I'm currently writing my thesis and I'm trying to split several images under different sections.
For some reason, the images dont appear under the correct sections and instead are just placed on the page one after the other.
I wasnt sure how to reproduce a proper MWE as it relies on using my images. I have used placeholders where my images would normally be.
Please see the below MWE I have put together as an example (hope this is ok):
\documentclass[10pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{ {YourGraphicsPath/} }
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\section{Section 1}
\begin{figure}[h]
\includegraphics{Your Image}
\centering
\caption{Test}
\label{fig:Test}
\end{figure}
\section{Section 2}
\begin{figure}[h]
\includegraphics{Your Image 2}
\centering
\caption{Test}
\label{fig:Test}
\end{figure}
\begin{figure}[h]
\includegraphics{Your Image 3}
\centering
\caption{Test}
\label{fig:Test}
\end{figure}
\section{Section 3}
\begin{figure}[h]
\includegraphics{Your Image 4}
\centering
\caption{Test}
\label{fig:Test}
\end{figure}
\end{document}
figure(andtable) are floating environments which means they not necessarily appear in the pdf exactly where you pleaced them in the input. You can influence the positioning of floats (See How to influence the position of float environments like figure and table in LaTeX?). – leandriis Mar 25 '20 at 11:02\captionof{figure}{...}(or\captionof{table}{...}) to add captions to images and tabulars outside of figure od table environments. – leandriis Mar 25 '20 at 11:02\includegraphicx{example-image}to prepare a MWE. – leandriis Mar 25 '20 at 11:06\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Alessandro Cuttin Mar 25 '20 at 11:36