0

I've been struggling with this issue a while, and I've looked at several other related questions on here to no avail.

I'm submitting an article to a journal using the elsarticle class file, and figures, tables, figure/table lists must be provided at the end of the text. Normally the endfloat package would be perfect for this, however I have an appendices environment at the end, including figures labelled A.1, A.2, etc. When I use endfloat, the A. prefix to the appendix figures is removed and they are relabelled to follow the figure list in the main text.

Essentially I need endfloat to behave as normal, but to list the appendix figures with my preferred figure numbers/letters rather than tacking them on as Fig. 13, 14 etc. Is this doable?

Basic working example below, with endfloat enabled and causing trouble:

\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}
1
  • The redefinition of \thefigure is lost when the appendices environment ends. You could put it into each figure (when used) instead. – John Kormylo Oct 12 '20 at 16:07
0

One can use \addtodelayedfloat{figure}{...} to add commands to the fff file before the next figure.

\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}
1
  • This is simple and solves the problem perfectly, thank you! – geolguy Oct 13 '20 at 2:54
-1

The suggest solution works only when there are no markers. However, if you activate markers, they say [Insert figure 3 about here] instead of [insert figure A1 about here]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.