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?
1 Answer
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
comment
,version
, orversions
. You could also have a look to my answer to this post (tex.stackexchange.com/questions/437614) to stick with the "boolean variable"