Could someone please share a working example of using the matching environment in a document class exam. I am new to using the exam document class and am unable to find a way to set up the matching style. I found exactly what I wanted in a document written in 2001, but cannot make it work in the new class. Here is what I have so far.

% other information

%exam header information

\begin{matching}[title={Match the following terms}]
    \pair{Field 1}{answer for 1}
    \pair{Field 2}{answer for 2}
    \pair{Field 3}{answer for 3}




2 Answers 2


Here is the way I did it. I just used the tabular environment within the questions environment. The points can be counted with the question, but I do not have the solution print for this question. The macro \midmatch just puts in a line before each entry in the right column for the student to write the answer.

\newcommand{\midmatch}{\hspace{0.75in}\underline{\hspace{0.5in}     }}

Then, after the \begin{document}, within the questions environment:

Match the property of matter from the left column with the appropriate measurement device or technique on the right.
a.  &   Temperature &   \midmatch   &   Thermometer\\
b.  &   Pressure    &   \midmatch   &   Graduated Cylinder\\
c.  &   Length      &   \midmatch   &   Spectrometer\\
d.  &   Volume      &   \midmatch   &   Ruler\\
e.  &   Color       &   \midmatch   &   Manometer



This answer may be helpful to you. Here's another that may give you some ideas but it does not use the exam class.

Here's my custom matching environment, based on this answer.




%% Create a Matching question format



\fullwidth{Match the \emph{most appropriate} term to each concept.  Not all terms are used. No term is used twice. (2 points each)}
Match 1 \\
Match 2 \\
Match 3 \\
Match 4 \\
Match 5 \\
Match 6 


\question\MatchQuestion{Match 3}{Which answer qoes with this question?}

\question\MatchQuestion{Match 5}{Which answer qoes with this question?}

\question\MatchQuestion{Match 2}{Which answer qoes with this question?}



Blank lines are printed for the exams.

enter image description here

Answers are printed when \printanswers is uncommented.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .