我正在使用 package.json 準備一些測試問題enumitem
。 MWE 我在這裡發現了 4 年前的問題並對其進行了稍微修改。
\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{multicol}
\newlist{choices}{enumerate}{1}
\setlist[choices]{label*=(\Alph*)}
\newcommand{\choice}{\item}
\SetEnumitemKey{twocol}{
before=\raggedcolumns\begin{multicols}{2},
after=\end{multicols}}
\SetEnumitemKey{threecol}{
before=\raggedcolumns\begin{multicols}{3},
after=\end{multicols}}
\begin{document}
Which fractions are reduced (one column)?
\begin{choices}
\choice long answer long answer long answer
\choice $\dfrac{8}{24}$
\choice $\dfrac{44}{121}$
\choice $\dfrac{9}{11}$
\end{choices}
Which fractions are reduced (two columns)?
\begin{choices}[twocol]
\choice long answer long answer long answer
\choice $\dfrac{8}{24}$
\choice $\dfrac{44}{121}$
\choice $\dfrac{9}{11}$
\end{choices}
Which fractions are reduced (three columns)?
\begin{choices}[threecol]
\choice long answer long answer long answer
\choice $\dfrac{8}{24}$
\choice $\dfrac{44}{121}$
\end{choices}
\end{document}
我的問題是 - 如何獲得合適寬度的列?長長的答案不應該被打破。我已經閱讀了手冊enumitem
,仍然沒有任何想法。請問,有什麼建議嗎?