我想将两个图形(一个带有两个子图)放入双列文档的一列中,如下所示。
我试过了\begin{figure*} ... \end{figure*}
,但得到了这个,
我也尝试过\begin{multicols}{1} ... \end{multicols}
,但一无所获。
这是我的源代码。
\documentclass[twocolumn,12pt]{article}
\usepackage{blindtext}
\usepackage{cleveref}
\usepackage{todonotes} % create Placeholder for missing figure
\usepackage{subcaption}
\usepackage{multicol}
\begin{document}
\blindtext
\blindtext
\blindtext
\begin{figure*}[h]%[pbth]
\centering
\begin{subfigure}{0.3\textwidth}
\missingfigure[figwidth=\textwidth]{}
\caption{Subfigure 1}
\end{subfigure}
\begin{subfigure}{0.3\textwidth}
\missingfigure[figwidth=\textwidth]{}
\caption{Subfigure 2}
\end{subfigure}
\begin{subfigure}{0.3\textwidth}
\missingfigure[figwidth=\textwidth]{}
\caption{Fig. 2}
\end{subfigure}
\caption{Fig. 1}
\end{figure*}
\blindtext
\blindtext
\blindtext
\begin{multicols}{1}
\begin{figure}%[h]%[pbth]
\centering
\begin{subfigure}{0.3\textwidth}
\missingfigure[figwidth=\textwidth]{}
\caption{Subfigure 1}
\end{subfigure}
\begin{subfigure}{0.3\textwidth}
\missingfigure[figwidth=\textwidth]{}
\caption{Subfigure 2}
\end{subfigure}
\caption{Fig. 1}
\end{figure}
\begin{figure}%{0.3\textwidth}
\missingfigure[figwidth=.3\textwidth]{}
\caption{Fig. 2}
\end{figure}
\end{multicols}
\end{document}
答案1
您可以利用小页面环境来放置普通图形和子图形的组合。
\documentclass[twocolumn,12pt]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure*}[ht]
\centering
\minipage[t]{0.66\linewidth}
\begin{subfigure}[t]{.5\linewidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Bob}
\end{subfigure}
\begin{subfigure}[t]{.5\linewidth}
\includegraphics[width=\linewidth]{example-image}
\caption{Bob's brother}
\end{subfigure}
\caption{This is a description that's too long to fit on one line.}\label{fig:awesome_image3}
\endminipage
~ % some horizontal spacing, can be done in different ways
\minipage[t]{0.33\linewidth}%
\includegraphics[width=\linewidth]{example-image}
\caption{This is a description that's even longer, some would say that it's even too long. However, it shows that figure vertical alignment is not affected.}\label{fig:awesome_image3}
\endminipage
\end{figure*}
\end{document}
如您所见,图形是水平对齐的,与标题长度无关。这是因为我对小页面和子图使用了位置修饰符 top [t]。显然,如果图像大小相同,这种相对简单的解决方案效果最好,因为图形的顶部对齐而不是底部对齐。