How do prevent tables from jumping to the next section? in this example, tables 2 and 3 should belong to section 1 but they jump to section 2 which is irrelevant to that section. Please note this is a two-column latex template and the tables are big, so they need to span both columns. Here is my code:
\documentclass[default,iicol]{sn-jnl}% Default with double column layout
\jyear{2021}%
%\usepackage{float}
\usepackage{tabularx}
\usepackage{array, makecell}
\usepackage{cuted}
\usepackage{stfloats}
%\usepackage{dblfloatfix}
\usepackage{lipsum}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
%\usepackage{kantlipsum}
\begin{document}
\section{sec1}\label{sec1}
\lipsum[1-2]
%% TABLE 1
\begin{table*}[b]
\begin{center}
\caption{TABLE 1}
\label{Tab1}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
name & job & title & age & address & status \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
\end{tabular}
\end{center}
\end{table*}
\lipsum[2-7]
%% TABLE 2
\begin{table*}[b]
\begin{center}
\caption{TABLE 2}
\label{Tab2}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
name & job & title & age & address & status \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
\end{tabular}
\end{center}
\end{table*}
%% TABLE 3
\begin{table*}[b]
\begin{center}
\caption{TABLE 3}
\label{Tab3}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
name & job & title & age & address & status \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols & Ida Nichols \\
\hline
\end{tabular}
\end{center}
\end{table*}
%-------------------------------------------------------------------------
\section{sec2}\label{sec2}
\lipsum[1-2]
\end{document}
Best Answer
table*
floats always appear on the top of the next page from where is inserted.table*
environment (which span over both columns), when your showed table can be nicely fit in one column?Addendum (1): Apparently OP table is so big, that it need to span both columns,. In this case may be of help package
stfloats
which enable to put table at bottom or to top of the same page where it is inserted:**Addendum (2):
table*
positioning accordingly. In the case showed in the edited question, an MWE can be: