0

I use the Latex package mdframed to define "environments" containing headlines and text. However, I would like to add some personal notes which should not (!) be displayed, if a boolean variable is set to false. How can I achieve that?

2
  • 1
    What have you tried so far? Please add a MWE.
    – epR8GaYuh
    Jun 22, 2018 at 19:45
  • the stand art solutin wolul be to resort to any of tje usuall packages comment, version, or versions. You could also have a look to my answer to this post (tex.stackexchange.com/questions/437614) to stick with the "boolean variable"
    – Jhor
    Jun 23, 2018 at 16:58

1 Answer 1

0

This is how I did it, finally:

%% Define a boolean variable
\newif\ifDisplayToDos
\DisplayToDostrue   % display the toDo-environment 
%\DisplayToDosfalse % uncomment to hide the toDo-environment 

% This will be used below to define an empty environment via \NewEnviron
\usepackage{environ} 

% Depending on the boolean variable, I define the environment:
\ifDisplayToDos
  % define proper environment
  \newmdtheoremenv[backgroundcolor=red]{todo}{ToDo}[section]
\else
  % def. empty environment
  \NewEnviron{todo}{}
\fi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.