# [texhax] multiplechoice in LaTeX

Vafa Khalighi vafakhlgh at gmail.com
Sat Dec 25 03:11:12 CET 2010

I want to define a macro :

If  the length of all arguments 1 to 4 is less than 0.25\textwidth, then I
want to typeset that as

\begin{multicols}{4}

\begin{itemize}

\item[a)] #1

\item[b)] #2

\item[c)] #3

\item[d)] #4

\end{itemize}

\end{multicols}

if the length of one of the arguments from 1 to 4 is less than 0.5\textwidth
but greater than 0.25\textwidth provided the length of no arguments from 1
to 4 is greater than 0.5\textwidth, then I want to typeset this as:

\begin{multicols}{2}

\begin{itemize}

\item[a)] #1

\item[b)] #2

\item[c)] #3

\item[d)] #4

\end{itemize}

\end{multicols}

and finally if the length of any arguments from 1 to 4 is bigger than
\textwidth, then I just want to typeset this as:

\begin{itemize}

\item[a)] #1

\item[b)] #2

\item[c)] #3

\item[d)] #4

\end{itemize}

How could I do this?

Thanks

\begin{multicols}{1}

\begin{itemize}

\item[a)] #1

\item[b)] #2

\item[c)] #3

\item[d)] #4

\end{itemize}

\end{multicols}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20101225/2fe72767/attachment.html>