Set an option to a custom environment to change width of a setheight Unicorn Meta Zoo #1: Why...

Combinatorics problem, right solution?

What's the difference between using dependency injection with a container and using a service locator?

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Does Mathematica have an implementation of the Poisson binomial distribution?

Raising a bilingual kid. When should we introduce the majority language?

How long after the last departure shall the airport stay open for an emergency return?

What is the term for a person whose job is to place products on shelves in stores?

Are there moral objections to a life motivated purely by money? How to sway a person from this lifestyle?

What *exactly* is electrical current, voltage, and resistance?

Will I lose my paid in full property

Has a Nobel Peace laureate ever been accused of war crimes?

`microtype`: Set Minimum Width of a Space

Why does Arg'[1. + I] return -0.5?

Mistake in years of experience in resume?

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

How to find if a column is referenced in a computed column?

How does the mezzoloth's teleportation work?

All ASCII characters with a given bit count

My admission is revoked after accepting the admission offer

Where was the County of Thurn und Taxis located?

Intern got a job offer for same salary than a long term team member

Co-worker works way more than he should

Multiple options vs single option UI

How to have a sharp product image?



Set an option to a custom environment to change width of a setheight



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow to force some of the code to be at a different placeSet strut heightSet Table height to fixed heightpgfplotstable column width & row heightHow to set fit height and width for tcbox according to the text inside?How to make a fixed height-width box with custom paddingLinebreak in raisebox-like environment + consistent height of table cellHow to change row height within xtable environment?calc-package prevents headheight to changeCustom built universal wrapfig using cutwinhow to set absolute tabular cell/row height and width












1















I'm tuning the code @CarLaTeX proposed in this topic to separate teacher version and student version.



The goal is when the boolean is true (student version), a blank line takes the place of the stuff. I'm sure it can be improved but it works for me.



Now, i'm convince that students need more space than what i can typeset (By example, demonstrations take often more place by hands than by computer) so i want to create an option for my command ProfPart who is a number and will multiply the value of theheightOfProfBox consequently.



At the moment i can't simply by hands multiply the size in the vspace so my hopes to make it an option seems like sweet dreams...



Someone could help me ?



Here is a MWE of what i have achieved untill now :



documentclass[11pt,a4paper]{report}
usepackage[latin1]{inputenc}

usepackage{lipsum}
usepackage{graphicx}
usepackage{mdframed}
usepackage{etoolbox}

newbool{studentversion}
setbool{studentversion}{true}%true for students' version

newlength{heightOfProfBox}
settoheight{heightOfProfBox}{0pt}

