定义不可见的标题

定义不可见的标题

简短问题:如何制作文档中未显示的标题?

长版本:我正在使用 xelatex 和 memoir,并试图制作一个超过 2 页的图表。基本上,类似于:

\begin{figure}

\subbottom[some name]{\includegraphics{pic.png}\label{somelabel}}
\caption{somecaption}

\end{figure}

\begin{figure}

\contsubbottom[some name2]{\includegraphics{pic2.png}\label{somelabel2}}
\сontcaption{somecaption}
\subconcluded
\end{figure}

我不想让第一个标题出现在任何地方或显示在我的图中,但我不能让它显示出来,因为否则索引和参考文献就会混乱——图是用单独的数字计算的。所以,我需要重新定义第一个标题“就位”以使其不可见。有什么办法吗?

答案1

在丢弃的框中排版模拟标题:

\documentclass{memoir}
\usepackage{graphicx}

\newsubfloat{figure}

\begin{document}

\chapter{Test}

\ref{X}

\begin{figure}[htp]
\centering
\subbottom[some name]{\includegraphics[width=5cm]{example-image-a}\label{somelabel}}
\setbox0=\vbox{\caption{somecaption}}
\end{figure}

\begin{figure}[htp]
\centering
\contsubbottom[some name2]{\includegraphics[width=5cm]{example-image-b}\label{somelabel2}}
\contcaption{somecaption}\label{X}
\subconcluded
\end{figure}

\end{document}

请注意,参考编号是正确的(但名称参考不正确)。

在此处输入图片描述

相关内容