5

For a journal submission, I need a list of figure captions at the end of my manuscript but they explicitly asks not to include the figures themselves in the document.

I have added \listoffigures at the end of the document and it does what it does. But, now, how do I keep the figures from being rendered?

\documentclass[man]{apa6}

% Essential manuscript parts
\title{Test}
\author{Test}

% Style list of figures
\usepackage[titles]{tocloft}
\renewcommand{\listfigurename}{Figure captions}
\cftpagenumbersoff{figure}
\renewcommand{\cftfigpresnum}{\itshape\figurename\enspace}
\renewcommand{\cftfigaftersnum}{.\space} \setlength{\cftfigindent}{0pt}
\setlength{\cftafterloftitleskip}{0pt}
\settowidth{\cftfignumwidth}{Figure 10.\quad}

\begin{document}

\maketitle

\begin{table}[htp]
\caption{Something}
\end{table}

\begin{figure}[htbp]
\centering
\caption{This is a figure.}
\end{figure}

\begin{figure}[htbp]
\centering
\caption{This is a figure.}
\end{figure}

\renewcommand{\listfigurename}{Figure captions}
\listoffigures

\end{document}

I have tried the comment package and \excludecomment{figure} but that eliminates the figure list as well.

I've tried adding the following to the preamble:

\renewcommand{\includegraphics}[2][]{}
\captionsetup[figure]{labelsep=none,labelformat=empty,textformat=empty}

This indeed removes the figures and captions on the final pages but leaves empty pages. Is there a way omit the empty pages?

2
  • 2
    If you are willing to define figures with a macro instead of an environment, you can have a look at the \holdFigures macro of the boxhandler package. It has a deferral mechanism. May 5 '15 at 20:03
  • In principle, I'd be willing to do that but in practice I can't. I'm writing the manuscript with interspersed R-code that creates the figures/tables and their environments.
    – crsh
    May 6 '15 at 8:02
2

A solution that requires a change in the file for the final version with only the list of figures.

You keep the line

\nofiles\renewcommand{\processdelayedfloats}

commented out until you have the document in final form; the figures will be printed at the end. When your document is finished, uncomment the two lines and run LaTeX again.

Here's an example

\documentclass{article}
\usepackage{graphicx}

%%% Remove the next line if you want the figures at their place    
\usepackage[figuresonly,nolists,nomarkers]{endfloat}

\usepackage{lipsum}% mock text

% Uncomment the following line for the final version
%\nofiles\renewcommand{\processdelayedfloats}{}

\begin{document}

\lipsum[1]

\begin{figure}
\includegraphics[width=.3\textwidth]{example-image-a}
\caption{Whatever}
\end{figure}

\lipsum[2]

\begin{figure}
\includegraphics[width=.3\textwidth]{example-image-a}
\caption{Whatever}
\end{figure}

\lipsum[3]

\begin{table}[htp]
A table
\caption{Something}
\end{table}

\lipsum[4]

\clearpage

\listoffigures

\end{document}
3
  • This looks good, but it doesn't quite work, yet. As evident from the MWE, I use the apa6 class that sets the options for endfloat to handle both figures and tables. Under these circumstances you solution has a side-effect: all tables are also omitted (I need the tables). I have updated my example to include a dummy table.
    – crsh
    May 6 '15 at 8:11
  • Well, they don't require me to use apa6, but they require me to implement the formatting used in this class. Unfortunately, in my field it's not customary for journals to provide their own TeX-classes (in fact, most manuscripts are written in Word), so I have to settle for DIY solutions. I agree, this is not desirable, though.
    – crsh
    May 6 '15 at 8:21
  • 1
    @crash A manual solution would be to remove the final figure pages with some PDF editing software (pdftk comes to mind), or with a document that just does \jncludepdf[pages=1-?]{filename} (where ? is the number of the last page with a table).
    – egreg
    May 6 '15 at 8:24
2

This is how I do it. I don't use the endfloat package.

Normal way to include figure

\begin{figure}
\centering
\includegraphics[width=4in]{somefigure.png}
\caption{some caption.}
\label{Fig: somefigure}
\end{figure}

%--------- modification ---------

\usepackage{caption}
\captionsetup{labelformat=empty}

\begin{figure}
\centering
%\includegraphics[width=4in]{somefigure.png}
\caption[some caption.]{}
\label{Fig: somefigure}
\end{figure}

This suppresses the figure and its caption in main document but shows the caption in list of figures.

First suppress the figure by removing the \includegraphics command. The caption label (Figure x., Table x. etc) is suppressed using caption package option, \captionsetup{labelformat=empty}. Note the \captionsetup{labelformat=empty} option suppress labels for all captions including tables. The caption in [] brackets shows up in list of figures while the caption in {} (which is kept empty) appears below the figure.

With these steps the figure and caption are suppressed in main document but you still get list of figures.

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.
https://tex.stackexchange.com/questions/242333/list-figures-with-listoffigures-but-dont-show-the-figures-themselves
tex.stackexchange.com
crawl=CC-MAIN-2022-05
153269
application/http; msgtype=response
sha1:BAX3BAV7P6XP56H7HB7CGUHXZC75BFUQ
<urn:uuid:44eedea0-c645-4163-a023-7f6705e2de15>
2022-01-26T23:29:54Z
151.101.1.69
text/html
sha1:KJMBNKUKNXGOK4VITUY3IVTGHPAXDFPA
<urn:uuid:e2565017-30a2-4d40-ab9e-52527514da0c>
https://tex.stackexchange.com/questions/242333/list-figures-with-listoffigures-but-dont-show-the-figures-themselves
response
<urn:uuid:aa8a4f7c-7d56-49de-8875-83e63a880862>
isPartOf: CC-MAIN-2022-05
publisher: Common Crawl
description: Wide crawl of the web for January 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-181
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/