匹配问题

匹配问题

是否有一个标准包用于生成匹配问题,例如:将以下州与其首府匹配:

Michigan              Raleigh

North Carolina        Lansing

Minnesota             St.Paul  

答案1

也许这个用户定义的环境matchtabular可能就是您正在寻找的:

例子

\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}

相关内容