Latex 在横向表格前创建了一个空白页。起初,我以为这是横向表格的问题(请参阅横向模式导致空白页)。如果我使用该页面上提出的任何解决方案(即 afterpage 包或删除“H”浮动位置),空白页就会消失。但是,我需要表格以及部分标题,确切地它们在文档中出现的位置。如果我使用任一解决方案,那么内容就会移动。
然后,在我多次尝试创建可复制的示例时,我发现,通过删除 hyperref,问题就消失了。根据此主题,float 包应该在 hyperref 之前加载。但是它没有提到 rotfloat。这两者之间是否存在不兼容性?(不用说,我不能简单地将 hyperref 从文档中完全删除,因为我在其他地方需要它。)
例子:
\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}
输出这里。
如果我不加载 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}
输出这里。
答案1
您的页面已满,您会收到警告
Overfull \vbox (33.08087pt too high) has occurred while \output is active []
这种过满的页面总是存在创建空白页的危险:LaTeX 通常将它们推到下一页以尝试它们是否适合那里。
您可以放大页面:
\subsubsection{Second Sub-Subsection Heading}\enlargethispage{40pt}