[Tex/LaTex] Subfig, KOMA script, caption – how to suppress some list of figures entries

captionskoma-scriptsubfloatstable of contents

I am using KOMA script and the subfig package like this

\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof]{scrbook}
\usepackage{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}

Best Answer

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.

Related Question