1

I know there are several latex packages like exsheets can make choice problems, but I like to use multicol and enumitem packages to make them. My little example is as follows:

\documentclass{article}

\usepackage{amsmath,amssymb,amsthm} \newtheorem{ex}{Exercise}

\usepackage[shortlabels]{enumitem} \setenumerate{nolistsep}

\usepackage{multicol} \setlength\multicolsep{0pt}

\begin{document}

\section{Choices}

\begin{ex} Which letter is a vowel? \begin{multicols}{4} \begin{enumerate}[(A)] \item a \item b \item c \item d \end{enumerate} \end{multicols} \end{ex}

\begin{ex} Which animal is the best? \begin{multicols}{2} \begin{enumerate}[(A)] \item cats \item dogs \item horses \item cows \end{enumerate} \end{multicols} \end{ex}

\begin{ex} Which mathematical formula do you prefer? %\begin{multicols}{1} \begin{enumerate}[(A)] \item The minimal surface equation \item The Callan-Symanzik equation \item Euler's Identity \item Euler-Lagrange equations and Noether's theorem \end{enumerate} %\end{multicols} \end{ex}

\end{document}

Since \begin{multicols}{1} is not supported by multicol package, one can just comment it and \end{multicols} to get the goals. However, if I want to make multicol compatible with one column, then what should I do? Btw, I also note that in here there is a little complex solution can make it. Does there exist a simpler way?

  • 1
    What's the actual problem with just leaving out the multicols environment when you want a single column? Are you trying to define a custom command that takes the number of columns as an argument? I think that could be solved other ways. – frabjous Jun 19 '22 at 16:12

0 Answers0