[OS X TeX] OT-latex file management

Jack Skoda jskoda at mac.com
Thu Apr 29 11:03:53 EDT 2004


On Apr 29, 2004, at 4:16, Ross Moore wrote:

> \newcommand{\showQuestion}[5]{%
>   \typeout{Question #1:#2  \string#3\empty}}%
>

Oh! Wow! Yeah!

  This bit of code jogged my rusty innards... how about
the exam class?  You could use an external database
to store questions in the exam class format:

% Fill in the blank
\begin{question}
\answer{John P. Holland} designed and built the first submarine
purchased the by the U.S. Navy.
\end{question}

% Multiple choice question
\begin{question}
Unreliable (meaning not acknowledged) connectionless service is often 
called:
         \choice[!]{datagram service}
         \choice{quality of service}
         \choice{single point of failure}
         \choice{10base2}
         \end{question}

And then build your exam with a few perl script, SQL queries, or
FileMaker reports.  You could have a skeleton
that lays out the sections of the test.

\documentclass[12pt]{exam}

\OneKey
\NumberOfVersions{1}
\ProportionalBlanks{3}
\class{Computer Networks (CIS2151)}
\examname{Exam \#1} %REPLACE FOO WITH REAL NUMBER!
\def\namedata{Name: \hrulefill \\
Date: \hrulefill }

\begin{document}
\begin{fillin}[title={Fill in the blank (1 pt each)}]
   \input{fillin.report.output.txt}
   \end{fillin}

\begin{truefalse}[title={True or False questions (1 pt each)}]
   \input{t-f.report.output.txt}
   \end{truefalse}

\begin{multiplechoice}[title={Multiple choice (2 pts each)}]
	\input{mc.output.txt}
	\end{multiplechoice}
\end{document}


-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list