[OS X TeX] writing sty files

Alain Schremmer Schremmer.Alain at gmail.com
Wed Nov 22 19:26:25 CET 2006


Themis Matsoukas wrote:

> What I wanted to do was to include or exclude text from being printed 
> depending on a switch (for example, print problem statement and 
> solution, or only problem statement).

Here is what I do:

In preamble.sty

    \boolean{ExamWithSolutions}

In exam comment/uncomment

    \setboolean{ExamWithSolutions}{true}

and then

    "problem statement"

and then

    \ifthenelse{\boolean{ExamWithSolutions}}{"Solution" here}{Else}

By the way, I am using the above within probsoln—which I like very 
much—with Else = "multiple choices" so that I can print a "BlueBook 
Question", "BlueBook Question With Solution" and "Multiple-Choice Question".

Regards
--schremmer
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list