0

Latex is creating a blank page before a sideways table. Initially, I thought this was a problem with sideways table (see Landscape mode causes a blankpage). Indeed the blank page goes away if I use any of the solutions proposed on that page (i.e., the afterpage package or removing the "H" float placement). However, I need the tables, as well as the section headings, exactly where they appear on the document. If I use either solution, then stuff moves around.

Then, during my several attempts to create a replicable example, I discovered that, by removing hyperref, the problem goes away. According to this thread, the float package should be loaded before hyperref. It doesn't say anything about rotfloat, though. Is there any incompatibility between the two? (Needless to say, I can't simply remove hyperref from the document altogether, as I need it elsewhere.)

Example:

\documentclass[12pt,letterpaper]{article}
\usepackage{rotfloat}
\usepackage{hyperref}
\usepackage{dcolumn}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\doublespacing
\frenchspacing
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}

\begin{document}

\section{Section Heading}
\subsection{Subsection Heading}
\subsubsection{First Sub-Subsection Heading}
\begin{table}[H] \centering 
  \caption{A smallish table} 
\begin{tabular}{@{\extracolsep{5pt}} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\multicolumn{1}{c}{} & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} \\ 
\hline \\[-1.8ex] 
\multicolumn{1}{c}{Row 1} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 2} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 3} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 4} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 5} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 6} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 7} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 8} & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{4}{l}{A note} \\ 
\multicolumn{4}{l}{Another note} \\ 
\end{tabular} 
\end{table} 

\begin{table}[H] \centering 
  \caption{another  smallish table} 
\begin{tabular}{@{\extracolsep{5pt}} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\multicolumn{1}{c}{} & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} \\ 
\hline \\[-1.8ex] 
\multicolumn{1}{c}{Row 1} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 2} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 3} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 4} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 5} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 6} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 7} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 8} & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{4}{l}{A note} \\ 
\multicolumn{4}{l}{Another note} \\ 
\end{tabular} 
\end{table} 

\subsubsection{Second Sub-Subsection Heading}
\begin{sidewaystable}[H] \centering 
  \caption{A very large table} 
\footnotesize 
\begin{tabular}{@{\extracolsep{5pt}}lD{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\\[-1.8ex] & \multicolumn{6}{c}{Table heading} \\ 
\\[-1.8ex] & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} & \multicolumn{1}{c}{Column 4} & \multicolumn{1}{c}{Column 5} & \multicolumn{1}{c}{Column 6} \\ 
 & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} \\ 
 & \multicolumn{3}{c}{Heading for columns 1-3} & \multicolumn{3}{c}{Heading for columns 4-6} \\ 
\hline \\[-1.8ex] 
  Row 1 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 2 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 3 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 4 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 5 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 6 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 7 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 8 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 9 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 10 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 11 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 12 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 13 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 14 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 15 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 16 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 17 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 18 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 19 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 20 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 21 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 22 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 23 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 24 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 25 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 26 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{7}{l}{A note} \\ 
\multicolumn{7}{l}{Another note} \\ 
\multicolumn{7}{l}{Yet another note} \\ 
\end{tabular} 
\end{sidewaystable} 

\end{document}

Output here.

The problem goes away if I don't load hyperref

\documentclass[12pt,letterpaper]{article}
\usepackage{rotfloat}
\usepackage{dcolumn}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\doublespacing
\frenchspacing
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}

\begin{document}

\section{Section Heading}
\subsection{Subsection Heading}
\subsubsection{First Sub-Subsection Heading}
\begin{table}[H] \centering 
  \caption{A smallish table} 
\begin{tabular}{@{\extracolsep{5pt}} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\multicolumn{1}{c}{} & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} \\ 
\hline \\[-1.8ex] 
\multicolumn{1}{c}{Row 1} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 2} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 3} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 4} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 5} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 6} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 7} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 8} & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{4}{l}{A note} \\ 
\multicolumn{4}{l}{Another note} \\ 
\end{tabular} 
\end{table} 

\begin{table}[H] \centering 
  \caption{another  smallish table} 
