Graphics, Figures & Tablessubfig | Sub-figures out of LoF

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sper
Posts: 3
Joined: Sun Oct 23, 2011 6:40 pm

subfig | Sub-figures out of LoF

Post by Sper »

Hi everyone:

I'm wondering if it's possible to stop LaTeX from including in the list of figures the captions of all subfigures. I am currently using the subfig package.

Code: Select all

\usepackage[caption=false,font=footnotesize]{subfig}
I want to include in the list of figures *only* the captions of the figures (as opposed to the captions of the figures, and the captions of each subfigure).

I hope I worded my question sufficiently clear, if not, please ask.

Thanks in advance for taking the time!

Sper
Last edited by Sper on Mon Oct 24, 2011 9:59 am, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

subfig | Sub-figures out of LoF

Post by localghost »

Somehow I can't comprehend the problem with your poor information.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{subfig}

\begin{document}
  \listoffigures

  \begin{figure}[!ht]
    \centering
    \subfloat[First sub-figure\label{subfig-1:dummy}]{\rule{1.6in}{0.9in}}
    \hspace{1em}
    \subfloat[Second sub-figure\label{subfig-2:dummy}]{\rule{1.6in}{0.9in}}
    \caption{Dummy figure}\label{fig:dummy}
  \end{figure}
\end{document}
So you better provide a true minimal example that shows the opposite.


Best regards and welcome to the board
Thorsten
Sper
Posts: 3
Joined: Sun Oct 23, 2011 6:40 pm

Re: subfig | Sub-figures out of LoF

Post by Sper »

Thank you for your reply and the welcome, Thorsten.

I am fairly new to LaTeX (I know, I already sound familiar, don't I?:)), and I am now using it to write a thesis. I am finding it hard to provide a minimal example quick, since I am using a template with a specific style and numerous packages and new commands and dependencies which I do not entirely control at this point... I'm pretty sure I understand where the problem comes from -- namely, from a macro that defines the style to be used when creating the list of figures entry in the table of content.

I'll try to put together a minimal example, but it may take a while. Thanks again for the insight on this.

Sper
Sper
Posts: 3
Joined: Sun Oct 23, 2011 6:40 pm

Re: subfig | Sub-figures out of LoF

Post by Sper »

Someone gave me an alternative to solve the issue I was having (i.e., include only the captions of the Figures in the Table of content, as opposed to including both captions of Figures, and of Subfigures). The command is:

\usepackage[lofdepth=1]{subfig}

or

\setcounter{lofdepth}{1}

The template I was using to write my thesis in had

\setcounter{lofdepth}{2}

therefore it was including in the table of content the captions of the subfigures as well. Maybe the default of the package is \setcounter{lofdepth}{1}, that's why in the example you provided it gives the desired result.

Thank you for taking the time - I learned something.

Best regards,

Sper
Post Reply