我对以下 MWE 做错了什么?编号不正确,并且由于某种原因,应该列在第 2 章末尾的表格列在第 1 章末尾。
我需要为所有表格添加阿拉伯数字编号(即使在 Endfloat 标记中也是如此)。我想在每章末尾打印图表列表。
\documentclass[oneside,12pt]{book}
\usepackage[tablesfirst]{endfloat}
\usepackage{titletoc}
\begin{document}
\renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}}
\renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}}
\chapter{Data}
\startlist{lot}
\begin{table}
\caption{Data chapter table}
\begin{tabular}{c}
123 \\
\end{tabular}
\end{table}
\processdelayedfloats
\chapter{Learning}
\startlist{lot}
\begin{table}
\caption{Learning chapter table}
\begin{tabular}{c}
123 \\
\end{tabular}
\end{table}
\processdelayedfloats
\end{document}
答案1
传递该notablist
选项,这样就不会打印一般的 LoT,而是用来\printlist
排版部分 LoT:
\documentclass[oneside,12pt]{book}
\usepackage[tablesfirst,notablist]{endfloat}
\usepackage{titletoc}
\renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}}
\renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}}
\begin{document}
\chapter{Data}
\startlist{lot}
\begin{table}
\caption{Data chapter table}
\begin{tabular}{c}
123 \\
\end{tabular}
\end{table}
\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats
\chapter{Learning}
\startlist{lot}
\begin{table}
\caption{Learning chapter table}
\begin{tabular}{c}
123 \\
\end{tabular}
\end{table}
\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats
\end{document}