# figures in sidewaysfigure environment are not listed in List of Figures

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}

-
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. 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 8 '12 at 15:54

## migrated from stackoverflow.comFeb 8 '12 at 14:09

This question came from our site for professional and enthusiast programmers.

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}

-