我想将文本环绕在图形底部行的大子图周围。顶部行 4 个子图没问题,间距正常。但是当我将文本环绕在(e)
底部的大子图周围时(名称(e)
也丢失),标题会拆分段落。此外,标题应该写在下面(e)
。
妇女权利委员会:
\begin{figure}
\begin{minipage}{1.0\textwidth}
\centering
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub1.png}
\caption{}
\end{subfigure}
\hspace{-0.25cm}
\begin{subfigure}{0.25\textwidth}
\includegraphics[height=\linewidth]{Images/SpecificAim3/sub2.png}
\caption{}
\end{subfigure}
\hspace*{-1.05cm}
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub3.png}
\caption{}
\end{subfigure}
\hspace*{-0.25cm}
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub4.png}
\caption{}
\end{subfigure}
\end{minipage}
\bigskip
\begin{wrapfigure}{r}{0.4\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub5.png}
\caption{}
\end{wrapfigure}
\lipsum[1]
\caption{注册可视化。} \end{figure} \lipsum[2]
答案1
这会将图片标题置于最后一幅图像和子标题之下。请注意,部分文本位于图片内,可能相对于其余文本浮动。
有趣的是,当我把\subcaption
和\caption
放在同一组时,就会\caption
变成另一个\subcaption
。
\documentclass{article}
\usepackage{subcaption}
\usepackage[export, draft]{adjustbox}% for valign
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\begin{figure}
\centering% not used
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub1.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[height=\linewidth]{Images/SpecificAim3/sub2.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub3.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub4.png}
\caption{}
\end{subfigure}\vspace{\floatsep}
\begin{minipage}[t]{\dimexpr 0.6\textwidth-\columnsep}
\lipsum[1]
\end{minipage}\hfill
\begin{minipage}[t]{0.4\textwidth}% to include figure \caption
\begin{subfigure}[t]{\linewidth}
\includegraphics[width=\linewidth, valign=t]{Images/SpecificAim3/sub5.png}
\caption{}
\end{subfigure}
\caption{Registration visualized. }
\end{minipage}
\end{figure}
\lipsum[2]
\end{document}
此版本使用单独的图形和带有 的 wrapfig \ContinuedFloat
。如果图形浮动到下一页,则 wrapfig 也应浮动,尽管它位于新段落的开头而不是图形的结尾。
\documentclass{article}
\usepackage{subcaption}
\usepackage[export, draft]{adjustbox}% for valign
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}
\begin{figure}[ht]
\centering% not used
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub1.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[height=\linewidth]{Images/SpecificAim3/sub2.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub3.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub4.png}
\caption{}
\end{subfigure}
\end{figure}% automatic \textfloatssep
\begin{wrapfigure}{R}{0.4\textwidth}
\ContinuedFloat
\vskip-\intextsep
\vbox{\includegraphics[width=0.4\textwidth]{Images/SpecificAim3/sub5.png}
\subcaption{}}
\caption{Registration visualized. }
\end{wrapfigure}
\lipsum[1-2]
\end{document}
这会将所有内容放入一个环绕图。它故意与左侧重叠,然后在文本中添加一个间隙以匹配。请注意,不是移动第一条底线,这样间隙就出现在底线下方。
\documentclass{article}
\usepackage{subcaption}
\usepackage[export, draft]{adjustbox}% for valign
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{lipsum}
\newlength{\overlap}
\begin{document}
\begin{wrapfigure}{r}{0.4\textwidth}
\sbox0{\begin{minipage}{\textwidth}% measure first row
\centering% not used
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub1.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[height=\linewidth]{Images/SpecificAim3/sub2.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub3.png}
\caption{}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=\linewidth]{Images/SpecificAim3/sub4.png}
\caption{}
\end{subfigure}
\end{minipage}}%
\setlength{\overlap}{\dimexpr \ht0+\dp0+\intextsep-\ht\strutbox}% compute overlap distance
\global\overlap=\overlap
\hfill\llap{\usebox0}\par\vskip\floatsep% overlap left side of page
\vbox{\includegraphics[width=0.4\textwidth]{Images/SpecificAim3/sub5.png}
\subcaption{}}
\caption{Registration visualized. }
\vskip-\overlap
\end{wrapfigure}
\strut\vspace{\overlap}\par% create gap below baseline
\lipsum[1-2]
\end{document}