[texhax] How to construct options?
Chris Bergstresser
chris at subtlety.com
Mon Nov 21 05:03:12 CET 2005
Hi all --
I'm writing a package to handle questionnaires. The questionnaires
I write often come with different versions of the same question, so one
person might see "How much do you like pizza?" while someone else might
see "How much do you like ice cream?".
Ideally, I'd like to tag each question which varies with a code,
which might look something like this:
\question[s1]{How much do you like \variant{a}{pizza}\variant{b}{ice
cream}\variant{c}{hamburgers}}
This would allow me to put, at the start of the document, something
like:
\variants{s1-b,s2-a,s3-c}
which would allow me to select which variant to include. Or, if I
specified something like "s4-*" would allow me to print all the
variants, in different colors, for debugging.
Does anyone know how to accomplish something like this? It looks
like optional is close to what I want, but I can't seem to figure out
how to get it to work right.
-- Chris
More information about the texhax
mailing list