Я пытаюсь набрать горизонтальную таблицу с автоматической нумерацией строк и поднумерацией столбцов. Я использовалэтот ответдля нумерации строк, но это дает мне только номера заголовков строк. Я бы хотел, чтобы столбцы имели соответствующие подномера для каждой строки (например, 1. заголовок строки 1a. примерно две строки из..., 1b. ..., 1c. ...). MWE сохраняет часть требуемого форматирования в качестве моего документа, поэтому некоторые элементы (например, таблица, расположенная сбоку) могут быть не нужны. Мои попытки привели к тому, что подсчет продолжался по строкам, а не получал подномера (например, я получаю 1. 2. 3. 4. по первой строке, а затем вторая строка начинается с 5.) Я новичок в LaTeX, и это мой первый пост, так что извините, если это очевидно или если я пропустил ответ где-то еще.
МВЭ:
\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}