我正在输入拓扑图理论图片,每个图(13 个图)都有两张图片。我希望能够像标题中那样引用我的图,但我不知道如何设置计数器来做到这一点。
\begin{document}
\section{Figures for Proposition 1}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D1}
\caption{\Dons has a unique embedding into \Sph, up to equivalence, by the symmetry of $K_{3,1,1}$.}
\label{fig:D1}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D1minors}
\caption{\Dons has only two equivalence classes of edges; those that are incident to a vertex of degree 2, and those that are not.}
\label{fig:D1minors}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D2}
\caption{\Dtws has four distinct embeddings into \Sph, up to equivalence.}
\label{fig:D2}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D2minors}
\caption{\Dtws has only two equivalence classes of edges; those that are contained by $K_4$, and those that are not.}
\label{fig:D2minors}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D3}
\caption{\Dths has a unique embedding into \Sph, up to equivalence.}
\label{fig:D3}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{../GeoGebra/ItiiP3L/D3minors}
\caption{\Dths has seven equivalence classes of edges, as highlight in Figure \ref{fig:D3}.}
\label{fig:D3minors}
\end{figure}
\end{document}
配置后,其内容为图 1、图 2、图 3、图 4、图 5、图 6。然而,这六幅图仅指三张图表。如果以类似于图 1.0、图 1.5、图 2.0、图 2.5、图 3.0、图 3.5 甚至图 1 A、图 1 B、图 2 A、图 2 B、图 3 A、图 3 B 的方式标记它们,我的论文的读者会更容易理解。
答案1
这里使用 1A、1B、2A、2B、... 编号可能更有意义,因为 0 和 5 似乎与内容没有任何关系:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\listoffigures
\section{Figures for Proposition 1}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-a}
\renewcommand{\thefigure}{\arabic{figure}A}
\caption{Caption one}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-b}
\addtocounter{figure}{-1}\renewcommand{\thefigure}{\arabic{figure}B}
\caption{Caption two}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-c}
\renewcommand{\thefigure}{\arabic{figure}A}
\caption{Caption three}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-b}
\addtocounter{figure}{-1}\renewcommand{\thefigure}{\arabic{figure}B}
\caption{Caption four}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-c}
\renewcommand{\thefigure}{\arabic{figure}A}
\caption{Caption five}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.7\linewidth, height=0.2\textheight]{example-image-a}
\addtocounter{figure}{-1}\renewcommand{\thefigure}{\arabic{figure}B}
\caption{Caption six}
\end{figure}
\end{document}
对于两个数字中的第一个,我将其附加A
到\thefigure
。对于两个数字中的第二个,我取消计数器figure
(以保持相同的数字)并将其附加B
到它。
答案2
\documentclass{article}
\renewcommand\thefigure{%
\ifodd\value{figure}%
\the\numexpr(\value{figure}-1)/2\relax.5%
\else
\the\numexpr\value{figure}/2\relax.0%
\fi}
\begin{document}
\listoffigures
\begin{figure}xxx\caption{zzz}\end{figure}
\begin{figure}xxx\caption{zzz}\end{figure}
\begin{figure}xxx\caption{zzz}\end{figure}
\begin{figure}xxx\caption{zzz}\end{figure}
\end{document}