# How to remove white space after table and before new section?

Kindly please help me soon, I must submit my paper as soon as possible and still there is a problem and white space and though I used htp for table, my table come between the text! also, I've searched a lot and still have this problem, after a long table there is a white space that the section can be in that space. My LaTeX code is as below:

\documentclass{cta-author}
\usepackage{natbib}
\usepackage{longtable}
\usepackage{lineno,hyperref}
\usepackage{lineno}
\usepackage{parskip}
\usepackage[utf8]{inputenc}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment

\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage{resizegather}
\usepackage{booktabs}
\usepackage{bm}
\usepackage[font=small,skip=0pt]{caption}
\usepackage{setspace}

\begin{document}
{text}
\subsection{text}
\begin{table}[!t]
\caption{text1}
\label{table1}
\centering
\resizebox{0.48\textwidth}{!}{%
%{\small \begin{center}
\begin{tabular}{|l|}
%\begin{longtable}{l}
%       \centering
\toprule\toprule
{text}
\bottomrule\bottomrule
\end{tabular}
}
\end{table}
\begin{table}[h]
\caption*{\raggedright Continuation of Table \ref{table1}:}
\label{table2}
\centering
\resizebox{0.48\textwidth}{!}{%
\begin{tabular}{|l|}
\toprule\toprule
{text3}
\end{tabular}}
\vspace{-5pt}
\end{table}
\section{Simulation Results}
\label{section 2}
{text}
\\
\raggedbottom
\begin{table}[htp]
\caption{Simulation}
\label{Table4}
\centering
\begin{spacing}{1.5}
\begin{tabular}{l c}
\toprule\toprule
{text5}
\bottomrule\bottomrule
\end{tabular}
\end{spacing}
\vspace{-10mm}
\end{table}
{text}
\end{document}

• Welcome to TeX.SE. What happens if you remove the \vfill instruction before \section{Simulation Results}? Please also do reveal which document class you employ and what happens if you move \raggedbottom to the preamble, so that the directives applies to the entire document? – Mico Oct 28 '19 at 9:21
• without an example document it is very hard to say anything, but the \\  after the section text is wrong and presumably generates warnings. – David Carlisle Oct 28 '19 at 9:22
• Incidentally, in many (most?) most document classes the default value of \tabcolsep is 6pt; setting it to -9pt (via the instruction \addtolength{\tabcolsep}{-15pt}) is likely to create major typographic malfunctions. – Mico Oct 28 '19 at 9:26
• Thank you for your response, \documentclass{cta-author} its my document class, I did this and moved \vfill before \section{Simulation Results}, but nothing happened. – sanaz Oct 28 '19 at 9:31
• what do you mean by preamble? – sanaz Oct 28 '19 at 9:31

Removing \vfill should do the trick as Mico said.

Also, you might be interested in this question and its answer.

Here is the full (corrected) MWE assuming article document class.

\documentclass{article}

\usepackage{graphicx}
\usepackage{booktabs}

\begin{document}
\begin{table}[h]%[!htbp]%[tp]
\caption*{\raggedright Table 1}
\label{table3new}
\centering
\resizebox{0.48\textwidth}{!}{%
\begin{tabular}{|l|}
\toprule\toprule
{text}\\
\bottomrule\bottomrule
\end{tabular}}
\vspace{-5pt}
\end{table}
%\vfill
\section{Simulation Results}
\label{section Five}
{text}.\\
\raggedbottom

\begin{table}[h]%[!htbp]%[tp]
\caption*{\raggedright Table 2}
\label{table3new}
\centering
\resizebox{0.48\textwidth}{!}{%
\begin{tabular}{|l|}
\toprule\toprule
{text}\\
\bottomrule\bottomrule
\end{tabular}}
\vspace{-5pt}
\end{table}

{text again}
\end{document}


• The question states the the OP is using two column, and this document produces Underfull \hbox (badness 10000) in paragraph at lines 22--24 which should never be generated by an answer (even though the bad \\  code was copied from the question) – David Carlisle Oct 28 '19 at 9:34
• also [h] (athough it avoids warnings in this small example) is usually unsuitable. In most case LaTeX will warn about it and change it to [ht] but [htp] is usually preferable. – David Carlisle Oct 28 '19 at 9:35
• thanks, but still I have this problem, I attach my whole document here to show you my problem – sanaz Oct 28 '19 at 9:37