6

Let us consider The following example

\documentclass{article}
\usepackage{enumerate}
\begin{document}
\begin{enumerate}
 \item Which of the following numbers is the largest ?\\
$2^{3^4},2^{4^3},3^{2^4},3^{4^2},4^{2^3},4^{3^2}.$

\begin{enumerate}[(a)]
\item  $2^{3^4}$
\item  $3^{4^2}$
\item  $4^{3^2}$ 
\item $4^{2^3}$
\end{enumerate}

\end{enumerate}
\end{document}

This produces :

enter image description here

But I'd like to produce the following using the same package :
enter image description here

OR
enter image description here

OR
enter image description here

How can I do that?

  • have you seen Defining a list environment with multiple optional arguments it looks pretty relevant – cmhughes Apr 5 '13 at 3:07
  • 3
    I am sorry to bother you, but I noticed that even though you have received answers to your questions, you haven't up-voted or accepted any of them (upvoting and accepting are two different actions). Please consider revisiting your questions, upvoting good answers and, in each case, accepting the answer you consider best solved your problem. In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Apr 5 '13 at 3:29
4

You can use the multicol package:

\documentclass{article}
\usepackage{enumerate}
\usepackage{multicol}
\begin{document}
\begin{enumerate}
 \item Which of the following numbers is the largest?\\
$2^{3^4}$, $2^{4^3}$, $3^{2^4}$, $3^{4^2}$, $4^{2^3}$, $4^{3^2}$.

\begin{enumerate}[(a)]
\begin{multicols}{2}
\item  $2^{3^4}$
\item  $3^{4^2}$
\item  $4^{3^2}$ 
\item $4^{2^3}$
\end{multicols}
\end{enumerate}

\end{enumerate}
\end{document}

enter image description here

Here's another option, using this time the enumitem package and its inline option:

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate}
\item Which of the following numbers is the largest?\\
$2^{3^4}$, $2^{4^3}$, $3^{2^4}$, $3^{4^2}$, $4^{2^3}$, $4^{3^2}$.

\begin{enumerate*}[label=(\alph*),itemjoin={\hspace{\fill}}]
\item  $2^{3^4}$
\item  $3^{4^2}$
\item  $4^{3^2}$
\item $4^{2^3}$
\end{enumerate*}

\end{enumerate}
\end{document}

enter image description here

|improve this answer|||||
  • sorry,the last answer shows 4 errors one is given here :Environment enumerate* undefined.\begin{enumerate*}. I don't know what is this. – Soumitra Sen Apr 5 '13 at 3:26
  • 3
    @SoumitraSen This error indicates that you are using an outdated version of the enumitem package. Please update the package (or, even better, your LaTeX system). My second solution works with version 3.5.2 of the enumitem package. – Gonzalo Medina Apr 5 '13 at 3:30
1

This looks like an ideal task for tasks (here in combination with exsheets which as of May 2017 is superseded by xsim):

enter image description here

\documentclass{article}
\usepackage{exsheets}
% this sets up the question headings to be a simple run-in number:
\SetupExSheets{
  headings = runin-nr ,
  headings-format = \normalfont
}

\usepackage{tasks}
% this creates a new environment `choices' where the single
% choices are indicated with \choice and are labelled (a), (b), ...:
\NewTasks[counter-format=(tsk[a]),label-width=2em]{choices}[\choice]

\begin{document}
\begin{question}
  Which of the following numbers is the largest?\\
  $2^{3^4}$, $2^{4^3}$, $3^{2^4}$, $3^{4^2}$, $4^{2^3}$, $4^{3^2}$.
  \begin{choices}
    \choice $2^{3^4}$
    \choice $3^{4^2}$
    \choice $4^{3^2}$ 
    \choice $4^{2^3}$
  \end{choices}
\end{question}

\begin{question}
  Which of the following numbers is the largest?\\
  $2^{3^4}$, $2^{4^3}$, $3^{2^4}$, $3^{4^2}$, $4^{2^3}$, $4^{3^2}$.
  % the optional argument in parentheses determines the number of columns:
  \begin{choices}(2)
    \choice $2^{3^4}$
    \choice $3^{4^2}$
    \choice $4^{3^2}$ 
    \choice $4^{2^3}$
  \end{choices}
\end{question}

\begin{question}
  Which of the following numbers is the largest?\\
  $2^{3^4}$, $2^{4^3}$, $3^{2^4}$, $3^{4^2}$, $4^{2^3}$, $4^{3^2}$.
  \begin{choices}(4)
    \choice $2^{3^4}$
    \choice $3^{4^2}$
    \choice $4^{3^2}$ 
    \choice $4^{2^3}$
  \end{choices}
\end{question}

\end{document}
|improve this answer|||||
  • sorry, your answe shows the error : File 'exsheets.sty' not found.\SetupExsheets.Please, explain what is this. – Soumitra Sen Apr 5 '13 at 7:44
  • 4
    @SoumitraSen this means that your TeX distribution is to old and has èxsheets`not yet installed. You'd need to update your distribution – cgnieder Apr 5 '13 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.