newcommand{ProfPart}[1]%
{%
ifbool{studentversion}%
{%%True (donc version pour étudiant)
settoheight{heightOfProfBox}{%
parbox{linewidth}{begin{mdframed}
textcolor{red}{#1}
end{mdframed}}}
vspace{theheightOfProfBox}%
}%
{%%False (donc version pour prof)
begin{mdframed}
textcolor{red}{#1}
end{mdframed}%
}
}


begin{document}
section{Section}
lipsum[1]
ProfPart{Stuff for teacher only. Access denied for students. Here are the answers to tests and exams.}
lipsum[2]
end{document}









share|improve this question



























    1















    I'm tuning the code @CarLaTeX proposed in this topic to separate teacher version and student version.



    The goal is when the boolean is true (student version), a blank line takes the place of the stuff. I'm sure it can be improved but it works for me.



    Now, i'm convince that students need more space than what i can typeset (By example, demonstrations take often more place by hands than by computer) so i want to create an option for my command ProfPart who is a number and will multiply the value of theheightOfProfBox consequently.



    At the moment i can't simply by hands multiply the size in the vspace so my hopes to make it an option seems like sweet dreams...



    Someone could help me ?



    Here is a MWE of what i have achieved untill now :



    documentclass[11pt,a4paper]{report}
    usepackage[latin1]{inputenc}

    usepackage{lipsum}
    usepackage{graphicx}
    usepackage{mdframed}
    usepackage{etoolbox}

    newbool{studentversion}
    setbool{studentversion}{true}%true for students' version

    newlength{heightOfProfBox}
    settoheight{heightOfProfBox}{0pt}

    newcommand{ProfPart}[1]%
    {%
    ifbool{studentversion}%
    {%%True (donc version pour étudiant)
    settoheight{heightOfProfBox}{%
    parbox{linewidth}{begin{mdframed}
    textcolor{red}{#1}
    end{mdframed}}}
    vspace{theheightOfProfBox}%
    }%
    {%%False (donc version pour prof)
    begin{mdframed}
    textcolor{red}{#1}
    end{mdframed}%
    }
    }


    begin{document}
    section{Section}
    lipsum[1]
    ProfPart{Stuff for teacher only. Access denied for students. Here are the answers to tests and exams.}
    lipsum[2]
    end{document}









    share|improve this question

























      1












      1








      1








      I'm tuning the code @CarLaTeX proposed in this topic to separate teacher version and student version.



      The goal is when the boolean is true (student version), a blank line takes the place of the stuff. I'm sure it can be improved but it works for me.



      Now, i'm convince that students need more space than what i can typeset (By example, demonstrations take often more place by hands than by computer) so i want to create an option for my command ProfPart who is a number and will multiply the value of theheightOfProfBox consequently.



      At the moment i can't simply by hands multiply the size in the vspace so my hopes to make it an option seems like sweet dreams...



      Someone could help me ?



      Here is a MWE of what i have achieved untill now :



      documentclass[11pt,a4paper]{report}
      usepackage[latin1]{inputenc}

      usepackage{lipsum}
      usepackage{graphicx}
      usepackage{mdframed}
      usepackage{etoolbox}

      newbool{studentversion}
      setbool{studentversion}{true}%true for students' version

      newlength{heightOfProfBox}
      settoheight{heightOfProfBox}{0pt}

      newcommand{ProfPart}[1]%
      {%
      ifbool{studentversion}%
      {%%True (donc version pour étudiant)
      settoheight{heightOfProfBox}{%
      parbox{linewidth}{begin{mdframed}
      textcolor{red}{#1}
      end{mdframed}}}
      vspace{theheightOfProfBox}%
      }%
      {%%False (donc version pour prof)
      begin{mdframed}
      textcolor{red}{#1}
      end{mdframed}%
      }
      }


      begin{document}
      section{Section}
      lipsum[1]
      ProfPart{Stuff for teacher only. Access denied for students. Here are the answers to tests and exams.}
      lipsum[2]
      end{document}









      share|improve this question














      I'm tuning the code @CarLaTeX proposed in this topic to separate teacher version and student version.



      The goal is when the boolean is true (student version), a blank line takes the place of the stuff. I'm sure it can be improved but it works for me.



      Now, i'm convince that students need more space than what i can typeset (By example, demonstrations take often more place by hands than by computer) so i want to create an option for my command ProfPart who is a number and will multiply the value of theheightOfProfBox consequently.



      At the moment i can't simply by hands multiply the size in the vspace so my hopes to make it an option seems like sweet dreams...



      Someone could help me ?



      Here is a MWE of what i have achieved untill now :



      documentclass[11pt,a4paper]{report}
      usepackage[latin1]{inputenc}

      usepackage{lipsum}
      usepackage{graphicx}
      usepackage{mdframed}
      usepackage{etoolbox}

      newbool{studentversion}
      setbool{studentversion}{true}%true for students' version

      newlength{heightOfProfBox}
      settoheight{heightOfProfBox}{0pt}

      newcommand{ProfPart}[1]%
      {%
      ifbool{studentversion}%
      {%%True (donc version pour étudiant)
      settoheight{heightOfProfBox}{%
      parbox{linewidth}{begin{mdframed}
      textcolor{red}{#1}
      end{mdframed}}}
      vspace{theheightOfProfBox}%
      }%
      {%%False (donc version pour prof)
      begin{mdframed}
      textcolor{red}{#1}
      end{mdframed}%
      }
      }


      begin{document}
      section{Section}
      lipsum[1]
      ProfPart{Stuff for teacher only. Access denied for students. Here are the answers to tests and exams.}
      lipsum[2]
      end{document}






      height calc






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 21 mins ago









      PirooohPiroooh

      15210




      15210






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487604%2fset-an-option-to-a-custom-environment-to-change-width-of-a-setheight%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487604%2fset-an-option-to-a-custom-environment-to-change-width-of-a-setheight%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

          How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

          Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...