我尝试在表格标题中使用枚举。但是,当我稍后尝试使用 引用它时,这会弄乱表格的标签autoref
。请参见下图和示例文档。
\documentclass{article}
\usepackage{plex-otf}
\usepackage{booktabs}
\usepackage[inline]{enumitem}
\usepackage[colorlinks]{hyperref}
\begin{document}
\title{Caption Enumerations and Labels}
\maketitle
\begin{table}[h]
% TOC title is mandatory, or compilation breaks?
%\caption{Here is a table showing stuff, with an enum in caption:
\caption[TOC caption]{Here is a table showing stuff, with an enum in caption:
\begin{enumerate*}[label=\itshape\alph*\upshape.]
\item first item,
\item second item,
\item third item.
\end{enumerate*}
}
\label{tab:second}
\centering
\begin{tabular}{ccc}
first & second & third \\
\toprule
1 & 2 & 3 \\
\end{tabular}
\end{table}
\section{Incorrect Label}
Here's a reference to the table: \autoref{tab:second}
\end{document}
有没有办法在caption
括号关闭后恢复正确的标签,以便autoref
产生表格引用?
请注意,产生的数字autoref
是正确的,而不是由前面的枚举挑选的数字。