[texhax] multiplechoice in LaTeX
Cong Ding
dingcongcs at gmail.com
Sat Dec 25 21:51:13 CET 2010
just do it
On Sat, Dec 25, 2010 at 03:11, Vafa Khalighi <vafakhlgh at gmail.com> wrote:
> I want to define a macro :
>
> \newcommand\answer[4]{.....}
>
> 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}
>
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
--
Cong Ding
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20101225/045224ea/attachment-0001.html>
More information about the texhax
mailing list