我的大学要求间距为 1.5 倍,左右间距至少为 2 厘米。我想使用 Arial 和页眉,如下所示。
现在,我明白了\vbox badness
,我读到这意味着页面定义不正确。
但是什么是正确的页面布局?我该如何弄清楚?那么我必须在包中设置底部和/或顶部geometry
,以便所有内容都能正确显示?
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{csquotes}
%% use arial
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
%% use 1.5 spacing
\linespread{1.5}
%%%%%%%%%%%%%%%%%%
%% Outer layout
\usepackage[a4paper,width=160mm,top=25mm,bottom=35mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
% redefining chapter numbers
\makeatletter
\def\@makechapterhead#1{%
\vspace*{20\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
\Huge\bfseries \thechapter.\space%
%\par\nobreak
%\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\makeatother
% in the book class, the first page of a chapter uses the plain style. Hence, redefining the plain style with fancyhdr
\fancypagestyle{plain}{%
\fancyhead{}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\renewcommand{\headrulewidth}{0.4pt}
\fancyfoot{}
\fancyfoot[RO,LE]{\thepage}}
\fancyhead{}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}} %makes Chapter 1 dissapear in header
\setlength{\headheight}{15pt} % this adjusts header higth since otherwise headersize too small
\fancyfoot{}
\fancyfoot[RO,LE]{\thepage}
(例如,将底部设置为 15 毫米并不会显示出不好的情况,但看起来并不好)