3

I was writing my thesis and found that all figures I included in sidewaysfigure environment are not listed in \listoffigures. How can I make those figures listed in List of Figures?

What I did is like:

\begin{sidewaysfigure}[ht!]
  \centering
  \subfloat[figure caption]{\label{fig:figuelabel}
  \includegraphics[width=8cm,trim=0cm 0cm 1cm 1cm, clip=true]{Figures/figureFilename.pdf}}
  \caption[]{my caption}
  \label{fig:labelname}
\end{sidewaysfigure}
lockstep
  • 250,273
  • Welcome to TeX.sx! Your question was migrated here from [so]. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – N.N. Feb 08 '12 at 15:54

1 Answers1

9

Your problem does not have to do with sidewaysfigure. The problem is how you use \caption. If you remove the square brackets in \caption[]{my caption} the image is included in the list of figures when subfig is loaded.

Briefly, the \caption macro takes one mandatory argument which is the text to be displayed next to the figure, e.g. \caption{my caption}, and one optional argument which is the text displayed for the figure in lists such as the list of figures, e.g. \caption[my list caption]{my caption}. If the optional argument is left out the mandatory argument will be used for lists. If the optional argument is given but empty, as in your case, and you load any of the packages subfig, caption or subcaption the figure will not be included in lists. For details see, http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Lists_of_figures_and_tables.

So, to make your figure appear in the list of figures either give a non-empty optional argument or do not give an optional argument at all. I think that the latter approach is best because it makes your references more consistent. Here is a working example:

\documentclass{article}

\usepackage{rotating}
\usepackage{subfig}

\begin{document}

\begin{sidewaysfigure}
  \caption{my caption}
  \label{fig:labelname}
\end{sidewaysfigure}

\listoffigures

\end{document}
N.N.
  • 36,163