I want to produce two versions of one document with different content. The idea is to comment out certain sections if a logical variable is false. This logical variable will be inputted eventually through an argument to a package. My difficulty is that my code either does not work or it ignores boolean variable. Here is sample code which does not work. Error is "missing number treated as zero"
\usepackage{ifthen,comment}
\newboolean{iflecturer}
\newenvironment{myitemize}
{\ifthenelse{iflecturer}
{\begin{itemize}}{\begin{comment}}
}
{\ifthenelse{iflecturer}
{\end{itemize}}{\end{comment}}
}
\begin{document}
\setboolean{iflecturer}{true}% \setboolean{iflecturer}{false}
\begin{myitemize}
\item Monday
\item Tuesday
\item Wednesday
\end{myitemize}
\end{document}
\begin{comment}
begins a comment in the definition, it is not seen as then part of the if then. – Guido Oct 3 '14 at 8:07\ifthenelse{\boolean{lecturer}}{true}{false}
; but\begin{comment}
cannot be used in the definition of an environment anyway. – egreg Oct 3 '14 at 8:45