如何对齐子图中的标题?

如何对齐子图中的标题?

我有一个由三个子图组成的图形。其中两个预计占据屏幕左侧,最后一个位于右侧。我希望右侧的子标题与左侧两个子标题中下方的子标题对齐。我该怎么做?

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption,float}

\begin{document}
\begin{figure}[ht!]
  \centering
  %\caption{Figures showing the behavior of a type II superconductor.}
  \begin{subfigure}[t]{0.48\textwidth}
    \includegraphics[height=3.5cm]{figures/type-2-magnetization-color.png}
    \caption{Figure showing a the relation between applied magnetic field and magnetization for a type II superconductor. The S stands for superconducting phase, the MS for mixed state, and the N stand for normal phase.}
    \includegraphics[height=3.5cm]{figures/type-2-meissner-color.png}
    \caption{Figure showing the phase transition between a normal metal and a type II superconductor. The S stands for superconducting phase, the MS for mixed state, and the N stand for normal phase.}
    \label{fig:type-2-magnetization}
  \end{subfigure}
  \hfill
  \begin{subfigure}[t]{0.48\textwidth}
    \centering
    \includegraphics{figures/ybco.jpg}
    \caption{Figure showing the the vortices in YBCO, a type II superconductor. © Frederick S. Wells, Alexey V. Pan, X. Renshaw Wang, Sergey A. Fedoseev \& Hans Hilgenkamp, CC Wikimedia.}
   %\vspace{1cm}
    \label{fig:vortices}
  \end{subfigure}
  \label{fig:type-2-relationship-h-t}
\end{figure}
\end{document}

答案1

问:“我想让右侧的副标题与左侧下方的副标题对齐。我该怎么做?”

答:只需将两个 都改为\begin{subfigure}[t]即可\begin{subfigure}[b]

如果你还没猜到的话:[t]意味着对齐op,[b]表示在b奥托姆。


完整的 MWE(最小工作示例)——请注意,我主张使图表和标题同样宽:

enter image description here

\documentclass{article}
\usepackage[english]{babel} % optional
\usepackage[demo]{graphicx} % remove 'demo' option in real doc.
\usepackage{subcaption,ragged2e}

\begin{document}
\begin{figure}[ht!]
\captionsetup[subfigure]{justification=RaggedRight}

\begin{subfigure}[b]{0.48\textwidth}
\includegraphics[height=3.5cm,width=\textwidth]{figures/type-2-magnetization-color.png}
\caption{Figure showing a the relation between applied magnetic field and magnetization for a type II superconductor. The S stands for superconducting phase, the MS for mixed state, and the N stands for normal phase.}

\medskip
\includegraphics[height=3.5cm,width=\textwidth]{figures/type-2-meissner-color.png}
\caption{Figure showing the phase transition between a normal metal and a type II superconductor. The S stands for superconducting phase, the MS for mixed state, and the N stand for normal phase.}
\label{fig:type-2-magnetization}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\textwidth}
\includegraphics[height=3.5cm,width=\textwidth]{figures/ybco.jpg}
\caption{Figure showing the the vortices in YBCO, a type II superconductor. ©~Frederick S. Wells, Alexey V. Pan, X. Renshaw Wang, Sergey A. Fedoseev~\& Hans Hilgenkamp, CC Wikimedia.}
\label{fig:vortices}
\end{subfigure}

%% You need a \caption statement for the overall 'figure' env.
\label{fig:type-2-relationship-h-t}
\end{figure}

\end{document}

相关内容