I have a MWE as given below:
/*Packages that are being used
...
...
*/
\chapter{...}
\section{...}
\paragraph{...}
\section{...}
...
\section{...}
\paragraph{...}
(some text)
\begin{figure}
\includegraphics[scale=0.675,angle=90]{filename}
\caption[reference]{caption}
\end{figure}
\section{...}
\paragraph{...}
Instead of appearing in the place I expected in the middle of the text, my figure ends up at the end of the chapter after the last paragraph. How could I solve this?
Following suggestions I tried
\begin{figure}[h]
, \begin{figure}[ht]
and \begin{figure}[htbp]
but figure still goes to the end of chapter.
Solved using \usepackage{float}
and \begin{figure}[H
], as suggested in How to influence the position of float environments like figure and table in LaTeX?
\includegraphics
includes the image, the purpose of thefigure
environment is to take the content out of the document flow and allow it to be inserted elsewhere to help with page breaking. By default leaving it in place isn't allowed but you can use\begin{figure}[htbp]
to allow it to stay in place if it fits.\begin{figure}
. Like this:\begin{figure}[H]
. To do that you should also add a new package called\usepackage{float}
. Anyway, further information can be seen here.\paragraph
is a fourth level heading and should be used below\subsubsection
not below\section