我想包含 3 张图片。第一张图片是左图,其他两张图片堆叠在右图中的单独图中。我该怎么做?
我目前拥有的:
\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{image1} % first figure itself
\caption{first figure}
\end{minipage}\hfill
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{image2} % second figure itself
\caption{second figure}
\end{minipage}
\end{figure}
\end{document}
这将产生以下输出:
答案1
已采用回答你的情况:
(红线表示部分页面布局)
\documentclass{article}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage[skip=0.5ex]{subcaption}
\newlength{\colwidth}
\usepackage[demo,
export]{adjustbox}
\usepackage{tabularx}
\newsavebox{\picbox}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}
\begin{document}
\lipsum[66]
\begin{figure}[htb]
\setkeys{Gin}{width=\linewidth, keepaspectratio}
\setlength\colwidth{0.33\linewidth}
\savebox{\picbox}{\parbox{\colwidth}{\addtocounter{figure}{1}
\begin{subfigure}{\linewidth}
\includegraphics[height=22mm]{case_a}
\caption{}
\label{fig:case-a}
\end{subfigure}
\smallskip
\begin{subfigure}{\linewidth}
\includegraphics[height=22mm]{case_b}
\caption{}
\label{fig:case-b}
\end{subfigure}}
}% end of save box
\begin{tabularx}{\linewidth}{@{} X @{\ } p{\colwidth}@{}}
\includegraphics[height=\dimexpr\ht\picbox+\dp\picbox,
valign=c]{merge-scenario}
\addtocounter{figure}{-1}
\caption{Merge Scenario}
\label{fig:merge-scenario}
&
\usebox\picbox
\caption{States}
\label{fig:scenario}
\end{tabularx}
\end{figure}
See figure \ref{fig:scenario}, particularly \ref{fig:case-b} \dots
\end{document}