使用回忆录时如何获取对子标题编号的引用?在此示例中:
\documentclass{memoir}
\newsubfloat{figure}
\begin{document}
\chapter{Lorem}
\section{ipsum}
\begin{figure}[b]
\begin{minipage}{0.49\textwidth}
\centering
\Large \textbf{Lorem}
\subcaption{Lorem}
\label{lorem}
\end{minipage}
\begin{minipage}{0.49\textwidth}
\centering
\Large \textbf{ipsum}
\subcaption{Ipsum}
\label{ipsum}
\end{minipage}
\caption{Lorem Ipsum}
\end{figure}
Lorem (figure:~\ref{lorem}) ipsum (figure:~\ref{ipsum}) dolor sit amet, consectetur adipiscing elit. Nullam ut nunc lacus, ac vestibulum orci. Nullam viverra dictum dolor, in molestie neque ullamcorper sed. Nullam felis velit, vestibulum ut convallis quis, luctus sit amet est. Etiam vel viverra magna. Phasellus euismod venenatis augue, quis rutrum sem pulvinar at. Donec pellentesque enim vitae ante tristique lacinia. Nulla auctor fermentum lorem, ut scelerisque nunc vehicula id. Phasellus sed facilisis erat. Nulla porttitor, metus eu bibendum molestie, elit dui lacinia dolor, nec iaculis sem tortor sit amet tortor. Vivamus a euismod arcu.
\end{document}
我希望获得像“Lorem(图:1.1a)ipsum(图:1.1b)”这样的参考,而不是像这样:
在我切换到 memoir 之前,我使用过 subcaption 包,它似乎开箱即用。我如何在 memoir 中实现这种行为?
答案1
将 放在命令label
中subcaption
,如手册的 §10.9 中所述memoir
。这将打印子引用周围的括号,例如1.1(a)
,但目前无法删除这些括号(请参阅 daleif 的评论)。
\documentclass{memoir}
\newsubfloat{figure}
\begin{document}
\chapter{Lorem}
\section{ipsum}
\begin{figure}[h]
\begin{minipage}{0.49\textwidth}
\centering
\Large \textbf{Lorem}
\subcaption{Lorem\label{lorem}}
\end{minipage}
\begin{minipage}{0.49\textwidth}
\centering
\Large \textbf{ipsum}
\subcaption{Ipsum\label{ipsum}}
\end{minipage}
\caption{Lorem Ipsum}
\end{figure}
Lorem (figure:~\ref{lorem}) ipsum (figure:~\ref{ipsum}) dolor sit amet[...]
\end{document}