I have some simple LaTeX code structured as follows:
- Introduction
- Results
- Discussion
The results section is composed of ten tables. The problem is that the heading (and subsequent text/tables) for the discussion section keep going up and being randomly distributed through the tables in the results. I've been trying to fix this for the past two hours, with some combination of the float package, [H], and vspace, but to no avail. I am working in OverLeaf. Here is the link to my paper: Paper. Any help would be much appreciated.
I also looked at a few other questions and tried implementing their suggestions (\FloatBarrier, placeins , etc.), but to no avail.
Here is some code:
\documentclass[12pt]{article}
\usepackage{multirow}
\usepackage{float}
\usepackage{physics}
\usepackage{siunitx}
\usepackage{enumerate}
\usepackage{array}
\usepackage{enumitem}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{graphicx,booktabs}
\begin{document}
\title{Very Important Paper}
\author{Billy Ards}
\date{\today}
\maketitle
\section{Introduction}
Lorem Ipsum
\section{Results}
\begin{table}[h!]
\begin{center}
\begin{tabular}{ c p{5cm} p{5cm} }
\toprule
Configuration & Word & Prediction \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}
\raisebox{-\totalheight}{\includegraphics[width=0.3\textwidth]{B1.png}}
&
stuff in table
&
stuff in table
\\ \bottomrule
\end{tabular}
\caption{$(60,60,60), 60^{\circ}$, P}
\label{tbl:myLboro}
\end{center}
\end{table}
\begin{table}[t]
\begin{center}
\begin{tabular}{ c p{5cm} p{5cm} }
\toprule
Configuration & Word & Prediction \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}
\raisebox{-\totalheight}{\includegraphics[width=0.3\textwidth]{B2.png}}
&
text in table
&
text in table
\\ \bottomrule
\end{tabular}
\caption{$(60,60,60), 80^{\circ}$, E}
\label{tbl:myLboro}
\end{center}
\end{table}
\begin{table}[h]
\begin{center}
\begin{tabular}{ c p{5cm} p{5cm} }
\toprule
Configuration & Word & Prediction \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}
\raisebox{-\totalheight}{\includegraphics[width=0.3\textwidth]{B3.png}}
&
text in table
&
text in table
\\ \bottomrule
\end{tabular}
\caption{$(60,60,60), 45^{\circ}$, E}
\label{tbl:myLboro}
\end{center}
\end{table}
\begin{table}[b!]
\begin{center}
\begin{tabular}{ c p{5cm} p{5cm} }
\toprule
Configuration & Word & Prediction \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}
\raisebox{-\totalheight}{\includegraphics[width=0.3\textwidth]{B4.png}}
&
text in table
&
text in table
\\ \bottomrule
\end{tabular}
\caption{$(60,60,60), 30^{\circ}$, E}
\label{tbl:myLboro}
\end{center}
\end{table}
\section{Discussion}
\begin{figure}[H]
\centering
\includegraphics[width=14cm]{Picture.png}
\caption{These are really important.}
\end{figure}

\begin{table}is to allow TeX to move the table somewhere else. If you don't want the table to move, then you don't need\begin{table}. (Also, your code doesn't give your output.) – Teepeemm Sep 30 '22 at 18:19