행에 자동으로 번호를 매기고 열에 하위 번호를 매기는 옆쪽 표를 조판하려고 합니다. 나는 사용했다이 답변행에 번호를 매기려고 했는데 행 머리글 번호만 가져왔습니다. 열의 각 행에 해당하는 하위 번호를 갖고 싶습니다(예: 1. 행 머리글 1a. 대략 두 행..., 1b...., 1c....). MWE는 내 문서에 필요한 형식 중 일부를 유지하므로 일부 요소(예: 옆으로 있는 테이블)가 필요하지 않을 수 있습니다. 내 시도로 인해 하위 숫자를 얻는 대신 행 전체에 걸쳐 계산이 계속되었습니다(예: 첫 번째 행에서 1. 2. 3. 4.를 얻은 다음 두 번째 행은 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}