[texhax] conditional macros
Barry Dale
barryd at mtechIT.com
Thu Apr 29 02:27:09 CEST 2004
I seem to recall a discussion on this list recently about printing
terms in text in bold the first time they are used in a document, then
in normal font after that. I think the solution involved ifthen
commands.
I have a similar situation. I use macros to insert boilerplate
responses to submitted questionaires. The macros can include graphics,
and can be used more than once. I would like the graphics to be
used only once (to save space and avoid multiple labels).
Is there a way to check if a macro has already been used, and
treat it differently on subsequent uses?
In other words, the macro \AnswerOne may be defined as:
\AnswerOne{%
text
text
\FigureOne{}
}%
so that \FigureOne is expanded the first time but empty on subsequent
uses.
I'm familiar with basic LaTeX, but I'm not a programmer, so the
ifthen documentation is a little daunting. Sorry if it seems obvious.
Many thanks
--
Barry Dale
Technical Writer
M-Tech Information Technology Inc.
http://mtechIT.com http://psynch.com http://idsynch.com
--------------------------------------------
More information about the texhax
mailing list