| 1 |
% ====================================================================== |
| 2 |
% common-headfootheight-en.tex |
| 3 |
% Copyright (c) Markus Kohm, 2013-2023 |
| 4 |
% |
| 5 |
% This file is part of the LaTeX2e KOMA-Script bundle. |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the conditions of |
| 8 |
% the LaTeX Project Public License, version 1.3c of the license. |
| 9 |
% The latest version of this license is in |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 12 |
% version 2005/12/01 or later and of this work. |
| 13 |
% |
| 14 |
% This work has the LPPL maintenance status "author-maintained". |
| 15 |
% |
| 16 |
% The Current Maintainer and author of this work is Markus Kohm. |
| 17 |
% |
| 18 |
% This work consists of all files listed in MANIFEST.md. |
| 19 |
% ====================================================================== |
| 20 |
% |
| 21 |
% Text that is common for several chapters of the KOMA-Script guide |
| 22 |
% Maintained by Markus Kohm |
| 23 |
% |
| 24 |
% ============================================================================ |
| 25 |
|
| 26 |
\KOMAProvidesFile{common-headfootheight-en.tex} |
| 27 |
[$Date: 2023-04-06 09:05:58 +0200 (Do, 06. Apr 2023) $ |
| 28 |
KOMA-Script guide (common paragraph: Head and Foot Height)] |
| 29 |
\translator{Markus Kohm\and Jana Schubert\and Jens Hühne\and Karl Hagen} |
| 30 |
|
| 31 |
\section{Header and Footer Height} |
| 32 |
\seclabel{height} |
| 33 |
\BeginIndexGroup |
| 34 |
\BeginIndex{}{header>height}% |
| 35 |
\BeginIndex{}{footer>height}% |
| 36 |
\IfThisCommonLabelBase{scrlayer-scrpage}{% |
| 37 |
\begin{Explain}% |
| 38 |
The \LaTeX{} standard classes do not use the footer much, and if they do |
| 39 |
use it, they put the contents into a \Macro{mbox} which results in the |
| 40 |
footer being a single text line. This is probably the reason that \LaTeX{} |
| 41 |
itself does not have a well-defined footer height. Although the distance |
| 42 |
between the last baseline of the text area and the baseline of the footer |
| 43 |
is defined with \Length{footskip}\IndexLength[indexmain]{footskip}, if the |
| 44 |
footer consists of more than one text line, there is no definite statement |
| 45 |
whether this length should be the distance to the first or the last |
| 46 |
baseline of the footer. |
| 47 |
|
| 48 |
Although the page header of the standard classes will also be put into a |
| 49 |
horizontal box, and therefore is also a single text line, \LaTeX{} in fact |
| 50 |
provides a length to set the height of the header. The reason for this may |
| 51 |
be that this height is needed to determine the start of the text area. |
| 52 |
\end{Explain}% |
| 53 |
}{% |
| 54 |
The header and footer of a page are central elements not just of a page |
| 55 |
style. They can also serve to restrict layers using the appropriate options |
| 56 |
(see \autoref{tab:scrlayer.layerkeys}, |
| 57 |
\autopageref{tab:scrlayer.layerkeys}). Therefore the heights of these |
| 58 |
elements must be defined.% |
| 59 |
} |
| 60 |
|
| 61 |
\IfThisCommonFirstRun{}{% |
| 62 |
The information in \autoref{sec:\ThisCommonFirstLabelBase.height} applies |
| 63 |
equally to this chapter. So if you have already read and understood |
| 64 |
\autoref{sec:\ThisCommonFirstLabelBase.height}, you can skip ahead to |
| 65 |
\autoref{sec:\ThisCommonLabelBase.height.next}, |
| 66 |
\autopageref{sec:\ThisCommonLabelBase.height.next}.% |
| 67 |
} |
| 68 |
|
| 69 |
\begin{Declaration} |
| 70 |
\Length{footheight} |
| 71 |
\Length{headheight} |
| 72 |
\IfThisCommonLabelBase{scrlayer-scrpage}{% |
| 73 |
\OptionVName{autoenlargeheadfoot}{simple switch}% |
| 74 |
}{}% |
| 75 |
\end{Declaration} |
| 76 |
The \Package{scrlayer} package introduces a new length, \Length{footheight}, |
| 77 |
analogous to \Length{headheight}% |
| 78 |
\IfThisCommonLabelBase{scrlayer-scrpage}{}{of the \LaTeX{} kernel}. |
| 79 |
Additionally, |
| 80 |
\Package{scrlayer\IfThisCommonLabelBase{scrlayer-scrpage}{-scrpage}{}} |
| 81 |
interprets \Length{footskip} to be the distance from the last baseline of the |
| 82 |
text area to the first normal baseline of the footer. The |
| 83 |
\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% |
| 84 |
\important{\hyperref[cha:typearea]{\Package{typearea}}} package interprets |
| 85 |
\Length{footheight} in the same way, so \Package{typearea}'s options for the |
| 86 |
footer height can also be used to set the values for the \Package{scrlayer} |
| 87 |
package. See the \DescRef{typearea.option.footheight} and |
| 88 |
\DescRef{typearea.option.footlines} options in |
| 89 |
\autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.footheight}) |
| 90 |
and option \DescRef{typearea.option.footinclude} on |
| 91 |
\DescPageRef{typearea.option.footinclude} of the same section. |
| 92 |
|
| 93 |
If you do not use the \hyperref[cha:typearea]{\Package{typearea}}% |
| 94 |
\important{\hyperref[cha:typearea]{\Package{typearea}}} package, you should |
| 95 |
adjust the header and footer heights using appropriate values for the lengths |
| 96 |
where necessary. For the header, at least, the \Package{geometry} package, for |
| 97 |
example, provides similar settings. |
| 98 |
\IfThisCommonLabelBase{scrlayer-scrpage}{\par% |
| 99 |
If you choose a header or footer height that is too small for the actual |
| 100 |
content, \Package{scrlayer-scrpage} tries by default to adjust the lengths |
| 101 |
appropriately. At the same time, it will issue a warning containing |
| 102 |
suggestions for suitable settings. These automatic changes take effect |
| 103 |
immediately after the need for them has been detected and are not |
| 104 |
automatically reversed, for example, when the content of the header or |
| 105 |
footer becomes smaller afterwards. |
| 106 |
However,\ChangedAt{v3.25}{\Package{scrlayer-scrpage}}, this behaviour can be |
| 107 |
changed by using the \Option{autoenlargeheadfoot} option. This option |
| 108 |
recognizes the values for simple switches in \autoref{tab:truefalseswitch}, |
| 109 |
\autopageref{tab:truefalseswitch}. The option is activated by default. If it |
| 110 |
is deactivated, the header and footer are no longer enlarged |
| 111 |
automatically. Only a warning with hints for suitable settings is issued.% |
| 112 |
}{% |
| 113 |
\IfThisCommonLabelBase{scrlayer}{\par% |
| 114 |
If you choose a header or footer height that is too small for the actual |
| 115 |
content, \Package{scrlayer} usually accepts this without issuing an error |
| 116 |
message or a warning. The header then expands according to its height, |
| 117 |
usually upwards, with the footer moved down accordingly. Information about |
| 118 |
this change is not obtained automatically. However, packages like |
| 119 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 120 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% |
| 121 |
\IndexPackage{scrlayer-scrpage} that build upon \Package{scrlayer} may |
| 122 |
contain their own tests which can lead to their own actions (see |
| 123 |
\DescRef{scrlayer-scrpage.length.headheight} and |
| 124 |
\DescRef{scrlayer-scrpage.length.footheight} on |
| 125 |
\DescPageRef{scrlayer-scrpage.length.headheight}).% |
| 126 |
}{}% |
| 127 |
}% |
| 128 |
\EndIndexGroup |
| 129 |
% |
| 130 |
\EndIndexGroup |
| 131 |
|
| 132 |
%%% Local Variables: |
| 133 |
%%% mode: latex |
| 134 |
%%% TeX-master: "scrguide-en.tex" |
| 135 |
%%% coding: utf-8 |
| 136 |
%%% ispell-local-dictionary: "en_GB" |
| 137 |
%%% eval: (flyspell-mode 1) |
| 138 |
%%% End: |
| 139 |
|