为什么 pagebreak 不会删除页面底部的多余空间?

为什么 pagebreak 不会删除页面底部的多余空间?

在阅读了 \pagebreak 和 \newpage 之间的区别后,我注意到 \pagebreak 不能正常工作。这是为什么?我是否遗漏了什么?我是否应该在序言中添加一些内容?

\pagebreak{} 和 \pagebreak[4] 都会发生这种情况

代码:

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{setspace}
\onehalfspacing

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


\@ifundefined{date}{}{\date{}}
\makeatother

\usepackage{babel}
\begin{document}
asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg

asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg

asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg

asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg

asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg

\pagebreak[4]

asdgf g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf
g dfh adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh
adfgsdaf afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf
afgsd fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd
fdh gjhsfdgag ag gfd gsg sdhgfsdgasdgf g dfh adfgsdaf afgsd fdh gjhsfdgag
ag gfd gsg sdhgfsdg
\end{document}

输出:

答案1

您必须启用\flushbottom。本文中的默认设置是\raggedbottom

在此处输入图片描述

相关内容