0

I am working with Overleaf. I have created a document with sections and subsections and I want to insert an image directly under the subsection.

I did it as follows:

\subsection{Title}

\begin{figure}[h]

\includegraphics[width=13cm]{Image}

\end{figure}

Somehow I see the title, but the image goes to the end of the document. How can i fix it, so that it goes exactly under the title?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Dave
  • 3
  • 3
    Why are you using the figure environment, when you don't want the image to float? Just use \includegraphics wherever you want the image to go. – Ingmar Aug 08 '22 at 19:49

1 Answers1

0

Have you tried @Juan A. Navarro's answer below:

%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}

itc
  • 657
  • ah perfect now it worked thanks a lot!!! – Dave Aug 08 '22 at 19:49
  • And do forget to accept it as answer if it solved your problem for the benefit of other users who may be experiencing this same problem. – itc Aug 08 '22 at 19:54