我们如何在章节号(#)和章节标题行之间以及章节标题行和第一段之间留出 25 毫米的垂直间隙。
答案1
构建于章节号和章节标题之间的空格长度,您所追求的空间在\@makechapterhead
for \chapter
(和\@makeschapterhead
for \chapter*
)中给出。以下定义取自report.cls
:
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@% <--- Chapter title & Chapter text
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@% <------- Chapter text and first paragraph
}}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@% <------- Chapter text and first paragraph
}}
可以使用以下方法修补/修改这些值etoolbox
:
\documentclass{report}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\@makechapterhead}{20\p@}{25mm}{}{}% Correct \chapter
\patchcmd{\@makechapterhead}{40\p@}{25mm}{}{}% ... \chapter
\patchcmd{\@makeschapterhead}{40\p@}{25mm}{}{}% ... \chapter*
\makeatother
\begin{document}
\chapter{A chapter} Some text
\chapter*{Another chapter} Some text
\end{document}