在没有真正子图的情况下将子标题放入图片列表

在没有真正子图的情况下将子标题放入图片列表

我尽了最大努力,但还是没找到。我的问题如下:我使用软件包\phantomsubcaption中的subcaption命令进行引用,但我还想在图表列表中添加一些标记,并附上每个面板的简短描述。我尝试了软件包中的其他命令组合subcaption,但目前还没有找到。memoir 是否有内置功能可以帮助我,还是我应该放弃?

以下是 MWE

\documentclass{memoir}

\usepackage{float}
\usepackage[list=true]{subcaption}
        \renewcommand\thesubfigure{\Alph{subfigure}} %just for aesthetics
        \newcommand{\callsubfig}[1]{\textbf{(#1)}} % how I reference subfigs in my captions
\usepackage[style=base,labelfont=bf]{caption} % I bold my caption titles.


\begin{document}
\newdimen\LoFindent
\LoFindent = \parindent

\frontmatter

\tableofcontents*
\newpage
\listoffigures

\mainmatter
\chapter{Intro}
Intro to my topic. Here's a figure to clarify. (\fref{fig:introFig})

\begin{figure}[!b]
\centering
    {\fbox{Figure graphics that have 2 panels in one PDF file.}
    \phantomsubcaption\label{subfig:introFigA}
    \phantomsubcaption\label{subfig:introFigB}}
    \caption[Full Caption Title for ToC]{Caption title appears in text and is much longer than what appears in the LoF, which is good because this is long.
        \callsubfig{\subref{subfig:introFigA}} Explaining the first part, then\ldots
        \callsubfig{\subref{subfig:introFigB}} Explaining the second. But how do I get subcaption titles into the LoF?
        }\label{fig:introFig}
\end{figure}

for an idea of what I want my LoF to look like, see \fref{fig:example}.


\begin{figure}[!b]
ToC Title for Fig 1.1 \dotfill \pageref{fig:introFig}

\hspace{\LoFindent} subtitle for subfig A

\hspace{\LoFindent} subtitle for subfig B


ToC Title for Fig 1.2 \dotfill \pageref{fig:example}

\caption{What I want my LoF to look like (content-wise, of course)}\label{fig:example}
\end{figure}

\end{document}

答案1

我的第一个想法是在环境\captionlistentry中使用subfigure而不是\phantomcaption因为\captionlistentry会创建一个列表条目和一个引用(可以与\label和一起使用\ref)而\phantomcaption只创建一个引用:

\documentclass{memoir}
\setcounter{lofdepth}{2}

%\usepackage{float}
\usepackage[list=true]{subcaption}
        \renewcommand\thesubfigure{\Alph{subfigure}} %just for aesthetics
        \DeclareCaptionLabelFormat{boldparens}{\textbf{(#2)}} % how I reference subfigs in my captions
\captionsetup{style=base,labelfont=bf,subrefformat=boldparens} % I bold my caption titles.

\begin{document}
\newdimen\LoFindent
\LoFindent = \parindent

\frontmatter

\tableofcontents*
\newpage
\listoffigures

\mainmatter
\chapter{Intro}
Intro to my topic. Here's a figure to clarify. (\fref{fig:introFig})

\begin{figure}[!b]
    \begin{subfigure}{\linewidth}
      \centering
      \fbox{Figure graphics that have 2 panels in one PDF file.}
      \captionlistentry{A}\label{subfig:introFigA}
      \captionlistentry{B}\label{subfig:introFigB}
    \end{subfigure}
    \caption[Full Caption Title for ToC]{Caption title appears in text and is much longer than what appears in the LoF, which is good because this is long.
        \subref{subfig:introFigA} Explaining the first part, then\ldots
        \subref{subfig:introFigB} Explaining the second. But how do I get subcaption titles into the LoF?
        }\label{fig:introFig}
\end{figure}

for an idea of what I want my LoF to look like, see \fref{fig:example}.

\begin{figure}[!b]
ToC Title for Fig 1.1 \dotfill \pageref{fig:introFig}

\hspace{\LoFindent} subtitle for subfig A

\hspace{\LoFindent} subtitle for subfig B

ToC Title for Fig 1.2 \dotfill \pageref{fig:example}

\caption{What I want my LoF to look like (content-wise, of course)}\label{fig:example}
\end{figure}

\end{document}

但令我惊讶的是,我发现我完全忘记了适应\captionlistentry我的subcaption包裹。

但是,我刚刚这样做了,你会发现包的实际版本captionhttps://sourceforge.net/p/latex-caption/code/HEAD/tree/trunk/tex/

也可以看看:https://sourceforge.net/p/latex-caption/tickets/13/

虽然上面的示例代码现在可以正常工作,但我仍然需要完成以下几件事:

  1. \subcaptionlistentry额外提供(及文件)
  2. lofdepth在文档中添加一条注释,说明将尊重文档类提供的计数器memoir,即需要将其至少设置为 2 的值
  3. 把这个东西放到 CTAN

我会随时向您通报进一步的进展……

相关内容