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.

There is a method presented here on how to selectively ignore list of figures. Is there an equivalent method for sidecaptions in memoir?

MWE:

\documentclass{memoir}
\usepackage[english]{babel}
\usepackage{graphicx}

\usepackage{caption}%This is necessary in order to ignore lof

\begin{document}
\listoffigures\clearpage

\begin{figure}
\begin{sidecaption}{Main caption}[fig:label]%unfortunately appears in lof
\includegraphics[width=0.5\textwidth]{Picture}
\end{sidecaption}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{Picture}
\caption[]{Main caption} %does not appear in lof
\end{figure}
\end{document}
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Since you are loading the caption package, you could use \captiosetup{list=no}:

\documentclass{memoir}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}
\usepackage{caption}%This is necessary in order to ignore lof

\begin{document}
\listoffigures\clearpage

\begin{figure}
\captionsetup{list=no}
\begin{sidecaption}{Main Caption}[fig:label]%does not appear in lof
\includegraphics[width=0.5\textwidth]{Picture}
\end{sidecaption}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{Picture}
\caption[]{Main caption} %does not appear in lof
\end{figure}
\end{document}

But using caption with the memoir document class produces a warning:

Class memoir Warning: You are using the caption package with the memoir class. This may cause unexpected or inconsistent results if you use any of memoir's captioning facilities.

This warning indicates that since caption package is being used, memoir's own caption configuration interface is not doing anything. If you want to keep memoir's captioning facilities (without the caption package), I'd suggest another approach, simply locally changing the file extension used for the figure(s):

\documentclass{memoir}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}

\makeatletter
\newcommand\nocaptioninlist{\renewcommand\ext@figure{ll}}
\makeatother

\begin{document}
\listoffigures\clearpage

\begin{figure}
\nocaptioninlist
\begin{sidecaption}{Main Caption}[fig:label]%does not appear in lof
\includegraphics[width=0.5\textwidth]{Picture}
\end{sidecaption}
\end{figure}

\begin{figure}
\centering
\nocaptioninlist
\includegraphics[width=0.5\linewidth]{Picture}
\caption{Main caption} %does not appear in lof
\end{figure}
\end{document}

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

share|improve this answer
    
The warning is just there to notify the user that when the caption package is used, then memoirs own caption configuration interface is not doing anything –  daleif Dec 17 '12 at 14:37
    
@daleif yes; perhaps my description was not complete; I've corrected it now. –  Gonzalo Medina Dec 17 '12 at 14:46
    
Thanks. Since I am using memoir caption stuff I used the second method. Where is the ll file then? Does the same thing apply for tables? –  rowman Dec 17 '12 at 14:52
    
@rowman yes, you could say \makeatletter \newcommand\nocaptioninlist{\renewcommand\ext@figure{ll}\renewcommand\ext@table{‌​ll}} \makeatother and now \nocaptioninlist will also suppress entries for selected table captions. –  Gonzalo Medina Dec 17 '12 at 14:58
    
@rowman and to answer your question about the .ll file (which I initially overlooked), the file simply doesn't exist since nothing is creating such file. –  Gonzalo Medina Dec 17 '12 at 15:02

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.