Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using KOMA script and the subfig package like this

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\usepackage[caption=false, font=footnotesize, justification=RaggedRight]{subfig}

The caption=false option is added in order to retain caption handling from scrbook. Now I would like to prevent entries for some figures from appearing in my LOF. a) Because I have some \ContinuedFloat figures and b) because I don't want figures from the appendices to appear in the LOF.

Now I know that I can suppress a LOF entry by leaving the optional caption argument empty like this

\caption[]{Bla bla}

but only IF I load the caption package or remove the caption=false option from the subfig package.

Now doing this unfortunately messes up some of my subfloat captions where space is tight. I could try fixing these manually, but maybe there is an alternative. So here are my two questions (the second one corresponding to the manually editing option..):

  1. Is there a way to suppress selected figures from appearing in the LOF without using the caption package while still numbering the figures?
  2. What would be the command(s) from the caption package that I could use to set the indent for selected (!) subfloat captions to zero, i.e. such that the second line starts without any indent?

EDIT: Add minimal example for the second question. Ok, so here is a minimal example of how I would like to change the indentation of a certain subfloat caption. Normally it's all indented such that the subfloat label (a) stands on its on and that's fine. Just for some certain subfloats I'd like to save space and start the second line completely left aligned.

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\usepackage[font=footnotesize, justification=RaggedRight]{subfig}

\begin{document}

\begin{figure}[p]
\centering
  \subfloat[aaa aaa aaa aaa aaa aaa \newline
  This should be left aligned with no indent.]%
  {%
    \label{fig:a}%
    \rule{0.48\linewidth}{0.48\linewidth}
%     \includegraphics[width=0.48\linewidth]{}%
  }%
  \subfloat[bbb bbb bbb bbb bbb bbb \newline
  This should be left aligned with no indent.]%
  {%
    \label{fig:b}%
    \rule{0.48\linewidth}{0.48\linewidth}
%     \includegraphics[width=0.48\linewidth]{\rule{1in}{1cm}}%
  }%
  \caption[Bla]{Bla Bla}
  \label{fig:example}
\end{figure}

\end{document}
share|improve this question
    
Ah. "table-of-contents" is obviously the wrong tag. How can I remove it? –  janitor048 Mar 23 '11 at 21:33
    
no it is the right tag. {list-of-figures} is a synonym for it; this is because the packages and solutions for the two are mostly the same. (You can remove/add tags by editing the question.) –  Caramdir Mar 23 '11 at 21:47
add comment

1 Answer 1

up vote 2 down vote accepted

I would go with the caption package; using the list=no option you can suppress the entries in the LoF for a particular figure or for a group of figures; using the plain format (for the subfigures) you can achieve the desired format for their captions; an example (if this change should only affect selected subfigures, remove the line \captionsetup[subfigure]{format=plain} from the preamble and include it in the corresponding figure environment(s)):

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\usepackage[caption=false, font=footnotesize, justification=RaggedRight]{subfig}
\usepackage{caption}

\captionsetup[subfigure]{format=plain}

\begin{document}
\listoffigures

\chapter{Test}

\begin{figure}
  \caption{A figure with a caption and its entry in the LoF}
\end{figure}

\begin{figure}
% this particular figure will be numbered and labeled but won't have entry in the LoF
  \captionsetup{list=no}
  \caption{A figure with a caption without entry in the LoF}
\end{figure}

\begin{figure}
  \caption{Another figure with a caption and its entry in the LoF}
\end{figure}

\begin{figure}
\centering
  \subfloat[text text text  text text text text text text This is left aligned with no indent.]%
  {%
    \label{fig:a}%
    \rule{0.48\linewidth}{0.48\linewidth}
  }%
  \subfloat[text text text  text text text text text text This is left aligned with no indent.]%
  {%
    \label{fig:b}%
    \rule{0.48\linewidth}{0.48\linewidth}
  }%
  \caption[Bla]{A figure with two subfigures}
  \label{fig:example}
\end{figure}

\chapter{Test two}
\captionsetup[figure]{list=no}
% all figures from this point on will be numbered and labeled but won't have entry in the LoF

\begin{figure}
  \caption{A second figure with a caption without entry in the LoF}
\end{figure}

\begin{figure}
  \caption{A third figure with a caption without entry in the LoF}
\end{figure}

\end{document}

Moreover, if it's not too late (there's no deadline involved), I would suggest you to change to the subcaption package instead of subfig.

EDIT: I've added the adjustemnts needed to have the requested format for the subfigure captions.

share|improve this answer
    
Yeah, I've already guessed that the caption package is probably the best way to go. The project is rather complex, I'll try coming up with a minimal example. As to the subcaption package: in retrospect I would also use it instead of subfig. But my document (PhD thesis, ~200 pages) is already 99% finished and I don't really want to go there any more... –  janitor048 Mar 23 '11 at 22:06
    
Ok, I've added an example above.. –  janitor048 Mar 23 '11 at 22:43
    
@janitor084: I've complemented my answer by including the adjustments needed to achieve the required format for the subfigures. –  Gonzalo Medina Mar 23 '11 at 22:57
    
Cool. format=plain really does the trick. I couldn't find this option in the subfig manual.. I'm using \captionsetup[subfloat]{format=plain} on an individual level though.. –  janitor048 Mar 23 '11 at 23:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.