我想要按照下图所示的方式放置图形。
下面的代码可以将三个数字并排放置,但右侧的第三个数字变为 1c(而不是 2)。有什么建议吗?提前谢谢。
\begin{figure*}[tp!]
\centering
\begin{minipage}{.315\linewidth}
\centering
\subcaptionbox{\footnotesize 1a. \label{fig:1a} }
{\includegraphics[width=\textwidth]{figures/1a.pdf}}
\end{minipage}\quad
\begin{minipage}{.315\linewidth}
\centering
\subcaptionbox{\footnotesize 1b. \label{fig:1b}}
{\includegraphics[width=\textwidth]{figures/1b.pdf}}
\end{minipage}\quad
\begin{minipage}{.315\linewidth}
\centering
\subcaptionbox{\footnotesize 2. \label{fig:2}}
{\includegraphics[width=\textwidth]{figures/2.pdf}}
\end{minipage}
\caption{\footnotesize Main caption here. }
\label{fig:main}
\end{figure*}
答案1
以下是使用该subcaption
包的两个版本:
\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure*}[tp!]
\begin{minipage}[t]{.63\linewidth}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/1a.pdf}
\caption{1a}\label{fig:1a}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/1b.pdf}
\caption{1b}\label{fig:1b}
\end{subfigure}
\caption{Main caption here.}
\end{minipage}\hfill
\begin{minipage}[t]{.315\linewidth}
\centering
\includegraphics[width=\textwidth]{figures/1b.pdf}
\caption{Main caption of the second figure}\label{fig:2}
\end{minipage}
\end{figure*}
\begin{figure*}[tp!]
\begin{minipage}[t]{.63\linewidth}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/1a.pdf}
\caption{1a}\label{fig:3a}
\end{subfigure}
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/1b.pdf}
\caption{1b}\label{fig:3b}
\end{subfigure}
\end{minipage}\hfill
\begin{minipage}[t]{.315\linewidth}
\centering
\includegraphics[width=\textwidth]{figures/1b.pdf}
\end{minipage}
\medskip
\begin{minipage}[t]{.63\linewidth}
\caption{Main caption here.}
\end{minipage}\hfill
\begin{minipage}[t]{.315\linewidth}
\caption{Main caption of the second figure}\label{fig:4}
\end{minipage}
\end{figure*}
\end{document}