General2 seperate list of figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

2 seperate list of figures

Post by -Robin- »

For my thesis I have the following problem.
I have 'normal figures' and 'electrical schemes', which are also figures and thus placed in a figure environment.

Now I want two separate list of figures: one containing all the normal figures, without the electrical schemes and one with only the electrical schemes.

I've already found out about the tocloft package to create new lists, but this didn't really help.

Any suggestions ?

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

2 seperate list of figures

Post by gmedina »

One possibility is to use the \newfloat command provided by the float package. Refer to the package documentation for further information.

In the following simple example a defined a new float (Scheme) and used the \listof command (float package) to build a List of Schemes similar to the list of figures. You can addapt this example according to your particular needs.

Code: Select all

\documentclass{report}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{float}
\newfloat{Scheme}{htbp}{los}[chapter]
\usepackage{lipsum}

\begin{document}

\listoffigures
\clearpage
\listof{Scheme}{List of Schemes}
\clearpage

\chapter{First chapter}
\lipsum

\begin{Scheme}
  \centering
  \rule{5cm}{3cm}
  \caption{Test scheme 1}
  \label{sch:testsch1}
\end{Scheme}

\lipsum

\begin{figure}
  \centering
  \rule{5cm}{2cm}
  \caption{Test figure 1}
  \label{fig:testfig1}
\end{figure}

\lipsum[1-2]

\begin{Scheme}
  \centering
  \rule{5cm}{3cm}
  \caption{Test scheme 2}
  \label{sch:testsch2}
\end{Scheme}

\chapter{Second chapter}

\lipsum

\begin{figure}
  \centering
  \rule{5cm}{2cm}
  \caption{Test figure 2}
  \label{fig:testfig2}
\end{figure}

\lipsum[1-2]

\begin{figure}
  \centering
  \rule{5cm}{2cm}
  \caption{Test figure 3}
  \label{fig:testfig3}
\end{figure}

\begin{Scheme}
  \centering
  \rule{5cm}{3cm}
  \caption{Test scheme 3}
  \label{sch:testsch3}
\end{Scheme}

\end{document}
Remarks: 1) I used \rule to simulate actual figures.
2) The lipsum package was loaded only to automatically generate some text.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

2 seperate list of figures

Post by localghost »

The current version of the caption package allows declaring of new float environments and generates automatically the according lists.


Best regards
Thorsten¹
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

Re: 2 seperate list of figures

Post by -Robin- »

The problem was already solved, but thanks for pointing out the updated version of the package.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

2 seperate list of figures

Post by localghost »

-Robin- wrote:The problem was already solved, but thanks for pointing out the updated version of the package
If so, please post an answer to make that clear.
-Robin-
Posts: 31
Joined: Tue May 20, 2008 3:07 pm

Re: 2 seperate list of figures

Post by -Robin- »

Sorry about that. It wasn't really my problem, but for a collegue of mine. And I forget about the existence of this thread, until I received a notice by email (I was still subscribed on this thread).
So the solution that was posted worked just fine
Post Reply