Como numerar automaticamente linhas e colunas em uma tabela

Como numerar automaticamente linhas e colunas em uma tabela

Estou tentando compor uma tabela lateral com numeração automática nas linhas e subnumeração nas colunas. eu useiesta respostapara numerar as linhas, mas isso só me dá os números dos cabeçalhos das linhas. Gostaria que as colunas tivessem subnúmeros correspondentes a cada linha (por exemplo, 1. cabeçalho da linha 1a. aproximadamente duas linhas de..., 1b. ..., 1c. ...). O MWE mantém parte da formatação exigida do meu documento, portanto alguns elementos (como a tabela lateral) podem não ser necessários. Minhas tentativas resultaram na contagem contínua nas linhas, em vez de obter subnúmeros (por exemplo, recebo 1. 2. 3. 4. na primeira linha e a segunda linha começa em 5.) Sou novo no LaTeX e este é meu primeiro post, desculpe se isso é óbvio ou se perdi a resposta em outro lugar.

MWE:

\documentclass[11pt,a4paper,openright,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{rotating}

\renewcommand{\arraystretch}{1.5}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcounter{rowcount}
\setcounter{rowcount}{0}

\begin{document}
\begin{sidewaystable}
\centering
\caption{An Appropriate Table Title}
\small
\label{tab:valued_language_capabilities}
\begin{tabular}{@{\stepcounter{rowcount}\therowcount.\hspace*{\tabcolsep}}L{40mm}L{45mm}L{45mm}L{45mm}}
\multicolumn{1}{>{\makebox[3em][r]{}}l}{}   & column header & column header & column header\\
\hline
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
\hline
\end{tabular}
\end{sidewaystable}
\end{document}

Compila como:

Linhas numeradas, mas sem subnúmeros na linha em cada coluna

Responder1

Assim? (Eu costumava \hskipapenas reduzir o número de letras.)

\documentclass[11pt,a4paper,openright,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{rotating}

\renewcommand{\arraystretch}{1.5}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcounter{rowcount}
\setcounter{rowcount}{0}
\newcounter{colcount}[rowcount]% auto reset
\renewcommand{\thecolcount}{\therowcount\alph{colcount}}

\begin{document}
\begin{sidewaystable}
\centering
\caption{An Appropriate Table Title}
\small
\label{tab:valued_language_capabilities}
\begin{tabular}{@{\stepcounter{rowcount}\therowcount.\hskip\tabcolsep}L{40mm}
  @{\hskip\tabcolsep\stepcounter{colcount}\thecolcount\hskip\tabcolsep}L{45mm}
  @{\hskip\tabcolsep\stepcounter{colcount}\thecolcount\hskip\tabcolsep}L{45mm}
  @{\hskip\tabcolsep\stepcounter{colcount}\thecolcount\hskip\tabcolsep}L{45mm}}
\multicolumn{1}{>{\makebox[3em][r]{}}l}{}   & column header & column header & column header\\
\hline
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
row header  & approximately two lines of row subcontent & approximately two lines of row subcontent & approximately two lines of row subcontent\\
\hline
\end{tabular}
\end{sidewaystable}
\end{document}

informação relacionada