回忆录:减少页面顶部的空间

回忆录:减少页面顶部的空间

我正在使用该memoir包来创建我的硕士论文。

当我写完一页文字并转到下一页时,它会在页眉后和文本后留出一个垂直空间。

这可能是什么原因造成的?我该如何修复它?

在此处输入图片描述

梅威瑟:

\documentclass[english, oneside, 12pt]{memoir}

\usepackage{lipsum}
%Setup for the 'memoir' package (replace 'article')

%Margin
\usepackage[left=3.5cm,right=2.0cm,top=1.5cm,bottom=1.5cm]{geometry}

\linespread{1.15}

\newcommand{\HRule}{\rule{\linewidth}{0.8mm}}

%Text in footer
\usepackage{lastpage} %Finds last page number
\usepackage{xspace} %Inserts necesary space bestween the page number, the dash and the total pagenumber
\newcommand{\footerText}{\thepage\xspace /\pageref{LastPage}}

% Specific chapter style.
% See more at: ftp://ftp.tex.ac.uk/tex-archive/info/MemoirChapStyles/MemoirChapStyles.pdf
\chapterstyle{hangnum}

\nouppercaseheads
\makepagestyle{mystyle} 

\makeevenhead{mystyle}{}{\\ \leftmark}{} 
\makeoddhead{mystyle}{}{\\ \leftmark}{} 

\makeevenfoot{mystyle}{}{\footerText}{} 
\makeoddfoot{mystyle}{}{\footerText}{} 

\makeatletter
    \makepsmarks{mystyle}{% Title in the header
  \createmark{chapter}{left}{shownumber}{\@chapapp\ }{.\ }} 
\makeatother

\makefootrule{mystyle}{\textwidth}{\normalrulethickness}{0.4pt}
\makeheadrule{mystyle}{\textwidth}{\normalrulethickness}

\makepagestyle{plain}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\makeevenfoot{plain}{}{\footerText}{}
\makeoddfoot{plain}{}{\footerText}{}
\makefootrule{plain}{\textwidth}{\normalrulethickness}{0.4pt}

\pagestyle{mystyle}

\setlength{\beforechapskip}{-40pt} 
\setlength{\afterchapskip}{0pt} 
\setlength{\headsep}{0pt}
\setlength{\topmargin}{35pt}
\setlength{\headheight}{102pt}
% \setlength{\textheight}{322pt}
\renewcommand\afterchaptertitle{\par\nobreak\vskip \afterchapskip}

\setlrmarginsandblock{2.5cm}{2.5cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*} %Space from top of paper to header

\setheadfoot{29pt}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\checkandfixthelayout
%%----------------------------------------------------------------------

\begin{document}
\chapter{MVE}

\lipsum[1-10]
\end{document}

由此得出以下结论: 在此处输入图片描述

答案1

解决方案似乎是使用这两个属性添加额外的空间:

\setheadfoot{29pt}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}

定义2\onelineskip(至少在本例中)从水平线到文本开始/停止处有多少空间。将其设置为“1”可获得更好的结果:

\setheadfoot{29pt}{1\onelineskip}
\setheaderspaces{*}{1\onelineskip}{*}

不同之处可见这里: 在此处输入图片描述

相关内容