Combinando o pacote Endfloat e um apêndice com numeração de figuras diferentes

Oct 12 2020

Tenho lutado com esse problema há algum tempo e consultei várias outras questões relacionadas aqui, sem sucesso.

Estou submetendo um artigo a um periódico utilizando o arquivo de classes de artigos, e figuras, tabelas, listas de figuras / tabelas devem ser fornecidas no final do texto. Normalmente, o pacote endfloat seria perfeito para isso, no entanto, tenho um ambiente de apêndices no final, incluindo figuras rotuladas A.1, A.2, etc. Quando eu uso endfloat, o prefixo A. para as figuras do apêndice é removido e eles são renomeados para seguir a lista de figuras no texto principal.

Essencialmente, preciso que o endfloat se comporte normalmente, mas relacione as figuras do apêndice com os números / letras das minhas figuras preferidas, em vez de anexá-las como Fig. 13, 14 etc. Isso é possível?

Exemplo básico de trabalho abaixo, com endfloat ativado e causando problemas:

\documentclass[authoryear,review]{elsarticle}

\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\usepackage{array}
\usepackage{booktabs}
\usepackage[nomarkers]{endfloat}
    \DeclareDelayedFloatFlavor{sidewaystable}{table}

\newcolumntype{C}{ >{\centering\arraybackslash} m{1cm} }

\begin{document}

\LipsumPar{1}

\begin{figure}[ht]
\centering
A FIGURE
\caption{First  figure}
\end{figure}

\LipsumPar{2}

\begin{figure}[ht]
\centering
ANOTHER FIGURE
\caption{Second figure}
\end{figure}

\begin{table}[ht]
\centering
\begin{tabular}{CCCCCCC} \toprule
1&2&3&4&5&6&7 \\ \bottomrule
\end{tabular}
\caption{A table}
\label{table}
\end{table}

\clearpage
\begin{appendices}
\renewcommand{\thefigure}{A\arabic{figure}}
\setcounter{figure}{0}

\appendixpage

\section{Appendix A}
\label{Appendix A}

\begin{figure}[ht]
\centering
APPENDIX FIGURE
\caption{Appendix figure 1}
\end{figure}

\begin{figure}[ht]
\centering
ANOTHER APPENDIX FIGURE
\caption{Appendix figure 2}
\end{figure}

\end{appendices}

\end{document}

Respostas

1 JohnKormylo Oct 12 2020 at 23:42

Pode-se usar \addtodelayedfloat{figure}{...}para adicionar comandos ao arquivo fff antes da próxima figura.

\documentclass[authoryear,review]{elsarticle}

\usepackage[titletoc]{appendix}
\usepackage{lipsum}
\usepackage{array}
\usepackage{booktabs}
\usepackage[nomarkers]{endfloat}
    \DeclareDelayedFloatFlavor{sidewaystable}{table}

\newcolumntype{C}{ >{\centering\arraybackslash} m{1cm} }

\begin{document}

\LipsumPar{1}

\begin{figure}[ht]
\centering
A FIGURE
\caption{First  figure}
\end{figure}

\LipsumPar{2}

\begin{figure}[ht]
\centering
ANOTHER FIGURE
\caption{Second figure}
\end{figure}

\begin{table}[ht]
\centering
\begin{tabular}{CCCCCCC} \toprule
1&2&3&4&5&6&7 \\ \bottomrule
\end{tabular}
\caption{A table}
\label{table}
\end{table}

\clearpage
\begin{appendices}
\addtodelayedfloat{figure}{\renewcommand{\thefigure}{A\arabic{figure}}%
  \setcounter{figure}{0}}%

\appendixpage

\section{Appendix A}
\label{Appendix A}

\begin{figure}[ht]
\centering
APPENDIX FIGURE
\caption{Appendix figure 1}
\end{figure}

\begin{figure}[ht]
\centering
ANOTHER APPENDIX FIGURE
\caption{Appendix figure 2}
\end{figure}

\end{appendices}

\end{document}