\begin{tabular}{@{\extracolsep{5pt}} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\multicolumn{1}{c}{} & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} \\ 
\hline \\[-1.8ex] 
\multicolumn{1}{c}{Row 1} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 2} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 3} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 4} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 5} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 6} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 7} & 0.00 & 0.00 & 0.00 \\ 
\multicolumn{1}{c}{Row 8} & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{4}{l}{A note} \\ 
\multicolumn{4}{l}{Another note} \\ 
\end{tabular} 
\end{table} 

\subsubsection{Second Sub-Subsection Heading}
\begin{sidewaystable}[H] \centering 
  \caption{A very large table} 
\footnotesize 
\begin{tabular}{@{\extracolsep{5pt}}lD{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} D{.}{.}{-2} } 
\\[-1.8ex]\hline \\[-1.8ex] 
\\[-1.8ex] & \multicolumn{6}{c}{Table heading} \\ 
\\[-1.8ex] & \multicolumn{1}{c}{Column 1} & \multicolumn{1}{c}{Column 2} & \multicolumn{1}{c}{Column 3} & \multicolumn{1}{c}{Column 4} & \multicolumn{1}{c}{Column 5} & \multicolumn{1}{c}{Column 6} \\ 
 & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} & \multicolumn{1}{c}{Column subheading} \\ 
 & \multicolumn{3}{c}{Heading for columns 1-3} & \multicolumn{3}{c}{Heading for columns 4-6} \\ 
\hline \\[-1.8ex] 
  Row 1 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 2 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 3 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 4 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 5 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 6 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 7 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 8 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 9 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 10 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 11 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 12 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 13 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 14 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 15 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 16 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 17 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 18 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 19 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 20 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 21 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 22 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 23 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 24 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 25 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
  Row 26 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\ 
\hline \\[-1.8ex] 
\multicolumn{7}{l}{A note} \\ 
\multicolumn{7}{l}{Another note} \\ 
\multicolumn{7}{l}{Yet another note} \\ 
\end{tabular} 
\end{sidewaystable} 

\end{document}

Output here.

  • 1
    It is simply wrong to use the [H] placement specifier with a sidewaystable environment. Don't do it, and the all-empty page disappears -- irrespective of whether or not the hyperref package is loaded. If you want the table to show up on the same page as the subsubsection-level header, don't use a sidewaystable environment; instead, use a sideways environment. – Mico Oct 21 '19 at 19:01
  • "It is simply wrong to use the [H] placement specifier with a sidewaystable environment." Source? If that was the case, why would the developers even bother creating rotfloat? – Lucas De Abreu Maia Oct 21 '19 at 19:04
  • 3
    I didn't wrote the rotfloat package to combine rotating package and [H], instead I wrote it to combine rotating and floats defined with \newfloat offered by the float package. I second the statement from Mico, it's wrong to use [H] with a sidewaystable environment... However, using [H] with sideways-floats could make sense in special situations, for example when combining it with \afterpage offered by the afterpage package. – user2574 Oct 21 '19 at 19:26
  • 2
    @LucasDeAbreuMaia - Question: Source? Answer: Please study the user guide of the rotating package -- and especially its section 5, "Sideways figures and tables". You'll learn, inter alia, that the sidewaystable and sidewaysfigure environments are meant to occupy an entire page at a time. If you try to shoehorn a subsubsection-level header onto a page with a sidewaystable environment (via the [H] specifier), you'll necessarily get a massively overfull page -- as indeed your code does. – Mico Oct 21 '19 at 19:28
  • @Nico, the sideways environment, in addition to making the font size \tiny, did the trick. I still do not understand why loading hyperref results in a blank page, but if you want to offer the sideways environment suggestion as an answer, I'll accept it. Thanks. – Lucas De Abreu Maia Oct 21 '19 at 20:27
1

Your page is overfull, you get a warning

Overfull \vbox (33.08087pt too high) has occurred while \output is active []

Such overfull page are always in danger of creating empty pages: Often LaTeX pushes them one page later to try if they fit there.

You can enlarge the page:

\subsubsection{Second Sub-Subsection Heading}\enlargethispage{40pt}
  • That doesn't explain why the blank page only appears when I load hyperref. – Lucas De Abreu Maia Oct 21 '19 at 19:16
  • Well hyperref does a lot of small things that affect typesetting, in this case the effect disappear if one disables raiselinks with \def\Hy@raisedlink#1{}. But I don't want to spent my time hunting down what exactly happens. – Ulrike Fischer Oct 21 '19 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.