\documentclass[a4paper, 11pt]{book}
% Packages
\usepackage[utf8]{inputenc}
\usepackage{graphicx} % For images
\usepackage{titling} % For adjusting white space above headers
\usepackage{titlesec} % For adjusting title spacing
\usepackage{biblatex} % Reference Manager
\usepackage{enumitem} % To itemize the symbols and abbreviations list
\usepackage{etoolbox} % To help remove numbering from inputted pages in frontmatter
\usepackage{lipsum}
\usepackage{setspace}
% Environments
% Extra Declarations
\let\cleardoublepage=\clearpage % Clear second page automatically set by book class
% Set itemized format for symbols and abbreviations
\newlist{abbrv}{itemize}{1}
\setlist[abbrv,1]{label=,labelwidth=1in,align=parleft,itemsep=0.1\baselineskip,leftmargin=!}
% To shift margins of even numbered pages to the left
\let\tmp\oddsidemargin
\let\evensidemargin\oddsidemargin
\let\evensidemargin\tmp
\reversemarginpar
% Increase right margin length by removing margin notes and increasing width
\marginparwidth 0pt % set width of margin notes to zero
\marginparsep 0pt % set distance between margin notes and body to zero
\textwidth \dimexpr \pdfpagewidth -2\oddsidemargin -2in % increase body width
%%%%%%%%%% Document Starts Here %%%%%%%%%%%%%%%%%%
\begin{document}
\frontmatter %Tex files that were inputted are set formats by my University
\mainmatter
%\pagestyle{plain} - default setting of mainmatter
\chapter{Materials and Methods}
\onehalfspacing
\section{Experimental Paradigm}
In this experiment, the subjects were asked to perform a task based on four movement indicators. These four indicators are presented on a screen. The indicators represent four directions - forward, backward, left and right which will be presented in sequence. The sequence of movement the four movement indicators will be random each trial. The experiment start with the subject looking at a fixation target: a solid dot at the centre of the screen, the dot will remain on the screen for the whole experiment to prevent eye movement. To start the experiment the subject will press a button soon after which the four indicators will be presented on the screen one after the other, every 500ms. After the fourth indication is displayed, the fourth auditory cue is generated after 200ms and for a duration of 200ms to indicate the subject to start planning the movements, a second auditory cue is generated at a random interval between 500ms t0 850ms after the first cue is completed, again for a duration of 200ms.
The sound used represents the note A and has an octave = 4 and stereo = -1. The second cue is indicates the subject to initiate the first foot movement. Once the first foot movement is completed, which is detected by the foot interface, the first and second auditory cues are generated and the the second foot movement is performed in accordance to the sequence displayed by the indicators. This is repeated for the 4 moves in total and this constitutes a single trial. There are a total of 200 trials, 2 min breaks are given every 6 trials in order to ensure that the participant does not get physically or mentally exhausted. Out of the 200 trials there will be 10 different patterns of sequences each repeated 20 times.
\section{Recruitment}
\lipsum[2]
\backmatter
\end{document}
在“实验范式”部分中,如果现在运行,则节标题和第一段之间以及第一段和第二段之间有相当大的空间,如下所示:
现在,如果我在第二段或第一段的任何地方添加一些文本(大约 2 到 3 行),格式就会恢复到应有的样子。这似乎是某种压缩效果,但我不明白为什么以及如何在尺寸大致固定的情况下发生这种情况。我尝试使用setspace
和titlesec
包来格式化距离,但没有任何效果。真的很感谢你的帮助。
编辑:
\raggedbottom
有效。我发现的另一个解决方案是使用\clearpage
。
我还有一个问题是,当我使用这两种解决方案中的任何一种时,为什么下一部分不会向上移动来填充该页面的剩余空间?