我正在使用 Overleaf。我创建了一个包含章节和子章节的文档,我想在子章节下直接插入一张图片。
我按照如下方式进行操作:
\subsection{Title}
\begin{figure}[h]
\includegraphics[width=13cm]{Image}
\end{figure}
不知怎的,我看见了标题,但图像却移到了文档末尾。我该如何修复它,让它恰好位于标题下方?
答案1
您是否尝试过以下@Juan A. Navarro 的回答:
%Available at https://tex.stackexchange.com/questions/8625/force-figure-placement-in-text#:~:text=The%20short%20answer%3A%20use%20the,H%5D%20option%20for%20your%20figure.&text=The%20longer%20answer%3A%20The%20default,how%20books%20are%20often%20typeset.
\usepackage{float}%load this into your preamble
...
\begin{figure}[H]
\centering
\includegraphics[width=13cm]{Image}
\caption{Write some caption here}\label{image1}
\end{figure}