Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the exam document class for an exam with a multiple choice section. To match the appearance of the scantron form, I'd like to use circled numbers in the choices and oneparchoices environments. I've got it working for the choices environment, but it's not working for the oneparchoices environment. Below is a minimal working example. Any suggestions?

\documentclass{exam}
\usepackage{pifont}
\renewcommand\choicelabel{\thechoice}
\renewcommand\choiceshook{
  \addtocounter{choice}{191} 
}
\renewcommand\thechoice{\ding{\arabic{choice}}}
\begin{document}
\begin{questions}

\question With the choices environment this
\begin{choices}
    \choice  does
    \CorrectChoice  work
    \choice nicely 
\end{choices}

\question With the oneparchoices environment this
    \begin{oneparchoices}
    \choice does 
    \CorrectChoice not      
    \choice work 
\end{oneparchoices}
\end{questions}
\end{document}
share|improve this question

2 Answers 2

up vote 7 down vote accepted

Using a slightly modified version of circled numbering presented in Good way to make \textcircled numbers?, here an alternative using tikz to circle the numbers, rather than pifont. The macro \circled encircles its argument with a 1pt separation:

enter image description here

\documentclass{exam}% http://ctan.org/pkg/exam
\usepackage{tikz}% http://ctan.org/pkg/pgf
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
            \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
\renewcommand\choicelabel{\circled{\thechoice}}
\renewcommand\thechoice{\arabic{choice}}%
\begin{document}
\begin{questions}

\question With the \texttt{choices} environment this
\begin{choices}
    \choice  does
    \CorrectChoice  work
    \choice nicely 
\end{choices}

\question With the \texttt{oneparchoices} environment this
    \begin{oneparchoices}
    \choice does 
    \CorrectChoice work      
    \choice nicely
\end{oneparchoices}
\end{questions}
\end{document}

The advantage here is that it allows for selection beyond 9 options. However, I'm not sure whether the scantron is limited to only 9 selections (1 through 9).

share|improve this answer
    
Thanks - I like this alternative also because the choices are more readable. –  Jason Nov 14 '11 at 3:25

The oneparchoices environment resets the choice counter to 0. Quick patch:

\usepackage{pifont,etoolbox}
\renewcommand\choicelabel{\thechoice}
\renewcommand\choiceshook{
  \addtocounter{choice}{191} 
}
\renewcommand\thechoice{\ding{\arabic{choice}}}
\patchcmd{\oneparchoices}{0}{191}{}{}

Thus, also the oneparchoices environment will start from 191 like choices. Unfortunately there's no \oneparchoiceshook, so a different path must be followed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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