[Tex/LaTex] Enumerate over two columns in tabular environment

#enumeratetables

I can't seem to figure out the minute details needed to use enumerate inside a tabular environment. If I just sort of brute force the code I can get something similar to what I'm trying to achieve, but I'd much prefer somehow being able to use enumerate (or something similar) so I can be consistent. My "for the time being" code looks like:

\begin{tabular}{|p{8cm}p{8cm}|}
\hline
\multicolumn{2}{|c|}{Testing Modifications (highlight or circle)} \\
\hline
1. Time Limit Waved             & 2. On-Task Focusing Prompts \\
3. Exam/Sep Location            & 4. Waive Spelling Reqs \\
5. Questions Read Aloud     & 6. Revise Test Format \\
7. Answers Any Way              & 8. Revise Test Directions \\
9. Calc/Abacus Permitted  & 10. Breaks \\
\multicolumn{2}{|l|}{11. Other: \underline{\hspace{10cm}}} \\
\hline
\end{tabular}

Which gives me the output of:
enter image description here

Which isn't awful, but is still a little off (most notably the fact that the numbers are being left justified due to the tabular environment. I think there were some topics on here about how to have a specific column be able to allow enumerate, but so far I haven't seen anything about enumerate spanning two columns. Any help is appreciated!

Best Answer

One way to do it would be to use a custom counter. Below I have adapted the solution from a very similar question Making the table enumerated, which yields:

enter image description here

Notes:

  • I have used a \newcolumntype from the array package to define a P column type to simplify the use of the tabular environments in adding the labels:

      \newcolumntype{P}[1]{>{\AddLabel}p{#1}<{}}
    

    When a column of type P{} is used, the \AddLabel macro is invoked first, which increments the counter and automatically adds the counters value as a label before using the regular p{} column type.

  • \makebox is used to ensure that the labels are aligned to the right within a space equal to the width that would be required to typeset 99 (assuming that your max will be two digits.

  • When using the \multicolumn, you need to manually include \AddLabel to generate the label as needed.

  • At the start of any subsequent tables that use the P column type as defined here, one needs to reset the counter via \setcounter{Label}{0}. Otherwise a table following the one in this example would start the numbering from 12.

    If you are using this table numerous times in your document, the I would suggest either defining a custom environment, or perhaps redefining the \begin{tabular} environment to automatically reset this counter. See How can I center all tables in a document? for help with this if desired.

Code:

\documentclass{article}
\usepackage{array}%            \newcolumntype
\usepackage{calc}%             \widthof

\newcounter{Label}
\newcommand*{\AddLabel}{%
    \stepcounter{Label}%
    \makebox[\widthof{99}][r]{\arabic{Label}}.~%
}%

\newcolumntype{P}[1]{>{\AddLabel}p{#1}<{}}

\begin{document}
\setcounter{Label}{0}% Start at beginning (Really only needed for subsequent uses)
\begin{tabular}{|P{5cm}P{5cm}|}
\hline
\multicolumn{2}{|l|}{Testing Modifications (highlight or circle)} \\
\hline
Time Limit Waved         & On-Task Focusing Prompts \\
Exam/Sep Location        & Waive Spelling Reqs \\
Questions Read Aloud     & Revise Test Format \\
Answers Any Way          & Revise Test Directions \\
Calc/Abacus Permitted    & Breaks \\
\multicolumn{2}{|c|}{\AddLabel Other: \underline{\hspace{10cm}}} \\
\hline
\end{tabular}
\end{document}
Related Question