我有这个代码
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[margin=2.5cm]{geometry}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage[skip=0.33\baselineskip]{caption}
\captionsetup[table]{
font=bf,
size=normalsize,
justification=centerlast,
labelsep=newline
}
\renewcommand\thetable{\Roman{table}}
\begin{document}
\listoftables
\appendix
\vspace{5ex}
\section{Appendix}
\setcounter{table}{0}
\renewcommand{\thetable}{\Alph{section}.\Roman{table}}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l
S[table-format=-2.2]
*{6}{S}
}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\end{document}
产生这个输出
在我的报告中,附录中列出了大约 15 个表格(使用罗马数字)。我能够重置表格计数器并在表格编号中添加“A”。但是,当我添加多个表格时,表格列表中的表格编号和名称会重叠。
有人知道我如何使用类似于我现在使用的格式,但它不重叠吗?(抱歉以这种方式复制表格,否则我不知道如何显示表格列表。)提前谢谢您!
答案1
您可以重新定义\l@table
:
\makeatletter
\renewcommand*\l@table{\@dottedtocline{1}{1.5em}{3em}}
\makeatother
第一个长度(默认值:1.5em)是表格条目的缩进,第二个长度是表格编号的水平空间(默认值:2.3em)。因此,您必须调整\@dottedtocline
for的第三个参数\l@table
。
tocbasic
或者,您可以使用诸如tocloft
等的包。
包tocbasic
可以计算数字所需的水平空间:
\usepackage{tocbasic}
\DeclareTOCStyleEntry[dynnumwidth]{tocline}{table}
但请注意,此计算需要额外运行。