# Have some figures show up in two listofs: list of figures and list of special figures

I have a number of figures in my dissertation. Out of those figures, there are some that I want to be included simultaneously in two listof's: the standard "List of Figures" and a non-standard "List of Study Systems."

For example, I have the following figure that is a study system. Therefore, it should be in the List of Figures and also in the List of Study Systems. Note different captions in two lists.

I want it to appear in the standard List of Figures, as shown below:

and at the same time appear in a custom List of Study Systems, as shown below:

-
How are you building your "List of Study Systems"? Please add to your question a MWE showing the relevant settings. –  Gonzalo Medina Nov 28 '11 at 22:22
Actually this is something I faced a few months ago and found a solution. After reading TeX.SX faq, I decided to post it here hoping it would benefit others. But I just realized as my rep is low, I can't answer my own questions right away. –  Ali Mehrizi Nov 28 '11 at 22:30

Here's one possible solution using the features provided by the caption package. The basic idea is to declare a new float called system using \DeclareCaptionType, and then to use a new command with one mandatory argument that will simply increase the system counter, and write its argument to both the LoF and the new list:

\documentclass{article}
\usepackage{caption}

\newcommand\listofsystemname{List of Study Systems}
\DeclareCaptionType[fileext=sys]{system}[\listofsystemname]

\renewcommand\thesystem{\Roman{system}}

\newcommand\DoubleCaption[1]{%
\stepcounter{system}%
\caption{Study system \thesystem: #1}

\begin{document}

\listofsystems
\listoffigures

\begin{figure}
\centering A
\DoubleCaption{IEEE 13-bus unbalanced}
\label{fig:test1}
\end{figure}

\begin{figure}
\centering B
\caption{A standard figure caption}
\label{fig:test2}
\end{figure}

\begin{figure}
\centering C
\DoubleCaption{IEEE 16-bus balanced}
\label{fig:test3}
\end{figure}

\end{document}


Depending of the actual needs, my previous solution could be an overkill; after all, if the only requirement is a "new list of", creating a new float type is not really necessary. In this case, a simple use of \@starttoc will suffice:

\documentclass{article}

\newcommand\listofsystemname{List of Study Systems}

\newcounter{system}
\renewcommand\thesystem{\Roman{system}}

\makeatletter
\newcommand\listofsystems{\section*{\listofsystemname}\@starttoc{sys}}
\makeatother

\newcommand\DoubleCaption[1]{%
\stepcounter{system}%
\caption{Study system \thesystem: #1}

\begin{document}

\listofsystems
\listoffigures

\begin{figure}
\centering A
\DoubleCaption{IEEE 13-bus unbalanced}
\label{fig:test1}
\end{figure}

\begin{figure}
\centering B
\caption{A standard figure caption}
\label{fig:test2}
\end{figure}

\begin{figure}
\centering C
\DoubleCaption{IEEE 16-bus balanced}
\label{fig:test3}
\end{figure}

\end{document}

-
thanks. My own solution is below, but yours is far more elegant! –  Ali Mehrizi Apr 27 '12 at 18:23

This is how I did it myself:

In the preamble, add the following:

% Add a list of study systems
\usepackage{tocloft}
\newcommand{\tocloftclearpage}{\cleardoublepage\phantomsection}
% tocloft won't print listofs on new pages otherwise
\newcommand{\liststudysystemname}{List of Study Systems}
\newlistof[chapter]{studysystem}{sts}{\liststudysystemname}
\newcounter{studysystemdiagram}
\newcommand{\studysystem}[1]{%
\stepcounter{studysystemdiagram}
\newcommand{\studysystemcaption}[1]{Default caption}
\newcommand{\studysystemcaptionprefix}{Study system \Roman{studysystemdiagram}:\ }
\newcommand{\definesystemlabel}[1]{%
\newcommand{#1}{\Roman{studysystemdiagram}}}


Then for each "special figure," update its figure environment similar to this one:

\begin{figure}
\centering
\includegraphics[width=0.65\textwidth]{Figs/systemIEEE13bus}
\renewcommand{\studysystemcaption}{IEEE 13-bus unbalanced test feeder with the augmented DER unit and load.}
\studysystem{\studysystemcaption}
\caption[\studysystemcaptionprefix\studysystemcaption]{\studysystemcaptionprefix \studysystemcaption\ Loads and shunt capacitors of the original test feeder are not shown.}
\label{fig:SPAACE_systemIEEE13bus}
\end{figure}

-
Could you please include an explanation of the code? –  N.N. Nov 29 '11 at 19:22