单个图形有多个标题

单个图形有多个标题

如何subfig为单个图形添加类似标题?我有图像,每个图像都有多个面板,我想为所有子面板添加标题,并能够引用每个子面板。类似于图 1A、1B 等。

更新这是我根据 Werner 的想法得出的回答

\documentclass[11pt]{article}
\usepackage{geometry}
\geometry{letterpaper}

\usepackage{graphicx}

\usepackage[labelformat=simple]{caption,subcaption}
\usepackage{hyperref}
\usepackage{varioref}

\renewcommand\thesubfigure{\Alph{subfigure}}

\begin{document}

Tofu gluten-free VHS locavore, viral williamsburg +1 cliche fanny pack leggings terry richardson cred photo booth artisan. Echo park locavore jean shorts shoreditch before they sold out, farm-to-table keytar high life banksy tofu sartorial marfa. Gentrify butcher leggings 

\captionsetup{singlelinecheck=false}

\begin{figure}[htb]
    \includegraphics[scale=1]{figure2}
    \caption{This is a general heading for figure 1.}\label{fig:1}

    \subcaptionbox{This is something about figure 1A.}[\linewidth]{\label{fig:1a}}
    \subcaptionbox{This is more more more more more more more more more more text about figure 1B. Sustainable terry richardson craft beer homo, cardigan wayfarers blog commodo DIY quinoa sartorial american apparel nostrud.\label{fig:1b}}[\linewidth]  {}


\end{figure}

Here's a ref to fig \vref{fig:1b}.Skateboard tempor hoodie helvetica quis. Sustainable terry richardson craft beer homo, cardigan wayfarers blog commodo DIY quinoa sartorial american apparel nostrud. Williamsburg aute mcsweeney's wes anderson. Dolor eiusmod tempor assumenda stumptown, delectus irony laboris 


\end{document}  

答案1

此示例与subcaption包装文档可能就是您正在寻找的(\rule仅用于说明):

\documentclass{article}
\usepackage{caption,subcaption}
\begin{document}
\begin{figure}
  \hfill\subcaptionbox{A subfigure\label{fig:1a}}[8em]{\centering \rule{5pt}{3em}}
  \hfill\subcaptionbox{Another subfigure\label{fig:1b}}{\centering \rule{10em}{2em}}
  \hfill\subcaptionbox{A final subfigure\label{fig:1c}}[9em]{\centering \rule{2em}{4em}}
  \hfill\null
  \caption{A figure}\label{fig:1}
\end{figure}
Look at Figure~\ref{fig:1a} and~\ref{fig:1b}, or even Figure~\ref{fig:1c}. Everything is contained in Figure~\ref{fig:1}.
\end{document}

图中子图

subcaption 包必然要求其内容排版在一个框中。因此,使用\subcaptionbox{<heading>}[<width>][<inner-pos>]{<contents>}是理想的选择,以便可以具有可变宽度(<width>参数是可选的)带有子标题的内容。如果不指定<width>,子图将被放置在一个“自然宽度”等于 宽度的框中<contents>。因此,如果您的图像非常宽,则不必担心指定<width>。但是,对于非常窄的图像,<contents>指定<width>将允许正确排版标题。

此外,还有一些方法可以操纵你的(子)标题和参考的表示。

相关内容