TCL <***@cox.net> wrote:
: On May 14, 2:50 am, José Carlos Santos <***@fc.up.pt> wrote:
: > On 13-05-2010 23:56, TCL wrote:
: >
: > > I installed the package. But what is the command? The command I show
: > > above \begin{enumerate}[random]
: > > does not work.
: >
: > Try this:
: >
: > \documentclass{article}
: > \usepackage[first=1,last=6]{lcg}
: > \begin{document}
: > \begin{enumerate}
: > \item[\rand\arabic{rand}.] Something
: > \item[\rand\arabic{rand}.] Something else
: > \item[\rand\arabic{rand}.] And still something else
: > \end{enumerate}
: > \end{document}
: >
: > Best regards,
: >
: > Jose Carlos Santos
: This does not work. The result it produces is a random order of the
: number but not the content of the number: e.g. 5. Something 1.
: Something else 2. And still something else
: What one intended should be e.g. 1. Something else 2. And still
: something else 3. Something
Hi,
I just think of a possible solution which helps you randomize the
/order/ of your items rather than their enumeration.
The following code is untested and certainly contains errors, but
perhaps you get the idea.
You should separate answers and numbering. Store the answers in a
structure separate from your itemized list.
\documentclass{article}
\usepackage[first=1,last=5]{lcg}
\newcommand{\MyChoice}[1]{\ifcase #1
\or Some item
\or Another item
\or Yet another item
\or Again another item
\or A fifth item
\fi}
\begin{document}
\begin{enumerate}
\item \MyChoice{\rand\arabic{rand}}
\item \MyChoice{\rand\arabic{rand}}
\item \MyChoice{\rand\arabic{rand}}
\item \MyChoice{\rand\arabic{rand}}
\item \MyChoice{\rand\arabic{rand}}
\end{enumerate}
\end{document}
For more multiple-choice questions, you can \renewcommand{\MyChoice}.
Hth,
Oliver.
--
Dr. Oliver Corff e-mail: ***@zedat.fu-berlin.de