| 1 |
% LAY_e2.TEX - Anhang von LAYOUT.TEX (PA 1988) |
| 2 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 |
|
| 4 |
\clearpage |
| 5 |
|
| 6 |
\section*{Appendix} |
| 7 |
\addcontentsline{toc}{section}{Appendix} |
| 8 |
|
| 9 |
\appendix |
| 10 |
|
| 11 |
\section{The page structure in \LaTeX} |
| 12 |
|
| 13 |
This appendix describes how the actual page is build from its |
| 14 |
components and how they are influenced by \TeX{}'s parameters. |
| 15 |
(\seealso{Fig.\,\ref{bild}} Figure~\ref{bild} has been created by |
| 16 |
Nelson Beebe at the University of Utah.) |
| 17 |
|
| 18 |
\begin{description} |
| 19 |
|
| 20 |
\item[text area] |
| 21 |
The normal text area (``Body'') contains the running text |
| 22 |
including footnotes, tables and figures. The headings, footer |
| 23 |
and margin notes do \emph{not} belong to the text area. |
| 24 |
|
| 25 |
The text area has the width \cs{textwidth} |
| 26 |
and the height \cs{text\-height}. |
| 27 |
|
| 28 |
In a two column layout the text area is split into two columns, with |
| 29 |
the width \cs{columnwidth} each and a space of \cs{columnsep} between |
| 30 |
them. Thus the \cs{columnwidth} is a little bit smaller than half |
| 31 |
the \cs{textwidth}. |
| 32 |
|
| 33 |
\cs{textwidth} and \cs{columnwidth} should be a multiple of the |
| 34 |
width of one character in the \texttt{tt} font. |
| 35 |
|
| 36 |
\cs{textheight} should be multiple of the line height |
| 37 |
\cs{baselineskip}, increased by the constant value of \cs{topskip}. |
| 38 |
|
| 39 |
Indentations inside the text area are defined with \cs{leftskip} and |
| 40 |
\cs{rightskip}. These parameters should not be changed explicitly |
| 41 |
by the user but rather implicitly through environments. |
| 42 |
|
| 43 |
\item[left margin] |
| 44 |
The left margin is either \cs{odd-} or \cs{evensidemargin} plus |
| 45 |
1~inch. Both parameters have the same value, unless the |
| 46 |
\texttt{twoside} option is given. |
| 47 |
|
| 48 |
\item[top margin] |
| 49 |
The top margin is the sum of \cs{topmargin}, \cs{headheight} and |
| 50 |
\cs{headsep} plus 1~inch. |
| 51 |
|
| 52 |
\item[right margin] |
| 53 |
The right margin is the paper width minus the left margin and |
| 54 |
the text area. |
| 55 |
|
| 56 |
\item[bottom margin] |
| 57 |
The bottom margin is the paper height minus the top margin and |
| 58 |
the text area. |
| 59 |
|
| 60 |
\item[heading]\index{headings} |
| 61 |
The heading is inside the top margin with a space of \cs{headsep} |
| 62 |
between the lower border of the header and the upper border of the |
| 63 |
text area. Above the header is a free space of \cs{topmargin} |
| 64 |
increased by 1~inch. |
| 65 |
|
| 66 |
\item[footing]\index{footings} The footer is inside the bottom margin with a |
| 67 |
space of \cs{footskip} between the lower border |
| 68 |
of the text area and the lower border of the footer. |
| 69 |
|
| 70 |
\item[margin notes]\index{margin notes} Margin notes are inside the left or |
| 71 |
right margin. They have a width of \cs{marginparwidth} and a space |
| 72 |
of \cs{marginparsep} between the margin note and the text area. The |
| 73 |
vertical space between two margin notes is \cs{marginparpush}. |
| 74 |
|
| 75 |
\end{description} |
| 76 |
|
| 77 |
The \texttt{paperheight} consists of the following elements (from top to |
| 78 |
bottom): |
| 79 |
\begin{verse} |
| 80 |
1 inch \\*[2pt] |
| 81 |
\cs{topmargin} \\*[2pt] |
| 82 |
\cs{headheight} \\*[2pt] |
| 83 |
\cs{headsep} \\*[2pt] |
| 84 |
\cs{textheight} \\*[2pt] |
| 85 |
\cs{footskip} \\*[2pt] |
| 86 |
remaining page. |
| 87 |
\end{verse} |
| 88 |
|
| 89 |
On pages with margin notes in the right margin the \texttt{paperwidth} consists |
| 90 |
of the following elements: |
| 91 |
\begin{verse} |
| 92 |
1 inch\\*[2pt] |
| 93 |
\cs{oddsidemargin} |
| 94 |
\ \ or\ \ |
| 95 |
\cs{evensidemargin}\\*[2pt] |
| 96 |
\cs{textwidth}\\*[2pt] |
| 97 |
\cs{marginparsep}\\*[2pt] |
| 98 |
\cs{marginparwidth}\\*[2pt] |
| 99 |
remaining page |
| 100 |
\end{verse} |
| 101 |
With the option \texttt{twoside} the left pages change to |
| 102 |
\begin{verse} |
| 103 |
1 inch\\*[2pt] |
| 104 |
\cs{evensidemargin}\\*[2pt] |
| 105 |
\cs{textwidth}\\*[2pt] |
| 106 |
remaining page |
| 107 |
\end{verse} |
| 108 |
|
| 109 |
\marginlabel{Comments:} The parameters \cs{topmargin}, \cs{oddsidemargin}, |
| 110 |
and \cs{evensidemargin} may be negative. In this case, the margin will be |
| 111 |
smaller than 1~inch. The same is true for \cs{leftskip} and \cs{rightskip} |
| 112 |
which leads to text that is wider than the text area. |
| 113 |
|
| 114 |
Extensive treatment and figures to this subject may be found in the |
| 115 |
\textsc{TUGboat} Vol.9, No.1 (April 1988). |
| 116 |
|
| 117 |
The parameter \cs{footheight} is no longer defined |
| 118 |
in \LaTeXe\ since no-one used it. |
| 119 |
|
| 120 |
|
| 121 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 122 |
|
| 123 |
\begin{fullpage} |
| 124 |
%%%%%%%%%%%%%%%% |
| 125 |
|
| 126 |
|
| 127 |
% Bild von Nelson Beebe, mit geringen "Anderungen von PA: |
| 128 |
\newcommand{\X}[1]{{#1}\index{{#1}}} |
| 129 |
% NB: For computed dimension parameters, we cannot use |
| 130 |
% \newcommand{}, because this expands to a TeX \def which does |
| 131 |
% not evaluate the definition before assigning it to the control |
| 132 |
% sequence name; we use \xdef directly to force evaluation |
| 133 |
\newcount\T % temporary counter for arithmetic calculations |
| 134 |
\T=0 |
| 135 |
|
| 136 |
% ********************************************************************** |
| 137 |
% WARNING: Do not insert ANY aditional whitespace in these |
| 138 |
% macros--otherwise it ends up in the TeX boxes and ruins the |
| 139 |
% positioning, sigh.... |
| 140 |
% ********************************************************************** |
| 141 |
|
| 142 |
% NAMEBOX{x}{y}{dx}{dy}{width}{height}{pos}{label} -- framed label with |
| 143 |
% box lower-left corner at (x+dx,y+dy) |
| 144 |
\newcommand{\NAMEBOX}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces |
| 145 |
\framebox(#5,#6)[#7]{#8}\end{picture}}} |
| 146 |
|
| 147 |
% HARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- horizontal |
| 148 |
% labeled arrow with left point at (x+dx,y+dy), label on bottom |
| 149 |
% (side=b) or top (side=t) of arrow, in makebox[pos] |
| 150 |
\newcommand{\HARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces |
| 151 |
\put(0,0){\vector(1,0){#5}}\ignorespaces |
| 152 |
\put(#5,0){\vector(-1,0){#5}}\ignorespaces |
| 153 |
\ifthenelse{\equal{#6}{b}}{\ignorespaces |
| 154 |
\put(0,-\TAD){\makebox(#5,0)[#7]{#8}} |
| 155 |
}{\ignorespaces |
| 156 |
\ifthenelse{\equal{#6}{t}}{}{\ignorespaces |
| 157 |
\typeout{Side #6 must be ``b'' or ``t''--``t'' assumed}}\ignorespaces |
| 158 |
\put(0,\TAD){\makebox(#5,0)[#7]{#8}} |
| 159 |
} |
| 160 |
\end{picture}}} |
| 161 |
|
| 162 |
% VARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical |
| 163 |
% labeled arrow with left point at (x+dx,y+dy), label on left |
| 164 |
% (side=l) or right (side=r) of arrow, in makebox[pos] |
| 165 |
\newcommand{\VARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces |
| 166 |
\put(0,0){\vector(0,1){#5}}\ignorespaces |
| 167 |
\put(0,#5){\vector(0,-1){#5}}\ignorespaces |
| 168 |
\ifthenelse{\equal{#6}{l}}{\ignorespaces |
| 169 |
\put(-\TAD,0){\makebox(0,#5)[#7]{#8}} |
| 170 |
}{\ignorespaces |
| 171 |
\ifthenelse{\equal{#6}{r}}{}{\ignorespaces |
| 172 |
\typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces |
| 173 |
\put(\TAD,0){\makebox(0,#5)[#7]{#8}} |
| 174 |
} |
| 175 |
\end{picture}}} |
| 176 |
|
| 177 |
% VRULE{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical |
| 178 |
% rule with left point at (x+dx,y+dy), label on left |
| 179 |
% (side=l) or right (side=r) of rule, in makebox[pos] |
| 180 |
\newcommand{\VRULE}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces |
| 181 |
\put(0,0){\line(0,1){#5}}\ignorespaces |
| 182 |
\ifthenelse{\equal{#6}{l}}{\ignorespaces |
| 183 |
\put(0,0){\makebox(0,#5)[#7]{$\rightarrow${}#8}} |
| 184 |
}{\ignorespaces |
| 185 |
\ifthenelse{\equal{#6}{r}}{}{\ignorespaces |
| 186 |
\typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces |
| 187 |
\put(0,0){\makebox(0,#5)[#7]{$\leftarrow${}#8}} |
| 188 |
} |
| 189 |
\end{picture}}} |
| 190 |
% ********************************************************************** |
| 191 |
% If you wish to change any of these values: |
| 192 |
% * definitions are mostly in alphabetical order |
| 193 |
% * remember units are in centipoints for accurate |
| 194 |
% positioning |
| 195 |
% * most parameters are taken directly from values in |
| 196 |
% BK11.STY, but in order to improve the appearance of the |
| 197 |
% figure, a few have been increased to avoid overlap of |
| 198 |
% labels and/or boxes, or to loosen up the figure |
| 199 |
% * ALL parameters which depend on others are defined by |
| 200 |
% computation and \xdef's below; they must NEVER be |
| 201 |
% changed |
| 202 |
% |
| 203 |
%- For 11pt BOOK style, \textwidth / \pagewidth(8.5in) = 0.5294 |
| 204 |
%- Anything larger than this will generate an overfull box. We |
| 205 |
%- choose 0.50 since that makes scaling trivial for the reader |
| 206 |
%- \newcommand{\UNITLENGTH}{0.005pt} |
| 207 |
%- \newcommand{\SCALEFACTOR}{50\%} |
| 208 |
% |
| 209 |
%-----> We use a larger picture with 0.70 on our DIN-A4 paper: |
| 210 |
\newcommand{\UNITLENGTH}{0.007pt} |
| 211 |
\newcommand{\SCALEFACTOR}{70\%} |
| 212 |
% <------------------------------ |
| 213 |
% |
| 214 |
% US papersize... |
| 215 |
% |
| 216 |
\newcommand{\PAGEHEIGHT}{79497} % 11in in centipoints |
| 217 |
\newcommand{\PAGEWIDTH}{61430} % 8.5in in centipoints |
| 218 |
% |
| 219 |
% Typical dimensions from BK10.DOC |
| 220 |
% |
| 221 |
\newcommand{\BASELINESKIP}{2000} % really 1000, but this is |
| 222 |
% too tight for the figure |
| 223 |
\newcommand{\COLUMNSEP}{1000} |
| 224 |
\newcommand{\COLUMNSEPRULE}{0} |
| 225 |
|
| 226 |
% DVI drivers put top left corner at (1in,1in) from physical page |
| 227 |
% left corner |
| 228 |
\newcommand{\DVIXOFFSET}{7227} |
| 229 |
\newcommand{\DVIYOFFSET}{7227} |
| 230 |
|
| 231 |
\newcommand{\EVENSIDEMARGIN}{10841} |
| 232 |
|
| 233 |
\newcommand{\FOOTHEIGHT}{2400} % really 1200, but too tight |
| 234 |
\newcommand{\FOOTNOTESEP}{665} |
| 235 |
\newcommand{\FOOTSKIP}{4207} % really 2529, but too tight; for symmetry, |
| 236 |
% make FOOTSKIP=HEADSEP+FOOTHEIGHT |
| 237 |
\newcommand{\HEAdHEIGHT}{2400} % really 1200, but too tight |
| 238 |
\newcommand{\HEADSEP}{1807} |
| 239 |
|
| 240 |
\newcommand{\MARGINPARPUSH}{2000} % really 500, but too tight |
| 241 |
\newcommand{\MARGINPARSEP}{2800} % really 700, but too tight |
| 242 |
\newcommand{\MARGINPARWIDTH}{7227} |
| 243 |
\newcommand{\MARGINNOTEHEIGHT}{4444} % arbitrary value (holds |
| 244 |
% ``Margin Note A'' on |
| 245 |
% 2 lines) |
| 246 |
|
| 247 |
\newcommand{\ODDSIDEMARGIN}{3613} |
| 248 |
% |
| 249 |
% Upper left page corner (0,0) is at (1in,1in) on physical page |
| 250 |
% for DVI drivers. Position the LOWER left corner at |
| 251 |
% (\PAGEXORIGIN,\PAGEYORIGIN), where \PAGEYORIGIN is computed |
| 252 |
% below |
| 253 |
\newcommand{\PAGEXORIGIN}{\DVIXOFFSET} |
| 254 |
|
| 255 |
\newcommand{\TAD}{800} % how far to move labels from their arrows |
| 256 |
\newcommand{\TEXTHEIGHT}{50400} |
| 257 |
\newcommand{\TEXTWIDTH}{32522} |
| 258 |
\newcommand{\TOPMARGIN}{5420} |
| 259 |
|
| 260 |
% ********************************************************************** |
| 261 |
% DO NOT CHANGE any of these computed parameters |
| 262 |
% |
| 263 |
|
| 264 |
% |
| 265 |
\T=\TEXTWIDTH |
| 266 |
\advance\T by -\COLUMNSEP |
| 267 |
\divide\T by 2 |
| 268 |
\xdef\COLUMNWIDTH{\the\T} |
| 269 |
|
| 270 |
\T=\TEXTWIDTH |
| 271 |
\divide\T by 2 |
| 272 |
\advance\T by \ODDSIDEMARGIN |
| 273 |
\xdef\COLUMNXMIDDLE{\the\T} % 0.5*TEXTWIDTH+ODDSIDEMARGIN |
| 274 |
|
| 275 |
\T=\COLUMNWIDTH |
| 276 |
\advance\T by \ODDSIDEMARGIN |
| 277 |
\advance\T by \COLUMNSEP |
| 278 |
\xdef\COLUMNTWOX{\the\T} % COLUMNWIDTH+COLUMNSEP+ODDSIDEMARGIN |
| 279 |
|
| 280 |
\T=\FOOTSKIP |
| 281 |
\advance\T by \TEXTHEIGHT |
| 282 |
\advance\T by \HEADSEP |
| 283 |
\xdef\HEADYORIGIN{\the\T} % FOOTSKIP+TEXTHEIGHT+HEADSEP |
| 284 |
% |
| 285 |
% Inner TeX page dimensions are (\INNERWIDTH,\INNERHEIGHT). All TeX |
| 286 |
% coordinates are relative to (0,0) at upper-left corner of this |
| 287 |
% page, although for the figures, we put (0,0) at lower-left |
| 288 |
% corner. |
| 289 |
% |
| 290 |
\T=\TOPMARGIN |
| 291 |
\advance\T by \HEAdHEIGHT |
| 292 |
\advance\T by \HEADSEP |
| 293 |
\advance\T by \TEXTHEIGHT |
| 294 |
\advance\T by \FOOTSKIP |
| 295 |
% INNERHEIGHT=TOPMARGIN+HEAdHEIGHT+HEADSEP+TEXTHEIGHT+FOOTSKIP |
| 296 |
\xdef\INNERHEIGHT{\the\T} |
| 297 |
|
| 298 |
\T=\ODDSIDEMARGIN |
| 299 |
\advance\T by \TEXTWIDTH |
| 300 |
\advance\T by \EVENSIDEMARGIN |
| 301 |
\xdef\INNERWIDTH{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+EVENSIDEMARGIN |
| 302 |
|
| 303 |
\T=\ODDSIDEMARGIN |
| 304 |
\advance\T by \TEXTWIDTH |
| 305 |
\advance\T by \MARGINPARSEP |
| 306 |
\xdef\MARGINNOTEXORIGIN{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+MARGINPARSEP |
| 307 |
|
| 308 |
\T=\TEXTHEIGHT |
| 309 |
\multiply\T by 75 |
| 310 |
\divide\T by 100 |
| 311 |
\advance\T by \FOOTSKIP |
| 312 |
\xdef\MARGINNOTEYA{\the\T} % .75*TEXTHEIGHT+FOOTSKIP |
| 313 |
|
| 314 |
\T=\MARGINNOTEYA |
| 315 |
\advance\T by -\MARGINNOTEHEIGHT |
| 316 |
\advance\T by -\MARGINPARPUSH |
| 317 |
\xdef\MARGINNOTEYB{\the\T} % MARGINNOTEYA-MARGINNOTEHEIGHT-MARGINPARPUSH |
| 318 |
|
| 319 |
\T=\MARGINNOTEYA |
| 320 |
\advance\T by \MARGINNOTEHEIGHT |
| 321 |
\xdef\MARGINNOTEYC{\the\T} % MARGINNOTEYA+MARGINNOTEHEIGHT |
| 322 |
|
| 323 |
\T=\PAGEHEIGHT |
| 324 |
\advance\T by -\DVIYOFFSET |
| 325 |
\xdef\PAGEYTOP{\the\T} % PAGEHEIGHT-DVIYOFFSET |
| 326 |
|
| 327 |
\T=\PAGEYTOP |
| 328 |
\advance\T by -\INNERHEIGHT |
| 329 |
\xdef\PAGEYORIGIN{\the\T} % PAGEYTOP-INNERHEIGHT |
| 330 |
|
| 331 |
\T=\ODDSIDEMARGIN |
| 332 |
\advance\T by \TEXTWIDTH |
| 333 |
\xdef\RIGHTEDGE{\the\T} % ODDSIDEMARGIN+TEXTWIDTH |
| 334 |
|
| 335 |
\T=\TEXTHEIGHT |
| 336 |
\multiply\T by 4 |
| 337 |
\divide\T by 10 |
| 338 |
\xdef\TEXTY{\the\T} % TEXTY = 0.4*TEXTHEIGHT (we put |
| 339 |
% sample text here) |
| 340 |
|
| 341 |
\T=\TEXTHEIGHT |
| 342 |
\divide\T by 3 |
| 343 |
\xdef\TEXTWIDTHY{\the\T} % TEXTWIDTHY = TEXTHEIGHT/3 (we |
| 344 |
% put \textwidth label here) |
| 345 |
\begin{figure} |
| 346 |
%%%%%%%%%%%%%% |
| 347 |
|
| 348 |
\caption{Page layout} |
| 349 |
\label{bild} |
| 350 |
|
| 351 |
\begin{center} |
| 352 |
\begin{small} % make text somewhat smaller |
| 353 |
\setlength{\unitlength}{\UNITLENGTH} |
| 354 |
\begin{picture}(\PAGEWIDTH,\PAGEHEIGHT) % sizes in centipoints |
| 355 |
|
| 356 |
% |
| 357 |
\NAMEBOX{0}{0}{0}{0}{\PAGEWIDTH}{\PAGEHEIGHT}{}{} |
| 358 |
% |
| 359 |
\HARROW{0}{\PAGEYTOP}{0}{0}{\PAGEXORIGIN}{b}{}{1in} |
| 360 |
% |
| 361 |
\VARROW{\PAGEXORIGIN}{\PAGEYTOP}{0}{0}{\DVIYOFFSET}{r}{l}{1in} |
| 362 |
% |
| 363 |
\put(\PAGEXORIGIN,\PAGEYORIGIN){ |
| 364 |
\begin{picture}(\INNERWIDTH,\INNERHEIGHT) |
| 365 |
% Draw 3-sided inner page frame--no bottom side |
| 366 |
% because it is not significant for dimensioning |
| 367 |
\put(0,0){\line(0,1){\INNERHEIGHT}} |
| 368 |
\put(0,\INNERHEIGHT){\line(1,0){\INNERWIDTH}} |
| 369 |
\put(\INNERWIDTH,0){\line(0,1){\INNERHEIGHT}} |
| 370 |
% |
| 371 |
\NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{0}{\TEXTWIDTH}{ |
| 372 |
\BASELINESKIP}{l}{A line of text\ldots} |
| 373 |
\NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{-\BASELINESKIP}{ |
| 374 |
\TEXTWIDTH}{\BASELINESKIP}{l}{Next line\ldots} |
| 375 |
% |
| 376 |
\VARROW{\COLUMNXMIDDLE}{\TEXTY}{0}{-\BASELINESKIP}{ |
| 377 |
\BASELINESKIP}{r}{l}{\tt\string\baselinestretch |
| 378 |
$\times$\string\baselineskip} |
| 379 |
% |
| 380 |
\HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{t}{}{ |
| 381 |
\tt\string\oddsidemargin} |
| 382 |
\HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{b}{}{ |
| 383 |
\tt\string\evensidemargin} |
| 384 |
% |
| 385 |
% Page text label |
| 386 |
\NAMEBOX{\ODDSIDEMARGIN}{\FOOTSKIP}{0}{0}{\TEXTWIDTH}{ |
| 387 |
\TEXTHEIGHT}{}{Page Text} |
| 388 |
% Page footer box, arrow, and label |
| 389 |
\NAMEBOX{\ODDSIDEMARGIN}{0}{0}{0}{\TEXTWIDTH}{ |
| 390 |
\FOOTHEIGHT}{}{Page Footer} |
| 391 |
% |
| 392 |
\VARROW{\ODDSIDEMARGIN}{0}{-\TAD}{0}{\FOOTHEIGHT}{l}{r}{ |
| 393 |
\tt\string\footheight} |
| 394 |
% |
| 395 |
% Footskip arrow and label |
| 396 |
\VARROW{\RIGHTEDGE}{0}{\TAD}{0}{\FOOTSKIP}{r}{l}{ |
| 397 |
\tt\string\footskip} |
| 398 |
% |
| 399 |
\HARROW{\ODDSIDEMARGIN}{\TEXTWIDTHY}{0}{0}{\TEXTWIDTH}{b}{}{ |
| 400 |
\tt\string\textwidth} |
| 401 |
% |
| 402 |
\VARROW{\ODDSIDEMARGIN}{\FOOTSKIP}{-\TAD}{0}{ |
| 403 |
\TEXTHEIGHT}{l}{r}{\tt\string\textheight$\rightarrow$} |
| 404 |
% |
| 405 |
\VARROW{\ODDSIDEMARGIN}{\HEADYORIGIN}{-\TAD}{0}{ |
| 406 |
\HEAdHEIGHT}{l}{r}{\tt\string\headheight} |
| 407 |
% |
| 408 |
\VARROW{\RIGHTEDGE}{\HEADYORIGIN}{\TAD}{-\HEADSEP}{ |
| 409 |
\HEADSEP}{r}{l}{\tt\string\headsep} |
| 410 |
% |
| 411 |
\VARROW{\RIGHTEDGE}{\INNERHEIGHT}{\TAD}{-\TOPMARGIN}{ |
| 412 |
\TOPMARGIN}{r}{l}{\tt\string\topmargin} |
| 413 |
% |
| 414 |
\NAMEBOX{\ODDSIDEMARGIN}{\HEADYORIGIN}{0}{0}{\TEXTWIDTH}{ |
| 415 |
\HEAdHEIGHT}{}{Page Header} |
| 416 |
% |
| 417 |
\NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{0}{0}{ |
| 418 |
\MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{ |
| 419 |
Margin\\note A}} |
| 420 |
% |
| 421 |
\VARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{-\TAD}{ |
| 422 |
-\MARGINPARPUSH}{\MARGINPARPUSH}{l}{r}{ |
| 423 |
\tt\string\marginparpush} |
| 424 |
% |
| 425 |
\NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{0}{ |
| 426 |
\MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{Margin\\note B}} |
| 427 |
% |
| 428 |
\HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{-\TAD}{ |
| 429 |
\MARGINPARWIDTH}{b}{}{\tt\string\marginparwidth} |
| 430 |
% |
| 431 |
\HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYC}{ |
| 432 |
-\MARGINPARSEP}{\TAD}{\MARGINPARSEP}{t}{}{ |
| 433 |
\tt\string\marginparsep} |
| 434 |
% |
| 435 |
\end{picture}} |
| 436 |
\end{picture} |
| 437 |
\end{small} |
| 438 |
\end{center} |
| 439 |
\end{figure} |
| 440 |
%%%%%%%%%%%% |
| 441 |
|
| 442 |
\clearpage |
| 443 |
%%%%%%%%%% |
| 444 |
|
| 445 |
\end{fullpage} |
| 446 |
%%%%%%%%%%%%%% |
| 447 |
|
| 448 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 449 |
|
| 450 |
\section{Description of the refman-class family} |
| 451 |
\label{refman} |
| 452 |
|
| 453 |
The \texttt{refman.sty} was defined at the EDV-Zentrum (computing center) of |
| 454 |
the TU\footnote{Technical University} Wien. This layout is suitable for |
| 455 |
reference manuals, technical descriptions and similar applications. It is |
| 456 |
based on the ideas shown in previous sections: The layout has a wide left |
| 457 |
margin for headings and margin notes and smaller margins on the right side, |
| 458 |
the top and the bottom. |
| 459 |
|
| 460 |
In 1994 this layout was re-implemented as a class for the new \LaTeXe. |
| 461 |
This made it possible to include some minor improvements, such as the |
| 462 |
support of different paper sizes. The \texttt{refman.sty} was split |
| 463 |
into two classes |
| 464 |
\texttt{refrep}\index{refrep.cls}, similar to \texttt{report} and |
| 465 |
\texttt{refart}\index{refart.cls}, similar to \texttt{article}. |
| 466 |
These classes differ in the layout of the header and footer. The |
| 467 |
\texttt{refart} does not support the \cs{chapter} command. |
| 468 |
|
| 469 |
The current version of both classes is described in this document. It |
| 470 |
serves as an example for the layout. |
| 471 |
|
| 472 |
|
| 473 |
\subsection{Invocation} |
| 474 |
\index{refart, invocation} |
| 475 |
\index{refrep, invocation} |
| 476 |
|
| 477 |
The \LaTeX\ local guide (if available) shows if this class is available |
| 478 |
at your \TeX\ installation or where to install it. To use the |
| 479 |
\texttt{refart} class, simply call it with the \cs{documentclass} |
| 480 |
command: |
| 481 |
|
| 482 |
\begin{verbatim} |
| 483 |
\documentclass[11pt,a4paper]{refart} |
| 484 |
\usepackage{german} % other packages you may want |
| 485 |
\end{verbatim} |
| 486 |
|
| 487 |
\subsection{Options} |
| 488 |
\index{options} |
| 489 |
|
| 490 |
The \texttt{refart} class replaces \texttt{article} and \texttt{refrep} |
| 491 |
replaces \texttt{report}. They support all options of these classes |
| 492 |
except for the \texttt{twocolumn} option. |
| 493 |
|
| 494 |
It supports the additional option \texttt{square} which makes the |
| 495 |
\cs{textheight} equal to the \cs{textwidth}. |
| 496 |
|
| 497 |
Neither \texttt{refart} nor \texttt{refrep} support two column layout, thus |
| 498 |
the commands \cs{twocolumn} and \cs{onecolumn} must not be used. |
| 499 |
|
| 500 |
The index will be set in two column format and you can't change it |
| 501 |
with the means of this class. |
| 502 |
|
| 503 |
\subsection{Layout changes} |
| 504 |
|
| 505 |
\subsubsection{Page design} |
| 506 |
|
| 507 |
\index{page design, horizontal}\marginlabel{Horizontal:} |
| 508 |
In this design the usable area for text (\cs{fullwidth}) is |
| 509 |
calculated as the paper width minus 2~\cs{papermarginwidth}. The default |
| 510 |
value for \cs{papermarginwidth}\index{papermarginwidth} is 1~Inch. |
| 511 |
|
| 512 |
The option \texttt{smallborder} reduces \cs{papermarginwidth} to 0.25~Inch. |
| 513 |
This is more suitable for documents viewed on screen, especially when |
| 514 |
combined with the \texttt{a5paper} and \texttt{landscape} options. |
| 515 |
|
| 516 |
Only a fraction of this width is used for the running text (\cs{textwidth}), |
| 517 |
the remaining part forms a wide left margin (\cs{leftmarginwidth}) which is |
| 518 |
used for headings and margin notes. The \cs{textwidth} is 70~\% of the |
| 519 |
\cs{fullwidth} by default, but this can be changed with the |
| 520 |
\cs{settextfraction} command\index{settextfraction} which accepts arguments |
| 521 |
between 0 and 1. |
| 522 |
|
| 523 |
\index{page design, vertical}\marginlabel{Vertical:} The text height is |
| 524 |
calculated as the paper height minus 2~\cs{papermarginwidth}. The |
| 525 |
\texttt{topmargin} is modified by some pagestyles. (see \ref{pagestyle}). |
| 526 |
|
| 527 |
The pages are always set with a ragged bottom. |
| 528 |
|
| 529 |
\subsubsection{Section headings} |
| 530 |
|
| 531 |
The headings for \cs{section}, \cs{subsection}, and |
| 532 |
\cs{subsubsection} extend into the left margin, thus using the full |
| 533 |
width of the page. They are not justified and hyphenation is |
| 534 |
discouraged. A small space is kept free above and below the heading. |
| 535 |
Headings for \cs{section} and \cs{subsection} are set in a bold |
| 536 |
font. |
| 537 |
|
| 538 |
The \texttt{refrep} class defines a different layout for the |
| 539 |
\cs{chapter} command: It always starts a new page and prints the |
| 540 |
chapter headings in a large bold font with a thick line above and |
| 541 |
below. This heading uses the full width of the page. |
| 542 |
|
| 543 |
A similar heading is created by the \cs{part} commands which is |
| 544 |
available in both classes. It uses a roman part number instead of the |
| 545 |
arabic section number. |
| 546 |
|
| 547 |
The \cs{maketitle} commands sets the title of the document in the |
| 548 |
same layout when no special title page is requested. (This is the |
| 549 |
default for \texttt{refart}. To suppress the title page in a |
| 550 |
\texttt{refrep} document, you can use the \texttt{notitlepage} option.) |
| 551 |
The name of the author and the date is printed in italic flush right |
| 552 |
below the document title. |
| 553 |
|
| 554 |
\subsubsection{Paragraphs} |
| 555 |
|
| 556 |
Paragraphs are separated by a vertical space (\cs{parskip}) of |
| 557 |
half a line (\verb|0.5\baselineskip|) plus a stretchable length of 2~pt. |
| 558 |
Paragraphs are not indented. |
| 559 |
|
| 560 |
The vertical spacing inside, above and below a list environment is the |
| 561 |
same as in the running text. |
| 562 |
|
| 563 |
\subsection{Footnotes}\index{footnote} |
| 564 |
|
| 565 |
The footnote layout consists of a small margin (1em) which contains |
| 566 |
the footnote symbol. A small space is set between the symbol and the |
| 567 |
footnote text. The paragraphs of the footnote are not indented. There |
| 568 |
is currently no space between two footnotes, I'm not sure it this will |
| 569 |
stay this way. The footnote symbol is set as a superscript. This may |
| 570 |
change in later versions. I'm relying on user feedback to finally |
| 571 |
solve this. |
| 572 |
|
| 573 |
\subsubsection{Description environment} |
| 574 |
\index{description environment} |
| 575 |
|
| 576 |
The \texttt{description} environment will use the whole left margin |
| 577 |
for the description label. |
| 578 |
|
| 579 |
\seealso{Section \ref{layout}} |
| 580 |
You will find examples in the section~\ref{layout}. |
| 581 |
|
| 582 |
\subsubsection{Positioning of margin notes} |
| 583 |
|
| 584 |
Margin notes (\cs{marginpar}) are always put into the left margin. |
| 585 |
They use the whole width of the margin. |
| 586 |
|
| 587 |
The minimum space between two margin notes is set to 0 to prevent |
| 588 |
them from being shifted around when many margin notes are used. |
| 589 |
|
| 590 |
\subsubsection{Headers and Footers} \label{pagestyle} |
| 591 |
\index{pagestyle} |
| 592 |
|
| 593 |
The page style \texttt{plain} puts the page number into the footer in |
| 594 |
the right corner. When the option \texttt{twoside} is active, the page |
| 595 |
number of left pages is put into the left corner. |
| 596 |
|
| 597 |
\index{headings} \index{myheadings} The pagestyles \texttt{headings} and |
| 598 |
\texttt{myheadings} create a header which spans the whole width of the page. |
| 599 |
The headings contain the running head (\cs{section} and \cs{subsection} in |
| 600 |
\texttt{refart} and \cs{chapter} and \cs{section} in \texttt{refrep}) when |
| 601 |
\texttt{headings} is used or a fixed text that can defined with the |
| 602 |
\cs{markboth} command when \texttt{myheadings} is used. The heading will be |
| 603 |
set in a slanted font and separated from the body by a thin line. |
| 604 |
|
| 605 |
\index{footings} |
| 606 |
\index{myfootings} |
| 607 |
In addition to the standard classes, \texttt{refman} supports a style |
| 608 |
for footers, which is used in this documentation. The information is |
| 609 |
exactly the same as in the headings but now printed in the footer with |
| 610 |
a thin line above. |
| 611 |
|
| 612 |
To use a user-defined string you can say: |
| 613 |
\begin{verbatim} |
| 614 |
\pagestyle{myfootings} % or myheadings |
| 615 |
\markboth{left title}{right title} |
| 616 |
\end{verbatim} |
| 617 |
|
| 618 |
The \texttt{heading} and \texttt{myheading} commands increase the top margin |
| 619 |
by one line while the \texttt{footings} and \texttt{myfootings} commands |
| 620 |
decrease the top margin by one line. The page styles \texttt{empty} and |
| 621 |
\texttt{plain} leave the top margin unchanged. You should not combine |
| 622 |
headings and footings in one document. |
| 623 |
|
| 624 |
User feedback has shown that it is not a good idea to combine \texttt{plain} |
| 625 |
and \texttt{(my)heading} either. Therefore I changed the layout of the |
| 626 |
\cs{chapter} page to \texttt{empty}. Maybe it is necessary to define a |
| 627 |
\texttt{hplain} and \texttt{fplain} pagestyle or to define some magic to use |
| 628 |
the correct definition of \texttt{plain}. Feedback is welcome. |
| 629 |
|
| 630 |
\subsection{Additional commands} |
| 631 |
|
| 632 |
\subsubsection{Marginlabel} |
| 633 |
\index{marginlabel} |
| 634 |
|
| 635 |
The command \verb|\marginlabel{xxx}| prints the text \texttt{xxx} right |
| 636 |
justified into the left margin. Please note that a \cs{marginpar} will print |
| 637 |
it left justified. |
| 638 |
|
| 639 |
\marginlabel{Example:} The word ``Example'' in the left margin is |
| 640 |
printed with the command \verb|\marginlabel{Example:}| |
| 641 |
|
| 642 |
\subsubsection{Attention} |
| 643 |
\index{attention}\index{attentionsymbol}\index{manfnt} |
| 644 |
|
| 645 |
The command \cs{attention} puts an exclamation mark with an arrow |
| 646 |
pointing to the text into the left margin.\attention{} This is an |
| 647 |
example for \cs{attention}. |
| 648 |
|
| 649 |
\renewcommand{\attentionsymbol}{\texttt{:-)}} |
| 650 |
\attention |
| 651 |
Since version 2.0c you can change the symbol used for the |
| 652 |
\cs{attention} command using a |
| 653 |
\verb|\renewcommand{\attentionsymbol}{\texttt\{:-)\}}| |
| 654 |
command. To get the default back use |
| 655 |
\verb|\renewcommand{\attentionsymbol}| \verb|{\large \bfseries ! $\rightarrow$}| |
| 656 |
\renewcommand{\attentionsymbol}{\large \bfseries ! $\rightarrow$} |
| 657 |
|
| 658 |
Since version 2.0c \cs{attention} takes an optional argument to define the |
| 659 |
symbol used in the margin. Thus you can change the symbol once, without |
| 660 |
having to restore it later. Do not abuse this |
| 661 |
feature\attention[\texttt{:-(}], it is primarily meant as an support for the |
| 662 |
\texttt{manfnt} package which enables you to use the ``dangerous bend'' and |
| 663 |
``double dangerous bend'' signs. |
| 664 |
|
| 665 |
The \texttt{manfnt} package is no longer enclosed with Refman, it |
| 666 |
has grown and is now a package of its own. |
| 667 |
|
| 668 |
\subsubsection{Seealso} |
| 669 |
\index{seealso} |
| 670 |
|
| 671 |
The command \verb|\seealso{n}| prints an arrow and its argument into |
| 672 |
the left margin. You will find examples for this in the left margin |
| 673 |
and in \seealso{Chapter 1} chapter~1. |
| 674 |
|
| 675 |
\subsubsection{Maxipage environment} |
| 676 |
\index{maxipage} |
| 677 |
|
| 678 |
The \texttt{maxipage} environment is a special kind of \texttt{minipage} |
| 679 |
which extends over the full width of the page. It can be used for long |
| 680 |
formulas or \texttt{tabular} environments. You may use \texttt{maxipage} |
| 681 |
environments inside floats. You cannot use margin notes inside a |
| 682 |
\texttt{maxipage} and no page break will occur while in a \texttt{maxipage}. |
| 683 |
A \texttt{maxipage} is always a paragraph of its own with a thick line above |
| 684 |
and below. You can disable these lines with the |
| 685 |
\cs{maxipagerulefalse}\index{maxipagerule} command. They are on by default. |
| 686 |
|
| 687 |
The following paragraph is an example for a \texttt{maxipage}: |
| 688 |
\nopagebreak |
| 689 |
\begin{maxipage} |
| 690 |
This very long line is an example for a \texttt{maxipage}. It extends |
| 691 |
over the full width of the page, including the left margin. |
| 692 |
\end{maxipage}\nopagebreak |
| 693 |
This is normal text after the \texttt{maxipage}. |
| 694 |
|
| 695 |
\subsubsection{Fullpage environment} \label{fullpage} |
| 696 |
\index{fullpage} |
| 697 |
|
| 698 |
The \texttt{fullpage} environment consists of one or more pages where |
| 699 |
the text extends over the full width of the page. You cannot use |
| 700 |
margin notes inside a \texttt{fullpage} environment. A \texttt{fullpage} |
| 701 |
will always start and end on a page of its own. It may be used for |
| 702 |
large tables, program listings or anything that does not fit into the |
| 703 |
normal layout. |
| 704 |
|
| 705 |
\seealso{Page \pageref{bild}} |
| 706 |
Page~\pageref{bild} is an example for a \texttt{fullpage}. |
| 707 |
|
| 708 |
\subsubsection{Noparskip} |
| 709 |
|
| 710 |
The \cs{noparskip} removes the vertical space between two |
| 711 |
paragraphs. It is similar to the \cs{noindent} command that removes |
| 712 |
the indent of the first line of a paragraph. |
| 713 |
|
| 714 |
\subsubsection{Setleftmarginwidth} |
| 715 |
\index{setleftmarginwidth} |
| 716 |
|
| 717 |
The \cs{setleftmarginwidth} command is no longer supported. You can |
| 718 |
achieve similar results by using the \cs{settextfraction} command. |
| 719 |
|
| 720 |
\subsubsection{Descriptioncolon} |
| 721 |
\index{descriptioncolon} |
| 722 |
|
| 723 |
By default a colon is printed after the description label. The command |
| 724 |
\cs{description\-colonfalse} disables the colon, the |
| 725 |
\cs{description\-colontrue} re-enables it. |
| 726 |
|
| 727 |
\subsubsection{Descriptionleft} |
| 728 |
\index{descriptionleft} |
| 729 |
|
| 730 |
The \cs{descriptionlefttrue} command sets the description label |
| 731 |
left justified into the margin. The default is right justified which |
| 732 |
will be achieved with \cs{descriptionleftfalse} |
| 733 |
|
| 734 |
\subsubsection{Maxipagerule} |
| 735 |
\index{maxipagerule} |
| 736 |
|
| 737 |
You can disable the rules before and after a \texttt{maxipage} with the |
| 738 |
\cs{maxipage\-rulefalse} command and re-enable them with the |
| 739 |
\cs{maxipageruletrue} command. The default is on. You should not mix |
| 740 |
\texttt{maxipage}s with and without rules in one document. |
| 741 |
|
| 742 |
\subsubsection{Condbreak} |
| 743 |
\index{condbreak} |
| 744 |
|
| 745 |
The command \verb|\condbreak{2cm}| ensures, that the next 2~cm are |
| 746 |
either completely on this page or completely on the next. No |
| 747 |
page break will appear in the next 2~cm. |
| 748 |
|
| 749 |
This is really a hack to achieve what the \cs{samepage} command often fails |
| 750 |
to do. |
| 751 |
|
| 752 |
\subsubsection{Example} |
| 753 |
\index{example} |
| 754 |
|
| 755 |
The \texttt{example} environment acts like a \texttt{verse} |
| 756 |
environment but uses a \texttt{tt} font. |
| 757 |
|
| 758 |
\subsubsection{Pageperchapter} |
| 759 |
\index{pageperchapter} |
| 760 |
|
| 761 |
The command \cs{pageperchapter} creates page number that start with |
| 762 |
1 for every new chapter. This may be useful for larger manuals. Since |
| 763 |
it works with chapters it is only available in the |
| 764 |
\texttt{refrep} class. |
| 765 |
|
| 766 |
\subsubsection{Smallborder} |
| 767 |
\index{smallborder} |
| 768 |
|
| 769 |
The normal border around the page is 1~Inch. That is fine for a printed |
| 770 |
document, but wastes a lot of space when a document is meant for reading on |
| 771 |
screen. The option \texttt{smallborder} reduces the margin to 0.25~Inch. |
| 772 |
|
| 773 |
|
| 774 |
You can redefine the border with \cs{setlength}\cs{papermarginwidth} |
| 775 |
\verb|{0.25in}|. |
| 776 |
Call \verb|\setpagefraction{0.7}| afterwards to recalculate the page layout. |
| 777 |
|
| 778 |
\subsubsection{Dvips} |
| 779 |
\index{dvips} |
| 780 |
|
| 781 |
The option \texttt{dvips} tells DVIPS about the current page size. |
| 782 |
|
| 783 |
\subsubsection{Pdftex} |
| 784 |
\index{pdftex} |
| 785 |
|
| 786 |
The option \texttt{pdftex} tells PDF\TeX about the current page size. |
| 787 |
|
| 788 |
\subsubsection{Pagesize} |
| 789 |
\index{pagesize} |
| 790 |
|
| 791 |
\texttt{pagesize} chooses the correct \cs{special}-command to tell the |
| 792 |
DVI-driver about the paper size. It works with DVIPS and DVIPDFMX for DVI |
| 793 |
output and PDF\TeX\ for PDF output. |
| 794 |
|
| 795 |
\subsubsection{Ifpdfoutput} |
| 796 |
\index{ifpdfoutput} |
| 797 |
|
| 798 |
You can use \verb|\ifpdfoutput{pdftext}{dvitext}| to write different text |
| 799 |
depending on the output format. This command was necessary to implement the |
| 800 |
\texttt{pagesize} option and is available for the user as well. |
| 801 |
|
| 802 |
The last four commands have been taken from KOMA-Script, thanks Markus. |
| 803 |
|
| 804 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 805 |
\endinput |
| 806 |
|