1

I am typing multiple choice problems like the following with the "article" class:

enter image description here

A quick search on Google returns something related to the "exam" class. I have also played around with \enumerate and \itemize a bit. I can only get the following

\documentclass{article}
\newcounter{choice}
\renewcommand\thechoice{\Alph{choice}}
\newcommand\choicelabel{(\thechoice)}

\newenvironment{choices}%
{\list{\choicelabel}%
    {\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%
        \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 0em}%
        \def\choice{%
            \item
        } % choice
        \labelwidth\leftmargin\advance\labelwidth-\labelsep
        \topsep=0pt
        \partopsep=0pt
    }%
}%
{\endlist}

\begin{document}
    \section*{No. 2-1}
    \subsection*{Section A}
    In humans, the pilomotor reflex leads to the response commonly known as goose bumps, and this response is widely considered to be vestigial—that is, something formerly having a greater physiological advantage than at present. It occurs when the
Line tiny muscle at the base of a hair follicle contracts, pulling the hair upright. In animals  with feathers, fur, or quills, this creates a layer of insulating warm air or a reason for predators to think twice before attacking. But human hair is too puny to serve these
functions. Goose bumps in humans may, however, have acquired a new role. Like flushing—another thermoregulatory (heat-regulating) mechanism—goose bumps have become linked with emotional responses, notably fear, rage, or the pleasure of, say,
 listening to beautiful music. They may thus serve as a signal to others.

\begin{enumerate} 
        \item The author claims that most studies of folktales told by Afro-American slaves are inadequate because the studies
        \begin{choices}
            \choice George
            \choice Paul
            \choice John
            \choice Ringo
            \choice Socrates
        \end{choices}
        \item What was the color of George Washinton's white horse?
        \begin{choices}
            \choice George
            \choice Paul
            \choice John
            \choice Ringo
            \choice Socrates
        \end{choices}
\end{enumerate}

\end{document}

which gives

enter image description here

  • How can I get the same alignment for the question labels and choice labels as indicated in the scanned picture above? [Edited to make question clearer:] How can I get rid of the indent before the question labels so that I would get the same layout as in the first image?
  • How can I put an oval around the labels? [Added: I'm particularly interested in getting the exact same size ovals as shown in the first image.]

2 Answers2

5

It is rather difficult to measure an size from a screenshot.

\documentclass{article}
\usepackage{enumitem,tikz}
\usetikzlibrary{shapes}
\setlist[enumerate,1]{align=left}
\newlist{choices}{enumerate}{2}
\setlist[choices]{label=\Alph*,format=\ovalnode,align=left}
\newcommand\ovalnode[1]{%
  \tikz[baseline=(oval.base)]\node[draw,ellipse,inner ysep=0pt,inner xsep=1pt](oval){\makebox[0.8em]{#1\vphantom{A}}};}
\let\choice\item

\begin{document}
    \section*{No. 2-1}
    \subsection*{Section A}
    In humans, the pilomotor reflex leads to the response commonly known as goose bumps, and this response is widely considered to be vestigial—that is, something formerly having a greater physiological advantage than at present. It occurs when the
Line tiny muscle at the base of a hair follicle contracts, pulling the hair upright. In animals  with feathers, fur, or quills, this creates a layer of insulating warm air or a reason for predators to think twice before attacking. But human hair is too puny to serve these
functions. Goose bumps in humans may, however, have acquired a new role. Like flushing—another thermoregulatory (heat-regulating) mechanism—goose bumps have become linked with emotional responses, notably fear, rage, or the pleasure of, say,
 listening to beautiful music. They may thus serve as a signal to others.

\begin{enumerate}
        \item The author claims that most studies of folktales told by Afro-American slaves are inadequate because the studies
        \begin{choices}
            \choice George
            \choice Paul
            \choice John
            \choice Ringo
            \choice Socrates
        \end{choices}
        \item What was the color of George Washinton's white horse?
        \begin{choices}
            \choice George
            \choice Paul
            \choice John
            \choice Ringo
            \choice Socrates
        \end{choices}
\end{enumerate}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
0

This code should do what you want:

\usepackage{enumitem}
..........
\begin{document}
..........
\begin{enumerate}[wide=0pt, leftmargin=*]
..........
Bernard
  • 271,350
  • Thank you for your answer. How would you put an oval around A,B,C,D,E as the first image shows? –  Apr 04 '17 at 18:38