# Captions at the End and No Figures/Tables

Is there a way to place all figure and table captions at the end of the PDF without displaying the figures and tables? The following command places all figures and their captions at the end, but I'd like to prevent displaying the figures.

\usepackage[figuresonly,nolists,nomarkers]{endfloat}


In addition, is possible to list all the captions without issuing a \newpage between them?

• Do you mean that you want the figures (with their captions) at the normal place in the text, and then the captions again at the end of the document? Or do you want to separate the captions completely from the figures (which would be quite odd, I think)? – Pieter van Oostrum Dec 12 '16 at 16:40
• it sounds like this is a request from a journal to which you are submitting an article for publication. that would be a useful bit of information to include in the question. (there are at least two other questions here on that topic -- Splitting figures/tables into separate files and journal specification for figures and figure captions -- unfortunately, they both suggest only endfloat, which you've already discovered.) – barbara beeton Dec 12 '16 at 16:56
• @PietvanOostrum: Yes, this is an odd question based on an odd requirement for an accepted paper in a journal. The request is that the PDF has NO figures/tables, and that the captions are placed at the end of the PDF. – Bruno Dec 12 '16 at 18:56
• @barbarabeeton: Exactly. My paper only has figures as floats (no tables). With endfloat, I'm able to place figures and captions at the end, but I'd like to remove the figures and still have the references to them in the text. – Bruno Dec 12 '16 at 18:59

There are a number of things to do here. \AtBeginDelayedFloats would be where you can adjust some of the processing. This would include:

• \renewcommand{\includegraphics}[2][]{}

This removes the functionality of the \includegraphics command.

• \renewcommand{\resizebox}[3]{}

This removes the functionality of the \resizebox command (if you're using it to resize tables or images.

• \RenewEnviron{tabular}[2][]{}

This gobbles the tabular environment and its contents.

Additionally, you'll have to increase the totalnumber counter (and perhaps topnumber and bottomnumber) to allow for more floats on a page.

\documentclass{article}

\usepackage{graphicx,lipsum,environ}
\usepackage[nolists,nomarkers]{endfloat}

\AtBeginDelayedFloats{%
\renewcommand{\includegraphics}[2][]{}% Remove \includegraphics functionality
\renewcommand{\resizebox}[3]{}% Remove \resizebox functionality
\RenewEnviron{tabular}[2][]{}% Gobble tabular environment
}
\setcounter{totalnumber}{10}% Allow up to 10 floats per page
\renewcommand{\efloatseparator}{\mbox{}}% From the documentation

\begin{document}

\section{First section}
\lipsum[1-10]
\begin{figure}[ht]
\centering
\includegraphics[width=100pt]{example-image}
\caption{A figure}
\end{figure}
\lipsum[11-20]
\begin{table}[ht]
\centering
\begin{tabular}{ *{4}{c} }
A & B & C & D \\ 1 & 2 & 3 & 4
\end{tabular}
\caption{A table}
\end{table}

\section{Second section}
\lipsum[1-10]
\begin{figure}[ht]
\centering
\includegraphics[width=100pt]{example-image}
\caption{A figure}
\end{figure}
\lipsum[11-20]
\begin{table}[ht]
\centering
\begin{tabular}{ *{4}{c} }
A & B & C & D \\ 1 & 2 & 3 & 4
\end{tabular}
\caption{A table}
\end{table}

\section{Third section}
\lipsum[1-10]
\begin{figure}[ht]
\centering
\includegraphics[width=100pt]{example-image}
\caption{A figure}
\end{figure}
\lipsum[11-20]
\begin{table}[ht]
\centering
\begin{tabular}{ *{4}{c} }
A & B & C & D \\ 1 & 2 & 3 & 4
\end{tabular}
\caption{A table}
\end{table}

\section{Last section}
\lipsum[1-10]
\begin{figure}[ht]
\centering
\includegraphics[width=100pt]{example-image}
\caption{A figure}
\end{figure}
\lipsum[11-20]
\begin{table}[ht]
\centering
\begin{tabular}{ *{4}{c} }
A & B & C & D \\ 1 & 2 & 3 & 4
\end{tabular}
\caption{A table}
\end{table}

\end{document}


OK, so I had an obvious idea to accomplish part of what I wanted. I just had to comment out the command that includes the picture (duh!). For example:

\begin{figure}[ht]
\centering
%\resizebox{17cm}{!}{\includegraphics[scale=1]{myfigure.png}}
\caption{Caption for my figure.}
\label{fig:myfigure}
\end{figure}


This "hides" the figure at the end of the PDF and only displays the caption. Apparently, the command to prevent displaying one caption per page is the following:

\renewcommand{\efloatseparator}{\mbox{}}


However, for some unknown reason, I have three captions displayed on one page, and two captions displayed on another (!) as shown below.

I can't figure out why this is happening. It looks strange. If I can't get that fixed, I'll just go with the option of displaying one caption per page.

Edit

As suggested below, this can be "fixed" with the following command:

\setcounter{totalnumber}{10}

• Only a certain number of floats are allowed at the top/bottom/total or fraction of a page, in general. Look into the counters topnumber, bottomnumber and totalnumber. Default for totalnumber is 3, so try something like \setcounter{totalnumber}{10} in the preamble. – Werner Dec 12 '16 at 21:08
• @Werner: Excellent! Thank you very much! :) – Bruno Dec 12 '16 at 21:17
• By the way, it would be better to define a conditional in your preamble (\ifshowfigures, for example). If it's true, then execute the resizebox command. That way, you can change a single line in your file, and not have to search for all five figures (and invariably miss one of them). – Teepeemm Dec 12 '16 at 21:58