使用 endfloat 包但将附录保留在最后

使用 endfloat 包但将附录保留在最后

假设我有以下文章:

\documentclass[12pt]{article}
\usepackage[nolists, tabhead, fighead]{endfloat}
\begin{document}

\section{Section} This is the start of a section:

\begin{table}[htp]
    \caption{Table}
    \centering
\begin{tabular}{|c|c|c|c|}
    \hline 
    Test & Test & Test & Test\\ 
    \hline 
    Test & Test & Test & Test\\ 
    \hline 
\end{tabular} 

\end{table}

This is the start of another section:

\newpage
\section*{Appendix A: Construction of Index}

We construct the index from .........

\end{document}

我使用endfloat包,因此表格被推到末尾。但是,我希望附录位于表格之后的最后一页。有没有办法做到这一点并仍然使用endfloat包?

答案1

您可以使用\processdelayedfloats

\documentclass[12pt]{article}
\usepackage[nolists, tabhead, fighead]{endfloat}
\begin{document}

\section{Section} 

This is the start of a section.

\begin{table}[htp]
    \caption{Table}
    \centering
\begin{tabular}{|c|c|c|c|}
    \hline 
    Test & Test & Test & Test\\ 
    \hline 
    Test & Test & Test & Test\\ 
    \hline 
\end{tabular} 

\end{table}

This is the end of the section.

\clearpage % ensure all floats are processed
\processdelayedfloats
\clearpage

\section*{Appendix A: Construction of Index}

We construct the index from .........

\end{document}

相关内容