'enumerate' 패키지를 사용하여 다중 열 목록 환경을 만드는 방법은 무엇입니까?

'enumerate' 패키지를 사용하여 다중 열 목록 환경을 만드는 방법은 무엇입니까?

다음 예를 고려해 보겠습니다.

\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}

이는 다음을 생성합니다.

여기에 이미지 설명을 입력하세요

하지만 동일한 패키지를 사용하여 다음을 생성하고 싶습니다.
여기에 이미지 설명을 입력하세요

또는
여기에 이미지 설명을 입력하세요

또는
여기에 이미지 설명을 입력하세요

어떻게 해야 합니까?

답변1

당신은 사용할 수 있습니다multicol패키지:

\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}

여기에 이미지 설명을 입력하세요

또 다른 옵션이 있습니다. 이번에는enumitem패키지 및 inline옵션:

\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}

여기에 이미지 설명을 입력하세요

답변2

이것은 이상적인 작업처럼 보입니다.tasks(여기서는exsheets2017년 5월부터 다음으로 대체됩니다.xsim):

여기에 이미지 설명을 입력하세요

\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}

관련 정보