Conditioning


Table of Contents

Conditional text in LaTeX?? 
Conditional Statement (Solution for including full latex files) 
Command to include text on first usage only 
Command to include text on first usage only 

Conditional text in LaTeX?? 

Newsgroups: comp.text.tex
Date: 1995/04/11

http://groups.google.com/groups?hl=en&selm=95101.131720BAV2%40psuvm.psu.edu

>Is there a macro package which will work with LaTeX to allow
>conditionally included text in a LaTeX document?  Or ...

The ifthen package does this. Include in your file the line

\usepackage{ifthen}

Then set your variable to true or false by

\newcommand{\condition}{true} or \newcommand{\condition}{false}.

Then you can use the following statement:

\ifthenelse{\equal{\condition}{true}}{
    blah-blah %this is printed iff \condition is set to true
}
{
    another blah-blah %this is printed otherwise
}

Boris