我想要一个由 4 个不同大小的子图组成的图形,这些子图应垂直居中,标题应位于同一高度。
我尝试过有和没有[c]
之后\begin
子图,但无法同时获得这两个图和字幕对齐。
\documentclass{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textcomp}
\begin{document}
\begin{figure}[t!]
\centering
\begin{subfigure}{0.24\textwidth}
\centering
\includegraphics[width=0.65\linewidth]{Gibson.pdf}
\captionsetup{justification=centering}
\caption*{\textbf{V}\\ Gibson \textit{et al.}\\ 2002}
\label{fig:s5}
\end{subfigure}
\begin{subfigure}{0.24\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{Salen.pdf}
\captionsetup{justification=centering}
\caption*{\textbf{VI}\\ Idage \textit{et al.}\\ 2010}
\label{fig:s6}
\end{subfigure}
\begin{subfigure}{0.24\textwidth}
\centering
\includegraphics[width=0.7\linewidth]{Fe_N_4.pdf}
\captionsetup{justification=centering}
\caption*{\textbf{VII}\\Herres-Pawlis \textit{et al.}\\ 2017}
\label{fig:s7}
\end{subfigure}
\begin{subfigure}{0.24\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{Thomas.pdf}
\captionsetup{justification=centering}
\caption*{\textbf{IIX}\\Thomas \textit{et al.}\\2001}
\label{fig:s8}
\end{subfigure}
\caption{Structures of iron catalysts used in the ROP of LA
\label{fig:StructuresIronCat2}}
\end{figure}
\end{document}
不使用[c]
,标题对齐,但图形不对齐
使用[c]
,图片对齐,但标题不对齐
答案1
欢迎来到 TeX:SE!
像这样?
一种(唯一可能的)方法是将图像基线移动到其垂直中心并将图像插入表中(正如@John Kormylo 在其评论中所建议的那样),其中一行是垂直居中的图像,下一行是(顶部对齐)标题。
通过adjustbox
这个的帮助可以很容易地做到:
\documentclass{article}
\usepackage[demo,
export]{adjustbox}
\usepackage{tabularx}
\usepackage[skip=1ex]{caption}
\usepackage{subcaption}
\usepackage{textcomp}
\begin{document}
\begin{figure}[htb]
\captionsetup{justification=centering}
\setlength\tabcolsep{1pt}
\adjustboxset{valign=m}
\begin{tabularx}{\linewidth}{*{4}{>{\centering\arraybackslash}X}}
\adjincludegraphics[width=0.65\linewidth,height=3cm]{Gibson.pdf}
& \adjincludegraphics[width=0.9\linewidth,height=1cm]{Salen.pdf}
& \adjincludegraphics[width=0.7\linewidth,height=2.5cm]{Fe_N_4.pdf}
& \adjincludegraphics[width=0.9\linewidth,height=2cm]{Thomas.pdf}
\\
\caption*{\textbf{V}\\ Gibson \textit{et al.}\\ 2002}
\label{fig:s5}
& \caption*{\textbf{VI}\\ Idage \textit{et al.}\\ 2010}
\label{fig:s6}
& \caption*{\textbf{VII}\\Herres-Pawlis \textit{et al.}\\ 2017}
\label{fig:s7}
& \caption*{\textbf{IIX}\\Thomas \textit{et al.}\\2001}
\label{fig:s8}
\end{tabularx}
\caption{Structures of iron catalysts used in the ROP of LA}
\label{fig:StructuresIronCat2}
\end{figure}
\end{document}