| 1 |
% ====================================================================== |
| 2 |
% typearea-en.tex |
| 3 |
% Copyright (c) Markus Kohm, 2001-2022 |
| 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 |
% Chapter about typearea of the KOMA-Script guide |
| 22 |
% Maintained by Markus Kohm |
| 23 |
% |
| 24 |
% ====================================================================== |
| 25 |
|
| 26 |
\KOMAProvidesFile{typearea-en.tex}% |
| 27 |
[$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ |
| 28 |
KOMA-Script guide (chapter: typearea)] |
| 29 |
\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and |
| 30 |
Karl Hagen} |
| 31 |
|
| 32 |
\chapter{Calculating the Page Layout with \Package{typearea}} |
| 33 |
\labelbase{typearea} |
| 34 |
|
| 35 |
\BeginIndexGroup% |
| 36 |
\BeginIndex{Package}{typearea}% |
| 37 |
Many {\LaTeX} classes\iffree{, including the standard classes,}{} present the |
| 38 |
user with a largely fixed configuration of margins and page layout. In the |
| 39 |
standard classes, the choice is limited to selecting a font size. |
| 40 |
There are separate packages, such as \Package{geometry}\IndexPackage{geometry} |
| 41 |
(see \cite{package:geometry}), which give the user complete control over, but |
| 42 |
also full responsibility for, setting the type area and margins. |
| 43 |
|
| 44 |
\KOMAScript{} takes a somewhat different approach with the \Package{typearea} |
| 45 |
package. Users are offered ways to adjust the design and algorithms based on |
| 46 |
established typographic standards, making it easier for them to make good |
| 47 |
choices. |
| 48 |
|
| 49 |
\iffalse% Umbruchoptimierung!!! |
| 50 |
Note that the \Package{typearea} package makes use of the \Package{scrbase} |
| 51 |
package. The latter is explained in the expert section of this |
| 52 |
\iffree{guide}{book} in \autoref{cha:scrbase} on \autopageref{cha:scrbase}. |
| 53 |
However, most of the features documented there are directed not to users but |
| 54 |
to class and package authors. |
| 55 |
\fi |
| 56 |
|
| 57 |
\section{Fundamentals of Page Layout} |
| 58 |
\seclabel{basics} |
| 59 |
|
| 60 |
\begin{Explain} |
| 61 |
At first glance, a single page of a book or other printed material |
| 62 |
consists of the margins, |
| 63 |
\iffalse% Umbruchkorrekturtext |
| 64 |
\footnote{The author and the editor have considered the question as to |
| 65 |
whether, since a page has only one periphery, the term should be |
| 66 |
``the margin.'' However, since \LaTeX{} logically divides this one |
| 67 |
margin into several margins, which are determined separately, we |
| 68 |
use the term ``the margins'' here.}% |
| 69 |
\fi% |
| 70 |
a header, a body of text, and a footer. More precisely, there |
| 71 |
is also a space between the header area and the text |
| 72 |
body, as well as between the body and the footer. The text body is |
| 73 |
called, in the jargon of typographers and typesetters, the \emph{type area}. |
| 74 |
The division of these areas, as well as their relations to each other and |
| 75 |
to the paper, is called the \emph{page layout}.\Index[indexmain]{page layout} |
| 76 |
|
| 77 |
Various algorithms and heuristic methods for constructing an appropriate |
| 78 |
type area have been discussed in the literature% |
| 79 |
\iffree{ \cite{DANTE:TK0402:MJK}}{. A short introduction to the basics may |
| 80 |
be found at \autoref{cha:typeareaconstruction}}. |
| 81 |
These rules are known as the ``canons of page construction.'' One approach |
| 82 |
often mentioned involves diagonals and their intersections. The result is |
| 83 |
that the aspect ratio of the type area corresponds to the proportions of the |
| 84 |
\emph{page}. In a one-sided document,\Index{one-sided} the left and right |
| 85 |
margins should have equal widths, while the ratio of the top and bottom |
| 86 |
margins should be 1:2. In a two-sided document\Index{two-sided} (e.\,g. a |
| 87 |
book), however, the entire inner margin (the margin at the spine) should be |
| 88 |
the same size as each of the two outer margins; in other words, a single |
| 89 |
page contributes only half of the inner margin. |
| 90 |
|
| 91 |
In the previous paragraph, we mentioned and emphasised \emph{the page}. It |
| 92 |
is often mistakenly thought that the format of the page is the same as the |
| 93 |
format of the paper.\Index[indexmain]{page>format}% |
| 94 |
\Index[indexmain]{paper>format} However, if you look at |
| 95 |
a bound document, you can see that part of the paper disappears in the |
| 96 |
binding\Index[indexmain]{binding} and is no longer part of the visible page. |
| 97 |
For the type area, however, it is not the format of the paper which is |
| 98 |
important; it is the impression of the visible page to the reader. Thus, it |
| 99 |
is clear that the calculation of the type area must account for the ``lost'' |
| 100 |
paper in the binding and add this amount to the width of the inner margin. |
| 101 |
This is called the \emph{binding correction}.\Index[indexmain]{binding |
| 102 |
correction} The binding correction is therefore calculated as part of the |
| 103 |
\emph{gutter}\Index[indexmain]{gutter} but not the visible inner margin. |
| 104 |
|
| 105 |
The binding correction depends on the production process and cannot be |
| 106 |
defined in general terms. It is therefore a parameter that must be redefined |
| 107 |
for each project. In professional printing, this value plays only a minor |
| 108 |
role, since printing is done on larger sheets of paper and then cropped to |
| 109 |
the right size. The cropping is done so that the above relations for the |
| 110 |
visible, two-sided page are maintained. |
| 111 |
|
| 112 |
So now we know how the individual parts of a page relate to each other. |
| 113 |
However, we do not yet know how wide and high the type area is. Once we know |
| 114 |
one of these two dimensions, we can calculate all the other dimensions from |
| 115 |
the paper format and the page format or the binding correction. |
| 116 |
\begin{align*} |
| 117 |
\Var{type~area~height}\Index{type area} : \Var{type~area~width} &= |
| 118 |
\Var{page~height}\Index{page} : \Var{page~width}\\ |
| 119 |
\Var{top~margin}\Index{margin} : \Var{footer~margin} &= |
| 120 |
\text{1} : \text{2} \\ |
| 121 |
% |
| 122 |
\Var{left~margin} : \Var{right~margin} &= \text{1} : \text{1} \\ |
| 123 |
% |
| 124 |
\Var{half~inner~margin} : \Var{outer~margin} &= \text{1} : \text{2} \\ |
| 125 |
% |
| 126 |
\Var{page~width} &= |
| 127 |
\Var{paper~width}\Index{paper} - |
| 128 |
\Var{binding~correction}\Index{binding correction}\\ |
| 129 |
% |
| 130 |
\Var{top~margin} + \Var{bottom~margin} &= |
| 131 |
\Var{page~height} - \Var{type~area~height} \\ |
| 132 |
% |
| 133 |
\Var{left~margin} + \Var{right~margin} &= |
| 134 |
\Var{page~width} - \Var{type~area~width} \\ |
| 135 |
% |
| 136 |
\Var{half~inner~margin} + \Var{outer~margin} &= |
| 137 |
\Var{page~width} - \Var{type~area~width} \\ |
| 138 |
% |
| 139 |
\Var{half~inner~margin} + \Var{binding~correction} &= |
| 140 |
\Var{gutter}\Index{gutter} |
| 141 |
\end{align*} |
| 142 |
\Index[indexmain]{margin}% |
| 143 |
The values \Var{left~margin} and \Var{right~margin} only exist in a |
| 144 |
one-sided document while \Var{half~inner~margin} and \Var{outer~margin} only |
| 145 |
exist in a two-sided document. We use \Var{half~inner~margin} in these |
| 146 |
equations, since the full inner margin is an element of the whole two-page |
| 147 |
spread. Thus, only half of the inner margin, \Var{half~inner~margin}, |
| 148 |
belongs to a single page. |
| 149 |
|
| 150 |
The question of the width of the type area is also discussed in the |
| 151 |
literature. The optimum width depends on several factors: |
| 152 |
\begin{itemize} |
| 153 |
\item the size, width, and type of font used, |
| 154 |
\item the line spacing, |
| 155 |
\item the word length, |
| 156 |
\item the available space. |
| 157 |
\end{itemize} |
| 158 |
The importance of the font becomes clear once you realize what serifs are |
| 159 |
for. Serifs\Index[indexmain]{serifs} are small strokes that finish off the |
| 160 |
lines of letters. Letters with vertical lines touching the text baseline |
| 161 |
disturb the flow rather than keeping the eye on the line. It is precisely |
| 162 |
with these letters that the serifs lie horizontally on the baseline and thus |
| 163 |
enhance the horizontal effect of the font. The eye can better follow the |
| 164 |
line of text, not only when reading the words but also when jumping back to |
| 165 |
the beginning of the next line. Thus, the line length can actually be |
| 166 |
slightly longer for a serif font than for a sans serif font. |
| 167 |
|
| 168 |
Leading\Index[indexmain]{leading}\textnote{leading} refers to the vertical |
| 169 |
distance between individual lines of text. In \LaTeX{}, the leading is set |
| 170 |
at about 20\% of the font size. With commands like |
| 171 |
\Macro{linespread}\IndexCmd{linespread}, or better, packages like |
| 172 |
\Package{setspace}\IndexPackage{setspace} (see \cite{package:setspace}), you |
| 173 |
can change the leading. A wider leading makes it easy for the eye to follow |
| 174 |
the line. A very wide leading, however, disturbs reading because the eye has |
| 175 |
to travel long distances between the lines. In addition, the reader becomes |
| 176 |
uncomfortable because of the visible striped effect. The uniform grey value |
| 177 |
of the page is thereby spoiled. Nevertheless, the lines can be longer with a |
| 178 |
wider leading. |
| 179 |
|
| 180 |
The literature gives different values for good line |
| 181 |
lengths\Index[indexmain]{line length}, depending on the author. To some |
| 182 |
extent, this is related to the author's native language. Since the eye |
| 183 |
usually jumps from word to word, short words make this task easier. Across |
| 184 |
all languages and fonts, a line length of 60 to 70 characters, including |
| 185 |
spaces and punctuation, forms a usable compromise. This requires well-chosen |
| 186 |
leading, but {\LaTeX}'s default is usually good enough. Longer line lengths |
| 187 |
should only be considered for highly-developed readers who spend many hours |
| 188 |
a day reading. But even then, line lengths beyond 80 characters are |
| 189 |
unacceptable. In each case, the leading must be appropriately chosen. An |
| 190 |
extra 5\% to 10\% is recommended as a good rule of thumb. For typefaces like |
| 191 |
Palatino, which require more than 5\% leading for normal line lengths, even |
| 192 |
more can be required. |
| 193 |
|
| 194 |
Before looking at the actual construction of the page layout, there are a |
| 195 |
few minor points you should know. {\LaTeX} does not start the first line in |
| 196 |
the text area of a page at the upper edge of the text area but sets the |
| 197 |
baseline at a defined distance from the top of the text area. Also, {\LaTeX} |
| 198 |
recognizes the commands |
| 199 |
\DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} and |
| 200 |
\DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom}. |
| 201 |
\DescRef{maincls.cmd.raggedbottom} specifies that the last line of a page |
| 202 |
should be positioned wherever it was calculated. This means that the |
| 203 |
position of this line can be different on each page, up to the height of one |
| 204 |
line\,---\, even more when the end of the page coincides with headings, |
| 205 |
figures, tables, or the like. In two-sided documents that is usually |
| 206 |
undesirable. The second command, \DescRef{maincls.cmd.flushbottom}, makes |
| 207 |
sure that the last line is always at the lower edge of the text area. To |
| 208 |
achieve this vertical compensation, {\LaTeX} may have to stretch vertical |
| 209 |
glue beyond what is normally allowed. Paragraph skip is such a stretchable, |
| 210 |
vertical glue, even when set to zero. To avoid stretching on normal pages |
| 211 |
where paragraph spacing is the only stretchable glue, the height of the text |
| 212 |
area should be a multiple of the height of the text line, including the |
| 213 |
distance of the first line from the top of the text area. |
| 214 |
|
| 215 |
\iffalse% Umbruchkorrektur |
| 216 |
This explains all the basics of the type area calculation that play a role |
| 217 |
in {\KOMAScript}. |
| 218 |
\else |
| 219 |
This concludes the fundamentals. |
| 220 |
\fi |
| 221 |
\iffalse% Umbruchkorrektur |
| 222 |
Below are two methods of construction offered by \KOMAScript{}. |
| 223 |
\else |
| 224 |
\iffalse% Umbruchkorrektur |
| 225 |
Now, we can begin with the actual construction. |
| 226 |
\else |
| 227 |
In the following two sections, the methods of construction offered by |
| 228 |
{\KOMAScript} are presented in detail. |
| 229 |
\fi |
| 230 |
\fi |
| 231 |
\end{Explain} |
| 232 |
|
| 233 |
|
| 234 |
\section{Constructing the Type Area by Division} |
| 235 |
\seclabel{divConstruction} |
| 236 |
|
| 237 |
\begin{Explain} |
| 238 |
The easiest way to make sure that the text area has the same ratio as the |
| 239 |
page is as follows: |
| 240 |
\begin{itemize} |
| 241 |
\item First, subtract the \Var{BCOR} required for the binding |
| 242 |
correction\Index{binding correction} from the inner edge of the paper, and |
| 243 |
divide the rest of the page vertically into \Var{DIV} rows of equal |
| 244 |
height. |
| 245 |
\item Next, divide the page horizontally into the same number (\Var{DIV}) of |
| 246 |
columns of equal width. |
| 247 |
\item Then, take the uppermost row as the upper margin and the two lowermost |
| 248 |
rows as the lower margin. If you are printing two-sided, you similarly |
| 249 |
take the innermost column as the inner margin and the two outermost |
| 250 |
columns as the outer margin. |
| 251 |
\item Then add the binding correction \Var{BCOR} to the inner margin. |
| 252 |
\end{itemize} |
| 253 |
What remains within the page is the text area.\Index{text area} The width |
| 254 |
and height of the text area and margins result automatically from the |
| 255 |
number of rows and columns, \Var{DIV}. Since the margins always need three |
| 256 |
stripes, \Var{DIV} must be greater than three. In order that the |
| 257 |
text area occupy at least twice as much space as the margins, \Var{DIV} |
| 258 |
should really be at least nine. With this value, the design |
| 259 |
is also known as the \emph{classical nine-part division} (see |
| 260 |
\autoref{fig:typearea.nineparts}). |
| 261 |
|
| 262 |
\begin{figure} |
| 263 |
% \centering |
| 264 |
\KOMAoption{captions}{bottombeside}% |
| 265 |
\setcapindent{0pt}% |
| 266 |
\setlength{\columnsep}{.6em}% |
| 267 |
\begin{captionbeside}[{% |
| 268 |
Two-sided layout with the box construction of the classical |
| 269 |
nine-part division, after subtracting a binding correction% |
| 270 |
}]{% |
| 271 |
\label{fig:typearea.nineparts}% |
| 272 |
\hspace{0pt plus 1ex}% |
| 273 |
Two-sided layout with the box construction of the classical |
| 274 |
nine-part division, after subtracting a binding correction% |
| 275 |
} |
| 276 |
[l] |
| 277 |
\setlength{\unitlength}{.25mm}% |
| 278 |
\definecolor{komalight}{gray}{.75}% |
| 279 |
\definecolor{komamed}{gray}{.6}% |
| 280 |
\definecolor{komadark}{gray}{.3}% |
| 281 |
\begin{picture}(420,297) |
| 282 |
% BCOR |
| 283 |
\put(198,0){\color{komalight}\rule{24\unitlength}{297\unitlength}} |
| 284 |
\multiput(198,2)(0,20){15}{\thinlines\line(0,1){10}} |
| 285 |
\multiput(222,2)(0,20){15}{\thinlines\line(0,1){10}} |
| 286 |
% the paper |
| 287 |
\put(0,0){\thicklines\framebox(420,297){}} |
| 288 |
% \put(210,0){\thicklines\framebox(210,297){}} |
| 289 |
% the page layout |
| 290 |
\put(44,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} |
| 291 |
\put(244,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} |
| 292 |
% helper lines |
| 293 |
\multiput(0,33)(0,33){8}{\thinlines\line(1,0){198}} |
| 294 |
\multiput(222,33)(0,33){8}{\thinlines\line(1,0){198}} |
| 295 |
\multiput(22,0)(22,0){8}{\thinlines\line(0,1){297}} |
| 296 |
\multiput(244,0)(22,0){8}{\thinlines\line(0,1){297}} |
| 297 |
% annotations |
| 298 |
\put(198,0){\color{white}\makebox(24,297)[c]{% |
| 299 |
\rotatebox[origin=c]{-90}{binding correction}}} |
| 300 |
\put(44,66){\color{white}\makebox(132,198)[c]{page layout left}} |
| 301 |
\put(244,66){\color{white}\makebox(132,198)[c]{page layout right}} |
| 302 |
% box numbers |
| 303 |
\makeatletter |
| 304 |
\multiput(1,27)(0,33){9}{\footnotesize\makebox(0,0)[l]{\the\@multicnt}} |
| 305 |
\multiput(177,291)(-22,0){9}{% |
| 306 |
\footnotesize\makebox(0,0)[l]{\the\@multicnt}} |
| 307 |
\multiput(419,27)(0,33){9}{% |
| 308 |
\footnotesize\makebox(0,0)[r]{\the\@multicnt}} |
| 309 |
\multiput(243,291)(22,0){8}{% |
| 310 |
\footnotesize\makebox(0,0)[r]{\the\numexpr\@multicnt+1\relax}} |
| 311 |
\makeatother |
| 312 |
\end{picture} |
| 313 |
\end{captionbeside} |
| 314 |
% \caption{Two-sided layout with the box construction of the classical |
| 315 |
% nine-part division, after subtracting a binding correction} |
| 316 |
% \label{fig:typearea.nineparts} |
| 317 |
\end{figure} |
| 318 |
|
| 319 |
In {\KOMAScript}, this kind of design is implemented with the |
| 320 |
\Package{typearea} package, where the bottom margin may drop any fractions |
| 321 |
of a line in order to comply with the constraint for the height of the type |
| 322 |
area mentioned in the previous paragraph and thereby reduce the problem |
| 323 |
mentioned with \Macro{flushbottom}. For A4 paper, \Var{DIV} is predefined |
| 324 |
according to the font size (see \autoref{tab:typearea.div}, |
| 325 |
\autopageref{tab:typearea.div}). If there is no binding correction |
| 326 |
(\(\Var{BCOR} = 0\Unit{pt}\)), the results roughly match the values of |
| 327 |
\autoref{tab:typearea.typearea}, \autopageref{tab:typearea.typearea}. |
| 328 |
|
| 329 |
In addition to the predefined values, you can specify \Var{BCOR} and |
| 330 |
\Var{DIV} as options when loading the package (see |
| 331 |
\autoref{sec:typearea.options}, starting on |
| 332 |
\autopageref{sec:typearea.typearea}). There is also a command to calculate |
| 333 |
the type area explicitly by providing these values as parameters (see also |
| 334 |
\autoref{sec:typearea.options}, \DescPageRef{typearea.cmd.typearea}). |
| 335 |
|
| 336 |
The \Package{typearea} package can automatically determine the optimal value |
| 337 |
of \Var{DIV} for the font and leading used. Again, see |
| 338 |
\autoref{sec:typearea.options}, \DescPageRef{typearea.option.DIV.calc}. |
| 339 |
\end{Explain} |
| 340 |
|
| 341 |
|
| 342 |
\section{Constructing the Type Area by Describing a Circle} |
| 343 |
\seclabel{circleConstruction} |
| 344 |
|
| 345 |
\begin{Explain} |
| 346 |
In addition to the construction method for the type area\Index{type area} |
| 347 |
described above, there is an even more traditional, or even medieval, method |
| 348 |
found in the literature. The aim of this method is not just to have the same |
| 349 |
ratios between page size and type area; it is considered optimal when the |
| 350 |
height of the text area corresponds to the width of the page. This means |
| 351 |
that a circle can be drawn that will touch both the sides of the page and |
| 352 |
the top and bottom of the text area. The exact procedure can be found in |
| 353 |
\cite{JTsch87}. |
| 354 |
|
| 355 |
A disadvantage of this late-medieval canon of page construction is that the |
| 356 |
width of the text area no longer depends on the font. One no longer chooses |
| 357 |
the text area to match the font. Instead, the author or typesetter must |
| 358 |
choose the appropriate font for the text area. |
| 359 |
% |
| 360 |
\iftrue |
| 361 |
% Umbruchkorrekturtext |
| 362 |
This should be considered mandatory. |
| 363 |
\fi |
| 364 |
|
| 365 |
In the \Package{typearea} package, this construction is modified to |
| 366 |
determine the \Var{DIV} value by selecting a special (normally meaningless) |
| 367 |
\Var{DIV} value or a special, symbolic indication of the \Var{DIV} value so |
| 368 |
that the resulting type area comes as close as possible to the late-medieval |
| 369 |
page canon. Hence it relies in turn on the method of constructing the type |
| 370 |
area by division. |
| 371 |
% |
| 372 |
\iffalse |
| 373 |
% Umbruchkorrekturtext |
| 374 |
If you choose a good font, the result often coincides with the search for |
| 375 |
the optimal \Var{DIV} value. See also \autoref{sec:typearea.options}, |
| 376 |
\DescPageRef{typearea.option.DIV.calc}. |
| 377 |
% |
| 378 |
\fi |
| 379 |
\end{Explain} |
| 380 |
|
| 381 |
\LoadCommonFile{options}% \section{Early or late Selection of Options} |
| 382 |
|
| 383 |
\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of \KOMAScript} |
| 384 |
|
| 385 |
\section{Adjusting the Type Area and Page Layout} |
| 386 |
\seclabel{typearea} |
| 387 |
|
| 388 |
The \Package{typearea} package offers two different user interfaces to |
| 389 |
influence the construction of the type area. The most important method is to |
| 390 |
specify options when loading the package. For information on how to setup |
| 391 |
options with \KOMAScript, please refer to \autoref{sec:\LabelBase.options}. |
| 392 |
|
| 393 |
In\textnote{Note!} this section the classes used in the examples are not |
| 394 |
existing {\KOMAScript} classes but hypothetical ones. This |
| 395 |
\iffree{guide}{book} assumes that ideally an appropriate class is available |
| 396 |
for each task. |
| 397 |
|
| 398 |
\begin{Declaration} |
| 399 |
\OptionVName{BCOR}{correction} |
| 400 |
\end{Declaration}% |
| 401 |
Use the \OptionVName{BCOR}{correction}\ChangedAt{v3.00}{\Package{typearea}} |
| 402 |
option to specify the absolute value of the binding correction\Index{binding |
| 403 |
correction}\textnote{binding correction}, i.\,e. the width of the area lost |
| 404 |
from the paper during the binding process. This value is then automatically |
| 405 |
taken into account when constructing the page layout and is added back to the |
| 406 |
inner (or left) margin during output. In the value of the \PName{correction}, |
| 407 |
you can specify any measurement unit understood by \TeX{}. |
| 408 |
|
| 409 |
\begin{Example} |
| 410 |
Suppose you create a financial report. The whole thing should be printed out |
| 411 |
one-sided on A4 paper and then stapled in a binder folder. The clip of the |
| 412 |
folder covers 7.5\Unit{mm}. The stack of pages is very thin, so at most |
| 413 |
another 0.75\Unit{mm} will be lost from bending and the sheets themselves. |
| 414 |
Therefore, you can write: |
| 415 |
\begin{lstcode} |
| 416 |
\documentclass[a4paper]{report} |
| 417 |
\usepackage[BCOR=8.25mm]{typearea} |
| 418 |
\end{lstcode} |
| 419 |
with \OptionValue{BCOR}{8.25mm} as an option to \Package{typearea} or |
| 420 |
\begin{lstcode} |
| 421 |
\documentclass[a4paper,BCOR=8.25mm]{report} |
| 422 |
\usepackage{typearea} |
| 423 |
\end{lstcode} |
| 424 |
when using \OptionValue{BCOR}{8.25mm} as a global option. |
| 425 |
|
| 426 |
When using a {\KOMAScript} class, you do not need to load the |
| 427 |
\Package{typearea} package explicitly: |
| 428 |
\begin{lstcode} |
| 429 |
\documentclass[BCOR=8.25mm]{scrreprt} |
| 430 |
\end{lstcode} |
| 431 |
You can omit the \Option{a4paper} option with \Class{scrreprt}, since this |
| 432 |
is the default for all {\KOMAScript} classes. |
| 433 |
|
| 434 |
If you want to set the option to a new value later, you can, for example, |
| 435 |
use the following: |
| 436 |
\begin{lstcode} |
| 437 |
\documentclass{scrreprt} |
| 438 |
\KOMAoptions{BCOR=8.25mm} |
| 439 |
\end{lstcode} |
| 440 |
Defaults are initialized when the \Class{scrreprt} class is loaded. |
| 441 |
Changing a setting with the \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 442 |
\DescRef{\LabelBase.cmd.KOMAoption} commands will automatically calculate a |
| 443 |
new type area with new margins. |
| 444 |
\end{Example} |
| 445 |
|
| 446 |
Note\textnote{Attention!} you must pass this option as a class option when |
| 447 |
loading one of the {\KOMAScript} classes, as in the example above, or via |
| 448 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} |
| 449 |
after loading the class. When you use a {\KOMAScript} class, you should not |
| 450 |
load the \Package{typearea} package explicitly with |
| 451 |
\DescRef{\LabelBase.cmd.usepackage}, nor should you specify it as an optional |
| 452 |
argument when loading the package if you are using another class. If the |
| 453 |
option is changed with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 454 |
\DescRef{\LabelBase.cmd.KOMAoption} after loading the package, the type area |
| 455 |
and margins are automatically recalculated.% |
| 456 |
% |
| 457 |
\EndIndexGroup |
| 458 |
|
| 459 |
|
| 460 |
\begin{Declaration} |
| 461 |
\OptionVName{DIV}{factor} |
| 462 |
\end{Declaration}% |
| 463 |
The \OptionVName{DIV}{factor}\ChangedAt{v3.00}{\Package{typearea}} option |
| 464 |
specifies the number of strips into which the page is divided horizontally and |
| 465 |
vertically during the construction of the type area. The exact construction |
| 466 |
method is found in \autoref{sec:typearea.divConstruction}. It's important to |
| 467 |
realise that the larger the \PName{factor}, the larger the text block and the |
| 468 |
smaller the margins. Any integer value greater than 4 is valid for |
| 469 |
\PName{factor}. Note, however, that large values can cause violations in the |
| 470 |
constraints on the margins of the type area, depending on how you set other |
| 471 |
options. In extreme cases, the header may fall outside of the page. When you |
| 472 |
use the \OptionVName{DIV}{factor} option, you are responsible for complying |
| 473 |
with the margin constraints and for choosing a typographically pleasing line |
| 474 |
length. |
| 475 |
|
| 476 |
In \autoref{tab:typearea.typearea}, you will find the sizes of the type areas |
| 477 |
for several \Option{DIV} factors for the A4 page with no binding correction. In |
| 478 |
this case, the other constraints that are dependent on the font size are not |
| 479 |
taken into account. |
| 480 |
|
| 481 |
\begin{table} |
| 482 |
% \centering |
| 483 |
\KOMAoptions{captions=topbeside}% |
| 484 |
\setcapindent{0pt}% |
| 485 |
\begin{captionbeside} |
| 486 |
% \caption |
| 487 |
[{Type area dimensions dependent on \Option{DIV} for A4}] |
| 488 |
{\label{tab:typearea.typearea}Type area dimensions dependent on \Option{DIV} |
| 489 |
for A4 regardless of \Length{topskip} or \Option{BCOR}} |
| 490 |
[l] |
| 491 |
\begin{tabular}[t]{ccccc} |
| 492 |
\toprule |
| 493 |
& |
| 494 |
\multicolumn{2}{c}{Type area} & \multicolumn{2}{c}{Margins}\\ |
| 495 |
%\raisebox{1.5ex}[0pt]{ |
| 496 |
\Option{DIV} |
| 497 |
%} |
| 498 |
& width & height & top & inner \\ |
| 499 |
\midrule |
| 500 |
6 & 105.00 & 148.50 & 49.50 & 35.00 \\ |
| 501 |
7 & 120.00 & 169.71 & 42.43 & 30.00 \\ |
| 502 |
8 & 131.25 & 185.63 & 37.13 & 26.25 \\ |
| 503 |
9 & 140.00 & 198.00 & 33.00 & 23.33 \\ |
| 504 |
10 & 147.00 & 207.90 & 29.70 & 21.00 \\ |
| 505 |
11 & 152.73 & 216.00 & 27.00 & 19.09 \\ |
| 506 |
12 & 157.50 & 222.75 & 24.75 & 17.50 \\ |
| 507 |
13 & 161.54 & 228.46 & 22.85 & 16.15 \\ |
| 508 |
14 & 165.00 & 233.36 & 21.21 & 15.00 \\ |
| 509 |
15 & 168.00 & 237.60 & 19.80 & 14.00 \\ |
| 510 |
\bottomrule |
| 511 |
\multicolumn{5}{r}{\small (all lengths in mm)} |
| 512 |
\end{tabular} |
| 513 |
\end{captionbeside} |
| 514 |
\end{table} |
| 515 |
|
| 516 |
|
| 517 |
\begin{Example} |
| 518 |
Suppose you are writing up the minutes of a meeting using the |
| 519 |
\Class{minutes} class. The whole thing should be two-sided. Your company |
| 520 |
uses 12\Unit{pt} Bookman font. This font, which is one of the standard |
| 521 |
PostScript fonts, is enabled in {\LaTeX} with the command |
| 522 |
\verb|\usepackage{bookman}|. Bookman is a very wide font, meaning that the |
| 523 |
individual characters are relatively wide compared to their height. |
| 524 |
Therefore, the default setting for \Option{DIV} in \Package{typearea} is too |
| 525 |
small. After thoroughly studying this entire chapter, you conclude that a |
| 526 |
value of 15, instead of 12, is most suitable. The minutes will not be bound |
| 527 |
but punched and kept in a folder, and thus no binding correction is |
| 528 |
necessary. So you write: |
| 529 |
\begin{lstcode} |
| 530 |
\documentclass[a4paper,twoside]{minutes} |
| 531 |
\usepackage{bookman} |
| 532 |
\usepackage[DIV=15]{typearea} |
| 533 |
\end{lstcode} |
| 534 |
When you're done, you become aware that the minutes will from now on be |
| 535 |
collected and bound together as a book at the end of the quarter. The |
| 536 |
binding is to be a simple glue binding because this is only being done to |
| 537 |
conform to ISO\,9000 and nobody is actually going to read them. The binding, |
| 538 |
including space lost in folding the pages, requires an average of |
| 539 |
12\Unit{mm} You change the options of the \Package{typearea} package |
| 540 |
accordingly and use the class for minutes that conform to ISO\,9000 |
| 541 |
regulations: |
| 542 |
\begin{lstcode} |
| 543 |
\documentclass[a4paper,twoside]{iso9000p} |
| 544 |
\usepackage{bookman} |
| 545 |
\usepackage[DIV=15,BCOR=12mm]{typearea} |
| 546 |
\end{lstcode} |
| 547 |
Of course, it is equally possible to use a {\KOMAScript} class here: |
| 548 |
\begin{lstcode} |
| 549 |
\documentclass[twoside,DIV=15,BCOR=12mm]{scrartcl} |
| 550 |
\usepackage{bookman} |
| 551 |
\end{lstcode} |
| 552 |
The \Option{a4paper} option can be left out when using the |
| 553 |
\Class{scrartcl} class, as it is predefined in all {\KOMAScript} |
| 554 |
classes. |
| 555 |
\end{Example} |
| 556 |
|
| 557 |
Note\textnote{Attention!} that when using this option with one of the |
| 558 |
{\KOMAScript} classes, as in the example above, it must be passed either as a |
| 559 |
class option, or via \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 560 |
\DescRef{\LabelBase.cmd.KOMAoption} after loading the class. When using a |
| 561 |
{\KOMAScript} class, the \Package{typearea} package should not be loaded |
| 562 |
explicitly with \DescRef{\LabelBase.cmd.usepackage}, nor should the option be |
| 563 |
given as an optional argument thereto. If the option is changed via |
| 564 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} |
| 565 |
after loading the package, the type area and margins are automatically |
| 566 |
recalculated.% |
| 567 |
\EndIndexGroup |
| 568 |
|
| 569 |
\begin{Declaration} |
| 570 |
\OptionValue{DIV}{calc}% |
| 571 |
\OptionValue{DIV}{classic} |
| 572 |
\end{Declaration}% |
| 573 |
As\ChangedAt{v3.00}{\Package{typearea}} already mentioned in |
| 574 |
\autoref{sec:typearea.divConstruction}, there are fixed defaults for |
| 575 |
\Option{DIV} when using A4 paper. These can be found in \autoref{tab:typearea.div}. |
| 576 |
However, such fixed values have the disadvantage that they do not take into |
| 577 |
account the letter spacing of the font used. With A4 and fairly narrow fonts, |
| 578 |
this can quickly lead to an unpleasantly high number of characters per line. |
| 579 |
See the considerations in \autoref{sec:typearea.basics}. If you choose a |
| 580 |
different paper size, \Package{typearea} will calculate an appropriate |
| 581 |
\Option{DIV} value for you. Of course, you can also apply this same calculation |
| 582 |
to A4. To do so, simply use \OptionValue{DIV}{calc}% |
| 583 |
\important{\OptionValue{DIV}{calc}} in place of |
| 584 |
\OptionVNameRef{\LabelBase}{DIV}{factor}. Of course, you can also specify this |
| 585 |
option explicitly for all other paper sizes. If you want automatic |
| 586 |
calculation, this specification is useful, as it is possible to set different |
| 587 |
preferences in a configuration file (see \autoref{sec:typearea-experts.cfg}). |
| 588 |
Explicitly specifying the \OptionValue{DIV}{calc} option overrides such |
| 589 |
configuration settings. |
| 590 |
|
| 591 |
\begin{table} |
| 592 |
% \centering |
| 593 |
\KOMAoptions{captions=topbeside}% |
| 594 |
\setcapindent{0pt}% |
| 595 |
\begin{captionbeside} |
| 596 |
%\caption |
| 597 |
[{\PName{DIV} defaults for A4}] |
| 598 |
{\label{tab:typearea.div}\PName{DIV} defaults for A4} |
| 599 |
[l] |
| 600 |
\begin{tabular}[t]{lccc} |
| 601 |
\toprule |
| 602 |
base font size: & 10\Unit{pt} & 11\Unit{pt} & 12\Unit{pt} \\ |
| 603 |
\Option{DIV}: & 8 & 10 & 12 \\ |
| 604 |
\bottomrule |
| 605 |
\end{tabular} |
| 606 |
\end{captionbeside} |
| 607 |
\end{table} |
| 608 |
|
| 609 |
You can also select the traditional page layout mentioned in |
| 610 |
\autoref{sec:typearea.circleConstruction}, the medieval page canon. Instead of |
| 611 |
the \OptionVName{\DescRef{\LabelBase.option.DIV}}{factor} or |
| 612 |
\OptionValue{DIV}{calc} option, simply use the \OptionValue{DIV}{classic} |
| 613 |
option. A \Option{DIV} value which is as close as possible to the medieval page |
| 614 |
canon is then chosen. |
| 615 |
|
| 616 |
\begin{Example} |
| 617 |
In the example using the Bookman font and the |
| 618 |
\OptionVNameRef{\LabelBase}{DIV}{factor} option, the problem was to select a |
| 619 |
\Option{DIV} value that better matched the font. Modifying that example, you |
| 620 |
can simply leave the calculation of this value to \Package{typearea}: |
| 621 |
\begin{lstcode} |
| 622 |
\documentclass[a4paper,twoside]{protocol} |
| 623 |
\usepackage{bookman} |
| 624 |
\usepackage[DIV=calc]{typearea} |
| 625 |
\end{lstcode} |
| 626 |
\end{Example} |
| 627 |
\iffree{\par% |
| 628 |
Note\textnote{Attention!} that when using this option with one of the |
| 629 |
\KOMAScript{} classes% |
| 630 |
\iftrue , as in the example above, \fi% |
| 631 |
it must be passed either as a class option, or via |
| 632 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} |
| 633 |
after loading the class. When using a {\KOMAScript} class, the |
| 634 |
\Package{typearea} package should not be loaded explicitly with |
| 635 |
\DescRef{\LabelBase.cmd.usepackage}, nor should the option be given as an |
| 636 |
optional argument. If the option is changed via |
| 637 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} |
| 638 |
after loading the package, the type area and margins are automatically |
| 639 |
recalculated.% |
| 640 |
}{% |
| 641 |
\vskip-\dp\strutbox% Wegen Code im Beispiel am Ende |
| 642 |
}% |
| 643 |
% |
| 644 |
\EndIndexGroup |
| 645 |
|
| 646 |
|
| 647 |
\begin{Declaration} |
| 648 |
\OptionValue{DIV}{current} |
| 649 |
\OptionValue{DIV}{last} |
| 650 |
\end{Declaration}% |
| 651 |
If\ChangedAt{v3.00}{\Package{typearea}} you've been following the |
| 652 |
examples closely, you already know how to calculate a \Option{DIV} value |
| 653 |
based on the font you chose when using a {\KOMAScript} class together |
| 654 |
with a font package. |
| 655 |
|
| 656 |
\begin{Explain} |
| 657 |
The difficulty with doing so is that the {\KOMAScript} class already loads |
| 658 |
the \Package{typearea} package itself. Thus, it is not possible to pass |
| 659 |
options as optional arguments to \DescRef{\LabelBase.cmd.usepackage}. It |
| 660 |
would also be pointless to specify the |
| 661 |
\OptionValueRef{\LabelBase}{DIV}{calc} option as an optional argument to |
| 662 |
\DescRef{\LabelBase.cmd.documentclass}. This option would be evaluated |
| 663 |
immediately on loading the \Package{typearea} package and as a result the |
| 664 |
type area and margins would be calculated for the standard {\LaTeX} font and |
| 665 |
not for the font loaded later. |
| 666 |
|
| 667 |
However, it is possible to recalculate the type area and margins after |
| 668 |
loading the font with the aid of \DescRef{\LabelBase.cmd.KOMAoptions}% |
| 669 |
\PParameter{\OptionValueRef{\LabelBase}{DIV}{calc}} or |
| 670 |
\DescRef{\LabelBase.cmd.KOMAoption}% |
| 671 |
\PParameter{\DescRef{\LabelBase.option.DIV}}\PParameter{calc}. The option |
| 672 |
\OptionValue{DIV}{calc} will then request a \Option{DIV} value for an |
| 673 |
appropriate line length. |
| 674 |
|
| 675 |
As it is often more convenient to set the \Option{DIV} option not after |
| 676 |
loading the font but at a more noticeable point, such as when loading the |
| 677 |
class, the \Package{typearea} package offers two further symbolic values for |
| 678 |
this option. |
| 679 |
\end{Explain} |
| 680 |
|
| 681 |
The option \OptionVName{DIV}{current}\ChangedAt{v3.00}{\Package{typearea}} |
| 682 |
recalculates the type area and margins using the current \Option{DIV} value. |
| 683 |
This is less important for recalculating the type area after loading a |
| 684 |
different font. Instead, it is useful if, for example, you change the |
| 685 |
leading while keeping the \Option{DIV} value the same and want to ensure the |
| 686 |
margin constraint that \Length{textheight} minus \Length{topskip} is a |
| 687 |
multiple of \Length{baselineskip}. |
| 688 |
|
| 689 |
The option \OptionVName{DIV}{last}\ChangedAt{v3.00}{\Package{typearea}} will |
| 690 |
recalculate the type area and margins using exactly the same settings as the |
| 691 |
last calculation. |
| 692 |
|
| 693 |
By the way, if the last typeset area calculation before using |
| 694 |
\OptionValue{DIV}{last} or \OptionValue{DIV}{current} was done using |
| 695 |
\DescRef{\LabelBase.cmd.areaset}\IndexCmd{areaset}, the recalculation will be |
| 696 |
done using \DescRef{\LabelBase.cmd.areaset} again. It then corresponds to |
| 697 |
\DescRef{\LabelBase.cmd.areaset}\POParameter{current}\IndexLength{textwidth}% |
| 698 |
\PParameter{\Length{textwidth}}{\Length{textheight}}\IndexLength{textheight}. |
| 699 |
|
| 700 |
\begin{Example} |
| 701 |
Let's suppose again that we need to calculate an appropriate line length for |
| 702 |
a type area using the Bookman font. At the same time, a {\KOMAScript} class |
| 703 |
is used. This is very easy with the symbolic value \PValue{last} and the |
| 704 |
command \DescRef{\LabelBase.cmd.KOMAoptions}: |
| 705 |
\begin{lstcode} |
| 706 |
\documentclass[BCOR=12mm,DIV=calc,twoside]{scrartcl} |
| 707 |
\usepackage{bookman} |
| 708 |
\KOMAoptions{DIV=last} |
| 709 |
\end{lstcode} |
| 710 |
If you decide later that you need a different \Option{DIV} value, just |
| 711 |
change the setting of the optional argument to |
| 712 |
\DescRef{\LabelBase.cmd.documentclass}. |
| 713 |
\end{Example} |
| 714 |
|
| 715 |
For a summary of all possible symbolic values for the \Option{DIV} option, see |
| 716 |
\autoref{tab:symbolicDIV}. Note that the use of the |
| 717 |
\Package{fontenc}\IndexPackage{fontenc} package may also cause \LaTeX{} to |
| 718 |
load a different font. |
| 719 |
|
| 720 |
\begin{table} |
| 721 |
\caption[{% |
| 722 |
Symbolic values for the \DescRef{typearea.option.DIV} option and the |
| 723 |
\PName{DIV} argument to \DescRef{\LabelBase.cmd.typearea}% |
| 724 |
}]{% |
| 725 |
Available symbolic values for the \DescRef{typearea.option.DIV} option or |
| 726 |
the \PName{DIV} argument to |
| 727 |
\DescRef{typearea.cmd.typearea}\OParameter{BCOR}\Parameter{DIV}% |
| 728 |
} |
| 729 |
\label{tab:symbolicDIV} |
| 730 |
\begin{desctabular} |
| 731 |
\pventry{areaset}{Recalculate page |
| 732 |
layout.\IndexOption{DIV~=\textKValue{areaset}}}% |
| 733 |
\pventry{calc}{Recalculate type area including choice of appropriate |
| 734 |
\Option{DIV} value.\IndexOption{DIV~=\textKValue{calc}}}% |
| 735 |
\pventry{classic}{Recalculate type area using medieval book design canon |
| 736 |
(circle-based calculation).\IndexOption{DIV~=\textKValue{classic}}}% |
| 737 |
\pventry{current}{Recalculate type area using current \Option{DIV} |
| 738 |
value.\IndexOption{DIV~=\textKValue{current}}}% |
| 739 |
\pventry{default}{Recalculate type area using the standard value for the |
| 740 |
current page format and current font size. If no standard value exists, |
| 741 |
\PValue{calc} is used.\IndexOption{DIV~=\textKValue{default}}}% |
| 742 |
\pventry{last}{Recalculate type area using the same \PName{DIV} argument |
| 743 |
as was used in the last call.\IndexOption{DIV~=\textKValue{last}}}% |
| 744 |
\end{desctabular} |
| 745 |
\end{table} |
| 746 |
|
| 747 |
Frequently\textnote{Attention!}, the type area must be recalculated in |
| 748 |
combination with a change in the line spacing (\emph{leading})\Index{leading}. |
| 749 |
Since the type area should be calculated in such a way that a whole number of |
| 750 |
lines fits in the text block, a change in the leading normally requires a |
| 751 |
recalculation of the type area. |
| 752 |
|
| 753 |
\begin{Example} |
| 754 |
Suppose that you require a 10\Unit{pt} font and a spacing of 1.5 lines for a |
| 755 |
dissertation. By default, {\LaTeX} sets the leading for 10\Unit{pt} fonts at |
| 756 |
2\Unit{pt}, in other words 1.2 lines. Therefore, you must use an additional |
| 757 |
stretch factor of 1.25. Suppose also that you need a binding correction of |
| 758 |
\(12\Unit{mm}\). Then the solution to the problem might look like this: |
| 759 |
\begin{lstcode} |
| 760 |
\documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt} |
| 761 |
\linespread{1.25} |
| 762 |
\KOMAoptions{DIV=last} |
| 763 |
\end{lstcode}\IndexCmd{linespread} |
| 764 |
Since \Package{typearea} always executes the \Macro{normalsize} command |
| 765 |
itself when calculating a new type area, it is not strictly necessary to |
| 766 |
set the chosen leading with \Macro{selectfont} after \Macro{linespread}, |
| 767 |
since this will already be done in the recalculation. |
| 768 |
|
| 769 |
When using the \Package{setspace}\IndexPackage{setspace}% |
| 770 |
\important{\Package{setspace}} package (see \cite{package:setspace}), the |
| 771 |
same example would appear as follows: |
| 772 |
\begin{lstcode} |
| 773 |
\documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt} |
| 774 |
\usepackage[onehalfspacing]{setspace} |
| 775 |
\KOMAoptions{DIV=last} |
| 776 |
\end{lstcode} |
| 777 |
\end{Example} |
| 778 |
|
| 779 |
As\textnote{Hint!} you can see from the example, the \Package{setspace} |
| 780 |
package saves you from needing to know the correct stretch value. However, |
| 781 |
this only applies to the standard font sizes 10\Unit{pt}, 11\Unit{pt}, and |
| 782 |
12\Unit{pt}. For all other font sizes, the package uses an approximate value. |
| 783 |
|
| 784 |
At\textnote{Attention!} this point, note that the line spacing for the title |
| 785 |
page should be reset to the normal value, and the indexes should be set with |
| 786 |
the normal line spacing as well. |
| 787 |
\begin{Example} |
| 788 |
Here\IndexPackage{setspace} is a complete example: |
| 789 |
\begin{lstcode} |
| 790 |
\documentclass[10pt,twoside,BCOR=12mm,DIV=calc] |
| 791 |
{scrreprt} |
| 792 |
\usepackage{setspace} |
| 793 |
\onehalfspacing |
| 794 |
\AfterTOCHead{\singlespacing} |
| 795 |
\KOMAoptions{DIV=last} |
| 796 |
\begin{document} |
| 797 |
\title{Title} |
| 798 |
\author{Markus Kohm} |
| 799 |
\begin{spacing}{1} |
| 800 |
\maketitle |
| 801 |
\end{spacing} |
| 802 |
\tableofcontents |
| 803 |
\chapter{Ok} |
| 804 |
\end{document} |
| 805 |
\end{lstcode} |
| 806 |
Also see the notes in \autoref{sec:typearea.tips}. The |
| 807 |
\DescRef{tocbasic.cmd.AfterTOCHead}\IndexCmd{AfterTOCHead} command is |
| 808 |
described in \autoref{cha:tocbasic} of \autoref{part:forExperts} on |
| 809 |
\DescPageRef{tocbasic.cmd.AfterTOCHead}. |
| 810 |
\end{Example} |
| 811 |
Note also that changing the line spacing can also affect the page's header and |
| 812 |
footer. For example, if you are using the \Package{scrlayer-scrpage} package, |
| 813 |
you have to decide for yourself whether you prefer to have the normal or the |
| 814 |
changed leading. See the \DescRef{scrlayer.option.singlespacing} option in |
| 815 |
\autoref{cha:scrlayer}\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% |
| 816 |
\IndexPackage{scrlayer}\IndexOption{singlespacing}, |
| 817 |
\DescPageRef{scrlayer.option.singlespacing}. |
| 818 |
|
| 819 |
Note\textnote{Attention!} that when using this option with one of the |
| 820 |
{\KOMAScript} classes, as in the example above, it must be passed either as a |
| 821 |
class option, or via \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 822 |
\DescRef{\LabelBase.cmd.KOMAoption} after loading the class. When using a |
| 823 |
{\KOMAScript} class, the \Package{typearea} package should not be loaded |
| 824 |
explicitly with \DescRef{\LabelBase.cmd.usepackage}, nor should the option be |
| 825 |
given as an optional argument thereto. If the option is changed via |
| 826 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} |
| 827 |
after loading the package, the type area and margins are automatically |
| 828 |
recalculated.% |
| 829 |
% |
| 830 |
\EndIndexGroup |
| 831 |
|
| 832 |
|
| 833 |
\begin{Declaration} |
| 834 |
\Macro{typearea}\OParameter{BCOR}\Parameter{DIV}% |
| 835 |
\Macro{recalctypearea} |
| 836 |
\end{Declaration}% |
| 837 |
\begin{Explain} |
| 838 |
If the \DescRef{\LabelBase.option.DIV} option or the |
| 839 |
\DescRef{\LabelBase.option.BCOR} option is set after loading the |
| 840 |
\Package{typearea} package, the \Macro{typearea} command will be called |
| 841 |
internally. When setting the \DescRef{\LabelBase.option.DIV} option, the |
| 842 |
symbolic value \PValue{current} is used internally for \PName{BCOR}, which |
| 843 |
for reasons of completeness is also found in \autoref{tab:symbolicBCOR}. |
| 844 |
When setting the \DescRef{\LabelBase.option.BCOR} option, the symbolic value |
| 845 |
\PValue{last} is used internally for \PName{DIV}. If instead you want the |
| 846 |
type area and margins to be recalculated using the symbolic value |
| 847 |
\PValue{current} for \PName{DIV}, you can use |
| 848 |
\Macro{typearea}\POParameter{current}\PParameter{current} directly. |
| 849 |
\end{Explain} |
| 850 |
|
| 851 |
\begin{table} |
| 852 |
\caption[{% |
| 853 |
Symbolic \PName{BCOR} arguments for \DescRef{typearea.cmd.typearea}% |
| 854 |
}]{% |
| 855 |
Available symbolic \PName{BCOR} arguments for |
| 856 |
\Macro{typearea}\OParameter{BCOR}\Parameter{DIV}% |
| 857 |
} |
| 858 |
\label{tab:symbolicBCOR} |
| 859 |
\begin{desctabular} |
| 860 |
\pventry{current}{Recalculate type area with the currently valid |
| 861 |
\PName{BCOR} value.\IndexOption{BCOR~=\textKValue{current}}} |
| 862 |
\end{desctabular} |
| 863 |
\end{table} |
| 864 |
|
| 865 |
If you change both \PName{BCOR} and \PName{DIV}, you should use |
| 866 |
\Macro{typearea}, since then the type area and margins are recalculated only |
| 867 |
once. With \DescRef{\LabelBase.cmd.KOMAoptions}% |
| 868 |
\PParameter{\OptionVNameRef{\LabelBase}{DIV}{factor},% |
| 869 |
\OptionVNameRef{\LabelBase}{BCOR}{correction}} the type area and margins are |
| 870 |
recalculated once for the change to \DescRef{\LabelBase.option.DIV} and again |
| 871 |
for the change to \DescRef{\LabelBase.option.BCOR}. |
| 872 |
|
| 873 |
\begin{Explain} |
| 874 |
The command \Macro{typearea} is currently defined so as to make it possible |
| 875 |
to change the type area in the middle of a document. However, several |
| 876 |
assumptions about the structure of the {\LaTeX} kernel are made, and |
| 877 |
internal definitions and sizes of the kernel are changed. Since changes are |
| 878 |
only made to the {\LaTeX} kernel to fix bugs, there is a high likelihood, |
| 879 |
though no guarantee, that this will still work in future versions of |
| 880 |
\LaTeXe{}. When used within the document, a page break will result. |
| 881 |
\end{Explain} |
| 882 |
|
| 883 |
Since\important{\Macro{recalctypearea}} \DescRef{\LabelBase.cmd.KOMAoption}% |
| 884 |
\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}}}% |
| 885 |
\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{last}}, |
| 886 |
\DescRef{\LabelBase.cmd.KOMAoptions}% |
| 887 |
\PParameter{\OptionValueRef{\LabelBase}{DIV}{last}}, or |
| 888 |
\Macro{typearea}\POParameter{current}\PParameter{last} is frequently needed |
| 889 |
to recalculate the type area and margins, there is a convenience command, |
| 890 |
\Macro{recalctypearea}\ChangedAt{v3.00}{\Package{typearea}}. |
| 891 |
\begin{Example} |
| 892 |
If you find the notation |
| 893 |
\begin{lstcode} |
| 894 |
\KOMAoptions{DIV=last} |
| 895 |
\end{lstcode} |
| 896 |
or |
| 897 |
\begin{lstcode} |
| 898 |
\typearea[current]{last} |
| 899 |
\end{lstcode} |
| 900 |
too cumbersome for recalculating text area and margins because of |
| 901 |
the many special characters, you can simply use |
| 902 |
\begin{lstcode} |
| 903 |
\recalctypearea |
| 904 |
\end{lstcode} |
| 905 |
\end{Example}% |
| 906 |
\EndIndexGroup |
| 907 |
|
| 908 |
|
| 909 |
\begin{Declaration} |
| 910 |
\OptionVName{twoside}{simple switch}% |
| 911 |
\OptionValue{twoside}{semi} |
| 912 |
\end{Declaration}% |
| 913 |
As explained in \autoref{sec:typearea.basics}, the distribution of the margins |
| 914 |
depends on whether the document is to be printed one-sided or two-sided. For |
| 915 |
one-sided printing, the left and right margins are the same width, whereas for |
| 916 |
two-sided printing the inner margin of one page is only half as wide as the |
| 917 |
corresponding outer margin. To invoke two-sided printing, you must give the |
| 918 |
\Package{typearea} package the \Option{twoside} option. For the |
| 919 |
\PName{simple switch}, you can use any of the standard values for |
| 920 |
simple switches in \autoref{tab:truefalseswitch}. If the option is passed |
| 921 |
without a value, the value \PValue{true} is assumed, so two-sided printing is |
| 922 |
enabled. Deactivating the option leads to one-sided printing. |
| 923 |
|
| 924 |
\begin{table} |
| 925 |
\centering |
| 926 |
\caption{Standard values for simple switches in \KOMAScript} |
| 927 |
\begin{tabular}{ll} |
| 928 |
\toprule |
| 929 |
Value & Description \\ |
| 930 |
\midrule |
| 931 |
\PValue{true} & activates the option \\ |
| 932 |
\PValue{on} & activates the option \\ |
| 933 |
\PValue{yes} & activates the option \\ |
| 934 |
\PValue{false}& deactivates the option \\ |
| 935 |
\PValue{off} & deactivates the option \\ |
| 936 |
\PValue{no} & deactivates the option \\ |
| 937 |
\bottomrule |
| 938 |
\end{tabular} |
| 939 |
\label{tab:truefalseswitch} |
| 940 |
\end{table} |
| 941 |
|
| 942 |
In addition to the values in \autoref{tab:truefalseswitch}, you can also use |
| 943 |
the value \PValue{semi}\ChangedAt{v3.00}{\Package{typearea}}. This value |
| 944 |
results in two-sided printing with one-sided margins and one-sided, that is |
| 945 |
non-alternating, marginal notes. |
| 946 |
Beginning\ChangedAt{v3.12}{\Package{typearea}} with \KOMAScript{} version |
| 947 |
3.12, binding corrections (see \DescRef{\LabelBase.option.BCOR}, |
| 948 |
\DescPageRef{typearea.option.BCOR}) will be part of the left margin on odd |
| 949 |
pages but part of the right margin on even pages. But if you switch on |
| 950 |
compatibility with a prior |
| 951 |
version\important{\OptionValueRef{\LabelBase}{version}{3.12}} of \KOMAScript{} |
| 952 |
(see \autoref{sec:typearea.compatibilityOptions}, |
| 953 |
\autopageref{sec:typearea.compatibilityOptions}), the binding correction will |
| 954 |
be part of the left margin on both pages while using |
| 955 |
\OptionValue{twoside}{semi}. |
| 956 |
|
| 957 |
The option can also be passed as class option in |
| 958 |
\DescRef{\LabelBase.cmd.documentclass}, as a package option with |
| 959 |
\DescRef{\LabelBase.cmd.usepackage}, or even after loading |
| 960 |
\Package{typearea} with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 961 |
\DescRef{\LabelBase.cmd.KOMAoption}. Using this option after loading |
| 962 |
\Package{typearea} automatically\textnote{automatic recalculation} results in |
| 963 |
the recalculation of the type area using |
| 964 |
\DescRef{\LabelBase.cmd.recalctypearea} (see |
| 965 |
\DescPageRef{typearea.cmd.recalctypearea}). If the two-sided mode was active |
| 966 |
before the option was set, a page break is made to the next odd page before |
| 967 |
the recalculation.% |
| 968 |
% |
| 969 |
\EndIndexGroup |
| 970 |
|
| 971 |
|
| 972 |
\begin{Declaration} |
| 973 |
\OptionVName{twocolumn}{simple switch} |
| 974 |
\end{Declaration} |
| 975 |
To compute an appropriate type area with the help of |
| 976 |
\OptionValueRef{\LabelBase}{DIV}{calc}, it is useful to know in advance if the |
| 977 |
document is to be typeset in one or two columns. Since the considerations |
| 978 |
about line length in \autoref{sec:typearea.basics} apply to each column, the |
| 979 |
type area in two-column documents can be up to twice as wide as in one-column |
| 980 |
documents. |
| 981 |
|
| 982 |
To make this distinction, you must tell \Package{typearea} if the document is |
| 983 |
to be set with two columns using the \Option{twocolumn} option. Since this is |
| 984 |
a \PName{simple switch}, any of the standard values for simple switches |
| 985 |
from \autoref{tab:truefalseswitch} are valid. If the option is passed without |
| 986 |
a value, the value \PValue{true}\important{\OptionValue{twocolumn}{true}} is |
| 987 |
used, i.\,e. the two-column setting. Deactivating the option returns you to |
| 988 |
the default one-column setting. |
| 989 |
|
| 990 |
The option can also be passed as a class option in |
| 991 |
\DescRef{\LabelBase.cmd.documentclass}, as a package option to |
| 992 |
\DescRef{\LabelBase.cmd.usepackage}, or even after loading \Package{typearea} |
| 993 |
with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 994 |
\DescRef{\LabelBase.cmd.KOMAoption}. Using this option after loading |
| 995 |
\Package{typearea} will\textnote{automatic recalculation} automatically |
| 996 |
recalculate the type area using \DescRef{\LabelBase.cmd.recalctypearea} (see |
| 997 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 998 |
% |
| 999 |
\EndIndexGroup |
| 1000 |
|
| 1001 |
\begin{Declaration} |
| 1002 |
\OptionVName{headinclude}{simple switch}% |
| 1003 |
\OptionVName{footinclude}{simple switch} |
| 1004 |
\end{Declaration}% |
| 1005 |
\begin{Explain}% |
| 1006 |
So far we have discussed how the type area is calculated\Index{type area} |
| 1007 |
and the relationship of the margins\Index{margins} to one another and |
| 1008 |
between margins and body of the text. But one important question has not |
| 1009 |
been answered: What exactly are \emph{the margins}? |
| 1010 |
|
| 1011 |
At first glance the question appears trivial: Margins are those parts on the |
| 1012 |
right, left, top, and bottom of the page which remain empty. But this is |
| 1013 |
only half the story. Margins are not always empty. Sometimes there can be |
| 1014 |
marginal notes, for example (see the \DescRef{maincls.cmd.marginpar} command |
| 1015 |
in \cite{lshort} or \autoref{sec:maincls.marginNotes}). |
| 1016 |
|
| 1017 |
For the top and bottom margins, the question becomes how to handle |
| 1018 |
headers\Index{page header} and footers\Index{page footer}. Do these two |
| 1019 |
belong to the text body or to their respective margins? This question is not |
| 1020 |
easy to answer. Clearly an empty footer or header belongs to the margins, |
| 1021 |
since it cannot be distinguished from the rest of the margins. A footer that |
| 1022 |
contains only the |
| 1023 |
pagination\Index[indexmain]{pagination}\textnote{pagination} % |
| 1024 |
\iffalse % |
| 1025 |
\unskip\footnote{Pagination refers to the indication of the page number, |
| 1026 |
either inside or outside the type area, and usually appears in either the |
| 1027 |
header or the footer of the page.} % |
| 1028 |
\fi % |
| 1029 |
looks more like a margin and should therefore be counted as such. It is |
| 1030 |
irrelevant for the visual effect whether headers or footers are easily |
| 1031 |
recognized as such when reading or skimming. The decisive factor is how a |
| 1032 |
well-filled page appears when viewed \emph{out of focus}. For this purpose, |
| 1033 |
you could, for example, steal the glasses of a far-sighted grandparent and |
| 1034 |
hold the page about half a meter from the tip of your nose. If you lack an |
| 1035 |
available grandparent, you can also adjust your vision to infinity and look |
| 1036 |
at the page with one eye only. Those who wear glasses have a clear advantage |
| 1037 |
here. If the footer contains not only the pagination but also other material |
| 1038 |
like a copyright notice, it looks more like a slightly detached part of the |
| 1039 |
body of the text. This needs to be taken into account when calculating the |
| 1040 |
type area. |
| 1041 |
|
| 1042 |
For the header, this is even more complicated. The header often contains |
| 1043 |
running heads\Index[indexmain]{running heads}\textnote{running heads}. % |
| 1044 |
\iffalse% |
| 1045 |
\unskip\footnote{Running heads refer to the repetition of a title, in |
| 1046 |
titling font, which usually appears in the page header, or rarely in the |
| 1047 |
page footer.} % |
| 1048 |
\fi If you use the current chapter and section titles in your running head |
| 1049 |
and these titles are long, the header itself will necessarily be very |
| 1050 |
long. In this case, the header again acts like a detached part of the text |
| 1051 |
body and less like an empty margin. This effect is reinforced if the header |
| 1052 |
contains not only the chapter or section title but also the pagination. With |
| 1053 |
material on the right and left side, the header no longer appears as an |
| 1054 |
empty margin. It is more difficult if the pagination is in the footer and |
| 1055 |
the length of the running titles varies, so that the header may look like |
| 1056 |
part of the margin on one page and part of the text body on another. Under |
| 1057 |
no circumstances should you treat the pages differently. That would lead to |
| 1058 |
vertically jumping headers, which is not suitable even for a flip book. In |
| 1059 |
this case it is probably best to count the header as part of the text body. |
| 1060 |
|
| 1061 |
The decision is easy when the header or footer is separated from the actual |
| 1062 |
text body by a line. This will give a ``closed'' appearance and the header |
| 1063 |
or footer should be calculated as part of the text body. Remember: It is |
| 1064 |
irrelevant that the line improves the optical separation of text and header |
| 1065 |
or footer; only the appearance when viewed out of focus is important. |
| 1066 |
\end{Explain} |
| 1067 |
|
| 1068 |
The \Package{typearea} package cannot determine on its own whether |
| 1069 |
to count headers and footers\important{\OptionValue{headinclude}{true} |
| 1070 |
\OptionValue{headinclude}{false} \OptionValue{footinclude}{true} |
| 1071 |
\OptionValue{footinclude}{false}} as part of the text body or the |
| 1072 |
margin. The \Option{headinclude} and \Option{footinclude} options cause |
| 1073 |
the header or footer to be counted as part of the text. These |
| 1074 |
options, being \PName{simple switch}es\ChangedAt{v3.00}{\Package{typearea}}, |
| 1075 |
accept the standard values for simple switches in |
| 1076 |
\autoref{tab:truefalseswitch}. You can use the options without |
| 1077 |
specifying a value, in which case the value \PValue{true} is used for |
| 1078 |
the \PName{simple}, i.\,e. the header or footer is counted as part of |
| 1079 |
the text. |
| 1080 |
|
| 1081 |
If you are unsure what the correct setting should be, reread the explanations |
| 1082 |
above. The default is usually \OptionValue{headinclude}{false} and |
| 1083 |
\OptionValue{footinclude}{false}, but this can change in the {\KOMAScript} |
| 1084 |
classes or in other {\KOMAScript} packages depending on the options used (see |
| 1085 |
\autoref{sec:maincls.options} and \autoref{cha:scrlayer-scrpage}). |
| 1086 |
|
| 1087 |
Note\textnote{Attention!} that these options must be passed as class options |
| 1088 |
when using one of the {\KOMAScript} classes, or after loading the class with |
| 1089 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. |
| 1090 |
Changing these options after loading the \Package{typearea} package does not |
| 1091 |
automatically recalculate the type area. Instead, the changes only take effect |
| 1092 |
the next time the type area is recalculated. For recalculation of the type |
| 1093 |
area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option |
| 1094 |
with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or |
| 1095 |
\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see |
| 1096 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 1097 |
\DescRef{\LabelBase.cmd.recalctypearea} command (see |
| 1098 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 1099 |
% |
| 1100 |
\EndIndexGroup |
| 1101 |
|
| 1102 |
|
| 1103 |
\begin{Declaration} |
| 1104 |
\OptionVName{mpinclude}{simple switch} |
| 1105 |
\end{Declaration} |
| 1106 |
In addition to\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1107 |
\Class{scrartcl}} documents where the header and footer are more likely to |
| 1108 |
be part of the text body than the margins, there are also documents where |
| 1109 |
marginal notes should be considered part of the text body as well. The option |
| 1110 |
\Option{mpinclude} does exactly this. The option, as a \PName{simple |
| 1111 |
switch}\ChangedAt{v3.00}{\Package{typearea}}, accepts the standard values |
| 1112 |
for simple switches in \autoref{tab:truefalseswitch}. You can also pass this |
| 1113 |
option without specifying a value, in which case \PValue{true} is assumed. |
| 1114 |
|
| 1115 |
The effect of \OptionValue{mpinclude}{true}% |
| 1116 |
\important{\OptionValue{mpinclude}{true}} is that a width-unit is removed from |
| 1117 |
the main text body and used as the area for marginal notes. With the |
| 1118 |
\OptionValue{mpinclude}{false} option, which is the default setting, part of |
| 1119 |
the normal margin is used for marginal notes. The width of that area is one or |
| 1120 |
one-and-a-half width units, depending on whether you have chosen one-sided or |
| 1121 |
two-sided printing. The \OptionValue{mpinclude}{true} option is mainly for |
| 1122 |
experts and so is not recommended. |
| 1123 |
|
| 1124 |
\begin{Explain} |
| 1125 |
In most cases where the option \Option{mpinclude} makes sense, you also |
| 1126 |
require a wider area for marginal notes. Often, however, only a part of the |
| 1127 |
marginal note's width should be part of the text area, not the whole width, |
| 1128 |
for example if the margin is used for quotations. Such quotations are |
| 1129 |
usually set as unjustified text, with the flush edge against the text area. |
| 1130 |
Since the unjustified text gives no homogeneous optical impression, these |
| 1131 |
lines can protrude partially into the margin. You can accomplish that by |
| 1132 |
using the option \Option{mpinclude} and by increasing the length |
| 1133 |
\Length{marginparwidth} after the type area has been set up. The length can |
| 1134 |
be easily enlarged with the command \Macro{addtolength}. How much the length |
| 1135 |
has to be increased depends on the individual situation and it requires a |
| 1136 |
certain amount of sensitivity. This is another reason the \Option{mpinclude} |
| 1137 |
option is primarily intended for experts. Of course you can specify, for |
| 1138 |
example, that the marginal notes should project a third of the way into the |
| 1139 |
normal margin by using the following: |
| 1140 |
\begin{lstcode} |
| 1141 |
\setlength{\marginparwidth}{1.5\marginparwidth} |
| 1142 |
\end{lstcode} |
| 1143 |
|
| 1144 |
Currently there is no option to enlarge the space for marginal notes within |
| 1145 |
the text area. There is only one way to accomplish this: first, either omit |
| 1146 |
the \Option{mpinclude} option or set it to \PValue{false}, and then, after the |
| 1147 |
type area has been calculated, reduce \Length{textwidth} (the width of the |
| 1148 |
text body) and increase \Length{marginparwidth} (the width of the marginal |
| 1149 |
notes) by the same amount. Unfortunately, this procedure cannot be combined |
| 1150 |
with automatic calculation of the \PName{DIV} value. In contrast, |
| 1151 |
\Option{mpinclude} is taken into account with |
| 1152 |
\OptionValueRef{\LabelBase}{DIV}{calc}\IndexOption{DIV~=calc} (see |
| 1153 |
\DescPageRef{typearea.option.DIV.calc}). |
| 1154 |
\end{Explain} |
| 1155 |
|
| 1156 |
Note\textnote{Attention!} that these options must be passed as class options |
| 1157 |
when using one of the {\KOMAScript} classes, or after loading the class with |
| 1158 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. |
| 1159 |
Changing these options after loading the \Package{typearea} package does not |
| 1160 |
automatically recalculate the type area. Instead, the changes only take effect |
| 1161 |
the next time the type area is recalculated. For recalculation of the type |
| 1162 |
area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option |
| 1163 |
with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or |
| 1164 |
\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see |
| 1165 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 1166 |
\DescRef{\LabelBase.cmd.recalctypearea} command (see |
| 1167 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 1168 |
% |
| 1169 |
\EndIndexGroup |
| 1170 |
|
| 1171 |
|
| 1172 |
\begin{Declaration} |
| 1173 |
\OptionVName{headlines}{number of lines} |
| 1174 |
\OptionVName{headheight}{height} |
| 1175 |
\end{Declaration}% |
| 1176 |
\BeginIndex{}{header>height}% |
| 1177 |
We have seen how to calculate the type area using the \Package{typearea} |
| 1178 |
package and how to specify whether the header and footer are part of the text |
| 1179 |
or the margins. However, especially for the header, we still have to specify |
| 1180 |
the height. This is achieved with the options \Option{headlines} and |
| 1181 |
\Option{headheight}\ChangedAt{v3.00}{\Package{typearea}}. |
| 1182 |
|
| 1183 |
The \Option{headlines}\important{\Option{headlines}} option specifies the |
| 1184 |
number of lines of text in the header. The \Package{typearea} package uses a |
| 1185 |
default of 1.25. This is a compromise: large enough for underlined headers |
| 1186 |
(see \autoref{sec:maincls.pagestyle}) and small enough that the relative |
| 1187 |
weight of the top margin is not affected too much when the header is not |
| 1188 |
underlined. Thus the default value will usually be adequate. In special cases, |
| 1189 |
however, you may need to adjust the header height more precisely to your |
| 1190 |
actual requirements. |
| 1191 |
|
| 1192 |
\begin{Example} |
| 1193 |
Suppose you want to create a two-line header. Normally this would result in |
| 1194 |
{\LaTeX} issuing the warning ``\texttt{overfull} \Macro{vbox}'' for each |
| 1195 |
page. To prevent this from happening, you tell the \Package{typearea} |
| 1196 |
package to calculate an appropriate type area: |
| 1197 |
\begin{lstcode} |
| 1198 |
\documentclass[a4paper]{article} |
| 1199 |
\usepackage[headlines=2.1]{typearea} |
| 1200 |
\end{lstcode} |
| 1201 |
If you use a {\KOMAScript} class, you should pass this option directly to |
| 1202 |
the class: |
| 1203 |
\begin{lstcode} |
| 1204 |
\documentclass[a4paper,headlines=2.1]{scrartcl} |
| 1205 |
\end{lstcode} |
| 1206 |
Commands that can be used to define the contents of a two-line header |
| 1207 |
can be found in \autoref{cha:scrlayer-scrpage}. |
| 1208 |
\end{Example} |
| 1209 |
|
| 1210 |
In some cases it is useful to be able to specify the header height not in |
| 1211 |
lines but directly as a length. This is accomplished with the alternative |
| 1212 |
option \Option{headheight}\important{\Option{headheight}}. All lengths and |
| 1213 |
sizes that \LaTeX{} understands are valid for \PName{height}. |
| 1214 |
Note\textnote{Attention!}, however, that if you use a \LaTeX{} length such as |
| 1215 |
\Length{baselineskip}, its value is not fixed at the time the option is set. |
| 1216 |
The value that will be used will be the one current at the time the type area |
| 1217 |
and margins are calculated. Also\textnote{Attention!}, \LaTeX{} lengths like |
| 1218 |
\Length{baselineskip} should never be used in the optional argument of |
| 1219 |
\DescRef{\LabelBase.cmd.documentclass} or \DescRef{\LabelBase.cmd.usepackage}. |
| 1220 |
|
| 1221 |
Please be sure to note\textnote{Attention!} that these options must be passed |
| 1222 |
as class options when using one of the {\KOMAScript} classes, or after loading |
| 1223 |
the class with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 1224 |
\DescRef{\LabelBase.cmd.KOMAoption}. Changing these options after loading the |
| 1225 |
\Package{typearea} package does not\textnote{no automatic recalculation} |
| 1226 |
automatically recalculate the type area. Instead, the changes only take effect |
| 1227 |
the next time the type area is recalculated. For recalculation of the type |
| 1228 |
area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option |
| 1229 |
with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or |
| 1230 |
\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see |
| 1231 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 1232 |
\DescRef{\LabelBase.cmd.recalctypearea} command (see |
| 1233 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 1234 |
% |
| 1235 |
\EndIndexGroup |
| 1236 |
|
| 1237 |
|
| 1238 |
\begin{Declaration} |
| 1239 |
\OptionVName{footlines}{number of lines}% |
| 1240 |
\OptionVName{footheight}{height}% |
| 1241 |
\Length{footheight}% |
| 1242 |
\end{Declaration} |
| 1243 |
\BeginIndex{}{footer>height}% |
| 1244 |
Like\ChangedAt{v3.12}{\Package{typearea}} the header, the footer also requires |
| 1245 |
an indication of how high it should be. But unlike the height of the header, |
| 1246 |
the \LaTeX{} kernel does not provide a length for the height of the footer. So |
| 1247 |
\Package{typearea} defines a new length, |
| 1248 |
\Length{footheight}\IndexLength[indexmain]{footheight}, if it does not already |
| 1249 |
exist. Whether this length will be used by classes or packages to design the |
| 1250 |
headers and footers depends on the individual classes and packages. The |
| 1251 |
\KOMAScript{} package |
| 1252 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 1253 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% |
| 1254 |
\IndexPackage{scrlayer-scrpage} incorporates |
| 1255 |
\Length{footheight} and actively cooperates with \Package{typearea}. The |
| 1256 |
\KOMAScript{} classes, on the other hand, do not recognize \Length{footheight} |
| 1257 |
because without the help of packages they offer only page styles with |
| 1258 |
single-line page footers. |
| 1259 |
|
| 1260 |
You can use \Option{footlines}\important{\Option{footlines}} to set the number |
| 1261 |
of lines in the footer, similar to \DescRef{\LabelBase.option.headlines} for |
| 1262 |
the number of lines in the header. By default the \Package{typearea} package |
| 1263 |
uses 1.25 footer lines. This value is a compromise: large enough to |
| 1264 |
accommodate an overlined or underlined footer (see |
| 1265 |
\autoref{sec:maincls.pagestyle}), and small enough that the relative weight of |
| 1266 |
the bottom margin is not affected too much when the footer lacks a dividing |
| 1267 |
line. Thus the default value will usually be adequate. In special cases, |
| 1268 |
however, you may need to adjust the footer height more precisely to your |
| 1269 |
actual requirements. |
| 1270 |
|
| 1271 |
\begin{Example} |
| 1272 |
Suppose you need to place a two-line copyright notice in the footer. |
| 1273 |
Although there is no test in \LaTeX{} itself to check the space available |
| 1274 |
for the footer, exceeding the designated height will likely result in |
| 1275 |
unbalanced distribution of type area and margins. Moreover, a package such |
| 1276 |
as \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 1277 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% |
| 1278 |
\IndexPackage{scrlayer-scrpage}, which can be used to define such a footer, |
| 1279 |
performs the appropriate test and will report any overruns. So it makes |
| 1280 |
sense to specify the required footer height when calculating of the type |
| 1281 |
area: |
| 1282 |
\begin{lstcode} |
| 1283 |
\documentclass[a4paper]{article} |
| 1284 |
\usepackage[footlines=2.1]{typearea} |
| 1285 |
\end{lstcode} |
| 1286 |
Again, if you use a \KOMAScript{} class, you should pass this |
| 1287 |
option directly to the class: |
| 1288 |
\begin{lstcode} |
| 1289 |
\documentclass[footlines=2.1]{scrartcl} |
| 1290 |
\end{lstcode} |
| 1291 |
Commands that can be used to define the contents of a two-line footer |
| 1292 |
are described in \autoref{cha:scrlayer-scrpage}. |
| 1293 |
\end{Example} |
| 1294 |
|
| 1295 |
In some cases it is useful to be able to specify the footer height not in |
| 1296 |
lines but directly as a length. This is accomplished with the alternative |
| 1297 |
option \Option{footheight}\important{\Option{footheight}}. All lengths and |
| 1298 |
sizes that \LaTeX{} understands are valid for \PName{height}. Note, however, |
| 1299 |
that if you use a \LaTeX{} length such as \Length{baselineskip}, its value is |
| 1300 |
not fixed at the time the option is set. The value that will be used will be |
| 1301 |
the one current at the time the type area and margins are calculated. |
| 1302 |
Also\textnote{Attention!}, \LaTeX{} lengths like \Length{baselineskip} should |
| 1303 |
never be used in the optional argument of |
| 1304 |
\DescRef{\LabelBase.cmd.documentclass} or \DescRef{\LabelBase.cmd.usepackage}. |
| 1305 |
|
| 1306 |
Please be sure to note\textnote{Attention!} that these options must be passed |
| 1307 |
as class options when using one of the {\KOMAScript} classes, or after loading |
| 1308 |
the class with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 1309 |
\DescRef{\LabelBase.cmd.KOMAoption}. Changing these options after loading |
| 1310 |
\Package{typearea} does not\textnote{no automatic recalculation} automatically |
| 1311 |
recalculate the type area. Instead, the changes only take effect the next time |
| 1312 |
the type area is recalculated. For recalculation of the type area, see the |
| 1313 |
\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option with the |
| 1314 |
values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or |
| 1315 |
\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see |
| 1316 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 1317 |
\DescRef{\LabelBase.cmd.recalctypearea} command (see |
| 1318 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 1319 |
\EndIndexGroup |
| 1320 |
|
| 1321 |
|
| 1322 |
\begin{Declaration} |
| 1323 |
\Macro{areaset}\OParameter{BCOR}\Parameter{width}\Parameter{height} |
| 1324 |
\end{Declaration}% |
| 1325 |
So far, we have seen how to create a nice type area\Index{type area} for |
| 1326 |
standard situations and how the \Package{typearea} package makes it easier to |
| 1327 |
accomplish this while still giving the freedom to adapt the layout. However, |
| 1328 |
there are cases where the text body has to adhere precisely to specific |
| 1329 |
dimensions. At the same time, the margins should be distributed as nicely as |
| 1330 |
possible and, if necessary, a binding correction should be taken into account. |
| 1331 |
The \Package{typearea} package offers the command \Macro{areaset} for this |
| 1332 |
purpose. This command takes as parameters the width and height of the text |
| 1333 |
body, as well as the binding correction as an optional parameter. The width |
| 1334 |
and position of the margins are then calculated automatically, taking account |
| 1335 |
of the options \DescRef{\LabelBase.option.headinclude}, |
| 1336 |
\OptionValueRef{\LabelBase}{headinclude}{false}, |
| 1337 |
\DescRef{\LabelBase.option.footinclude} and |
| 1338 |
\OptionValueRef{\LabelBase}{footinclude}{false} where needed. On the other |
| 1339 |
hand, the options |
| 1340 |
\DescRef{\LabelBase.option.headlines}\IndexOption{headlines}, |
| 1341 |
\DescRef{\LabelBase.option.headheight}\IndexOption{headheight}, |
| 1342 |
\DescRef{\LabelBase.option.footlines}\IndexOption{footlines}, and |
| 1343 |
\DescRef{\LabelBase.option.footheight}\IndexOption{footheight} are ignored! |
| 1344 |
For more information, see \DescRef{typearea-experts.cmd.areaset} on |
| 1345 |
\DescPageRef{typearea-experts.cmd.areaset} of |
| 1346 |
\autoref{sec:typearea-experts.experimental}. |
| 1347 |
|
| 1348 |
The default for \PName{BCOR} is 0\Unit{pt}. If you want to preserve the |
| 1349 |
current binding correction, for example the value set by option |
| 1350 |
\DescRef{\LabelBase.option.BCOR}\IndexOption{BCOR}, you can use the symbolic |
| 1351 |
value \PValue{current} at an optional argument. |
| 1352 |
|
| 1353 |
\begin{Example} |
| 1354 |
Suppose a text on A4 paper needs a width of exactly 60 characters in a |
| 1355 |
typewriter font and a height of exactly 30 lines per page. You can |
| 1356 |
accomplish this with the following preamble: |
| 1357 |
\begin{lstcode} |
| 1358 |
\documentclass[a4paper,11pt]{article} |
| 1359 |
\usepackage{typearea} |
| 1360 |
\newlength{\CharsLX}% Width of 60 characters |
| 1361 |
\newlength{\LinesXXX}% Height of 30 lines |
| 1362 |
\settowidth{\CharsLX}{\texttt{1234567890}} |
| 1363 |
\setlength{\CharsLX}{6\CharsLX} |
| 1364 |
\setlength{\LinesXXX}{\topskip} |
| 1365 |
\addtolength{\LinesXXX}{29\baselineskip} |
| 1366 |
\areaset{\CharsLX}{\LinesXXX} |
| 1367 |
\end{lstcode} |
| 1368 |
The factor is 29 rather than 30 because the baseline of the topmost line of |
| 1369 |
text is \Macro{topskip} below the top margin of the type area, as long as |
| 1370 |
the height of the topmost line is less than \Macro{topskip}. So we don't |
| 1371 |
need to add any height for the first line. The descenders of characters on |
| 1372 |
the lowermost line, on the other hand, protrude below the dimensions of the |
| 1373 |
type area. |
| 1374 |
|
| 1375 |
\iffalse % Umbruchkorrekturtext |
| 1376 |
If instead you want to set a book of poetry in which the text area is |
| 1377 |
exactly square with a side length of 15\Unit{cm}, with a binding correction |
| 1378 |
of 1\Unit{cm} taken into account, you can achieve this as follows:% |
| 1379 |
\else% |
| 1380 |
To set a book of poetry with a square text area with a side length of |
| 1381 |
15\Unit{cm} and a binding correction of 1\Unit{cm}, the following is |
| 1382 |
possible:% |
| 1383 |
\fi |
| 1384 |
\begin{lstcode} |
| 1385 |
\documentclass{poetry} |
| 1386 |
\usepackage{typearea} |
| 1387 |
\areaset[1cm]{15cm}{15cm} |
| 1388 |
\end{lstcode} |
| 1389 |
\end{Example} |
| 1390 |
\EndIndexGroup |
| 1391 |
|
| 1392 |
|
| 1393 |
\begin{Declaration} |
| 1394 |
\OptionValue{DIV}{areaset} |
| 1395 |
\end{Declaration}% |
| 1396 |
In\ChangedAt{v3.00}{\Package{typearea}} rare cases it is useful to be able to |
| 1397 |
realign the current type area. This is possible with the option |
| 1398 |
\OptionValue{DIV}{areaset}, where |
| 1399 |
\DescRef{\LabelBase.cmd.KOMAoptions}\PParameter{\OptionValue{DIV}{areaset}} |
| 1400 |
corresponds to the |
| 1401 |
\begin{lstcode} |
| 1402 |
\areaset[current]{\textwidth}{\textheight} |
| 1403 |
\end{lstcode} |
| 1404 |
command. The same result is obtained if you use |
| 1405 |
\OptionValueRef{\LabelBase}{DIV}{last} and the typearea was last set with |
| 1406 |
\DescRef{\LabelBase.cmd.areaset}.% |
| 1407 |
% |
| 1408 |
\EndIndexGroup |
| 1409 |
|
| 1410 |
\iftrue% Umbruchkorrekturtext: Alternativen |
| 1411 |
If you have concrete specifications for the margins, \Package{typearea} is |
| 1412 |
not suitable. In this case, you should use the |
| 1413 |
\Package{geometry}\IndexPackage{geometry}% |
| 1414 |
\important{\Package{geometry}} package (see \cite{package:geometry}).% |
| 1415 |
\fi% |
| 1416 |
\iffalse% |
| 1417 |
The \Package{typearea} package is not designed to set up predefined margins. |
| 1418 |
If you have to do so, the \Package{geometry}\IndexPackage{geometry} package |
| 1419 |
(see \cite{package:geometry}) is recommended.% |
| 1420 |
\fi |
| 1421 |
|
| 1422 |
|
| 1423 |
\section{Selecting the Paper Size} |
| 1424 |
\seclabel{paperTypes}% |
| 1425 |
\BeginIndexGroup |
| 1426 |
|
| 1427 |
The paper size is a key feature of a document. As already mentioned in the |
| 1428 |
description of the supported page layout constructions (see |
| 1429 |
\autoref{sec:typearea.basics} to \autoref{sec:typearea.circleConstruction} |
| 1430 |
starting on \autopageref{sec:typearea.basics}), the layout of the page, and |
| 1431 |
hence the entire document, depends on the paper size. Whereas the {\LaTeX} |
| 1432 |
standard classes are limited to a few formats, {\KOMAScript} supports even |
| 1433 |
unusual paper sizes in conjunction with the \Package{typearea} package. |
| 1434 |
|
| 1435 |
|
| 1436 |
\begin{Declaration} |
| 1437 |
\OptionVName{paper}{size} |
| 1438 |
\OptionVName{paper}{orientation} |
| 1439 |
\end{Declaration}% |
| 1440 |
The \Option{paper}\ChangedAt{v3.00}{\Package{typearea}} option is the central |
| 1441 |
element for paper-size selection\important[i]{% |
| 1442 |
\begin{tabular}[t]{@{}l@{}l@{}} |
| 1443 |
\KOption{paper} & \PValue{letter}, \\ |
| 1444 |
& \PValue{legal}, \\ |
| 1445 |
& \PValue{executive}, \\ |
| 1446 |
& \PValue{A0}, \PValue{A1}, \PValue{A2} \dots\\ |
| 1447 |
& \PValue{B0}, \PValue{B1}, \PValue{B2} \dots\\ |
| 1448 |
& \PValue{C0}, \PValue{C1}, \PValue{C2} \dots\\ |
| 1449 |
& \PValue{D0}, \PValue{D1}, \PValue{D2} \dots\end{tabular}} % |
| 1450 |
in \KOMAScript. \PName{Size} supports the American formats \Option{letter}, |
| 1451 |
\Option{legal}, and \Option{executive}. In addition, it supports the ISO |
| 1452 |
formats of the series A, B, C, and D, for example \PValue{A4} or\,---\,written |
| 1453 |
in lower case\,---\,\PValue{a4}. |
| 1454 |
|
| 1455 |
Landscape orientations\important{% |
| 1456 |
\begin{tabular}[t]{@{}l@{}l@{}} |
| 1457 |
\KOption{paper} & \PValue{landscape}, \\ |
| 1458 |
& \PValue{seascape} |
| 1459 |
\end{tabular}% |
| 1460 |
} are supported by specifying the option one more time |
| 1461 |
with the value \PValue{landscape}\Index{paper>orientation} or |
| 1462 |
\PValue{seascape}\ChangedAt{v3.02c}{\Package{typearea}}. The only difference |
| 1463 |
between \PValue{landscape} and \PValue{seascape} is that that the application |
| 1464 |
\File{dvips} rotates \PValue{landscape} pages by -90\Unit{\textdegree}, while |
| 1465 |
it rotates \PValue{seascape} pages by +90\Unit{\textdegree}. Thus |
| 1466 |
\PValue{seascape} is particularly useful whenever a PostScript viewer shows |
| 1467 |
landscape pages upside-down. In order for the difference to have an effect, |
| 1468 |
you must not deactivate the \DescRef{\LabelBase.option.pagesize}% |
| 1469 |
\IndexOption{pagesize}\important{\DescRef{\LabelBase.option.pagesize}} option |
| 1470 |
described below. |
| 1471 |
|
| 1472 |
Additionally, the \PName{size} can also be specified either in the form |
| 1473 |
\PName{width}\texttt{:}\PName{height}\ChangedAt{v3.01b}{\Package{typearea}}% |
| 1474 |
\important{\OptionVName{paper}{width\textup{:}height}} or in the form |
| 1475 |
\PName{height}\texttt{:}\PName{width}\ChangedAt{v3.22}{\Package{typearea}}% |
| 1476 |
\important{\OptionVName{paper}{height\textup{:}width}}. Which value is taken |
| 1477 |
as the \PName{height} and which as the \PName{width} depends on the |
| 1478 |
orientation of the paper. With \OptionValue{paper}{landscape} or |
| 1479 |
\OptionValue{paper}{seascape}, the smaller value is the \PName{height} and the |
| 1480 |
larger one is the \PName{width}. With |
| 1481 |
\OptionValue{paper}{portrait}\important{\OptionValue{paper}{portrait}}, the |
| 1482 |
smaller value is the \PName{width} and the larger one is the \PName{height}. |
| 1483 |
|
| 1484 |
Note\textnote{Attention!} that until version~3.01a the first value was always |
| 1485 |
the \PName{height} and the second one the \PName{width}. From version~3.01b |
| 1486 |
through version~3.21, the first value was always the \PName{width} and the |
| 1487 |
second one the \PName{height}. This is important if you use compatibility |
| 1488 |
settings (see option \DescRef{\LabelBase.option.version}% |
| 1489 |
\IndexOption{version}\important{\DescRef{\LabelBase.option.version}}, |
| 1490 |
\autoref{sec:typearea.compatibilityOptions}, |
| 1491 |
\DescPageRef{typearea.option.version}). |
| 1492 |
|
| 1493 |
\begin{Example} |
| 1494 |
Suppose you want to print an ISO-A8 index card in landscape orientation. The |
| 1495 |
margins should be very small and no header or footer will be used. |
| 1496 |
\begin{lstcode} |
| 1497 |
\documentclass{article} |
| 1498 |
\usepackage[headinclude=false,footinclude=false, |
| 1499 |
paper=A8,landscape]{typearea} |
| 1500 |
\areaset{7cm}{5cm} |
| 1501 |
\pagestyle{empty} |
| 1502 |
\begin{document} |
| 1503 |
\section*{Supported Paper Sizes} |
| 1504 |
letter, legal, executive, a0, a1 \dots\ % |
| 1505 |
b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots |
| 1506 |
\end{document} |
| 1507 |
\end{lstcode} |
| 1508 |
If the file cards have the special format (height:width) |
| 1509 |
5\Unit{cm}\,:\,3\Unit{cm}, this can be achieved using the following: |
| 1510 |
\begin{lstcode} |
| 1511 |
\documentclass{article} |
| 1512 |
\usepackage[headinclude=false,footinclude=false,% |
| 1513 |
paper=landscape,paper=5cm:3cm]{typearea} |
| 1514 |
\areaset{4cm}{2.4cm} |
| 1515 |
\pagestyle{empty} |
| 1516 |
\begin{document} |
| 1517 |
\section*{Supported Paper Sizes} |
| 1518 |
letter, legal, executive, a0, a1 \dots\ % |
| 1519 |
b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots |
| 1520 |
\end{document} |
| 1521 |
\end{lstcode} |
| 1522 |
\end{Example} |
| 1523 |
|
| 1524 |
By default, {\KOMAScript} uses A4 paper in portrait orientation. This is in |
| 1525 |
contrast\textnote{\KOMAScript{} vs. standard classes} to the standard classes, |
| 1526 |
which by default use the American letter paper format. |
| 1527 |
|
| 1528 |
Please note\textnote{Attention!} that these options must be passed as class |
| 1529 |
options when using one of the {\KOMAScript} classes, or after loading the |
| 1530 |
class with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 1531 |
\DescRef{\LabelBase.cmd.KOMAoption}. Changing the paper size or orientation |
| 1532 |
with \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 1533 |
\DescRef{\LabelBase.cmd.KOMAoption} does not\textnote{no automatic |
| 1534 |
recalculation} automatically recalculate the type area. Instead, the changes |
| 1535 |
only take effect the next time the type area is recalculated. For |
| 1536 |
recalculation of the type area, see the |
| 1537 |
\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option with the |
| 1538 |
values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or |
| 1539 |
\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see |
| 1540 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 1541 |
\DescRef{\LabelBase.cmd.recalctypearea} command (see |
| 1542 |
\DescPageRef{typearea.cmd.recalctypearea}).% |
| 1543 |
\EndIndexGroup |
| 1544 |
|
| 1545 |
|
| 1546 |
\begin{Declaration} |
| 1547 |
\OptionVName{pagesize}{output driver} |
| 1548 |
\end{Declaration}% |
| 1549 |
\begin{Explain}% |
| 1550 |
The above-mentioned mechanisms for choosing the paper format only affect the |
| 1551 |
output insofar as internal {\LaTeX} lengths are set. The \Package{typearea} |
| 1552 |
package then uses them in dividing the page into type area and margins. |
| 1553 |
The specification of the DVI formats\Index{DVI}, however, does not include |
| 1554 |
any indication of paper size. % |
| 1555 |
\iffree{% |
| 1556 |
When outputting directly from the DVI format to a low-level printer |
| 1557 |
language such as PCL% |
| 1558 |
\iftrue% Umbruchkorrektur |
| 1559 |
\footnote{PCL is a family of printer languages that HP uses for its |
| 1560 |
inkjet and laser printers.}% |
| 1561 |
\fi \ or ESC/P2% |
| 1562 |
\iftrue% Umbruchkorrektur |
| 1563 |
\footnote{ESC/P2 is the printer language that EPSON uses for its |
| 1564 |
dot-matrix, and older inkjet or laser printers.}% |
| 1565 |
\fi \ or ESC/P-R% |
| 1566 |
\iftrue% Umbruchkorrektur |
| 1567 |
\footnote{ESC/P-R is the printer language that EPSON currently uses for |
| 1568 |
inkjet and laser printers.}% |
| 1569 |
\fi, this is usually not an issue% |
| 1570 |
}{% |
| 1571 |
In the past, when DVI was printed directly into a low-level printer |
| 1572 |
language, it did not matter% |
| 1573 |
}, since with these formats the reference zero-position is at the top left, |
| 1574 |
as in DVI. But nowadays, the output is normally translated into languages |
| 1575 |
such as PostScript\Index{PostScript} or PDF\Index{PDF}, in which the |
| 1576 |
zero-position is at a different point, and in which the paper format should |
| 1577 |
be specified in the output file, which is missing this information. To solve |
| 1578 |
this problem, the corresponding driver uses a default paper size, which the |
| 1579 |
user can change either by an option or by specifying it in the {\TeX} source |
| 1580 |
file. When using the DVI driver \File{dvips} or \File{dvipdfm}, the |
| 1581 |
information can be given in the form of a \Macro{special} command. When |
| 1582 |
using {pdf\TeX}, {lua\TeX}, {\XeTeX} or {V\TeX} their paper-size lengths are |
| 1583 |
set appropriately. |
| 1584 |
\end{Explain} |
| 1585 |
With the \Option{pagesize} option, you can select an output driver for writing |
| 1586 |
the paper size into the destination document. Supported output drivers are |
| 1587 |
listed at \autoref{tab:typearea.outputdriver}\iffalse% |
| 1588 |
, \autopageref{tab:typearea.outputdriver}\fi. The |
| 1589 |
default\ChangedAt{v3.17}{\Package{typearea}} is \Option{pagesize}. Using this |
| 1590 |
option without providing a value is equivalent to \OptionValue{pagesize}{auto}. |
| 1591 |
% |
| 1592 |
\begin{table} |
| 1593 |
\caption{Output driver for option \OptionVName{pagesize}{output driver}} |
| 1594 |
\begin{desctabular} |
| 1595 |
\pventry{auto}{Uses output driver \PValue{pdftex} if the pdf\TeX-specific |
| 1596 |
lengths \Macro{pdfpagewidth}\IndexLength{pdfpagewidth} and |
| 1597 |
\Macro{pdfpageheight}\IndexLength{pdfpageheight} or the lua\TeX-specific |
| 1598 |
lengths \Macro{pagewidth}\IndexLength{pagewidth} and |
| 1599 |
\Macro{pageheight}\IndexLength{pageheight} are defined. In addition, the |
| 1600 |
output driver \PValue{dvips} will also be used. This setting is in |
| 1601 |
principle also suitable for \XeTeX{}.% |
| 1602 |
\IndexOption{pagesize~=\textKValue{auto}}}% |
| 1603 |
\pventry{automedia}{Almost the same as \PValue{auto} but if the |
| 1604 |
\mbox{V\TeX}-specific lengths |
| 1605 |
\Macro{mediawidth}\IndexLength{mediawidth} and |
| 1606 |
\Macro{mediaheight}\IndexLength{mediaheight} are defined, they will be |
| 1607 |
set as well.\IndexOption{pagesize~=\textKValue{automedia}}}% |
| 1608 |
\entry{\PValue{false}, \PValue{no}, \PValue{off}}{% |
| 1609 |
Does not set any output driver and does not send page size information to |
| 1610 |
the output driver.\IndexOption{pagesize~=\textKValue{false}}}% |
| 1611 |
\pventry{dvipdfmx}{\ChangedAt{v3.05a}{\Package{typearea}} Writes the paper |
| 1612 |
size into DVI files using |
| 1613 |
\Macro{special}\PParameter{pagesize=\PName{width},\PName{height}}. The |
| 1614 |
name of the output driver is \PValue{dvipdfmx} because the application |
| 1615 |
\File{dvipdfmx} handles such specials not just in the preamble but |
| 1616 |
in the document body too.\IndexOption{pagesize~=\textKValue{dvipdfmx}}}% |
| 1617 |
\pventry{dvips}{Using this option in the preamble sets the paper size |
| 1618 |
using |
| 1619 |
\Macro{special}\PParameter{pagesize=\PName{width},\PName{height}}. Since |
| 1620 |
the \File{dvips} driver cannot handle changes of paper size in the |
| 1621 |
inner document pages, a hack is required to achieve such changes. Use |
| 1622 |
changes of paper size after \Macro{begin}\PParameter{document} at your |
| 1623 |
own risk, if you are using |
| 1624 |
\PValue{dvips}!\IndexOption{pagesize~=\textKValue{dvips}}}% |
| 1625 |
\entry{\PValue{pdftex}, \PValue{luatex}}{% |
| 1626 |
\ChangedAt{v3.20}{\Package{typearea}}Sets paper size using the |
| 1627 |
pdf\TeX-specific lengths |
| 1628 |
\Macro{pdfpagewidth}\IndexLength{pdfpagewidth} and |
| 1629 |
\Macro{pdfpageheight}\IndexLength{pdfpageheight} or the |
| 1630 |
lua\TeX-specific lengths \Macro{pagewidth}\IndexLength{pagewidth} |
| 1631 |
and \Macro{pageheight}\IndexLength{pageheight}. You can do this at any |
| 1632 |
time in your document.% |
| 1633 |
\IndexOption{pagesize~=\textKValue{pdftex}}% |
| 1634 |
\IndexOption{pagesize~=\textKValue{luatex}}}% |
| 1635 |
\end{desctabular} |
| 1636 |
\label{tab:typearea.outputdriver} |
| 1637 |
\end{table} |
| 1638 |
|
| 1639 |
\begin{Example} |
| 1640 |
Suppose a document should be available both as a DVI data file |
| 1641 |
and in PDF format for on-line viewing. The preamble might begin |
| 1642 |
as follows: |
| 1643 |
\begin{lstcode}[% |
| 1644 |
aboveskip=.5\baselineskip plus .1\baselineskip minus .1\baselineskip,% |
| 1645 |
belowskip=.4\baselineskip plus .1\baselineskip minus .1\baselineskip] |
| 1646 |
\documentclass{article} |
| 1647 |
\usepackage[paper=A4,pagesize]{typearea} |
| 1648 |
\end{lstcode} |
| 1649 |
If the {pdf\TeX} engine is used \emph{and} PDF output is enabled, the |
| 1650 |
lengths \Macro{pdfpagewidth} and \Macro{pdfpageheight} are set |
| 1651 |
appropriately. If, however, a DVI data file is created\,---\, whether by |
| 1652 |
{\LaTeX} or by {pdf\LaTeX}\,---\,then a \Macro{special} is written at the |
| 1653 |
start of this data file. |
| 1654 |
\end{Example}% |
| 1655 |
\iffree{% The recommendation is actually outdated. Those who use such old |
| 1656 |
% versions of typearea are the ones at fault. |
| 1657 |
If you use an older version of \Package{typearea}, you |
| 1658 |
should\textnote{Attention!} always specify the \Option{pagesize} option, |
| 1659 |
because older versions of \Package{typearea} did not set them by default. As |
| 1660 |
a rule, the method without an \PName{output driver} or with \PValue{auto} or |
| 1661 |
\PValue{automedia} is convenient.% |
| 1662 |
}{% |
| 1663 |
\vskip-1\ht\strutbox plus |
| 1664 |
.75\ht\strutbox% Wegen Beispiel am Ende der Erklaerung |
| 1665 |
}% |
| 1666 |
\EndIndexGroup |
| 1667 |
% |
| 1668 |
\EndIndexGroup |
| 1669 |
|
| 1670 |
|
| 1671 |
\section{Tips} |
| 1672 |
\seclabel{tips} |
| 1673 |
|
| 1674 |
For theses and dissertations, many rules exist that violate even the most |
| 1675 |
elementary rules of typography.\textnote{formatting rules vs. good typography} |
| 1676 |
The reasons for such rules include the typographical incompetence of those who |
| 1677 |
issue them, but also the fact that they were originally meant for mechanical |
| 1678 |
typewriters. With a typewriter or a primitive text processor from the early |
| 1679 |
1980s, it was not possible to produce typographically correct output without |
| 1680 |
extreme effort. So rules were created that appeared to be easy to follow and |
| 1681 |
were still accommodating to a proofreader. These include margins that lead to |
| 1682 |
usable line lengths for one-sided printing with a typewriter. To avoid |
| 1683 |
extremely short lines, which are made worse by unjustified text, the margins |
| 1684 |
were kept narrow and the leading was increased to 1.5 lines to allow space for |
| 1685 |
corrections. Before the advent of modern text processing systems, single |
| 1686 |
spacing would have been the only alternative\,---\,except with \TeX. In such a |
| 1687 |
single-spaced document, even correction signs would have been difficult to |
| 1688 |
add. When computers became more widely available for text processing, some |
| 1689 |
students showed their playful side and tried to spice up their work by using |
| 1690 |
an ornamental font to make their work look better than it really was. They did |
| 1691 |
not consider that such fonts are often more difficult to read and therefore |
| 1692 |
unsuitable for this purpose. Thus, two font families found their way |
| 1693 |
into the regulations which are neither compatible nor particularly suitable |
| 1694 |
for the job in the case of Times. Times is a relatively narrow typeface |
| 1695 |
designed at the beginning of the 20th century for the narrow columns of |
| 1696 |
British newspapers. Modern versions usually are somewhat improved. But still |
| 1697 |
the Times font, which is often required, does not really fit the prescribed |
| 1698 |
margins. |
| 1699 |
|
| 1700 |
{\LaTeX} already uses adequate line spacing, and the margins are wide enough |
| 1701 |
for corrections. Thus a page will look spacious, even when quite full of text. |
| 1702 |
|
| 1703 |
Often these typographically questionable rules are difficult to implement in |
| 1704 |
{\LaTeX}. A fixed number of characters per line can be achieved only when a |
| 1705 |
non-proportional font is used. There are very few good non-proportional fonts |
| 1706 |
available. Hardly any text typeset in this way looks really good. In many |
| 1707 |
cases font designers try to increase the serifs on the `i' or `l' to |
| 1708 |
compensate for the different character widths. This does not work and results |
| 1709 |
in a fragmented and agitated-looking text. If you use {\LaTeX} for your |
| 1710 |
thesis, some of these rules have to be either ignored or at least interpreted |
| 1711 |
generously. For example, ``60 characters per line'' can be interpreted not as |
| 1712 |
a fixed but as an average or maximum value.% |
| 1713 |
|
| 1714 |
As implemented, typesetting rules are usually intended to obtain a useful |
| 1715 |
result even if the author does not know what needs to be considered. |
| 1716 |
\emph{Useful} frequently means readable and correctable. In my opinion the |
| 1717 |
type area of a text set with {\LaTeX} and the \Package{typearea} package meets |
| 1718 |
these criteria well from the outset. So if you are confronted with regulations |
| 1719 |
which deviate substantially from it, I recommend that you present a sample of |
| 1720 |
the text to your advisor and ask whether you can submit the work despite |
| 1721 |
deviations in the format. If necessary the type area can be adapted somewhat |
| 1722 |
by changing the \DescRef{\LabelBase.option.DIV}% |
| 1723 |
\important{\DescRef{\LabelBase.option.DIV}} option. I advise against |
| 1724 |
using \DescRef{\LabelBase.cmd.areaset} for this purpose, however. In the |
| 1725 |
worst case, use the \Package{geometry} package% |
| 1726 |
\important{\Package{geometry}}\IndexPackage{geometry} (see |
| 1727 |
\cite{package:geometry}), which is not part of \KOMAScript, or change the page |
| 1728 |
layout parameters of \LaTeX{} yourself. You can find the values as determined |
| 1729 |
by \Package{typearea} in the \File{log} file of your document. The |
| 1730 |
\DescRef{typearea-experts.option.usegeometry}% |
| 1731 |
\important{\DescRef{typearea-experts.option.usegeometry}} option, which you |
| 1732 |
can find in \autoref{part:forExperts}, can also improve the interactions |
| 1733 |
between \Package{typearea} and \Package{geometry}. This should allow modest |
| 1734 |
adjustments. However, make sure that the proportions of the text area match |
| 1735 |
those of the page, taking the binding correction into account. |
| 1736 |
|
| 1737 |
If it is absolutely necessary to set the text with a line spacing of 1.5, do |
| 1738 |
not under any circumstances redefine \Macro{baselinestretch}. Although this |
| 1739 |
procedure is recommended all too frequently, it has been obsolete since the |
| 1740 |
introduction of {\LaTeXe} in 1994. In the worst case, use the |
| 1741 |
\Macro{linespread} command. I recommend the package |
| 1742 |
\Package{setspace}\important{\Package{setspace}}\IndexPackage{setspace} (see |
| 1743 |
\cite{package:setspace}), which is not part of \KOMAScript. You should also |
| 1744 |
let \Package{typearea} recalculate a new type area after changing the line |
| 1745 |
spacing. However, you should switch back to the normal line spacing for the |
| 1746 |
title, and preferably for the table of contents and various lists\,---\,as |
| 1747 |
well as the bibliography and the index. For details, see the explanation of |
| 1748 |
\OptionValueRef{\LabelBase}{DIV}{current}% |
| 1749 |
\important{\OptionValueRef{\LabelBase}{DIV}{current}}. |
| 1750 |
|
| 1751 |
The \Package{typearea} package, even with option |
| 1752 |
\OptionValueRef{\LabelBase}{DIV}{calc}% |
| 1753 |
\important{\OptionValueRef{\LabelBase}{DIV}{calc}}, calculates a very generous |
| 1754 |
text area. Many conservative typographers will find that the resulting line |
| 1755 |
length is still excessive. The calculated \Option{DIV} value may be found in the |
| 1756 |
\File{log} file for each document. So you can easily choose a smaller value |
| 1757 |
after the first {\LaTeX} run. |
| 1758 |
|
| 1759 |
Not\textnote{What is better?} infrequently I am asked why I dwell on type area |
| 1760 |
calculations for an entire chapter, when it would be much easier just to |
| 1761 |
provide a package with which you can adjust the margins as in a word |
| 1762 |
processor. Often it is said that such a package would be a better solution in |
| 1763 |
any case, since everyone knows how to choose appropriate margins, and that the |
| 1764 |
margins calculated by {\KOMAScript} are not that good anyway. I would like to |
| 1765 |
quote Hans Peter Willberg and Friedrich Forssmann, two of the most respected |
| 1766 |
contemporary typographers \cite{TYPO:ErsteHilfe}. (You can find the original |
| 1767 |
German in the German guide.) |
| 1768 |
\begin{quote} |
| 1769 |
\phantomsection\seclabel{tips.cite}% |
| 1770 |
\textit{The\textnote{Quote!} practice of doing things oneself has long been |
| 1771 |
widespread, but the results are often dubious because amateur typographers |
| 1772 |
do not see what is wrong and cannot know what is important. This is how |
| 1773 |
you get used to incorrect and poor typography.} [\dots] \textit{Now the |
| 1774 |
objection could be made that typography is a matter of taste. When it |
| 1775 |
comes to decoration, one could perhaps accept that argument, but since |
| 1776 |
typography is primarily about information, not only can mistakes irritate, |
| 1777 |
but they may even cause damage.} |
| 1778 |
\end{quote} |
| 1779 |
% |
| 1780 |
\EndIndexGroup |
| 1781 |
|
| 1782 |
%%% Local Variables: |
| 1783 |
%%% mode: latex |
| 1784 |
%%% TeX-master: "scrguide-en.tex" |
| 1785 |
%%% coding: utf-8 |
| 1786 |
%%% ispell-local-dictionary: "en_GB" |
| 1787 |
%%% eval: (flyspell-mode 1) |
| 1788 |
%%% End: |