2

I'm using the examdesign template to create an exam for my students. I want to place extra choices in the matching section (i.e. decoys), but cannot figure out how, nor can I find any solution online. Any help would be appreciated. Thanks!

\begin{matching}[title={Matching}]
Match the following definitions with the listed terms.
\pair{Elvis Costello}{Spike}
\pair{Nirvana}{Nevermind}
%But how do I add "The Wall" as another choice?
1

This is what a sleepy mind can do.

\documentclass{examdesign}
\Fullpages

\makeatletter
\def\dpair#1{%
    \expandafter
  \xdef\csname sec\thesection @\thequestion @tag\endcsname{\thetemp}
  \expandafter
  \gdef\csname sec\thesection @qst\thequestion\endcsname{%
    \exam@PairA{\item[]\hskip-\leftmargin
      \ifanswer
      \makebox[\exam@MatchingLineLength][c]{\exam@GetMatchingAnswer}%
      \hskip\exam@MatchingLineAfterSkip
      \else
      \rule{\exam@MatchingLineLength}{0pt}%
      \hskip\exam@MatchingLineAfterSkip
      \fi}}
%        \stepcounter{question}
  \expandafter
  \xdef\csname sec\thesection @\thequestion @tag\endcsname{\thetemp}
  \expandafter
  \gdef\csname sec\thesection @qst\thequestion\endcsname{%
    \exam@PairB{\item\relax\exam@SaveMatchingAnswer #1}}
  \stepcounter{temp}
  \stepcounter{question}}
\makeatother
\begin{document}
  \begin{matching}[title={Matching}]
Match the following definitions with the listed terms.
\pair{Elvis Costello}{Spike}
\pair{Nirvana}{Nevermind}
\dpair{The wall}   %% don't use \dpair at the beginning but only at the end
\dpair{Rahul Dravid}   %% nick named The Wall
\end{matching}

\end{document}

enter image description here

  • This can be improved further but now time to sleep. – user11232 Sep 15 '15 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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