提出了一种方法这里关于如何选择性地忽略图表列表。回忆录中的侧标题是否有等效方法?
梅威瑟:
\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}
答案1
由于您正在加载caption
包,因此您可以使用\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}
但caption
与memoir
文档类一起使用会产生警告:
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.
此警告表示由于caption
使用了包,memoir
自己的字幕配置界面没有执行任何操作。如果您想保留memoir
的字幕功能(不使用该caption
包),我建议采用另一种方法,只需在本地更改用于图形的文件扩展名:
\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}
选项demo
只是graphicx
用黑色矩形替换实际图形;不是在实际文档中使用该选项。