endfloat: 每章末尾的表格和图片列表

endfloat: 每章末尾的表格和图片列表

我怎样才能在每一章之后放置一个表格和图表列表,而不是只在文档末尾放置一次?

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{pdflscape}

\usepackage{endfloat}

\renewcommand{\theposttable}{\Roman{posttbl}}
\renewcommand{\thepostfigure}{\Roman{postfig}}
\renewcommand{\thefigure}{\Roman{figure}}
\renewcommand{\thetable}{\Roman{table}}

% new environment for landscape tables    
\newenvironment{ltable}
  {\begin{landscape}\begin{table}}
  {\end{table}\end{landscape}}

% make it known to endfloat
\DeclareDelayedFloatFlavor{ltable}{table}

\begin{document}

\chapter{This is Chapter 1}
Some text in chapter 1.  See my figure \ref{tab:table1}.

\begin{table}
\caption{First Table} \label{tab:table1}
\end{table}

\chapter{This is Chapter 2}
Some text in chapter 2.  See my figure \ref{tab:table2}.

\begin{ltable}
\caption{First Table} \label{tab:table2}
\end{ltable}

\end{document}

答案1

使用titletoc生成部分 LoF 的包:

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{pdflscape}
\usepackage[notablist]{endfloat}
\usepackage{titletoc}

\renewcommand{\theposttable}{\Roman{posttbl}}
\renewcommand{\thepostfigure}{\Roman{postfig}}
\renewcommand{\thefigure}{\Roman{figure}}
\renewcommand{\thetable}{\Roman{table}}

% new environment for landscape tables    
\newenvironment{ltable}
  {\begin{landscape}\begin{table}}
  {\end{table}\end{landscape}}

% make it known to endfloat
\DeclareDelayedFloatFlavor{ltable}{table}

\begin{document}

\chapter{This is Chapter 1}
\startlist{lot}
Some text in chapter 1.  See my figure \ref{tab:table1}.

\begin{table}
\caption{First Table} \label{tab:table1}
\end{table}

\begin{table}
\caption{Second Table} \label{tab:table2}
\end{table}

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

\chapter{This is Chapter 2}
\startlist{lot}
Some text in chapter 2.  See my figure \ref{tab:table2}.

\begin{ltable}
\caption{Third Table} \label{tab:table3}
\end{ltable}

\begin{ltable}
\caption{Fourth Table} \label{tab:table4}
\end{ltable}

\begin{ltable}
\caption{Fifth Table} \label{tab:table5}
\end{ltable}

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

\end{document}

部分列表图片:

在此处输入图片描述

在此处输入图片描述

每章之后使用,\startlist{lof}每章末尾使用

\printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}
\processdelayedfloats

相关内容