如何防止抵消保证金?

如何防止抵消保证金?

我有基本的类文件,我想使用 fancyhdr。以下是 some-class.cls 的标记:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{some-class}[2013/07/29]

\renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}
\DeclareOption{a4paper}{
    \setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}
}
\DeclareOption{landscape} {
    \setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}
}

%Default options for design
\ExecuteOptions{a4paper}
%Process user given options
\ProcessOptions

\RequirePackage[top=20mm, bottom=25mm, left=25mm, right=0mm]{geometry}
\RequirePackage{fancyhdr}
\fancypagestyle{normal}{
  \fancyhf{} % this clears all six fields (left, center, right in header and footer)
  \fancyhead[C]{\thepage. oldal}
  \renewcommand{\headrulewidth}{0mm}
  \headsep 20mm
}
\pagestyle{normal}

我的document.tex的内容:

\documentclass[]{some-class}
\usepackage{lipsum}
\author{roncsak}
\title{some title}
\date{2013/07/28}
\begin{document}
\lipsum
\lipsum
\end{document}

当不使用 fancyhdr 包时,我设置的每个边距都是我想要的。但是当我使用 \headsep 命令时,整个文档(标题除外)的偏移量为 20 毫米。这没问题,但在这种情况下,底部边距“消失”了。

我想使用某种可以从 \textlength 中减去或使边距“粘性”的代码。

你知道类似这样的事吗?

答案1

我不知道您的类文件中到底有什么内容,但我认为您想要修改的值textheight

为了做到这一点(假设您想减少量=20mm)请将以下行添加到您的文件中:

\addtolength{\textheight}{-20mm} 

相关内容