Graphics, Figures & TablesSeparate list of figures for appendix

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
comet64
Posts: 3
Joined: Mon Aug 17, 2009 12:25 pm

Separate list of figures for appendix

Post by comet64 »

Hi,

I have a document with four chapters and an appendix. The appendix has a lot more figures and tables than all the chapters combined. So, I wish to insert a separate list of figures just for the appendix, and a regular list of figures for the rest of the chapters combined. Is this feasible?

PS: I searched for this topic before posting and I couldn't find a previous solution, so please forgive me if this has already been answered.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Separate list of figures for appendix

Post by gmedina »

Hi,

several packages will allow the creation of the new list; one option is to use some of the features provided by the caption package. Take a look at the following simple example:

Code: Select all

\documentclass{book}
\usepackage{caption}

\DeclareCaptionType{myfigure}[Figure]

\begin{document}

\listoffigures
\begin{figure}[!ht]
  \centering
  \rule{5cm}{2cm}
  \caption{test figure 1}
  \label{fig:test1}
\end{figure}

\begin{figure}[!ht]
  \centering
  \rule{5cm}{2cm}
  \caption{test figure 2}
  \label{fig:test2}
\end{figure}

\appendix
\listofmyfigures

\setcounter{myfigure}{2}

\begin{myfigure}[!ht]
  \centering
  \rule{5cm}{2cm}
  \caption{test figure 3}
  \label{fig:test3}
\end{myfigure}

\begin{myfigure}[!ht]
  \centering
  \rule{5cm}{2cm}
  \caption{test figure 4}
  \label{fig:test4}
\end{myfigure}

\end{document}
Please refer to the package documentation for further information; particularly, refer to the use of the \DeclareCaptionType command (pp 27ff).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
comet64
Posts: 3
Joined: Mon Aug 17, 2009 12:25 pm

Separate list of figures for appendix

Post by comet64 »

Thank you gmedina for the helpful reply and especially for the code. From the code you posted, I understand that you are basically defining a new type of figure environment, and generating a new list of all the elements from that environment in the appendix.

I tried running the code, got a "undefined control sequence" error, so I figured the caption package was not installed. I am currently trying to get the caption package working on my system*, so I will try out your solution once that's done.


*WindowsXP, Miktex 2.7 basic installation with internet package update disabled by university proxy server.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Separate list of figures for appendix

Post by gmedina »

comet64 wrote:Thank you gmedina for the helpful reply and especially for the code. From the code you posted, I understand that you are basically defining a new type of figure environment, and generating a new list of all the elements from that environment in the appendix...
You are welcome, and yes, that's the idea behind the code.
comet64 wrote:...I tried running the code, got a "undefined control sequence" error, so I figured the caption package was not installed. I am currently trying to get the caption package working on my system*, so I will try out your solution once that's done.
Of course, the proper solution is to ask the administrator to update the MiKTeX packages. In the meantime, however, you can try this quick (but not elegant) solution:

Download caption.zip fron CTAN (here it is). Unzip the file; this will generate a folder called "caption". Open a terminal and go to the "caption" folder, and run

Code: Select all

latex caption.ins
once the compilation ends, copy all the contents of the "caption" folder to the folder that contains your .tex file.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply