1

I want to enumerated each row in table, but with varying enumeration of items in each cell, appearing like this in an automatic way:

\begin{tabular}{|c|c|c|c|c|c|}
    \hline
    Col 0 & Col 1 & Col 2 & Col 3 & Col 4 & Col 5\\
    \hline 
    a) & ... & ... & ... & ... & ... \\ 
    \hline 
    b) & ... & ... & ... & ... & ... \\
    \hline 
    c) & ... & ... & ... & ... & ... \\ 
                   .
                   .
                   .
\end{tabular}

I tried to use the answer for this question replacing a) with \begin{enumerate}[series=table] \item \end{enumerate} and then resume but didn't work.

1 Answers1

3

Here is a simple code:

    \documentclass{article}
     \usepackage{array}
     \setlength{\extrarowheight}{2pt}
    \newcounter{rowcount}

    \begin{document}

    \begin{tabular}{|>{\stepcounter{rowcount}\alph{rowcount})}c@{}*{5}{c|}}
    \cline{2-6}
       \multicolumn{1}{c}{} & \multicolumn{1}{|c}{Col 1 }& Col 2 & Col 3 & Col 4 & Col 5\\
       \noalign{\setco

unter{rowcount}{0}} \hline
    & blah & blah & blah & blah & blah \\
    \hline
    & ... & ... & ... & ... & ... \\
    \hline
      & ... & ... & ... & ... & ... \\
    \hline
    \end{tabular}
    \bigskip

    \begin{tabular}{|>{\stepcounter{rowcount}\alph{rowcount})}c@{}*{5}{c|}}
    \cline{2-6}
   \multicolumn{1}{c}{} & \multicolumn{1}{|c}{Col 1} & Col 2 & Col 3 & Col 4 & Col 5\\
   \noalign{\setcounter{rowcount}{0}} \hline
    & blah & blah & blah & blah & blah \\
    \hline
    & ... & ... & ... & ... & ... \\
    \hline
          & ... & ... & ... & ... & ... \\
    \hline
    \end{tabular}

    \end{document} 

enter image description here

Bernard
  • 271,350