[OS X TeX] FAQ List Structure?

David Craig dac at panix.com
Thu Oct 13 22:45:37 CEST 2011


I need to create a FAQ-type document with a list of groups of questions linked to answers below (in the same document).    The question groups and questions need to be numbered.  Among other things, this means that the numbering in the list of questions needs to match the numbering in the answers, but the complete list of questions needs to PRECEED the complete list of answers.     It would be nice if the tex code could be such that the questions and answers could be entered together but typeset separately, something like a description environment but pairing the list of questions with a list of the questions/answers following:

\begin{FAQ}
\faqheading{here's heading 1}
\faqitem{Here's question 1a}{Here's answer to 1a}
\faqitem{Here's question 1b}{Here's answer to 1b}
\faqheading{here's heading 2}
\faqitem{Here's question 2a}{Here's answer to 2a}
...
\end{FAQ}

which typesets as

Heading 1
Q1a
  A1a
Q1b
  A1b
Heading 2
Q2a
  A2a

(and so on).   Option for choosing numbering scheme would be nice, but perhaps not essential.    Obviously, one would want to use hyperref to link questions to answers, and ideally, answer environment could have a automatic link back to the list of questions i.e. a boilerplate "Back to top" link after each answer.

I have thought of several ways to accomplish this, but they are all very kludgy indeed, given my skills.   I'm open to suggestions.   I haven't found any packages that, as far as I can tell, provide this kind of clean paired-list type of environment.

Thanks,
David Craig


<http://www.panix.com/~dac/>






More information about the macostex-archives mailing list