4

Is there a standard package for generating a matching question such as: Match the following states with its capitals:

Michigan              Raleigh

North Carolina        Lansing

Minnesota             St.Paul  
Willie Wong
  • 24,733
  • 8
  • 74
  • 106
ashpool
  • 1,361

1 Answers1

10

Maybe this user-defined environment matchtabular might be what you are looking for:

Example

\documentclass{article}

\usepackage{tabularx}

\newcounter{matchleft}
\newcounter{matchright}

\newenvironment{matchtabular}{%
  \setcounter{matchleft}{0}%
  \setcounter{matchright}{0}%
  \tabularx{\textwidth}{%
    >{\leavevmode\hbox to 1.5em{\stepcounter{matchleft}\arabic{matchleft}.}}X%
    >{\leavevmode\hbox to 1.5em{\stepcounter{matchright}\alph{matchright})}}X%
    }%
}{\endtabularx}

\begin{document}

\begin{matchtabular}
France & Washington DC \\ 
The United States of America & Berlin \\ 
The Czech Republic & Paris \\ 
Germany & Prague \\ 
\end{matchtabular}

\end{document}
yo'
  • 51,322