单个图形下有多个标题

单个图形下有多个标题

我有一张图形(比如说一对夫妇的照片),我想要为其添加两个子标题(1 a 位于图形的前半部分下方,显示男人,1 b 位于图形的后半部分下方,显示女人)。

我强调,只有一个数字,但我想对其进行说明,就好像有两个数字一样。

答案1

一个使用的示例subfig

平均能量损失

\documentclass{article}
\usepackage{graphicx}
\usepackage[justification=centering]{subfig}
\usepackage[colorlinks]{hyperref}

\begin{document}
\begin{figure}[!h]
\centering
\hspace{-1cm}%
% png from http://es.wikipedia.org/wiki/Homo_sapiens#mediaviewer/File:Human.svg
\includegraphics[trim=.5cm 20cm 2.2cm 0cm, clip,height=7cm]{Human} 
\subfloat[\label{man} This is a man waving.]{\hspace{.5\linewidth}}
\subfloat[\label{woman} This is a woman.]{\hspace{.5\linewidth}}
\caption[Man a woman]{Human specimens.\label{humans}}
\end{figure}

As you can see in figure \ref{humans}, there are two types
of humans specimens: those that greet you (\ref{man}) 
and those that left the arms down (\ref{woman}).

\listoffigures

\end{document}

subfig如果和之间存在冲突hyperref(如 egreg cooment 所述),您也可以使用最新的subcaption包。此示例应产生与上述相同的输出:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[colorlinks]{hyperref}

\begin{document}
\begin{figure}[!h]

\centering
\hspace{-1cm}%
% png from http://es.wikipedia.org/wiki/Homo_sapiens#mediaviewer/File:Human.svg
\includegraphics[trim=.5cm 20cm 2.2cm 0cm, clip,height=7cm]{/home/fran/Human} 

\begin{minipage}[t]{.5\linewidth}
\centering
\subcaption{This is a man waving.}\label{man}
\end{minipage}%
\begin{minipage}[t]{.5\linewidth}
\centering
\subcaption{This is a woman}\label{woman}
\end{minipage}
\caption[Man a woman]{Human specimens.\label{humans}}

\end{figure}

As you can see in figure \ref{humans}, there are two types
of humans specimens: those that greet you (\ref{man}) 
and those that left the arms down (\ref{woman}).

\listoffigures

\end{document}

如果您想要图 1 和 2(而不是 1a 和 1b),只需在 minipages 中使用\caption而不是\subcaption(当然,那么您不需要该subcaption包)。

答案2

你可以根据\caption需要在figure

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\listoffigures


\begin{figure}[thp]
\begin{minipage}{.5\textwidth}
\centering
\includegraphics{man}
\caption{man}
\end{minipage}%
\begin{minipage}{.5\textwidth}
\centering
\includegraphics{woman}
\caption{woman}
\end{minipage}
\end{figure}

text .. text .. text .. text .. text .. 
text .. text .. text .. text .. text .. 
text .. text .. text .. text .. text .. 
text .. text .. text .. text .. text .. 

\end{document}

答案3

伪造起来非常容易。

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}

\begin{document}
\listoffigures

\noindent\rule{\textwidth}{1pt}

\begin{figure}[h]
\refstepcounter{figure}% for label or hyperref
\addcontentsline{lof}{figure}{\numberline {\thefigure}{\ignorespaces man and woman}}%
\hfil\includegraphics{example-image}% old school centering

\medskip
\hfil\thefigure{ a) man}\hfil\thefigure{ b) woman}
\end{figure}

\begin{figure}[p]
\caption{normal caption}
\end{figure}
\end{document}

假标题

相关内容