[横向き] 表の行と列に自動的に番号を付ける方法

[横向き] 表の行と列に自動的に番号を付ける方法

横向きの表を、行に自動番号付けし、列にサブ番号付けするタイプセットをしようとしています。この答え行に番号を付けようとしましたが、行ヘッダー番号しか取得されません。列には各行に対応するサブ番号を付けたいと思います (例: 1. 行ヘッダー 1a. 約 2 行の ...、1b. ...、1c. ...)。MWE はドキュメントとして必要な書式の一部を保持するため、一部の要素 (横向きの表など) は必要ない場合もあります。私の試みでは、サブ番号を取得するのではなく、行をまたいでカウントが継続されました (例: 最初の行に 1. 2. 3. 4. が付いて、2 行目は 5 から始まります)。私は LaTeX の初心者で、これが最初の投稿なので、これが明らかであったり、他の場所で回答を見逃していたり​​したら申し訳ありません。

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}

コンパイルすると次のようになります:

行番号は付いているが、各列の行全体にサブ番号は付いていない

答え1

こんな感じ?(\hskip文字数を減らすためだけに使用しました。)

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

関連情報