Hello latex-community,
Is there any possibilities to manage the compilation of tex file? Depending on some conditions some parts of tex file are compiled and some parts are not, i.e.
condition1
Hello,
%
condition2
World!
If both condition1 and condition2 are true, then the output will be "Hello, World!". Otherwise, if condition1 is false and condition2 is true, then output is "World" etc.
Thank you in advance!
General ⇒ managed compilation
NEW: TikZ book now 40% off at Amazon.com for a short time.
managed compilation
Code: Select all
\newif\ifcondition
\conditiontrue
\ifcondition
this will appear in your document
\fi
\conditionfalse
\ifcondition
this won't appear in your document
\fi
Tomek
managed compilation
Also consider the ifthen package and/or the comment package.
- ifthen provides a flexible and easy-to-use way of adding conditional statements to your LaTeX. Its approach is more LaTeX'y than standard TeX if constructs. Additionally, it gives you other tools to make construction of these statements easier.
- comment lets you define a slew of environments that can each be turned on and off at build time.