Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How to write hidden notes in a LaTeX file?
Conditional typesetting / build

Is it possible to add a flag (variable) in my .tex file, so that I can switch among two modes: a light version and a full version?

The text which is supposed to be displayed in full mode could be wrapped in an environment:

... flag ...
\begin{fullmode}
...
\end{fullmode} 

So when flag is 0, the text wrapped in fullmode is hidden in the pdf file generated; while flag is 1, the text wrapped in fullmode is displayed ...

Does anyone know how to realize that?

share|improve this question
add comment

marked as duplicate by egreg, Harish Kumar, Marco Daniel, diabonas, Claudio Fiandrino Sep 30 '12 at 14:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 3 down vote accepted

You can use the versions package and use the commands \includeversion{fullmode} or \excludeversions{fullmode} in the preamble as your flag.

share|improve this answer
add comment

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