Hello everyone,
I am typesetting a class for generating tests, and I would like to auto-generate an answer key at the end. I find that the syntax for \addcontentsline{}{}{} would work perfect for me, as I can just embed it directly into my question macro without any serious finagling and I have a counter for it set up already.
My question is, how do I go about defining a \answerkey macro, and a correct list so that I can just type something like \addcontentsline{ans}{\arabic{Qcount}}{#3} ? I assume that I would have to deal with some file I/O in latex, but it would be helpful if this stuff has already been defined; in particular, things like \@starttoc{}. Any sort of direction would be appreciated. Thanks!
General ⇒ Generating data similar to \toc or \lof
NEW: TikZ book now 40% off at Amazon.com for a short time.