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:
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:
Notes:
I have used a
\newcolumntype
from thearray
package to define aP
column type to simplify the use of thetabular
environments in adding the labels: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 regularp{}
column type.\makebox
is used to ensure that the labels are aligned to ther
ight within a space equal to the width that would be required to typeset99
(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: