I'm currently wasting my time by trying to create a proof-of-concept class to show that writing our university's curricula with LaTeX instead of MS Word would have some benefits. Since these curricula are essentially legal documents, there already exists a template with some fixed wording, some options to choose from, and some space to insert material specific to that study programme (e.g. tables of mandatory courses). My idea is to prvide commands that specify comments (only to be shown in draft mode), examples to be replaced (otherwise throwing an error in final mode, so they are not overlooked), and so on. Most of these I can probably figure out by myself, but for one I don't have enough experience yet: I'd like a command or environment/list with the following properties.
- accepts a variable number of arguments or items (up to 4 mostly) with arbitrary contents (usually a sentence or paragraph, sometimes also a longtable or such)
- in draft mode prints out all arguments/items
- in final mode throws an error, unless one of the given options is selected (by an optional argument to the command/environment)
If there isn't already a package for this, I'm open to custom solutions or suggestions to achieve the same functionality with other means.
EDIT: Here is an example of such a command and an environment:
\choose[3]{Option A}{Option B}{Option C}
% in draft mode prints: Option A / Option B / Option C
% in final mode throws an error
\choose[2][3]{Option A}{Option B}{Option C}
% in either mode prints: Option B
\begin{select}
\item Paragraph A
\item Paragraph B
% ...
\item Paragraph Z
\end{select}
% in draft mode prints all paragraphs (with some separator in between)
% in final mode throws an error
\begin{select}[2]
\item Paragraph A
\item Paragraph B
% ...
\item Paragraph Z
\end{select}
% in either mode prints Paragraph B
syntax
– user31729 Apr 12 '15 at 20:12