I have a paper with three large floats that go to the end of the document when compiling the source code, their position vary depending on how I update the content, but they even go to the middle of references list sometimes.
Hence, I use \afterpage{\clearpage}
to force the floats to go in a reasonable position. However, after placement of such command, some empty spaces appear after the float page. I used \vspace{-<some number>\baselineskip}
to insert negative spaces. However, this is not good for two reasons:
- With many changes in the document, the empty spaces change. Thus, the negative space can be either not enough or it may cause overprinting of contents.
- The references are generated automatically by using
\bibliography{*.bib}
, hence, I would not be able to remove the space between references title and references list.
I am using IEEEtran
document class
Here is how I force a float page while filling the current page (this works well for the page before the floats page)
MWE
\documentclass{IEEEtran}
\usepackage[svgnames, x11names]{xcolor}
\usepackage{amsmath}
\usepackage{array}
\renewcommand{\arraystretch}{1.7}
\usepackage{multirow}
\usepackage{caption}
\usepackage{ragged2e}
\usepackage{tabularx}
\newcolumntype{C}{ >{ \arraybackslash \Centering } X }
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{adjustbox}
\usepackage{stackengine}
\newcommand{\stackanchormath}[3][\stackgapSdefaultl]{
\stackanchor[#1]{$#2$}{$#3$}
}
\newlength{\stackgapSdefaultl}
\setlength{\stackgapSdefaultl}{1.06mm}
\setstackgap{S}{\stackgapSdefaultl}
\usepackage{graphicx}
\usepackage{float}
\usepackage{afterpage}
\usepackage{blindtext}
\begin{document}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\begin{figure*}
\centering
\includegraphics[width=0.6\textwidth]{example-image-a}
\end{figure*}
\begin{table*}[htb]
\noindent
\hspace*{\fill}
\begin{minipage}{0.45\textwidth}
% Table options
% Caption
\caption{Top five weak combinations of PoIs at different voltage levels identified using the exhaustive search method}
\label{table:ex_screen_result}
% Center the table
\centering
\begin{tabularx}{1\textwidth}{c ||C C C C C |C}
\toprule
& \multicolumn{5}{c|}{\adjustbox{rotate=90, valign=c}{
\Shortunderstack{{Reference} {PoI}}
} \hspace{\fill} \bfseries Combinations of PoIs \hspace{\fill} } &
\adjustbox{rotate=90}{
\Shortunderstack{{Min} {SDSCR}}
}
\\
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$69$ KV}} & \bfseries 80 & \bfseries 84 & \bfseries 76 & \bfseries 81 & \bfseries 78 & \bfseries 1.77
\\
& 52 & 35 & 86 & 70 & 22 & 1.79
\\
& 40 & 45 & 80 & 90 & 10 & 1.80
\\
& 14 & 11 & 50 & 30 & 20 & 1.83
\\
& 18 & 88 & 32 & 02 & 01 & 1.85
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$34.5$ KV}} & \bfseries 1008 & \bfseries 926 & \bfseries 925 & \bfseries 885 & \bfseries 884 & \bfseries 2.65
\\
& 56 & 900 & 200 & 800 & 400 & 2.68
\\
& 450 & 500 & 400 & 300 & 250 & 2.76
\\
& 750 & 30 & 100 & 20 & 10 & 30
\\
& 40 & 80 & 30 & 180 & 120 & 3.06
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$13.8$ KV}} & \bfseries 969 & \bfseries 998 & \bfseries 1001 & \bfseries 1003 & \bfseries 1000 & \bfseries 1.20
\\
& 60 & 20 & 2000 & 1500 & 200 & 1.22
\\
& 40 & 30 & 450 & 50 & 30 & 1.42
\\
& 95 & 550 & 1400 & 14 & 1700 & 1.60
\\
& 200 & 900 & 1017 & 1222 & 3333 & 1.82
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multicolumn{4}{c}{\bfseries \color{DeepSkyBlue2} Time Consumed} & \multicolumn{3}{c}{\bfseries \color{DeepSkyBlue2} 8 hours}
\\
\bottomrule
\end{tabularx}
\end{minipage}
\hspace{\fill}
\begin{minipage}{0.45\textwidth}
% Table options
% Caption
\caption{Top five weak combinations of PoIs at different voltage levels identified using the exhaustive search method}
\label{table:ex_screen_result}
% Center the table
\centering
\begin{tabularx}{1\textwidth}{c ||C C C C C |C}
\toprule
& \multicolumn{5}{c|}{\adjustbox{rotate=90, valign=c}{
\Shortunderstack{{Reference} {PoI}}
} \hspace{\fill} \bfseries Combinations of PoIs \hspace{\fill} } &
\adjustbox{rotate=90}{
\Shortunderstack{{Min} {SDSCR}}
}
\\
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$69$ KV}} & \bfseries 80 & \bfseries 84 & \bfseries 76 & \bfseries 81 & \bfseries 78 & \bfseries 1.77
\\
& 52 & 35 & 86 & 70 & 22 & 1.79
\\
& 40 & 45 & 80 & 90 & 10 & 1.80
\\
& 14 & 11 & 50 & 30 & 20 & 1.83
\\
& 18 & 88 & 32 & 02 & 01 & 1.85
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$34.5$ KV}} & \bfseries 1008 & \bfseries 926 & \bfseries 925 & \bfseries 885 & \bfseries 884 & \bfseries 2.65
\\
& 56 & 900 & 200 & 800 & 400 & 2.68
\\
& 450 & 500 & 400 & 300 & 250 & 2.76
\\
& 750 & 30 & 100 & 20 & 10 & 30
\\
& 40 & 80 & 30 & 180 & 120 & 3.06
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multirow{5}{0.3cm}{\adjustbox{rotate=90, valign=c, center}{$13.8$ KV}} & \bfseries 969 & \bfseries 998 & \bfseries 1001 & \bfseries 1003 & \bfseries 1000 & \bfseries 1.20
\\
& 60 & 20 & 2000 & 1500 & 200 & 1.22
\\
& 40 & 30 & 450 & 50 & 30 & 1.42
\\
& 95 & 550 & 1400 & 14 & 1700 & 1.60
\\
& 200 & 900 & 1017 & 1222 & 3333 & 1.82
\\
\Xhline{0.25mm}
\addlinespace
\Xhline{0.25mm}
\multicolumn{4}{c}{\bfseries \color{DeepSkyBlue2} Time Consumed} & \multicolumn{3}{c}{\bfseries \color{DeepSkyBlue2} 8 hours}
\\
\bottomrule
\end{tabularx}
\end{minipage}
\hspace{\fill}
\end{table*}
\afterpage{\clearpage}
\blindtext
\blindtext
\blindtext
\section{Conclusions}
\blindtext
\section{Conclusions}
\blindtext
\section{Conclusions}
\blindtext
\end{document}
\rule{width}{height}
. As it sits now we have no way of saying anytihng as we don't know your document class, preamble etc\afterpage
in a production document except as a really last resort (and I wrote it) the question you should be asking (and we can not answer from the posted information) is why are your floats going to the end of the document.x\\x\\x\\x\\x\\x
(with the right number of lines), and replace every image by\rule{3cm}{4cm}
(using the right size for the image) latex will make the same float position decisions so the resulting example will show the problem.\clearpage
is that you have explicitly prevented it from being placed on a float page by\begin{table*}[htb]
which is the same as\begin{table*}[t]
as 2-col floats can not useh
orb
. Why do you preventp
here??????