From 007f67a693e4d031fd3d792df8e4d5f43e2cb2e7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 9 Jan 2006 00:49:07 +0000 Subject: doc/latex git-svn-id: svn://tug.org/texlive/trunk@84 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/refman/lay_d2.tex | 832 ++++++++++++++++++++++++ Master/texmf-dist/doc/latex/refman/lay_e2.tex | 784 ++++++++++++++++++++++ Master/texmf-dist/doc/latex/refman/layout_d.pdf | Bin 0 -> 214846 bytes Master/texmf-dist/doc/latex/refman/layout_d.tex | 776 ++++++++++++++++++++++ Master/texmf-dist/doc/latex/refman/layout_e.pdf | Bin 0 -> 193909 bytes Master/texmf-dist/doc/latex/refman/layout_e.tex | 674 +++++++++++++++++++ Master/texmf-dist/doc/latex/refman/refman.upl | 146 +++++ 7 files changed, 3212 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/refman/lay_d2.tex create mode 100644 Master/texmf-dist/doc/latex/refman/lay_e2.tex create mode 100644 Master/texmf-dist/doc/latex/refman/layout_d.pdf create mode 100644 Master/texmf-dist/doc/latex/refman/layout_d.tex create mode 100644 Master/texmf-dist/doc/latex/refman/layout_e.pdf create mode 100644 Master/texmf-dist/doc/latex/refman/layout_e.tex create mode 100644 Master/texmf-dist/doc/latex/refman/refman.upl (limited to 'Master/texmf-dist/doc/latex/refman') diff --git a/Master/texmf-dist/doc/latex/refman/lay_d2.tex b/Master/texmf-dist/doc/latex/refman/lay_d2.tex new file mode 100644 index 00000000000..5b355674205 --- /dev/null +++ b/Master/texmf-dist/doc/latex/refman/lay_d2.tex @@ -0,0 +1,832 @@ +% LAYOUT2.TEX - Anhang von LAYOUT.TEX (PA 1988) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\clearpage + +\section*{Anhang} +\addcontentsline{toc}{section}{Anhang} + +\appendix + +\section{Die Seitenaufteilung in \LaTeX} + +In diesem Anhang wird angegeben, aus welchen Komponenten der +Seitenaufbau besteht und wie die einzelnen Parameter in \LaTeX\ +definiert sind (siehe auch \seealso{Abb.\,\ref{bild}} +Abbildung~\ref{bild}, die von Nelson Beebe an der University of Utah +erzeugt wurde). + +\begin{description} + +\item[Textbereich] + Der normale Textbereich ("`Body"') umfa"st den laufenden + Text einschlie"s"-lich Fu"snoten, Tabellen und Abbildungen. + \emph{Nicht} zu diesem Bereich geh"oren Kopfzeilen, + Fu"szeilen und Randnoten. + + Der Textbereich hat die Breite {\tt\bs text"-width} und die + H"ohe {\tt\bs text"-height}. + + Bei zweispaltiger Ausgabe enth"alt der Textbereich zwei + Spalten, die jeweils {\tt\bs column"-width} breit sind, und + zwischen ihnen einen Abstand der Breite {\tt\bs + column"-sep}. Die Spaltenbreite {\tt\bs column"-width} ist also + etwas geringer als die H"alfte von {\tt\bs text"-width}. + + {\tt\bs text"-width} bzw.\ {\tt\bs column"-width} soll ein + Vielfaches der Buchstabenbreite des \verb|\tt|-Fonts sein. + + {\tt\bs text"-height} soll ein Vielfaches der + Zeilenh"ohe {\tt\bs baseline"-skip}, vermehrt um die Konstante + {\tt\bs top"-skip}, sein. + + Innerhalb des Textbereichs werden Einr"uckungen mit {\tt\bs + left"-skip} und {\tt\bs right"-skip} festgelegt. Diese beiden + Gr"o"sen sollen nicht explizit ver"-"andert werden sondern nur + implizit durch die Environments. + +\item[linker Rand] + Der Rand links vom Textbereich ist um 1~Inch mehr als {\tt\bs + odd-} bzw.\ {\tt\bs even"-side"-margin}, je nachdem ob die + Seitennummer ungerade oder gerade ist. Normalerweise sind beide + Gr"o"sen gleich, nur bei der Option {\tt twoside} werden rechte + (=""ungerade) und linke (=""gerade) Seiten verschieden gesetzt. + +\item[oberer Rand] + Der Rand oberhalb des Textbereichs ist um 1~Inch mehr als die + Summe von {\tt\bs top"-margin}, {\tt\bs head"-height} und + {\tt\bs head"-sep}. + +\item[rechter Rand] + Der Rand rechts vom Textbereich ergibt sich aus der + Papierbreite minus der Breite von linkem Rand und Textbereich. + +\item[unterer Rand] + Der Rand unterhalb des Textbereichs ergibt sich aus der + Papier"-h"ohe minus der H"ohe von oberem Rand und Textbereich. + +\item[Kopfzeilen]\index{Kopfzeilen} + Kopfzeilen ("`Header"') stehen innerhalb des oberen Randes, und + zwar so, da"s zwischen dem unteren Rand der Kopfzeile und dem + oberen Rand des Textbereichs der Abstand {\tt\bs head"-sep} + bleibt. Oberhalb der Kopfzeile bleibt ein freier Rand von + 1~Inch mehr als {\tt\bs top"-margin}. + +\item[Fu"szeilen]\index{Fu{\ss}zeilen} + Fu"szeilen ("`Footer"') stehen innerhalb des unteren Randes, + und zwar so, da"s der Abstand vom unteren Rand des + Textbereichs zum unteren Rand der Fu"s"-zeile {\tt\bs + foot"-skip} ist. + +\item[Randnoten]\index{Randnoten} + Randnoten ("`Margin Notes"') stehen innerhalb des rechten oder + linken Randes. Sie haben eine Breite von {\tt\bs + margin"-par"-width}, und zwischen den Randnoten und dem + Textbereich bleibt ein horizontaler Abstand von {\tt\bs + margin"-par"-sep}. Der vertikale Abstand zwischen + aufeinanderfolgenden Randnoten ist mindestens {\tt\bs + margin"-par"-push}. + +\end{description} + +Die Papierh"ohe setzt sich also von oben nach unten +aus folgenden Elementen zusammen: +\begin{verse} +\rm 1 Inch \\*[2pt] +\tt \bs topmargin \\*[2pt] +\bs headheight \\*[2pt] +\bs headsep \\*[2pt] +\bs textheight \\*[2pt] +\bs footskip \\*[2pt] +\rm Rest der Seite +\end{verse} + +Bei Seiten mit rechten Randnoten +-- was der Standardfall ist -- +setzt sich die Papierbreite +von links nach rechts aus folgenden Elementen zusammen: +\begin{verse} +\rm 1 Inch \\*[2pt] +\tt \bs oddsidemargin\rm\ \ bzw.\ \ \tt \bs evensidemargin \\*[2pt] +\bs textwidth \\*[2pt] +\bs marginparsep \\*[2pt] +\bs marginparwidth \\*[2pt] +\rm Rest der Seite +\end{verse} +Bei der Option {\tt twoside} besteht die Seitenbreite +von linken Seiten mit linken Randnoten +aus folgenden Elementen: +\begin{verse} +\rm 1 Inch \\*[2pt] +\tt \bs evensidemargin \\*[2pt] +\bs textwidth \\*[2pt] +\rm Rest der Seite +\end{verse} + +\marginlabel{Anmerkungen:} +Die Gr"o"sen {\tt \bs topmargin}, {\tt \bs oddside"-margin} und {\tt +\bs evenside"-margin} k"onnen auch negative Werte haben, dann ergibt +sich an der betreffenden Stelle ein Rand von weniger als 1~Inch. +Auch {\tt\bs left"-skip} und {\tt\bs right"-skip} k"onnen negative +Werte haben, dann ragt der Text entsprechend aus dem Textbereich +heraus. Ausf"uhrlichere Hinweise und Skizzen zu diesem Thema findet +man unter anderem in der Zeitschrift {\sc TUGboat} Vol.9, No.1 (April +1988). + +Die Gr"o"se {\tt \bs footheight} ist in \LaTeX2e\ \emph{nicht} +mehr definiert, da sie anscheinend von niemandem benutzt wurde. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{fullpage} +%%%%%%%%%%%%%%%% + + +% Bild von Nelson Beebe, mit geringen "Anderungen von PA: +\newcommand{\X}[1]{{#1}\index{{#1}}} +% NB: For computed dimension parameters, we cannot use +% \newcommand{}, because this expands to a TeX \def which does +% not evaluate the definition before assigning it to the control +% sequence name; we use \xdef directly to force evaluation +\newcount\T % temporary counter for arithmetic calculations +\T=0 + +% ********************************************************************** +% WARNING: Do not insert ANY aditional whitespace in these +% macros--otherwise it ends up in the TeX boxes and ruins the +% positioning, sigh.... +% ********************************************************************** + +% NAMEBOX{x}{y}{dx}{dy}{width}{height}{pos}{label} -- framed label with +% box lower-left corner at (x+dx,y+dy) +\newcommand{\NAMEBOX}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \framebox(#5,#6)[#7]{#8}\end{picture}}} + +% HARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- horizontal +% labeled arrow with left point at (x+dx,y+dy), label on bottom +% (side=b) or top (side=t) of arrow, in makebox[pos] +\newcommand{\HARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\vector(1,0){#5}}\ignorespaces + \put(#5,0){\vector(-1,0){#5}}\ignorespaces + \ifthenelse{\equal{#6}{b}}{\ignorespaces + \put(0,-\TAD){\makebox(#5,0)[#7]{#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{t}}{}{\ignorespaces + \typeout{Side #6 must be ``b'' or ``t''--``t'' assumed}}\ignorespaces + \put(0,\TAD){\makebox(#5,0)[#7]{#8}} + } + \end{picture}}} + +% VARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical +% labeled arrow with left point at (x+dx,y+dy), label on left +% (side=l) or right (side=r) of arrow, in makebox[pos] +\newcommand{\VARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\vector(0,1){#5}}\ignorespaces + \put(0,#5){\vector(0,-1){#5}}\ignorespaces + \ifthenelse{\equal{#6}{l}}{\ignorespaces + \put(-\TAD,0){\makebox(0,#5)[#7]{#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{r}}{}{\ignorespaces + \typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces + \put(\TAD,0){\makebox(0,#5)[#7]{#8}} + } + \end{picture}}} + +% VRULE{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical +% rule with left point at (x+dx,y+dy), label on left +% (side=l) or right (side=r) of rule, in makebox[pos] +\newcommand{\VRULE}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\line(0,1){#5}}\ignorespaces + \ifthenelse{\equal{#6}{l}}{\ignorespaces + \put(0,0){\makebox(0,#5)[#7]{$\rightarrow${}#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{r}}{}{\ignorespaces + \typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces + \put(0,0){\makebox(0,#5)[#7]{$\leftarrow${}#8}} + } + \end{picture}}} +% ********************************************************************** +% If you wish to change any of these values: +% * definitions are mostly in alphabetical order +% * remember units are in centipoints for accurate +% positioning +% * most parameters are taken directly from values in +% BK11.STY, but in order to improve the appearance of the +% figure, a few have been increased to avoid overlap of +% labels and/or boxes, or to loosen up the figure +% * ALL parameters which depend on others are defined by +% computation and \xdef's below; they must NEVER be +% changed +% +%- For 11pt BOOK style, \textwidth / \pagewidth(8.5in) = 0.5294 +%- Anything larger than this will generate an overfull box. We +%- choose 0.50 since that makes scaling trivial for the reader +%- \newcommand{\UNITLENGTH}{0.005pt} +%- \newcommand{\SCALEFACTOR}{50\%} +% +%-----> We use a larger picture with 0.70 on our DIN-A4 paper: +\newcommand{\UNITLENGTH}{0.007pt} +\newcommand{\SCALEFACTOR}{70\%} +% <------------------------------ +% +% US papersize... +% +\newcommand{\PAGEHEIGHT}{79497} % 11in in centipoints +\newcommand{\PAGEWIDTH}{61430} % 8.5in in centipoints +% +% Typical dimensions from BK10.DOC +% +\newcommand{\BASELINESKIP}{2000} % really 1000, but this is + % too tight for the figure +\newcommand{\COLUMNSEP}{1000} +\newcommand{\COLUMNSEPRULE}{0} + +% DVI drivers put top left corner at (1in,1in) from physical page +% left corner +\newcommand{\DVIXOFFSET}{7227} +\newcommand{\DVIYOFFSET}{7227} + +\newcommand{\EVENSIDEMARGIN}{10841} + +\newcommand{\FOOTHEIGHT}{2400} % really 1200, but too tight +\newcommand{\FOOTNOTESEP}{665} +\newcommand{\FOOTSKIP}{4207} % really 2529, but too tight; for symmetry, + % make FOOTSKIP=HEADSEP+FOOTHEIGHT +\newcommand{\HEAdHEIGHT}{2400} % really 1200, but too tight +\newcommand{\HEADSEP}{1807} + +\newcommand{\MARGINPARPUSH}{2000} % really 500, but too tight +\newcommand{\MARGINPARSEP}{2800} % really 700, but too tight +\newcommand{\MARGINPARWIDTH}{7227} +\newcommand{\MARGINNOTEHEIGHT}{4444} % arbitrary value (holds + % ``Margin Note A'' on + % 2 lines) + +\newcommand{\ODDSIDEMARGIN}{3613} +% +% Upper left page corner (0,0) is at (1in,1in) on physical page +% for DVI drivers. Position the LOWER left corner at +% (\PAGEXORIGIN,\PAGEYORIGIN), where \PAGEYORIGIN is computed +% below +\newcommand{\PAGEXORIGIN}{\DVIXOFFSET} + +\newcommand{\TAD}{800} % how far to move labels from their arrows +\newcommand{\TEXTHEIGHT}{50400} +\newcommand{\TEXTWIDTH}{32522} +\newcommand{\TOPMARGIN}{5420} + +% ********************************************************************** +% DO NOT CHANGE any of these computed parameters +% + +% +\T=\TEXTWIDTH +\advance\T by -\COLUMNSEP +\divide\T by 2 +\xdef\COLUMNWIDTH{\the\T} + +\T=\TEXTWIDTH +\divide\T by 2 +\advance\T by \ODDSIDEMARGIN +\xdef\COLUMNXMIDDLE{\the\T} % 0.5*TEXTWIDTH+ODDSIDEMARGIN + +\T=\COLUMNWIDTH +\advance\T by \ODDSIDEMARGIN +\advance\T by \COLUMNSEP +\xdef\COLUMNTWOX{\the\T} % COLUMNWIDTH+COLUMNSEP+ODDSIDEMARGIN + +\T=\FOOTSKIP +\advance\T by \TEXTHEIGHT +\advance\T by \HEADSEP +\xdef\HEADYORIGIN{\the\T} % FOOTSKIP+TEXTHEIGHT+HEADSEP +% +% Inner TeX page dimensions are (\INNERWIDTH,\INNERHEIGHT). All TeX +% coordinates are relative to (0,0) at upper-left corner of this +% page, although for the figures, we put (0,0) at lower-left +% corner. +% +\T=\TOPMARGIN +\advance\T by \HEAdHEIGHT +\advance\T by \HEADSEP +\advance\T by \TEXTHEIGHT +\advance\T by \FOOTSKIP +% INNERHEIGHT=TOPMARGIN+HEAdHEIGHT+HEADSEP+TEXTHEIGHT+FOOTSKIP +\xdef\INNERHEIGHT{\the\T} + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\advance\T by \EVENSIDEMARGIN +\xdef\INNERWIDTH{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+EVENSIDEMARGIN + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\advance\T by \MARGINPARSEP +\xdef\MARGINNOTEXORIGIN{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+MARGINPARSEP + +\T=\TEXTHEIGHT +\multiply\T by 75 +\divide\T by 100 +\advance\T by \FOOTSKIP +\xdef\MARGINNOTEYA{\the\T} % .75*TEXTHEIGHT+FOOTSKIP + +\T=\MARGINNOTEYA +\advance\T by -\MARGINNOTEHEIGHT +\advance\T by -\MARGINPARPUSH +\xdef\MARGINNOTEYB{\the\T} % MARGINNOTEYA-MARGINNOTEHEIGHT-MARGINPARPUSH + +\T=\MARGINNOTEYA +\advance\T by \MARGINNOTEHEIGHT +\xdef\MARGINNOTEYC{\the\T} % MARGINNOTEYA+MARGINNOTEHEIGHT + +\T=\PAGEHEIGHT +\advance\T by -\DVIYOFFSET +\xdef\PAGEYTOP{\the\T} % PAGEHEIGHT-DVIYOFFSET + +\T=\PAGEYTOP +\advance\T by -\INNERHEIGHT +\xdef\PAGEYORIGIN{\the\T} % PAGEYTOP-INNERHEIGHT + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\xdef\RIGHTEDGE{\the\T} % ODDSIDEMARGIN+TEXTWIDTH + +\T=\TEXTHEIGHT +\multiply\T by 4 +\divide\T by 10 +\xdef\TEXTY{\the\T} % TEXTY = 0.4*TEXTHEIGHT (we put + % sample text here) + +\T=\TEXTHEIGHT +\divide\T by 3 +\xdef\TEXTWIDTHY{\the\T} % TEXTWIDTHY = TEXTHEIGHT/3 (we + % put \textwidth label here) + \begin{figure} + %%%%%%%%%%%%%% + + \caption{Seiten-Layout} + \label{bild} + + \begin{center} + \begin{small} % make text somewhat smaller + \setlength{\unitlength}{\UNITLENGTH} + \begin{picture}(\PAGEWIDTH,\PAGEHEIGHT) % sizes in centipoints + +% + \NAMEBOX{0}{0}{0}{0}{\PAGEWIDTH}{\PAGEHEIGHT}{}{} +% + \HARROW{0}{\PAGEYTOP}{0}{0}{\PAGEXORIGIN}{b}{}{1in} +% + \VARROW{\PAGEXORIGIN}{\PAGEYTOP}{0}{0}{\DVIYOFFSET}{r}{l}{1in} +% + \put(\PAGEXORIGIN,\PAGEYORIGIN){ + \begin{picture}(\INNERWIDTH,\INNERHEIGHT) + % Draw 3-sided inner page frame--no bottom side + % because it is not significant for dimensioning + \put(0,0){\line(0,1){\INNERHEIGHT}} + \put(0,\INNERHEIGHT){\line(1,0){\INNERWIDTH}} + \put(\INNERWIDTH,0){\line(0,1){\INNERHEIGHT}} +% + \NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{0}{\TEXTWIDTH}{ + \BASELINESKIP}{l}{A line of text\ldots} + \NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{-\BASELINESKIP}{ + \TEXTWIDTH}{\BASELINESKIP}{l}{Next line\ldots} +% + \VARROW{\COLUMNXMIDDLE}{\TEXTY}{0}{-\BASELINESKIP}{ + \BASELINESKIP}{r}{l}{\tt\string\baselinestretch + $\times$\string\baselineskip} +% + \HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{t}{}{ + \tt\string\oddsidemargin} + \HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{b}{}{ + \tt\string\evensidemargin} + % + % Page text label + \NAMEBOX{\ODDSIDEMARGIN}{\FOOTSKIP}{0}{0}{\TEXTWIDTH}{ + \TEXTHEIGHT}{}{Page Text} + % Page footer box, arrow, and label + \NAMEBOX{\ODDSIDEMARGIN}{0}{0}{0}{\TEXTWIDTH}{ + \FOOTHEIGHT}{}{Page Footer} + % + \VARROW{\ODDSIDEMARGIN}{0}{-\TAD}{0}{\FOOTHEIGHT}{l}{r}{ + \tt\string\footheight} + % + % Footskip arrow and label + \VARROW{\RIGHTEDGE}{0}{\TAD}{0}{\FOOTSKIP}{r}{l}{ + \tt\string\footskip} + % + \HARROW{\ODDSIDEMARGIN}{\TEXTWIDTHY}{0}{0}{\TEXTWIDTH}{b}{}{ + \tt\string\textwidth} + % + \VARROW{\ODDSIDEMARGIN}{\FOOTSKIP}{-\TAD}{0}{ + \TEXTHEIGHT}{l}{r}{\tt\string\textheight$\rightarrow$} + % + \VARROW{\ODDSIDEMARGIN}{\HEADYORIGIN}{-\TAD}{0}{ + \HEAdHEIGHT}{l}{r}{\tt\string\headHeight} + % + \VARROW{\RIGHTEDGE}{\HEADYORIGIN}{\TAD}{-\HEADSEP}{ + \HEADSEP}{r}{l}{\tt\string\headsep} + % + \VARROW{\RIGHTEDGE}{\INNERHEIGHT}{\TAD}{-\TOPMARGIN}{ + \TOPMARGIN}{r}{l}{\tt\string\topmargin} + % + \NAMEBOX{\ODDSIDEMARGIN}{\HEADYORIGIN}{0}{0}{\TEXTWIDTH}{ + \HEAdHEIGHT}{}{Page Header} + % + \NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{0}{0}{ + \MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{ + Margin\\note A}} + % + \VARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{-\TAD}{ + -\MARGINPARPUSH}{\MARGINPARPUSH}{l}{r}{ + \tt\string\marginparpush} + % + \NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{0}{ + \MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{Margin\\note B}} + % + \HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{-\TAD}{ + \MARGINPARWIDTH}{b}{}{\tt\string\marginparwidth} + % + \HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYC}{ + -\MARGINPARSEP}{\TAD}{\MARGINPARSEP}{t}{}{ + \tt\string\marginparsep} + % + \end{picture}} + \end{picture} + \end{small} + \end{center} + \end{figure} + %%%%%%%%%%%% + + \clearpage + %%%%%%%%%% + +\end{fullpage} +%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Beschreibung der Style-Option REFMAN} +\label{refman} + +Am EDV-Zentrum der TU Wien wurde -- aufbauend auf den in +den vorangegangenen Kapiteln angef"uhrten Grunds"atzen -- eine +Style-Option {\tt refman} zu den \LaTeX-Styles {\tt article} und {\tt +report} entwickelt, die ein Layout f"ur Reference Manuals, technische +Beschreibungen und dergleichen realisiert. Das Layout entspricht im +wesentlichen den Angaben in Abschnitt~\ref{refmanex}: Die normalen +Textseiten haben einen breiten linken Rand, der f"ur "Uberschriften +und Randnoten ben"utzt wird, und nur einen eher knappen freien Rand +oben, rechts und unten. + +F"ur \LaTeX2e\ wurde diese Option in eine echte Class +umgewandelt. Dadurch ist es leichter m"oglich, verschiedene +Papierformate zu unterst"uzen. Au"serdem gibt es neben der +\texttt{report}-"ahnliche +\texttt{refrep}-Class\index{Refrep.cls} eine +\texttt{article}-"ahnliche +\texttt{refart}-Class\index{Refart.cls}, die sich durch andere +Eintr"age in Kopf- und Fu"s-Zeile sowie das Fehlen der +Gliederungsebene \texttt{chapter} vom \texttt{refrep} +unterscheidet. + +Die derzeitige Version dieser Class wird im folgenden kurz in Hinblick +auf ihre Anwendeung beschrieben. Dies soll gleichzeitig als Beispiel +daf"ur dienen, welche "Anderungen und zus"atzliche Komponenten ein +typischer neuer \LaTeX-Style enthalten kann. + +Das vorliegende Handbuch wurde mit der Documentclass +\texttt{refart} gesetzt. Es ist also gleichzeitig ein Beispiel +f"ur das von dieser Class bewirkte Layout. + + +\subsection{Aufruf} +\index{Refart,Aufruf} +\index{Refrep,Aufruf} + +Im \LaTeX\ Local Guide ist jeweils angegeben, ob und wo dieses oder +ein "ahnliches Class-File in einer bestimmten +\LaTeX-""Installation verf"ugbar ist. Der Aufruf erfolgt durch die +Angabe der Class {\tt refart} im Befehl \verb|\documentclass|, +also \zB~mit +\begin{verbatim} +\documentclass[11pt,a4paper]{refart} +\usepackage{german} +\end{verbatim} + +\subsection{Optionen} +\index{Optionen} + +Die Class \texttt{refart} ersetzt die Class \texttt{article} und +die Class \texttt{refrep} die Class \texttt{report}. Sie kann +\emph{nicht} mit den folgenden Optionen verwendet werden: +{\tt twocolumn}. + +Da es sich jetzt um eine selbstst"andige Class handelt, sind folgende +Optionen m"oglich: +\texttt{landscape}\index{Landscape}, +\texttt{square}\index{Square} +sowie die aus den Standard--Classes bekannten +Papiergr"o"sen-Optionen +\texttt{a4paper}\index{a4paper}, +\texttt{a5paper} oder auch die Optionen f"ur amerikanische +Formate. Die \texttt{square}-Option erzeugt ein quadratisches +Layout, bei dem die H"ohe auf die Papierbreite begrenzt wird. + +Sie \emph{kann} auch mit zahlreichen anderen Optionen kombiniert +werden, auch \zB\ mit \texttt{twoside} oder \texttt{fleqn}. Die +Option \texttt{titelpage} erzeugt bei der \texttt{refart}-Class +eine eigene Titelseite. Bei der Class \texttt{refrep} ist dies +die Standarteinstellung. + +Die Classes {\tt refart} und {\tt refrep} unter"-st"utzen nur +die einspaltige Ausgabe, die Befehle \verb|\twocolumn| und +\verb|\onecolumn| k"onnen in diesem Fall \emph{nicht} verwendet +werden. + +Der Index wird automatisch zweispaltig gesetzt. Das Layout entspricht +hier dem der Standard--Classes, allerdings mit kleinen "Uberschriften +wie im Rest des Dokumentes. + +\subsection{Layout-"Anderungen} + +\subsubsection{Seitenaufteilung} + +\index{Seitenaufteilung, horizontal}\marginlabel{Horizontal:} +Die komplette gen"utzte Breite (\verb|\fullwidth|) berechnet +sich so, da"s am Papier rechts und links noch jeweils 1~Inch +freier Rand bleiben. Die Zeilenl"ange des normalen Textes +(\verb|\textwidth|) und alle davon abgeleiteten Gr"o"sen +betragen 70\% der \verb|\fullwidth|. Die Breite des Randes +(\verb|\leftmarginwidth|), der links vom normalen Textbereich +f"ur "Uberschriften und Randnoten verwendet wird, ergibt sich +aus der Differenz von \verb|\fullwidth| und \verb|\textwidth|. + +\index{Seitenaufteilung, vertikal}\marginlabel{Vertikal:} +Die Texth"ohe berechnet sich so, da"s ein oberer und unterer Rand von +1~Inch bleibt. +Manche Pagestyles verwenden einen anderen Wert f"ur den oberen Rand. +(siehe \ref{pagestyle}). + +Es wird kein vertikaler Randausgleich gemacht (\verb|\raggedbottom|). + +\subsubsection{Kapitel-"Uberschriften} + +Die "Uberschriften von \verb|\section|, \verb|\subsection| und +\verb|\subsubsection| verwenden die gesamte Seitenbreite, \dH\ sie +ragen in den linken Rand hinaus. Daf"ur werden kleinere vertikale +Abst"ande vor und nach den "Uberschriften und eine weniger gro"se +Schrift verwendet. In den "Uberschriften werden keine Wort"-abteilungen +und kein rechter Randausgleich gemacht. + +Beim Style {\tt refart} werden die von \verb|\maketitle| und +\verb|\part| erzeugten "Uberschriften im folgenden Layout gesetzt: Sie +stehen am Beginn einer neuen Seite (\verb|\clearpage|), verwenden die +gesamte Breite und sind von zwei waagrechten Linien eingeschlossen. Der +Befehl \verb|\maketitle| setzt die "Uberschrift (\verb|\title|) und den +Autor (\verb|\author|). Der Befehl \verb|\makeauthor|, wird nicht mehr +unterst"utzt. Beim Befehl \verb|\part| wird nur die r"omische Nummer +des Abschnitts vor den Text gesetzt (ohne das Wort "`Part"' oder +"`Teil"'). + +Beim Style {\tt refrep} werden Kapitel-"Uberschriften +(\verb|\chapter|) im folgenden Layout gesetzt: Sie stehen am +Beginn einer neuen Seite (\verb|\clearpage|), verwenden die +gesamte Breite und sind von zwei waagrechten Linien +eingeschlossen. Die Befehle \verb|\maketitle| und \verb|\part| +bleiben in diesem Style unver"-"andert, es wird aber empfohlen, +sie in ein Fullpage-""Environment (siehe \ref{fullpage}) +einzu"-schlie"sen. + +\subsubsection{Abs"atze} + +Abs"atze werden durch einen vertikalen Abstand (\verb|\parskip|) von +einer halben Zeile getrennt, ohne horizontale Einr"uckung +(\verb|\parindent| ist Null). Der vertikale Abstand ent"-h"alt einen +"`stretchable"' Anteil von "`{\tt plus 2pt}"'; dies ver"-gr"o"sert die +Wahrscheinlichkeit, da"s \LaTeX\ die am besten geeigneten Stellen f"ur +alle Seitenwechsel findet. + +Die vertikalen Ab"-st"an"-de in den List-""Environments sind so +gesetzt, da"s sich vor, nach und innerhalb der Environments jeweils +derselbe Abstand wie zwischen den normalen Ab"-s"atzen ergibt. + +\subsection{Fu"snoten} + +Das Layout der Fu"snoten wurde an das Absatzlayout angepast, \dH\ auch +die Fu"snoten werden ohne Einzug in der ersten Zeile gesetzt. + +\subsubsection{Description-Environment} +\index{Description-Environment} + +Das {\tt description}-Environment ist so abge"-"an"-dert, da"s +die Item-Labels den gesamten linken Rand verwenden. + +\seealso{\ref{layout}} +Beispiele daf"ur finden sich unter anderem in Kapitel~\ref{layout}. + +\subsubsection{Positionierung der Randnoten} + +Randnoten (\verb|\marginpar|) werden stets in den linken Rand gesetzt +und verwenden dessen gesamte Breite. + +Der minimale vertikale Abstand zwischen Randnoten +(\verb|\marginparpush|) ist auf Null gesetzt, damit m"oglichst keine +Verschiebung von Randnoten erfolgt. + + +\subsubsection{Kopf- und Fu"szeilen, Pagestyles} \label{pagestyle} +\index{Pagestyles} + +Beim Pagestyle {\tt plain} werden die Seitennummern in der +Fu"s"-zeile jeweils ganz rechts bzw.\ (auf linken Seiten bei der Option +{\tt twoside}) ganz links au"sen gesetzt. + +\index{Headings} +\index{Myheadings} +Bei den Pagestyles {\tt headings} und {\tt myheadings} wird +ebenfalls die gesamte Breite verwendet, und unter die Kopfzeile +wird eine waagrechte Linie gesetzt. Beim Pagestyle {\tt +headings} enth"alt die Kopfzeile beim {\tt refart} die +\verb|\section|-"""Uberschrift auf der linke und die +\verb|\subsection|-"""Uberschrift auf der linken Seite, beim +{\tt refrep} die \verb|\chapter|-"""Uberschrift auf der linken +und die \verb|\section|-"""Uberschrift auf der rechten Seite. +Die Schrift wird in schr"ager (slanted) Schrift gesetzt. + + +\index{Footings} +\index{Myfootings} +Zus"atzlich sind auch Pagestyles {\tt footings} und {\tt myfootings} +definiert, die entsprechende Fu"s"-zeilen (mit einer waagrechten Linie +dar"uber) setzen. Beispiel: Die folgenden Befehle setzen den Kurztitel des +Schrift"-st"ucks in die Fu"s"-zeile: +\begin{verse} +\verb|\pagestyle{myfootings}| \\* +\verb|\markboth{Kurztitel}{Kurztitel}| +\end{verse} + +Die Pagestyles {\tt headings} und {\tt myheadings} setzen den oberen +Rand auf einen etwas gr"o"seren Wert, um die leere Fu"s"-zeile +auszugleichen. Die Pagestyles {\tt footings} und {\tt myfootings} +setzen den oberen Rand auf einen etwas kleineren Wert, um die +leere Kopf"-zeile auszugleichen. Die Pagestyles {\tt empty} und {\tt +plain} lassen den Rand unver"-"andert. Daraus ergibt sich: Innerhalb +eines Schrift"-st"ucks kann man\newline entweder zwischen den +Pagestyles {\tt headings}, {\tt myheadings}, {\tt empty} und {\tt +plain}\newline oder zwischen den Pagestyles {\tt footings}, {\tt +myfootings}, {\tt empty} und {\tt plain}\newline wechseln, aber man +sollte nicht zwischen {\tt footings}- und {\tt headings}-Seiten +wechseln. + + +\subsection{Zus"atzliche Befehle} + +\subsubsection{Marginlabel} +\index{Marginlabel} + +Der Befehl \verb|\marginlabel{xxx}| setzt das Wort oder den Text {\tt +xxx} rechts"-b"undig in den linken Rand. Dies kann f"ur Stichworte, +kurze "Uberschriften von Abs"atzen oder "ahnliches verwendet werden. + +\marginlabel{Beispiel:}Das Wort "`Beispiel:"' links von diesem +Absatz ist ein Beispiel f"ur einen Marginlabel. + +\subsubsection{Attention} +\index{Attention}\index{Attentionsymbol}\index{manfnt} + +Der Befehl \verb|\attention| setzt ein Achtung-Zeichen in den linken +Rand. Dies dient zum Markieren wichtiger Abs"atze oder S"atze. + +\attention +Das ist ein Beispiel f"ur \verb|\attention|. + +\renewcommand{\attentionsymbol}{\texttt{:-)}} +\attention +Seit Version 2.0c ist es m"oglich das Symbol f"ur den +\cs{attention} Befehl mit Hilfe von +\verb|\renewcommand{\attentionsymbol}{\texttt\{:-)\}}| +zu ver"andern. Mit +\verb|\renewcommand{\attentionsymbol}|\\ \verb|{\large \bfseries ! $\rightarrow$}| +\renewcommand{\attentionsymbol}{\large \bfseries ! $\rightarrow$} +wird wieder auf das Originalverhalten zur"uckgeschaltet. + +Zus"atzlich unterst"utzt der \cs{attention} Befehl ein optionales +Argument um das Symbol im Rand einmalig durch ein anderes zu ers"atzen. +In diesem Fall ist es nicht notwendig, das \cs{attentionsymbol} +zur"uckzus"atzen. Diese Erweiterung dient vor allem zur +Unterst"utzung f"ur das \texttt{manfnt} Paket und sollte nicht zur +Erzeugung eines bunten Layouts mi"sbraucht werden.\attention[\texttt{:-(}] + +Mit dem \texttt{manfnt} Paket existiert eine einfache M"oglichkeit, um auf +die Symbole des \texttt{manfnt} Zeichensatzes zuzugreifen. Dieser +Zeichensatz enth"alt u.a. das "`Dangerous Bend"' und "`Double +Dangerous Bend"' Zeichen. + +\subsubsection{Seealso} +\index{Seealso} + +Der Befehl \verb|\seealso{n}| markiert einen Verweis auf ein Kapitel +oder eine Abbildung. + +Beispiele daf"ur finden sich nicht nur hier (am linken Rand) +sondern unter anderem auch in \seealso{1} Kapitel~1. + + +\subsubsection{Maxipage-Environment} +\index{Maxipage} + +Das {\tt maxipage}-Environment ist eine Art von "`Minipage"', die sich +"uber die gesamte Seitenbreite erstreckt. Dies eignet sich \zB\ f"ur +"uberlange mathematische Gleichungen oder breite Tabellen innerhalb des +Textes oder in "`Floats"' ({\tt table} oder {\tt figure}). Innerhalb +der "`Maxipage"' sind keine Seitenwechsel und keine Randnoten +m"oglich. Beginn und Ende des {\tt maxipage}-Envrionment bewirken +jeweils einen neuen Absatz und eine waagrechte Linie. + +Hier folgt nun ein Beispiel f"ur eine Maxipage.\nopagebreak +\begin{maxipage} +Diese "uberlangen Zeilen sind der Inhalt der Maxipage. Sie erstrecken +sich "uber die gesamte Seitenbreite, ohne linken +Rand. +\end{maxipage}\nopagebreak +Dies ist der normale Text nach dem Ende der Maxipage. + +\subsubsection{Fullpage-Environment} \label{fullpage} +\index{Fullpage} + +Das {\tt fullpage}-Environment besteht aus einer oder mehreren +Seiten, bei denen sich der Text "uber die gesamte Seitenbreite +erstreckt und kein linker Rand bleibt. Randnoten sind darin nicht +m"oglich. Beginn und Ende des {\tt fullpage}-Envrionment bewirken +jeweils einen Seitenwechsel (\verb|\clearpage|). + +Dies eignet sich f"ur Spezialseiten wie mehrseitige gro"se +Tabellen, Programmlistings, Titelseiten, Inhaltsverzeichnisse und +"ahnliches. + +\seealso{S.\,\pageref{bild}} +Seite~\pageref{bild} ist ein Beispiel f"ur eine Fullpage. + +\subsubsection{Noparskip} + +Der Befehl \verb|\noparskip| entfernt den vertikalen Abstand vor einem +Absatz -- analog zum Befehl \verb|\noindent|, der die horizontale +Einr"uckung am Beginn eines Absatzes entfernt. + +\subsubsection{Setleftmarginwidth} +\index{Setleftmarginwidth} + +Der Befehl \verb|\setleftmarginwidth| wird nicht mehr unterst"utzt. +Stattdessen kann mit dem Befehl \verb|\settextfraction| der +Anteil des Textes (normalerweise 70~\%) ge"andert werden. Das +Argument mu"s zwischen 0 und 1 liegen. + +\subsubsection{Descriptioncolon} +\index{Descriptioncolon} + +Der Doppelpunkt in einer {\tt description} kann durch den Befehl +\verb|\descriptioncolonfalse| ab und durch \verb|\descriptioncolontrue| +wieder eingeschaltet werden. Im Normalfall ist der Doppelpunkt +eingeschaltet. + +\subsubsection{Descriptionleft} +\index{Descriptionleft} + +Mit \verb|\descriptionlefttrue| wird der Label f"ur eine {\tt +description} linksb"undig in den Rand gesetzt. Der Normalfall ist +rechtsb"undig, dies wird durch \verb|\descriptionleftfalse| erreicht. + +\subsubsection{Maxipagerule} +\index{Maxipagerule} + +Mit \verb|\maxipagerulefalse| lassen sich die Striche vor und nach +einer {\tt maxipage} abschalten. Sie sind normalerweise aktiv. + +\subsubsection{Condbreak} +\index{Condbreak} + +Mit \verb|\condbreak{2cm}| wird sichergestellt, da"s die n"achsten 2~cm +nicht getrennt werden. Sie erscheinen entweder auf der aktuellen Seite +oder werden komplett auf die neue Seite umgebrochen. + +\subsubsection{Example} +\index{Example} + +Die {\tt example}-Umgebung erzeugt eine {\tt verse}-Umgebung, schaltet +allerdings auf \verb|\tt| und versucht einen Seitenumbruch vor der +Umgebung zu vermeiden. + +\subsubsection{Pageperchapter} +\index{Pageperchapter} + +Der Befehl \verb|\pageperchapter| erzeugt eine kapitelweise +Seitennumerierung. Dies ist besonders f"ur umfangreiches +Reference Manuals sinnvoll. Da nur \texttt{refrep} "uber die +Gliederungsebene \texttt{chapter} verf"ugt, ist dieser Befehl +auch nur hier m"oglich. + +\printindex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput + diff --git a/Master/texmf-dist/doc/latex/refman/lay_e2.tex b/Master/texmf-dist/doc/latex/refman/lay_e2.tex new file mode 100644 index 00000000000..6450566e427 --- /dev/null +++ b/Master/texmf-dist/doc/latex/refman/lay_e2.tex @@ -0,0 +1,784 @@ +% LAY_e2.TEX - Anhang von LAYOUT.TEX (PA 1988) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\clearpage + +\section*{Appendix} +\addcontentsline{toc}{section}{Appendix} + +\appendix + +\section{The page structure in \LaTeX} + +This appendix describes how the actual page is build from it's +components and how they are influenced by \TeX s parameters +(\seealso{Fig.\,\ref{bild}}. Figure~\ref{bild} has been created by +Nelson Beebe at the University of Utah. + +\begin{description} + +\item[text area] + The normal text area (``Body'') contains the running text + including footnotes, tables and figures. The headings, footer + and margin notes do \emph{not} belong to the text area. + + The text area has the width \texttt{\textbackslash textwidth} + and the height \texttt{\textbackslash text\-height}. + + In a twocolumn layout the text area is split into two + columns, with the width \texttt{\textbackslash columnwidth} + each and a space of \texttt{\textbackslash columnsep} between + them. Thus the \texttt{\textbackslash columnwidth} is a + little bit smaller than half the \texttt{\textbackslash + textwidth}. + + \texttt{\textbackslash textwidth} and \texttt{\textbackslash + columnwidth} should be a multiple of the width of one + character in the \texttt{tt} font. + + \texttt{\textbackslash textheight} should be multiple of the + line height \texttt{\textbackslash baselineskip}, increased by + the constant value of \texttt{\textbackslash topskip}. + + Indentations inside the text area are defined with + \texttt{\textbackslash leftskip} and \texttt{\textbackslash + rightskip}. These parameters should not be changed explicit + by the user but rather implicit through environments. + +\item[left margin] + The left margin is either \texttt{\textbackslash odd-} or + \texttt{\textbackslash evensidemargin} increased by 1~inch. + Both parameters have the same value, unless the + \texttt{twoside} option is given. + +\item[top margin] + The top margin is the sum of \texttt{\textbackslash + topmargin}, \texttt{\textbackslash headheight} and + \texttt{\textbackslash headsep} increased by 1~inch. + +\item[right margin] + The right margin is the paper width minus the left margin and + the text area. + +\item[bottom margin] + The bottom margin is the paper height minus the top margin and + the text area. + +\item[heading]\index{headings} + The heading is inside the top margin with a space of + \texttt{\textbackslash headsep} between the lower border of + the header and the upper border of the text area. Above the + header is a free space of \texttt{\textbackslash topmargin} + increased by 1~inch. + +\item[footing]\index{footings} + The footer is inside the bottom margin with a space of + \texttt{\textbackslash footskip} between the lower border of the text + area and the lower border of the footer. + +\item[margin notes]\index{margin notes} + Margin notes are inside the left or right margin. They have a + width of \texttt{\textbackslash marginparwidth} and a space of + \texttt{\textbackslash marginparsep} between the margin note + and the text area. The vertical space between two margin + notes is \texttt{\textbackslash marginparpush}. + +\end{description} + +The paperheight consists of the following elements (from top to +bottom): +\begin{verse} +\rmfamily 1 Inch \\*[2pt] +\ttfamily \textbackslash topmargin \\*[2pt] +\textbackslash headheight \\*[2pt] +\textbackslash headsep \\*[2pt] +\textbackslash textheight \\*[2pt] +\textbackslash footskip \\*[2pt] +\rmfamily remaining page. +\end{verse} + +On pages with margin notes in the right margin the paperwidth consists +of the following elements: +\begin{verse} +\rmfamily 1 Inch \\*[2pt] +\ttfamily \textbackslash oddsidemargin +\rmfamily\ \ or\ \ +\ttfamily \textbackslash evensidemargin \\*[2pt] +\textbackslash textwidth \\*[2pt] +\textbackslash marginparsep \\*[2pt] +\textbackslash marginparwidth \\*[2pt] +\rm remaining page +\end{verse} +With the option \texttt{twoside} the left pages change to +\begin{verse} +\rmfamily 1 Inch \\*[2pt] +\ttfamily \textbackslash evensidemargin \\*[2pt] +\textbackslash textwidth \\*[2pt] +\rmfamily remaining page +\end{verse} + +\marginlabel{Comments:} The parameters \texttt{\textbackslash +topmargin}, \texttt{\textbackslash oddsidemargin} and +\texttt{\textbackslash evensidemargin} may be negative. In this case +the margin will be smaller than 1~inch. The same is true for +\texttt{\textbackslash leftskip} and \texttt{\textbackslash +rightskip} which leads to text that is wider than the text area. + +Extensive treatment and figures to this subject may be found in the +\textsc{TUGboat} Vol.9, No.1 (April 1988). + +The parameter \texttt{\textbackslash footheight} is no longer defined +in \LaTeXe\ since no-one used it. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{fullpage} +%%%%%%%%%%%%%%%% + + +% Bild von Nelson Beebe, mit geringen "Anderungen von PA: +\newcommand{\X}[1]{{#1}\index{{#1}}} +% NB: For computed dimension parameters, we cannot use +% \newcommand{}, because this expands to a TeX \def which does +% not evaluate the definition before assigning it to the control +% sequence name; we use \xdef directly to force evaluation +\newcount\T % temporary counter for arithmetic calculations +\T=0 + +% ********************************************************************** +% WARNING: Do not insert ANY aditional whitespace in these +% macros--otherwise it ends up in the TeX boxes and ruins the +% positioning, sigh.... +% ********************************************************************** + +% NAMEBOX{x}{y}{dx}{dy}{width}{height}{pos}{label} -- framed label with +% box lower-left corner at (x+dx,y+dy) +\newcommand{\NAMEBOX}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \framebox(#5,#6)[#7]{#8}\end{picture}}} + +% HARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- horizontal +% labeled arrow with left point at (x+dx,y+dy), label on bottom +% (side=b) or top (side=t) of arrow, in makebox[pos] +\newcommand{\HARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\vector(1,0){#5}}\ignorespaces + \put(#5,0){\vector(-1,0){#5}}\ignorespaces + \ifthenelse{\equal{#6}{b}}{\ignorespaces + \put(0,-\TAD){\makebox(#5,0)[#7]{#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{t}}{}{\ignorespaces + \typeout{Side #6 must be ``b'' or ``t''--``t'' assumed}}\ignorespaces + \put(0,\TAD){\makebox(#5,0)[#7]{#8}} + } + \end{picture}}} + +% VARROW{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical +% labeled arrow with left point at (x+dx,y+dy), label on left +% (side=l) or right (side=r) of arrow, in makebox[pos] +\newcommand{\VARROW}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\vector(0,1){#5}}\ignorespaces + \put(0,#5){\vector(0,-1){#5}}\ignorespaces + \ifthenelse{\equal{#6}{l}}{\ignorespaces + \put(-\TAD,0){\makebox(0,#5)[#7]{#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{r}}{}{\ignorespaces + \typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces + \put(\TAD,0){\makebox(0,#5)[#7]{#8}} + } + \end{picture}}} + +% VRULE{x}{y}{dx}{dy}{length}{side}{pos}{label} -- vertical +% rule with left point at (x+dx,y+dy), label on left +% (side=l) or right (side=r) of rule, in makebox[pos] +\newcommand{\VRULE}[8]{\put(#1,#2){\begin{picture}(0,0)(-#3,-#4)\ignorespaces + \put(0,0){\line(0,1){#5}}\ignorespaces + \ifthenelse{\equal{#6}{l}}{\ignorespaces + \put(0,0){\makebox(0,#5)[#7]{$\rightarrow${}#8}} + }{\ignorespaces + \ifthenelse{\equal{#6}{r}}{}{\ignorespaces + \typeout{Side #6 must be ``r'' or ``l''--``r'' assumed}}\ignorespaces + \put(0,0){\makebox(0,#5)[#7]{$\leftarrow${}#8}} + } + \end{picture}}} +% ********************************************************************** +% If you wish to change any of these values: +% * definitions are mostly in alphabetical order +% * remember units are in centipoints for accurate +% positioning +% * most parameters are taken directly from values in +% BK11.STY, but in order to improve the appearance of the +% figure, a few have been increased to avoid overlap of +% labels and/or boxes, or to loosen up the figure +% * ALL parameters which depend on others are defined by +% computation and \xdef's below; they must NEVER be +% changed +% +%- For 11pt BOOK style, \textwidth / \pagewidth(8.5in) = 0.5294 +%- Anything larger than this will generate an overfull box. We +%- choose 0.50 since that makes scaling trivial for the reader +%- \newcommand{\UNITLENGTH}{0.005pt} +%- \newcommand{\SCALEFACTOR}{50\%} +% +%-----> We use a larger picture with 0.70 on our DIN-A4 paper: +\newcommand{\UNITLENGTH}{0.007pt} +\newcommand{\SCALEFACTOR}{70\%} +% <------------------------------ +% +% US papersize... +% +\newcommand{\PAGEHEIGHT}{79497} % 11in in centipoints +\newcommand{\PAGEWIDTH}{61430} % 8.5in in centipoints +% +% Typical dimensions from BK10.DOC +% +\newcommand{\BASELINESKIP}{2000} % really 1000, but this is + % too tight for the figure +\newcommand{\COLUMNSEP}{1000} +\newcommand{\COLUMNSEPRULE}{0} + +% DVI drivers put top left corner at (1in,1in) from physical page +% left corner +\newcommand{\DVIXOFFSET}{7227} +\newcommand{\DVIYOFFSET}{7227} + +\newcommand{\EVENSIDEMARGIN}{10841} + +\newcommand{\FOOTHEIGHT}{2400} % really 1200, but too tight +\newcommand{\FOOTNOTESEP}{665} +\newcommand{\FOOTSKIP}{4207} % really 2529, but too tight; for symmetry, + % make FOOTSKIP=HEADSEP+FOOTHEIGHT +\newcommand{\HEAdHEIGHT}{2400} % really 1200, but too tight +\newcommand{\HEADSEP}{1807} + +\newcommand{\MARGINPARPUSH}{2000} % really 500, but too tight +\newcommand{\MARGINPARSEP}{2800} % really 700, but too tight +\newcommand{\MARGINPARWIDTH}{7227} +\newcommand{\MARGINNOTEHEIGHT}{4444} % arbitrary value (holds + % ``Margin Note A'' on + % 2 lines) + +\newcommand{\ODDSIDEMARGIN}{3613} +% +% Upper left page corner (0,0) is at (1in,1in) on physical page +% for DVI drivers. Position the LOWER left corner at +% (\PAGEXORIGIN,\PAGEYORIGIN), where \PAGEYORIGIN is computed +% below +\newcommand{\PAGEXORIGIN}{\DVIXOFFSET} + +\newcommand{\TAD}{800} % how far to move labels from their arrows +\newcommand{\TEXTHEIGHT}{50400} +\newcommand{\TEXTWIDTH}{32522} +\newcommand{\TOPMARGIN}{5420} + +% ********************************************************************** +% DO NOT CHANGE any of these computed parameters +% + +% +\T=\TEXTWIDTH +\advance\T by -\COLUMNSEP +\divide\T by 2 +\xdef\COLUMNWIDTH{\the\T} + +\T=\TEXTWIDTH +\divide\T by 2 +\advance\T by \ODDSIDEMARGIN +\xdef\COLUMNXMIDDLE{\the\T} % 0.5*TEXTWIDTH+ODDSIDEMARGIN + +\T=\COLUMNWIDTH +\advance\T by \ODDSIDEMARGIN +\advance\T by \COLUMNSEP +\xdef\COLUMNTWOX{\the\T} % COLUMNWIDTH+COLUMNSEP+ODDSIDEMARGIN + +\T=\FOOTSKIP +\advance\T by \TEXTHEIGHT +\advance\T by \HEADSEP +\xdef\HEADYORIGIN{\the\T} % FOOTSKIP+TEXTHEIGHT+HEADSEP +% +% Inner TeX page dimensions are (\INNERWIDTH,\INNERHEIGHT). All TeX +% coordinates are relative to (0,0) at upper-left corner of this +% page, although for the figures, we put (0,0) at lower-left +% corner. +% +\T=\TOPMARGIN +\advance\T by \HEAdHEIGHT +\advance\T by \HEADSEP +\advance\T by \TEXTHEIGHT +\advance\T by \FOOTSKIP +% INNERHEIGHT=TOPMARGIN+HEAdHEIGHT+HEADSEP+TEXTHEIGHT+FOOTSKIP +\xdef\INNERHEIGHT{\the\T} + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\advance\T by \EVENSIDEMARGIN +\xdef\INNERWIDTH{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+EVENSIDEMARGIN + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\advance\T by \MARGINPARSEP +\xdef\MARGINNOTEXORIGIN{\the\T} % ODDSIDEMARGIN+TEXTWIDTH+MARGINPARSEP + +\T=\TEXTHEIGHT +\multiply\T by 75 +\divide\T by 100 +\advance\T by \FOOTSKIP +\xdef\MARGINNOTEYA{\the\T} % .75*TEXTHEIGHT+FOOTSKIP + +\T=\MARGINNOTEYA +\advance\T by -\MARGINNOTEHEIGHT +\advance\T by -\MARGINPARPUSH +\xdef\MARGINNOTEYB{\the\T} % MARGINNOTEYA-MARGINNOTEHEIGHT-MARGINPARPUSH + +\T=\MARGINNOTEYA +\advance\T by \MARGINNOTEHEIGHT +\xdef\MARGINNOTEYC{\the\T} % MARGINNOTEYA+MARGINNOTEHEIGHT + +\T=\PAGEHEIGHT +\advance\T by -\DVIYOFFSET +\xdef\PAGEYTOP{\the\T} % PAGEHEIGHT-DVIYOFFSET + +\T=\PAGEYTOP +\advance\T by -\INNERHEIGHT +\xdef\PAGEYORIGIN{\the\T} % PAGEYTOP-INNERHEIGHT + +\T=\ODDSIDEMARGIN +\advance\T by \TEXTWIDTH +\xdef\RIGHTEDGE{\the\T} % ODDSIDEMARGIN+TEXTWIDTH + +\T=\TEXTHEIGHT +\multiply\T by 4 +\divide\T by 10 +\xdef\TEXTY{\the\T} % TEXTY = 0.4*TEXTHEIGHT (we put + % sample text here) + +\T=\TEXTHEIGHT +\divide\T by 3 +\xdef\TEXTWIDTHY{\the\T} % TEXTWIDTHY = TEXTHEIGHT/3 (we + % put \textwidth label here) + \begin{figure} + %%%%%%%%%%%%%% + + \caption{Page layout} + \label{bild} + + \begin{center} + \begin{small} % make text somewhat smaller + \setlength{\unitlength}{\UNITLENGTH} + \begin{picture}(\PAGEWIDTH,\PAGEHEIGHT) % sizes in centipoints + +% + \NAMEBOX{0}{0}{0}{0}{\PAGEWIDTH}{\PAGEHEIGHT}{}{} +% + \HARROW{0}{\PAGEYTOP}{0}{0}{\PAGEXORIGIN}{b}{}{1in} +% + \VARROW{\PAGEXORIGIN}{\PAGEYTOP}{0}{0}{\DVIYOFFSET}{r}{l}{1in} +% + \put(\PAGEXORIGIN,\PAGEYORIGIN){ + \begin{picture}(\INNERWIDTH,\INNERHEIGHT) + % Draw 3-sided inner page frame--no bottom side + % because it is not significant for dimensioning + \put(0,0){\line(0,1){\INNERHEIGHT}} + \put(0,\INNERHEIGHT){\line(1,0){\INNERWIDTH}} + \put(\INNERWIDTH,0){\line(0,1){\INNERHEIGHT}} +% + \NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{0}{\TEXTWIDTH}{ + \BASELINESKIP}{l}{A line of text\ldots} + \NAMEBOX{\ODDSIDEMARGIN}{\TEXTY}{0}{-\BASELINESKIP}{ + \TEXTWIDTH}{\BASELINESKIP}{l}{Next line\ldots} +% + \VARROW{\COLUMNXMIDDLE}{\TEXTY}{0}{-\BASELINESKIP}{ + \BASELINESKIP}{r}{l}{\tt\string\baselinestretch + $\times$\string\baselineskip} +% + \HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{t}{}{ + \tt\string\oddsidemargin} + \HARROW{0}{\TEXTHEIGHT}{0}{0}{\ODDSIDEMARGIN}{b}{}{ + \tt\string\evensidemargin} + % + % Page text label + \NAMEBOX{\ODDSIDEMARGIN}{\FOOTSKIP}{0}{0}{\TEXTWIDTH}{ + \TEXTHEIGHT}{}{Page Text} + % Page footer box, arrow, and label + \NAMEBOX{\ODDSIDEMARGIN}{0}{0}{0}{\TEXTWIDTH}{ + \FOOTHEIGHT}{}{Page Footer} + % + \VARROW{\ODDSIDEMARGIN}{0}{-\TAD}{0}{\FOOTHEIGHT}{l}{r}{ + \tt\string\footheight} + % + % Footskip arrow and label + \VARROW{\RIGHTEDGE}{0}{\TAD}{0}{\FOOTSKIP}{r}{l}{ + \tt\string\footskip} + % + \HARROW{\ODDSIDEMARGIN}{\TEXTWIDTHY}{0}{0}{\TEXTWIDTH}{b}{}{ + \tt\string\textwidth} + % + \VARROW{\ODDSIDEMARGIN}{\FOOTSKIP}{-\TAD}{0}{ + \TEXTHEIGHT}{l}{r}{\tt\string\textheight$\rightarrow$} + % + \VARROW{\ODDSIDEMARGIN}{\HEADYORIGIN}{-\TAD}{0}{ + \HEAdHEIGHT}{l}{r}{\tt\string\headheight} + % + \VARROW{\RIGHTEDGE}{\HEADYORIGIN}{\TAD}{-\HEADSEP}{ + \HEADSEP}{r}{l}{\tt\string\headsep} + % + \VARROW{\RIGHTEDGE}{\INNERHEIGHT}{\TAD}{-\TOPMARGIN}{ + \TOPMARGIN}{r}{l}{\tt\string\topmargin} + % + \NAMEBOX{\ODDSIDEMARGIN}{\HEADYORIGIN}{0}{0}{\TEXTWIDTH}{ + \HEAdHEIGHT}{}{Page Header} + % + \NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{0}{0}{ + \MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{ + Margin\\note A}} + % + \VARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYA}{-\TAD}{ + -\MARGINPARPUSH}{\MARGINPARPUSH}{l}{r}{ + \tt\string\marginparpush} + % + \NAMEBOX{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{0}{ + \MARGINPARWIDTH}{\MARGINNOTEHEIGHT}{}{\shortstack{Margin\\note B}} + % + \HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYB}{0}{-\TAD}{ + \MARGINPARWIDTH}{b}{}{\tt\string\marginparwidth} + % + \HARROW{\MARGINNOTEXORIGIN}{\MARGINNOTEYC}{ + -\MARGINPARSEP}{\TAD}{\MARGINPARSEP}{t}{}{ + \tt\string\marginparsep} + % + \end{picture}} + \end{picture} + \end{small} + \end{center} + \end{figure} + %%%%%%%%%%%% + + \clearpage + %%%%%%%%%% + +\end{fullpage} +%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Description of the refman-class family} +\label{refman} + +The \texttt{refman.sty} was defined at the EDV-Zentrum (computing +center) of the TU Wien. This layout is suitable for reference +manuals, technical descriptions and similar applications. It is based +on the ideas shown in previous sections: The layout has a wide left +margin for headings and margin notes and smaller margins on the right +side, the top and the bottom. + +In 1994 this layout was re-implemented as a class for the new \LaTeXe. +This made it possible to include some minor improvements, like the +support of different paper sizes. The \texttt{refman.sty} was split +into two classes +\texttt{refrep}\index{refrep.cls} similar to \texttt{report} and +\texttt{refart}\index{refart.cls} similar to \texttt{article}. +These classes differ in the layout of the header and footer. The +\texttt{refart} does not support the \texttt{\textbackslash chapter} +command. + +The current version of this class is described in this document. If +serves as an example for the layout. + + +\subsection{Invocation} +\index{refart, invocation} +\index{refrep, invocation} + +The \LaTeX\ local guide (if available) shows if this class is available +at your \TeX\ installation or where to install it. To use the +\texttt{refart} class, simply call it with the \verb|\documentclass| +command: + +\begin{verbatim} +\documentclass[11pt,a4paper]{refart} +\usepackage{german} % other packages you may want +\end{verbatim} + +\subsection{Options} +\index{options} + +The \texttt{refart} class replaces \texttt{article} and \texttt{refrep} +replaces \texttt{report}. They support all options of these classes +except for the \texttt{twocolumn} option. + +It supports the additional option \texttt{square} which makes the +\texttt{\textbackslash textheight} equal to the +\texttt{\textbackslash textwidth}. + +Neither \texttt{refart} nor \texttt{refrep} support twocolumn +layout, thus the commands \verb|\twocolumn| and \verb|\onecolumn| +must not be used. + +The index will be set in twocolumn format and you can't change it +with the means of this class. + +\subsection{Layout changes} + +\subsubsection{Page design} + +\index{page design, horizontal}\marginlabel{Horizontal:} +In this design the usable area for text (\verb|\fullwidth|) is +calculated as the paper width minus 2~inch. Only a fraction of this +width is used for the running text (\verb|\textwidth|), the remaining +part forms a wide left margin (\verb|\leftmarginwidth|) which is used +for headings and margin notes. The \verb|\textwidth| is 70~\% of the +\verb|\fullwidth| by default, but this can be changed with the +\verb|\settextfraction| command\index{settextfraction} which accepts +arguments between 0 and 1. + + +\index{page design, vertical}\marginlabel{Vertical:} +The text height is calculated as the paper height minus 2~inch. This +leaves a top margin of 1~inch, which is modified by some pagestyles +(see \ref{pagestyle}). + +The pages are always set with a ragged bottom. + +\subsubsection{Section headings} + +The headings for \verb|\section|, \verb|\subsection| and +\verb|\subsubsection| extend into the left margin, thus using the full +width of the page. They are not justified and hyphenation is +discouraged. A small space is kept free above and below the heading. +Headings for \verb|\section| and \verb|\subsection| are set in a bold +font. + +The \texttt{refrep} class defines a different layout for the +\verb|\chapter| command: It always starts a new page and prints the +chapter headings in a large bold font with a thick line above and +below. This heading uses the full width of the page. + +A similar heading is created by the \verb|\part| commands which is +available in both classes. It uses a roman part number instead of the +arabic section number. + +The \verb|\maketitle| commands sets the title of the document in the +same layout when no special titlepage is requested. (This is the +default for \texttt{refart}. To suppress the titlepage in a +\texttt{refrep} document, you can use the \texttt{notitlepage} option.) +The name of the author and the date is printed in italic flush right +below the document title. + +\subsubsection{Paragraphs} + +Paragraphs are separated by a vertikal space (\verb|\parskip|) of +half a line (\verb|0.5\baselineskip|) plus a strechtable length of 2pt. +Paragraphs are not indented. + +The vertical spacing inside, above and below a list environment is the +same as in the running text. + +\subsection{Footnotes}\index{footnote} + +The footnote layout consists of a small margin (1em) which contains +the footnote symbol. A small space is set between the symbol and the +footnote text. The paragraphs of the footnote are not indented. There +is currently no space between two footnotes, I'm not sure it this will +stay this way. The footnote symbol is set as a superscript. This may +change in later versions. I'm relying on user feedback to finally +solve this. + +\subsubsection{Description environment} +\index{description environment} + +The \texttt{description} environment will use the whole left margin +for the description label. + +\seealso{\ref{layout}} +You will find examples in the section~\ref{layout}. + +\subsubsection{Positioning of margin notes} + +Margin notes (\verb|\marginpar|) are always put into the left margin. +They use the whole width of the margin. + +The minimum space between two margin notes is set to 0 to prevent +them from being shifted around when many margin notes are used. + +\subsubsection{Headers and Footers} \label{pagestyle} +\index{pagestyle} + +The pagestyle \texttt{plain} puts the page number into the footer in +the right corner. When the option \texttt{twoside} is active, the page +number of left pages is put into the left corner. + +\index{headings} +\index{myheadings} +The pagestyles \texttt{headings} and \texttt{myheadings} create a +header which spans the whole width of the page. The headings contain +the running head (\verb|\section| and \verb|\subsection| in +\texttt{refart} and \verb|\chapter| and \verb|\section| in +\texttt{refrep}) when \texttt{headings} is used or a fixed text that can +defined with the \texttt{\textbackslash markboth} command when +\texttt{myheadings} is used. The heading will be set in a slanted +font and separated from the body by a thin line. + +\index{footings} +\index{myfootings} +In addition to the standard classes, \texttt{refman} supports a style +for footers, which is used in this documentation. The information is +exactly the same as in the headings but now printed in the footer with +a thin line above. + +To use a userdefined string you can say: +\begin{verbatim} +\pagestyle{myfootings} % or myheadings +\markboth{left title}{right title} +\end{verbatim} + +The \texttt{heading} and \texttt{myheading} commands increase the top +margin by one line while the \texttt{footings} and +\texttt{myfootings} commands decrease the top margin by one line. +The pagestyles \texttt{empty} and \texttt{plain} leave the top margin +unchanged. You should not combine headings and footings in one document. + +\subsection{Additional commands} + +\subsubsection{Marginlabel} +\index{marginlabel} + +The command \verb|\marginlabel{xxx}| prints the text \texttt{xxx} right +justified into the left margin. Please note that a +\texttt{\textbackslash marginpar} will print it left justified. + + +\marginlabel{Example:} The word ``Example'' in the left margin is +printed with the command \verb|\marginlabel{Example:}| + +\subsubsection{Attention} +\index{attention}\index{attentionsymbol}\index{manfnt} + +The command \cs{attention} puts an exclamation mark with an arrow +pointing to the text into the left margin.\attention This is an +example for \cs{attention}. + +\renewcommand{\attentionsymbol}{\texttt{:-)}} +\attention +Since version 2.0c you can change the symbol used for the +\cs{attention} command using a +\verb|\renewcommand{\attentionsymbol}{\texttt\{:-)\}}| +command. To get the default back use +\verb|\renewcommand{\attentionsymbol}| \verb|{\large \bfseries ! $\rightarrow$}| +\renewcommand{\attentionsymbol}{\large \bfseries ! $\rightarrow$} + +Since version 2.0c \cs{attention} takes an optional argument to +define the symbol used in the margin. Thus you can change the symbol +once without having to restore it later. Do not abuse this +feature\attention[\texttt{:-(}], it is primarily meant as an support +for the manfnt package to substitute the ``dangerous bend'' by a +``double dangerous bend''. + +If you have the manfnt-font available you can use the enclosed +\texttt{manfnt} package. It gives you easy +access to the symbols defined in this font. + +\subsubsection{Seealso} +\index{seealso} + +The command \verb|\seealso{n}| prints an arrow and its argument into +the left margin. You will find examples for this in the left margin +and in \seealso{1} chapter~1. + +\subsubsection{Maxipage environment} +\index{maxipage} + +The \texttt{maxipage} environment is a special kind of +\texttt{minipage} which extends over the full width of the page. It +can be used for long formulas or \texttt{tabular} environments. You may +use \texttt{maxipage} environments inside floats. You cannot use +margin notes inside a \texttt{maxipage} and no pagebreak will occur +while in a \texttt{maxipage}. A \texttt{maxipage} is always a +paragraph of its own with a thick line above and below. You can +disable these lines with the \texttt{\textbackslash +maxipagerulefalse}\index{maxipagerule} +command. They are on by default. + +The following paragraph is an example for a \texttt{maxipage}: +\nopagebreak +\begin{maxipage} +This very long line is an example for a \texttt{maxipage}. It extends +over the full width of the page, including the left margin. +\end{maxipage}\nopagebreak +This is normal text after the \texttt{maxipage}. + +\subsubsection{Fullpage environment} \label{fullpage} +\index{fullpage} + +The \texttt{fullpage} environment consists of one ore more pages where +the text extends over the full width of the page. You cannot use +margin notes inside a \texttt{fullpage} environment. A \texttt{fullpage} +will always start and end on a page of its own. It may be used for +large tables, program listings or anything that does not fit into the +normal layout. + +\seealso{See page \pageref{bild}} +Page~\pageref{bild} is an example for a \texttt{fullpage}. + +\subsubsection{Noparskip} + +The \verb|\noparskip| removes the vertical space between two +paragraphs. It is similar to the \verb|\noindent| command that removes +the indent of the first line of a paragraph. + +\subsubsection{Setleftmarginwidth} +\index{setleftmarginwidth} + +The \verb|\setleftmarginwidth| command is no longer supported. You can +achieve similar results by using the \verb|\settextfraction| command. + +\subsubsection{Descriptioncolon} +\index{descriptioncolon} + +By default a colon is printed after the description label. +The command \texttt{\textbackslash description\-colonfalse} disables +the colon, the \texttt{\textbackslash description\-colontrue} +re-enables ist. + +\subsubsection{Descriptionleft} +\index{descriptionleft} + +The \verb|\descriptionlefttrue| command sets the description label +left justified into the margin. The default is right justified which +will be achieved with \verb|\descriptionleftfalse| + +\subsubsection{Maxipagerule} +\index{maxipagerule} + +You can disable the rules before and after a \texttt{maxipage} with +the \texttt{\textbackslash maxipage\-rulefalse} command and re-enable +them with the \texttt{\textbackslash maxipageruletrue} command. The +default is on. You should not mix \texttt{maxipage}s with and without +rules in one document. + +\subsubsection{Condbreak} +\index{condbreak} + +The command \verb|\condbreak{2cm}| ensures, that the next 2~cm are +either completely on this page or completely on the next. No +pagebreak will appear in the next 2~cm. + +This is really a hack to achieve what the \texttt{\textbackslash +samepage} command often fails to do. + +\subsubsection{Example} +\index{example} + +The \texttt{example} environment acts like a \texttt{verse} +environment but uses a \texttt{tt} font. + +\subsubsection{Pageperchapter} +\index{pageperchapter} + +The command \verb|\pageperchapter| creates page number that start with +1 for every new chapter. This may be useful for larger manuals. Since +it works with chapters it is only available in the +\texttt{refrep} class. + +\printindex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput + diff --git a/Master/texmf-dist/doc/latex/refman/layout_d.pdf b/Master/texmf-dist/doc/latex/refman/layout_d.pdf new file mode 100644 index 00000000000..e2cbda1b955 Binary files /dev/null and b/Master/texmf-dist/doc/latex/refman/layout_d.pdf differ diff --git a/Master/texmf-dist/doc/latex/refman/layout_d.tex b/Master/texmf-dist/doc/latex/refman/layout_d.tex new file mode 100644 index 00000000000..5ee67ea50d6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/refman/layout_d.tex @@ -0,0 +1,776 @@ +% +% LAYOUT.TEX - Kurzbeschreibung von PA 88-10-04 (LaTeX) +% 99-03-20 +% +% Updated for REFMAN.CLS (LaTeX2e) +% +\documentclass[twoside,a4paper]{refart} +\usepackage{makeidx} +\usepackage{ifthen} +\usepackage{german} + +\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} +\def\bs{\char'134 } % backslash in \tt font. +\newcommand{\zB}{z.\,B.} +\newcommand{\dH}{d.\,h.} + +\title{Layout-"Anderungen mit \LaTeX} +\author{EDV-Zentrum der TU Wien, Abt.~Digitalrechenanlage \\ +Hubert Partl \\ +1988-10-04 \\ +Axel Kielhorn\thanks{a.kielhorn@web.de}\\ +1996-01-01 \\ +H27.0 --- Version 1} + + +\date{} +\emergencystretch1em % F"ur TeX <3.0 auskommentieren! + +\pagestyle{myfootings} +\markboth{Layout-"Anderungen mit \rm\LaTeX}% + {Layout-"Anderungen mit \rm\LaTeX} + +\makeindex % Dies nur als Demonstration, das jetzt auch ein Index + % m"oglich ist :-) +% Bei Marginlabels mu"s der Index *vor* dem Label stehen. + +% Es ist notwendig die Umlaute in der TeX-Schreibweise zu schreiben, +% da der german.sty sie sonst in etwas verwandeln w"urde, mit dem +% MakeIndex nicht zurecht kommt. + + +\setcounter{tocdepth}{2} + +\begin{document} + +\maketitle + +\begin{abstract} + Dieses Dokument beschreibt die M"oglichkeiten der + \texttt{refart} und \texttt{refrep} Class f"ur \LaTeXe. + Sie arbeitet nicht mehr mit dem alten \LaTeX\ 2.09 + zusammen und enth"alt einige Verbesserungen gegen"uber dem + Original. Alte \texttt{REFMAN} Quellen sollten sich aber + problemlos an die Class anpassen lassen. +\end{abstract} + + +Dieses Heft ist als Erg"anzung zu Kapitel~5 (``Designing It Yourself'') +des \LaTeX-Manuals von Leslie Lamport gedacht. + +\tableofcontents + +\newpage + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Einleitung} + +\subsection{Autor, Layout-Designer und Setzer} + +Jedes Schrift"-st"uck -- von einer kurzen handgeschriebenen Notiz bis +zu einem gedruckten Buch --besteht aus zwei Komponenten: {\bf Inhalt} +und {\bf Form.} In den meisten F"allen ist die Form nicht Selbstzweck +sondern dient nur dazu, den Inhalt f"ur den Leser verst"and"-lich +darzustellen. + +\index{Autor}\marginlabel{Autor:} +Der {\bf Inhalt} wird vom jeweiligen Autor geliefert. +Bei Druckwerken wird der Autor meist durch den Lektor des +Verlages oder den Herausgeber der Zeitschrift unterst"utzt. + +Bei der Verwendung des Textsatzsystems \LaTeX\ wird der Inhalt im +Hauptteil des \LaTeX-""Eingabefiles angegeben -- also zwischen +\verb|\begin{document}| und \verb|\end{document}| -- erg"anzt durch +\LaTeX-Befehle, die angeben, welche Bedeutung die einzelnen Text- +Teile haben. + +\index{Designer}\marginlabel{Designer:} +Die {\bf Form} eines Druckwerks wird "ublicherweise vom Verleger +festgelegt, der das Layout von den im Verlag angestellten +Designern entwerfen l"a"st. + +Die mit \LaTeX\ mitgelieferten sogenannten "`Document Classes"' +wurden von professionellen amerikanischen Layout-Designern f"ur die +von Leslie Lamport vorgesehenen Arten von Schrift"-st"ucken entworfen, +also f"ur wissenschaftliche Zeitschriften, Berichte und B"ucher -- auf +der Grundlage der in den USA "ublichen Konventionen. Die "`Koma-Script- +Classes"' sind an den europ"aischen Geschmack angepa"st und in vielen +Kleinigkeiten optimiert worden. Diese Layouts sind in den sogenannten +"`Class-Files"' festgelegt. Am Beginn des \LaTeX-""Eingabefiles -- +vor dem Befehl \verb|\begin{document}| -- wird angegeben, in welcher +Form der Inhalt des Schrift"-st"ucks gesetzt und ausgedruckt werden +soll. + +\index{Setzer}\marginlabel{Setzer:} +Der Setzer in der Druckerei +bringt den vom Autor bzw.\ Lektor gelieferten Inhalt in die vom +Layout-Designer festgelegte Form, in der das Schrift"-st"uck dann +schlie"slich ausgedruckt wird. + +Bei der Verwendung von \LaTeX\ erfolgt das Setzen durch das +Computer-""Programm \TeX\ und das Ausdrucken durch ein weiteres +Computer-""Programm, den sogenannten Device-Driver. + + +\subsection{Layout-"Anderungen} + +Wenn das Schrift"-st"uck nicht in einem der vorgefertigten +\LaTeX-Layouts gesetzt werden soll, sind die folgenden zwei +Voraussetzungen notwendig: +\begin{enumerate} + +\item + Das Layout mu"s entworfen werden. + Dies sollte im allgemeinen von einem professionellen Designer + gemacht werden. Falls kein solcher zur Verf"ugung steht, mu"s + sich der Autor oder der Herausgeber als "`Amateur-Designer"' + versuchen -- am besten durch Anlehnung an professionell + gestaltete Vorbilder. + +\seealso{\ref{design}} + Ausf"uhrlichere Hinweise dazu werden in Kapitel~\ref{design} + angegeben. + +\item + Das Layout mu"s in Form eines \LaTeX-Class-Files formuliert + werden. Dies kann entweder als "`Class-Option"' geschehen, oder + durch die Definition einer neuen "`Class"'. Die komplette + Neudefinition hat den Vorteil, das sie weitreichendere + "Anderungen erlaubt. Ich habe mich daher bei der Portierung nach + \LaTeXe\ f"ur eine eigene "`Class"' entschieden. Dadurch wird + die "Ubertragung von alten Dateien zwar etwas erschwert, aber + meiner Meinung nach "uberwiegen die Vorteile. + Die Angabe dieser "`Class"' bzw.\ dieser "`Class-Option"' am + Beginn des \LaTeX-""Eingabefiles bewirkt dann, da"s der Inhalt + des Schrift"-st"ucks in dieser neuen Form gesetzt und gedruckt + wird. + +\seealso{\ref{layout}} + Ausf"uhrlichere Hinweise dazu werden in Kapitel~\ref{layout} + angegeben. + +\end{enumerate} + +\section{Die Kunst des Layout-Design} +\label{design} +\label{Layout-Design} +\index{Layout-Design} + +\subsection{Allgemeine Regeln} +\index{Regeln} + +Es gibt fast keine allgemeing"ultigen Regeln, sondern man mu"s f"ur jedes +Schrift"-st"uck oder jede Reihe von Schrift"-st"ucken ein eigenes Layout +entwerfen. + +Dieses Layout mu"s sich vor allem daran orientieren, +{\it wer\/} das Schrift"-st"uck {\it wie\/} lesen wird. + +Ein wichtiges Kriterium ist \zB, ob der Leser es eher von A bis~Z +durchgehend lesen will wie einen Kriminalroman oder ein +"`Tutorial"', oder ob er eher bestimmte Stellen rasch auf"|finden +will wie in einem Telefonbuch oder in einem "`Reference Manual"'. +\index{Manual}\index{Telefonbuch} + +Au"serdem mu"s das Layout die bestehenden Konventionen ber"ucksichtigen, +vor allem die Gewohnheiten des Lesers, aber auch den sogenannten +"`House Style"',\index{House-Style} durch den sich verschiedenartige +Schrift"-st"ucke und die Produkte verschiedener Hersteller oder +Institutionen voneinander unterscheiden sollen.\footnote{Man vergleiche +\zB\ das jeweils typische Layout verschiedener Fachzeitschriften oder +Tageszeitungen.} + +\attention +Der Hauptzweck des Layouts ist stets, da"s der Leser die gesuchten +Informationen gut findet und sie gut lesen kann, und da"s er den Inhalt und +den logischen Aufbau des Schrift"-st"ucks richtig versteht. +Wichtig sind also "Ubersichtlichkeit, Lesbarkeit, Konsistenz und +dergleichen. Die Sch"on"-heit ("Asthetik) steht demgegen"-"uber im +allgemeinen nur an zweiter Stelle.\footnote{Dies gilt nat"urlich nicht +f"ur Werbeprospekte, Bild"-b"ande und dgl.} + +Im folgenden werden ein paar einfache +"`Faustregeln"'\index{Faustregeln} f"ur den Seitenaufbau angef"uhrt, die +f"ur die meisten Anwendungen G"ultigkeit haben. +\begin{description} + +\item[Zeilenabst"ande]\index{Zeilenabst\"ande} + Die Zeilenabst"ande m"ussen gr"o"ser als die Wortabst"ande + sein, damit die Augen des Lesers richtig entlang der Zeilen + gef"uhrt werden. + +\item[Zeilenl"ange]\index{Zeilenl\"ange} + Die Zeilenl"ange + -- bzw.\ bei mehrspaltigem Druck die Spaltenbreite -- + soll m"oglichst bei etwa 60~Zeichen pro Zeile liegen. Zu lange + Zeilen sind schlecht lesbar, weil sie anstrengende + Augenbewegungen erfordern und gleichzeitig die + Wahrscheinlichkeit erh"ohen, beim Zeilenwechsel in die falsche + Zeile zu geraten. Zu kurze Zeilen machen Probleme beim + Randausgleich (Blocksatz) und beim Abteilen (Silbentrennung). + Wenn l"angere Zeilen notwendig sind, dann m"ussen die + Zeilenabst"ande vergr"o"sert werden. + +\item[Seitenaufbau]\index{Seitenaufbau} + Die normalen Textseiten sollen einen m"oglichst einheitlichen + Aufbau haben. Abbildungen, Tabellen und spezielle Seiten wie + Inhaltsverzeichnis, Index usw. sollen aber \emph{nicht} in + dasselbe Schema gepre"st werden, sondern stets so viel Platz + einnehmen, wie f"ur die jeweilige Tabelle etc. am g"unstigsten + ist (also durchaus k"urzer oder l"anger als die normale + Zeilenl"ange, evtl.~mit einem Rahmen darum herum). Wenn m"oglich + sollten bei der Seitenaufteilung auch "asthetische Grundregeln + wie \zB\ der "`Goldene Schnitt"' ($ 13 : 8 \approx 8 : 5 $) + angewendet werden. + +\item[Randnoten]\index{Randnoten} + "`Randnoten"' sind f"ur viele Zwecke besser geeignet als + Fu"s"-noten, weil sie direkt neben dem Text erscheinen, auf den + sie sich beziehen. Dazu z"ahlen auch Symbole wie \zB\ + "`Achtung-Zeichen"', die wichtige Text-Teile markieren bzw.\ + den Leser auf sie hinweisen. + +\item[Kopf- und Fu"szeilen]\index{Kopfzeilen}\index{Fu{\ss}zeilen} + Der Inhalt von Kopf- und Fu"s-Zeilen soll die Orientierung + innerhalb des Schrift"-st"ucks erleichtern. Falls zu erwarten + ist, da"s manche Leser einzelne Seiten aus dem Schrift"-st"uck + herauskopieren (\zB\ einen Artikel aus einer Zeitschrift), + sollte in der Kopf- oder Fu"szeile auch die Information zu + finden sein, aus welchem Schrift"-st"uck die Seiten stammen. + Falls h"aufig neue Versionen eines Schrift"-st"ucks erstellt + werden (\zB\ bei Software-Manuals), sollte auch das Datum oder + die Versionsnummer in der Kopf- oder Fu"szeile erscheinen. + +\end{description} + +\subsection{Spezielle Hinweise f"ur technische Beschreibungen} + +Wir wollen kurz die Eignung von drei verschiedenen Layouts f"ur den an +unserer Universit"at h"aufigen Spezialfall von technischen +Beschreibungen, Users' Guides, Reference Manuals, Mitteilungs"-bl"attern +und "ahnlichen technischen Druckwerken vergleichen:\footnote{Diese +Hinweise stammen von Paul Stiff, der Layout-Design an der University of +Reading unterrichtet.} + + +\begin{description} + +\item[Plain \TeX] + Das Standardformat von Plain \TeX\ hat vor allem den gro"sen + Nachteil, da"s die Zeilen viel zu lang sind, was sich schlecht + auf die Lesbarkeit und "Ubersichtlichkeit auswirkt. Dieses von + Schreibmaschinenschrift gewohnte Schriftbild eignet sich nicht + f"ur die von \TeX\ unterst"utzte "`Druck"'-Schrift. Die an der + TU~Wien vor der Einf"uhrung von \LaTeX\ entwickelten Macros {\tt + EASY.TEX} und \hbox{\tt ARTii.TEX} bzw.\ \hbox{\tt REPii.TEX} + haben au"serdem einige weitere Design-M"angel, \zB\ sind die + Abst"ande zwischen den Kapitel-"""Uberschriften zu gro"s. + +\item[Standard-\LaTeX] + Auch das Standardformat von \LaTeX\ ist f"ur diese Zwecke nicht + ideal. Die Zeilenl"ange ist zwar richtig gew"ahlt, aber die + Seiten enthalten einen zu gro"sen ungen"utzten Rand, insbesondere + oben und unten. Au"serdem werden f"ur die Kapitel-"""Uberschriften + etwas zu gro"se Schriften verwendet. + +\item[Reference-Manual-Style] + Ein f"ur solche Zwecke g"unstigeres Seiten-Layout findet man bei + einigen in den letzten Jahren neu erschienenen Reference + Manuals:\footnote{Ein h"aufig zitiertes -- allerdings in den + konkreten Details auch nicht ganz ideales -- Beispiel ist das + "`PostScript Reference Manual"'.} +\begin{itemize} +\item + Der fortlaufenden Text steht mit einer relativ kurzen, gut + lesbaren Zeilenl"ange im rechten Teil der Seite. Dieser Teil + dient also zum fortlaufenden Lesen einzelner Abschnitte. +\item + Im breiten linken Rand jeder Seite stehen die + "Uberschriften sowie Stichworte und andere "`Randnoten"'. Dieser + Teil dient also zum raschen Auffinden von bestimmten + Informationen innerhalb des gesamten Schrift"-st"ucks. +\item + Abbildungen und Tabellen stehen je nach ihrem Platzbedarf in + der einen oder anderen Spalte oder gehen "uber die gesamte + Seitenbreite. +\end{itemize} +\seealso{\ref{refmanex}} +Eine Anleitung, wie man ein solches Layout mit \LaTeX\ realisieren +kann, wird in Abschnitt~\ref{refmanex} angegeben. + +\end{description} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\section{Wie kann man das \LaTeX-Layout "andern?} +\label{layout} + +\subsection{Vor und Nachteile des Textsatzsystems \LaTeX} + +\marginlabel{Vorteile:} +Der gro"se Vorteil von \LaTeX\ besteht darin, da"s es ein "`generisches"' +oder "`logisches"' Design \index{Design, logisches}\index{Design, generisches} +unterst"utzt. Darunter versteht man, da"s der +Autor nur mit einigen wenigen Befehlen angeben mu"s, welche +\emph{Bedeutung} die einzelnen Text-Teile haben: "Uberschriften, Zitate, +mathematische Gleichungen, Listen, Aufz"ahlungen, Literaturangaben usw. +Diese logischen Begriffe werden dann vom System automatisch in der +richtigen Art und Weise gesetzt und ausgedruckt. Was "`richtig"' ist, +mu"s dem System vorher in geeigneter Weise mitgeteilt werden, bei +\LaTeX\ durch die Angabe der "`Document Class"' und eventuell weiterer +"`Packages"'. + +Im Gegensatz dazu steht das von "alteren Textverarbeitungsprogrammen und +auch von Plain~\TeX\ unterst"utzte "`visuelle"' Design,\index{Design, +visuelles} bei dem der Autor die sichtbaren Eigenschaften wie +Schriftart, Schriftgr"o"se, vertikale Abst"ande, horizontale Einr"uckungen +usw. angeben mu"s. + +Das Prinzip des logischen Design\index{Design, logisches} macht +einerseits die Anwendung durch den Autor wesentlich einfacher und +"ubersichtlicher und stellt andererseits die logische Konsistenz des +Schrift"-st"ucks sicher (\zB\ einheitliche Schriftart f"ur alle +"Uberschriften des gleichen Levels, einheitliche Numerierung von +Kapiteln und von Gleichungen, einheitliche Darstellung von Listen und +Aufz"ahlungen, usw.). + +\marginlabel{Nachteile:} +Als Nachteil von \LaTeX\ wird immer wieder angef"uhrt, da"s es den Autor +zu sehr einschr"ankt und da"s man das Layout zu wenig "andern kann. Dies +ist nur teilweise richtig, n"amlich nur dann, wenn man sich auf die vier +mit \LaTeX\ mitgelieferten Standard-Layouts beschr"ankt, die sich +selbstverst"andlich nicht f"ur alle Anwendungen eignen und die au"serdem +sehr stark an amerikanische Konventionen angepa"st sind. + +\LaTeX\ ist aber wesentlich m"achtiger und flexibler: Man kann praktisch +beliebige "Anderungen am Layout dadurch erreichen, da"s man die in den +Style-Files enthaltenen Definitionen "andert, die ge"-"an"-derten +Definitionen in privaten Style-Option-Files speichert und diese dann +als zus"atzliche Style-Options aufruft. Der Aufwand daf"ur ist keineswegs +gr"o"ser als bei der Verwendung von Plain \TeX, in manchen F"allen sogar +wesentlich geringer. + +\subsection{Eingabe-Dateien und Class-Dateien} + +In Einklang mit dem Prinzip des logischen Design und der Trennung +von Inhalt und Form verwendet \LaTeX\ grund"-s"atz"-lich zwei Arten +von Dateien: +\begin{itemize} +\item + Der Inhalt einschlie"slich der logischen Struktur des + Schrift"-st"ucks wird in den \LaTeX-""Eingabefiles festgelegt. +\item + Die Form (das Layout) wird in sogenannten Class-Files und + eventuell auch Packages festgelegt. +\end{itemize} +Welche Class- und Package-Files ein Schrift"-st"uck verwendet -- +\dH\ in welchem Layout es gesetzt werden soll -- wird am Beginn des +Eingabefiles mit den Befehlen \verb|\documentclass| bzw. +\verb|\usepackage| angegeben. + +F"ur die Erzeugung eines Schriftst"ucks mit \LaTeX\ sind also +zumindest zwei Files notwendig: ein Eingabefile und ein Class-File. + +Diese Trennung entspricht den in der Einleitung erl"auterten +unterschiedlichen Funktionen von Autor und Layout-Designer. Sie hat +aber auch f"ur den Fall, da"s der Autor selbst das Layout festlegt, +wesentliche Vorteile: +\begin{itemize} +\item + Einerseits wird damit sichergestellt, da"s zusammengeh"orige + Schrift"-st"ucke automatisch im selben Layout gesetzt werden, + auch wenn dieses Layout nach dem Erstellen des Textes noch + ge"-"an"-dert wurde. Dies w"are nur schwer zu erreichen, wenn die + Layout-""Definitionen direkt in jedem einzelnen + Eingabefile enthalten w"aren. +\item + Andererseits ist es auf diese Weise ohne gro"sen Aufwand + m"oglich, denselben Inhalt in verschiedenen Layouts + auszudrucken, \zB\ als Artikel f"ur die eine oder andere + wissenschaftliche Zeitschrift oder als Kapitel einer + Dissertation und eines Forschungsberichts. +\end{itemize} + +\subsection{Class-Files und Package-Files} + +\LaTeX\ unterst"utzt innerhalb der Layout-Definition die folgende +Hierarchie von "`Class"' und "`Option"', die sich in den verschiedenen +Parametern des Befehls \verb|\documentclass| widerspiegelt: +\begin{itemize} +\item + Als erstes wird der Inhalt desjenigen "`Class-Files"' + verarbeitet, dessen Name im \verb|\documentclass|-Befehl + zwischen den geschwungenen Klammern angegeben wurde. Dies gibt + die grunds"atzliche Art des Schriftst"ucks an. +\item + Dann werden der Reihe nach diejenigen "`Class-Option-Files"' + verarbeitet, deren Namen zwischen den eckigen Klammern + angegeben wurden. Damit kann man verschiedene Layout-Varianten + ausw"ahlen. +\item + Als dritter Schritt werden dann die im + \verb|\usepackage|-Befehl angegebenen Packages geladen, die + ihrerseits wieder Optionen laden k"onnen. + +\end{itemize} +Diese mehrstufige Verarbeitung macht es m"oglich, die +Layout-""Definition in mehrere kleinere Einheiten zu zerlegen, wobei in +einem Class-Option-File sowohl Layout-Definitionen der urspr"unglichen +Class-Files abge"-"andert als auch weitere Definitionen hinzuge"-f"ugt +werden k"onnen. + +Class-Files, Class-Option-Files und Packages unterscheiden sich von +"`normalen"' Eingabefiles im wesentlichen durch die folgenden Punkte: +\begin{itemize} +\item + Sie d"urfen nur Definitionen enthalten, aber keine Text-Ausgaben + bewirken. +\item + Das Sonderzeichen "`Klammeraffe"' ({\tt @}) hat in ihnen die + Bedeutung eines Buchstabens ("`letter"'), \dH\ es ist + innerhalb von Befehlsnamen erlaubt. Die meisten von \LaTeX\ + intern verwendeten Befehle enthalten Klammeraffen in ihren + Namen, damit Kollisionen mit den vom Benutzer verwendeten + Befehlen ausgeschlossen werden. +\item + Die Filenamen haben die "`Extension"' {\tt cls} bzw. {\tt clo} + oder {\tt sty} f"ur Packages (nicht {\tt tex}). +\end{itemize} + +\subsection{Vorgangsweise bei Layout-"Anderungen} +\index{Layout-\"Anderungen, Vorgangsweise} + +\subsubsection{Festlegen der "Anderungen gegen"uber dem Original-Layout} + +Im allgemeinen ist es g"unstiger, die Class-Files f"ur das neue Layout +nicht von Null an neu zu erstellen, sondern die bereits bestehenden +\LaTeX-Class-Files als Vorbilder zu verwenden und so viel wie m"oglich +von den darin enthaltenen Definitionen zu "ubernehmen. + +In den meisten F"allen gen"ugt es sogar, ein mehr oder weniger kurzes +Package-File zu erstellen, das nur die Unterschiede des neuen Layouts +gegen"uber einem der originalen \LaTeX-Layouts enth"alt, und diese +"`Option"' dann in Verbindung mit der originalen "`Class"' zu verwenden. + +Im ersten Schritt legt man daher fest, in welchen Bereichen sich das +neue Layout vom originalen \LaTeX-Layout unterscheidet und worin diese +Unterschiede im einzelnen bestehen. Man geht dabei am besten so vor, +da"s man sich f"ur alle als \LaTeX-Befehle oder -Environments definierten +logischen Einheiten "uberlegt, in welchem Layout sie gesetzt werden +sollen. Neue zus"atzliche \LaTeX-Befehle sollte man nach M"oglichkeit +\emph{nicht} erfinden -- und wenn, dann nur im Einklang mit dem Prinzip +des logischen Design und mit der Struktur der anderen \LaTeX-Befehle +(\zB\ neue Environments f"ur spezielle Tabellen, oder eigene Befehle +f"ur spezielle Hervorhebungen). + +\subsubsection{Finden der Original-Definitionen} + +Im zweiten Schritt mu"s man finden, wo und wie alle +die Layout-""Eigenschaften, die man "andern will, im Original definiert +sind. Dazu soll man die folgenden Quellen in der folgenden +Reihenfolge durchsuchen:\footnote{Diese Hinweise stammen von Sue +Brooks, die im Rahmen der \TeX-""Konferenz 1988 in Exeter ein +Work"-shop f"ur "`\LaTeX-Hacker"' leitete.} +\begin{enumerate} +\item das \LaTeX-Manual von Leslie Lamport, +\item die Dokumentations-Files {\tt *.dtx} +\item die Kernal-Files {\tt *.ltx}, +\item das \TeX book von Donald E.~Knuth. +\end{enumerate} +Die beiden B"ucher sind im Buchhandel erh"altlich (Verlag Addison +Wesley). Ob und wo die Files an Ihrem Computer angelegt sind, ist im +"`\LaTeX\ Local Guide"' Ihrer Installation angegeben. Die Files sind +sehr gut kommentiert, soda"s man sich im allgemeinen auch dann gut in +ihnen zurechtfindet, wenn man nicht alle Details der darin enthaltenen +Befehle versteht. + + +\subsubsection{Schreiben eines neuen Package-Files} + +Im dritten Schritt erzeugt man das neue Package-File. Man w"ahlt einen +Namen f"ur die neue Package (\zB~\texttt{refman}) und bildet den +Filenamen aus diesem Namen und der Extension \texttt{sty} (\zB\ +\texttt{refman.sty}). Ausgerechnet f"ur \texttt{refman} trift +diese Vorgehensweise nicht zu, da es sich inzwischen um eine +eigenst"andige Class handelt. + +Dieses File mu"s nur diejenigen Definitionen +(\verb|\def|-Befehle, Wertzuweisungen und dergleichen) enthalten, die +sich gegen"uber der Originalversion unterscheiden, und/oder diejenigen, +die man zus"atzlich definieren will. + +Bei den "Anderungen geht man am besten so vor, da"s man die betreffenden +\verb|\def|-Befehle, Wertzuweisungen usw.\ aus den originalen Files in +das neue File kopiert und dann dort entsprechend modifizert. + +Auch bei neuen Definitionen lehnt man sich am besten an Vorbilder in +den originalen Files an. + +Au"serdem mu"s man den Zweck des Files, seine Verwendung, den +Autor und das letzte "Anderungsdatum sowie alle im File +enthaltenen Definitionen auf Kommentarzeilen innerhalb des Files +dokumentieren. Bei sehr umfangreichen Style-Files kann man dazu +das \texttt{docstrip}-Programm benutzen, mit dem auch alle +\LaTeXe\ Dateien dokumentiert wurden. Das Script +(\texttt{*.ins}) erzeugt aus dem Dokument (\texttt{*.dtx}) dann +eine Package (\texttt{*.sty}) oder Class (\texttt{*.cls}). +Die \texttt{dtx}-Datei dient gleichzeitig als Dokumentation. +Dadurch bleibt gew"ahrleistet das Package und +Dokumentation "ubereinstimmen. In den meisten F"allen gen"ugt es +aber, nur ein \texttt{sty}-File mit allen Kommentaren anzulegen. + + +\subsubsection{Verwendung der neuen Style-Option} + +Durch die Angabe des neuen Package-Namens im \verb|\usepackage|-Befehl +werden die "Anderungen f"ur das betreffende Schrift"-st"uck wirksam, +\dH~dieses wird im neuen Layout gesetzt. +Beispiel: +\begin{verbatim} + %Alte Version: + \documentstyle[11pt,twoside,german,refman]{article} +\end{verbatim} +wird zu: +\begin{verbatim} + %Neue Version: (LaTeX2e) + \documentclass[11pt,twoside,a4paper]{refart} + \usepackage{german} + %\usepackage{mysty} %<- Hier wird meine Package geladen +\end{verbatim} + +Davon abgesehen sollten keine "Anderungen im Eingabefile notwendig +sein -- es sei denn, das Schrift"-st"uck ent"-h"alt spezielle logische +Text-""Elemente, die im neuen Layout vorgesehen sind, aber in +Original-\LaTeX\ nicht unter"-st"utzt werden. + +\attention +Wenn man das Eingabefile an einen anderen Computer "ubertragen will, mu"s +man \emph{alle} darin verwendete Package-Files mit"-"ubertragen, damit +es auch dort verarbeitet werden kann. + +%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%% + +\subsection{Ein einfaches Beispiel (Gleichungsnummern)} + +Angenommen, Sie wollen, da"s in einem "`Article"' die Gleichungen innerhalb +jeder "`Section"' separat numeriert werden. + +Im \LaTeX-Manual finden Sie den Hinweis, da"s der "`Report"'-Style +etwas "Ahnliches pro "`Chapter"' macht. + +Sie schauen das File \texttt{report.cls} an und finden darin die +folgenden zwei Befehle, die sich -- wie in den Kommentarzeilen +angegeben ist -- auf die Gleichungsnummern beziehen:\nopagebreak +\begin{verbatim} + \@addtoreset{equation}{chapter} + \def\theequation{\thechapter .\arabic{equation}} + % In LaTeX2e ab 1995/06/01: + \renewcommand\theequation{\thechapter.\@arabic\c@equation} +\end{verbatim} +Es ist nicht notwendig, da"s sie diese beiden Befehle in allen Details +verstehen, +es gen"ugt, wenn Sie erkennen, da"s sich \texttt{chapter} in +beiden F"allen auf die Numerierung pro Kapitel bezieht. + +Sie legen ein File mit dem Namen {\tt eqpersec.sty} an,\footnote + {Je nach dem Computer, an dem Sie arbeiten, kann der Filename + eine andere Syntax haben, + \zB\ {\tt EQPERSEC\_STY} an einer CYBER unter NOS/VE.} +kopieren die Befehle in dieses File, ersetzen darin konsequent {\tt +chapter} durch {\tt section} und erhalten also die neuen +Definitionen\nopagebreak +\begin{verbatim} + % Dies ist equation_per_section.sty + % Kurzname: eqpersec.sty + % + % Gleichungszaehler am Anfang einer section + % zuruecksetzen. + \@addtoreset{equation}{section} + % Gleichungsnummer = sectionnummer.equationnummer + \def\theequation{\thesection .\arabic{equation}} + % oder: + \renewcommand\theequation{\thesection.\@arabic\c@equation} +\end{verbatim} +Nat"urlich f"ugen Sie auch noch Kommentarzeilen hinzu, die den Zweck des +Files erkl"aren und Ihren Namen als den Autor dieses neuen +Style-Option-Files sowie das "Anderungsdatum angeben. + +Wann immer Sie nun in Ihrem \LaTeX-""Eingabefile die Package {\tt +eqpersec} angeben, \zB~mit\nopagebreak +\begin{verbatim} +\documentclass[11pt]{article} +\usepackage{eqpersec} +\end{verbatim} +dann werden die Gleichungen in Ihrem Artikel nach dieser neuen +Konvention numeriert. + + +%%%%%%%%%% %%%%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%% %%%%%%%%%%%% + +\subsection{Ein etwas komplexeres Beispiel (Reference Manual)} +\label{refmanex} + +Wir wollen ein "ahnliches Seiten-Layout wie beim PostScript Reference +Manual erreichen: +mit einem breiten linken Rand, der f"ur "Uberschriften und Randnoten ben"utzt +wird, und mit nur einem eher knappen freien Rand oben, rechts und unten. + +Dies scheint eine sehr grundlegene "Anderung zu sein. Durch die gute +Modularit"at von \LaTeX\ sind aber auch f"ur eine solche Aufgabe nur relativ +wenige "Anderungen notwendig, die im folgenden komplett beschrieben werden. + + +\subsubsection{Seitenaufteilung} + +Die neue Seitenaufteilung wird im wesentlichen mit den im +\LaTeX-Manual beschriebenen Parametern festgelegt. In diesem Beispiel +verwenden wir dazu die Plain-\TeX-Befehle \verb|\newdimen|, +Wertzuweisung und \verb|\advance|, wir k"onnten aber genausogut auch die +entsprechenden \LaTeX-Befehle \verb|\newlength|, \verb|\setlength| +und \verb|\addtolength| verwenden. + +\pagebreak[2] + +\marginlabel{Horizontal:} +Zun"achst definieren wir zwei neue Bezeichnungen f"ur Gr"o"sen, +die im folgenden "ofter verwendet werden: + +\verb|\fullwidth| gibt die komplette Breite (Textbreite + gen"utzter linker +Rand) an und erh"alt denselben Wert wie in Plain~\TeX, n"amlich 6.5~Inch, +soda"s am Papier rechts und links noch jeweils 1~Inch freier Rand bleiben. +(Dies ist jetzt nat"urlich von der Papiergr"o"se abh"angig) + +\verb|\leftmarginwidth| gibt die Breite des Randes an, der links von der +normalen Textbreite f"ur "Uberschriften und Randnoten verwendet wird: +\begin{displaymath} +\texttt{leftmarginwidth} = \texttt{fullwidth} - \texttt{textwidth} +\end{displaymath} + +Da die entsprechenden Ma"se in Abh"angigkeit von der Papierbreite berechnet +werden, m"ochte ich hier auf eine genaue Beschreibung verzichten. Diese +Class wurde mit dem \texttt{docstrip}-Programm erstellt und erlaubt es +eine ausf"uhrliche Dokumentation zu erzeugen. (Allerdings in Englisch) + +\marginlabel{Vertikal:} +Das vertikale Layout wird abh"angig von der Papierh"ohe berechnet. Auch hier +m"ochte ich auf die Dokumentation zur Class verweisen. + +\vspace{0pt plus 1cm} + +\subsubsection{Kapitel-"Uberschriften} + +Die "Uberschriften von Sections, Sub- und Subsubsections sollen so +abge"-"an"-dert werden, da"s sie in den linken Rand hinausragen. + +Im File \texttt{classes.dtx} finden wir, da"s diese "Uberschriften durch +Aufrufe des Befehls \verb|\@startsection| definiert sind, dessen +Funktion auf den Kommentarzeilen beschrieben ist. F"ur uns relevant sind +nur folgende Parameter: +Der Absolutbetrag des vierten und des f"unften Parameters gibt den Abstand +vor bzw.\ nach der "Uberschrift an. Der sechste Parameter gibt an, wie der +Text der "Uberschrift gesetzt werden soll. +Der Befehl f"ur Sections ist \zB\ im Original so definiert:\nopagebreak +\begin{verbatim} +\newcommand\section{\@startsection + {section}{1}{\z@}% + {-3.5ex plus -1ex minus -.2ex}% + {2.3ex plus .2ex}% + {\normalfont\Large\bfseries}} +\end{verbatim} +und analog die Befehle f"ur Sub- und Subsubsections. +Die Anpassung an die jeweilige Schrift"-gr"o"se erfolgt automatisch durch +die Verwendung der relativen Einheit \texttt{ex}. + +Wir definieren zun"achst eine Abk"urzung \verb|\secshape| f"ur das neue +Layout aller dieser "Uberschriften. Die wesentliche "Anderung besteht darin, +da"s die "Uberschriften um die Breite des linken Randes weiter links als der +normale Text beginnen sollen. +Zu diesem Zweck setzen wir den linken Rand auf die entsprechende +negative Gr"o"se. Au"serdem wollen wir, da"s die W"orter in der "Uberschrift +nicht abgeteilt werden und da"s deshalb rechts kein Randausgleich +gemacht wird. +Dies erreichen wir mit den folgenden Befehlen, die im \TeX book +beschrieben sind:\nopagebreak +\begin{verbatim} +\def\secshape{\leftskip=-\leftmarginwidth + \rightskip=0pt plus 1fil + \hyphenpenalty=2000} +\end{verbatim} +Ein Aufruf dieses Befehls soll nun jeweils in den sechsten +Parameter von \verb|\@startsection| eingef"ugt werden. + +Da die "Uberschriften durch das Hinausragen in den linken Rand deutlich +genug vom normalen Text abgesetzt sind, m"ussen sie nicht durch so gro"se +Schrift und Abst"ande wie im Original hervorgehoben werden. +Wir verkleinern daher auch noch die entsprechenden Angaben im vierten, +f"unften und sechsten Parameter und erhalten schlie"slich die neue +Definition\nopagebreak +\begin{verbatim} +\newcommand\section{\@startsection + {section}{1}{\z@}% + {-2ex plus -1ex minus -.2ex}% + {0.5ex plus .2ex}% + {\secshape\normalfont\large\bfseries}} +\end{verbatim} +und analoge neue Definitionen f"ur Sub- und Subsubsections. + +\vspace{0pt plus 1cm} + +\subsubsection{Positionierung der Randnoten} + +Die Positionierung der Randnoten mu"s so abge"andert werden, da"s +\emph{alle} Randnoten in den linken Rand gesetzt werden -- unabh"angig +davon, ob es sich um eine rechte oder linke Seite und um eine normale +oder verkehrte Randnote handelt. + +Im File \texttt{latex.dtx} finden wir die viele Zeilen lange Definition +des Befehls \verb|\@addmarginpar|, der das Setzen der Randnoten +durchf"uhrt. Wir brauchen uns nicht um alle Details dieses komplizierten +Befehls zu k"ummern, wir m"ussen nur eines herausfinden: Im ersten Teil +des Befehls wird eine interne Gr"o"se \verb|\@tempcnta| entweder auf +\verb|\@ne| oder auf \verb|\m@ne| gesetzt, je nachdem, ob die Randnote +rechts oder links vom Text gesetzt werden soll. +Dazu dienen die folgenden Zeilen: +\begin{verbatim} + \@tempcnta\@ne + \if@twocolumn + \if@firstcolumn \@tempcnta\m@ne \fi + \else + \if@mparswitch + \ifodd\c@page \else\@tempcnta\m@ne \fi + \fi + \if@reversemargin \@tempcnta -\@tempcnta \fi + \fi +\end{verbatim} + +Diese Zeilen ersetzen wir also einfach durch die Zuweisung +\begin{verbatim} + \@tempcnta\m@ne +\end{verbatim} + +Die restlichen Zeilen, die das eigentliche Setzen der Randnote je nach +dem Wert von \verb|\@tempcnta| an die richtige Stelle der Seite +bewirken, lassen wir unver"andert. + +\subsubsection{Erweiterungen} + +Die hier angef"uhrten Definitionen gen"ugen durchaus f"ur einfache +Anwendungen. In der Praxis k"onnen allerdings noch einige Erweiterungen +n"utzlich sein. +\seealso{\ref{refman}} +Ein Beispiel f"ur eine solche "`komplette"' Style-Option ist in +Anhang~\ref{refman} beschrieben. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\input lay_d2 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\printindex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/refman/layout_e.pdf b/Master/texmf-dist/doc/latex/refman/layout_e.pdf new file mode 100644 index 00000000000..251c1e2e599 Binary files /dev/null and b/Master/texmf-dist/doc/latex/refman/layout_e.pdf differ diff --git a/Master/texmf-dist/doc/latex/refman/layout_e.tex b/Master/texmf-dist/doc/latex/refman/layout_e.tex new file mode 100644 index 00000000000..e55c09a3f31 --- /dev/null +++ b/Master/texmf-dist/doc/latex/refman/layout_e.tex @@ -0,0 +1,674 @@ +% % +% LAYOUT_E.TEX - Short description of REFMAN.CLS +% 99-03-20 +% +% Updated for REFMAN.CLS (LaTeX2e) +% +\documentclass[twoside,a4paper]{refart} +\usepackage{makeidx} +\usepackage{ifthen} +% ifthen wird vom Bild von N.Beebe gebraucht! + +\def\bs{\char'134 } % backslash in \tt font. +\newcommand{\ie}{i.\,e.} +\newcommand{\eg}{e.\,g.} +\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} + +\title{Changing the layout with \LaTeX} +\author{EDV-Zentrum der TU Wien, Abt.~Digitalrechenanlage \\ +Hubert Partl \\ +1988-10-04 \\ +English translation by\\ +Axel Kielhorn\thanks{a.kielhorn@web.de}\\ +1999-03-20 \\ +H27.0 --- Version 1} + +\date{} +\emergencystretch1em % + +\pagestyle{myfootings} +\markboth{Changing the layout with \rm\LaTeX}% + {Changing the layout with \rm\LaTeX} + +\makeindex + +\setcounter{tocdepth}{2} + +\begin{document} + +\maketitle + +\begin{abstract} + This document describes the capabilities of the + \texttt{refart} and \texttt{refrep} classes for \LaTeXe. + These classes do not work with \LaTeX\ 2.09. They contain some + improvements over the original \texttt{refman} style which may result + in different output and minor incompatibilities, but make refman + work with paper sizes other than ISO A4, which I consider an + improvement. +\end{abstract} + + +This manual is an addition to chapter~5 (``Designing It Yourself'') of +the \LaTeX-manual by Leslie Lamport. It was originally written in +1988 by Hubert Partl and updated by me during the developement of +\texttt{refman}~2.0. The translation into english was done in summer +1998, almost 10 years after the initial release in german. + +\tableofcontents + +\newpage + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Introduction} + +\subsection{Author, Layout Designer and Compositor} + +Every piece of writing -- from a short handwritten note to a printed +book -- consists of two components: \textbf{contents} and +\textbf{design.} In most cases the design is only a means to allow +the reader to understand the contents easier. + +\index{author}\marginlabel{Author:} +The \textbf{contents} will be written by the author of the document. +She usually is supported by the publisher who issues guidelines +about how the document should be written and conducts proofreading. + +When using \LaTeX\ the contents appears in the main part of the +document -- between \verb|\begin{document}| and \verb|\end{document}| +-- with some additional \LaTeX-commands that describe the meaning of +the different parts. + +\index{designer}\marginlabel{Designer:} +The \textbf{design} of a printed document is usually defined by the +publisher who employs designers for this purpose. + +The layout is defined in so-called class files. When writing a +document you have to specify the class you want to use with the +\verb+\documentclass+ command. + +The document classes distributed with \LaTeX\ have been designed by +american layout designers according to the conventions used in the +USA. The ``Koma-Script'' classes have been adapted to european taste +and contain a lot of small improvements. + +\index{compositor}\marginlabel{Compositor:} +The compositor takes the contents from the author and formats it +according to the layout the designer specified. + +When using \LaTeX, this job is done by the \TeX\ program and the +printing is done by a device driver. + +\subsection{Changing the Layout} + +If you want to use a layout different from the ones distributed with +\LaTeX, you have to take the following steps: + +\begin{enumerate} + +\item + The layout has to be defined. + This is usually a job for a professional designer. + +\seealso{\ref{design}} + You can find detailed information about how change the design in + chapter~\ref{design}. + +\item + The Layout has to be programmed in \LaTeX. This can either result in + a ``package'' that changes the behaviour of a standard class or + in the definition of a new ``class''. \texttt{Refman} used to be a + package that changed the definition of the \texttt{article} + class but is now a class of it's own. When writing a new class, you + will have more work but as a result more freedom to change things. + +\seealso{\ref{layout}} + Chapter~\ref{layout} contains more information about the new layout. + +\end{enumerate} + +\section{The Art of Layout-Design} +\label{design} +\label{Layout-Design} +\index{layout design} + +\subsection{Common Rules} +\index{rules} + +There are almost no common rules because every kind of documents has +different requirements and needs a specific layout. This layout +should consider \emph{who} will read the document \emph{how}. + +An important criteria is if the reader will read the document from +start to end like a detective novel (linear reading) or if he wants to +find a certain information like in a telephone directory or a +reference manual. \index{manual}\index{telephone directory} + +In addition to that, the layout has to consider certain conventions, +like the habits of the reader or ``Corporate Design'' \index{corporate +desing} rules that distinguish publications from different publishers. +\footnote{Compare the layout of different daily papers or magazines +like ``page'' or ``invers''.} + +\attention +The main purpose of a layout is to make sure the reader finds the +information he wants and is able to read and understand them easily. +The structure, readability and consistence of a document is more +important than it's ``beauty''.\footnote{This is not always true for +adverts that usually contain no information at all and picture +magazines where the beauty of the picture \emph{is} the contents.} + +The following ``rules of thumb''\index{rules of thumb} will be valid +for most applications: + +\begin{description} + +\item[Linespacing]\index{linespacing} + The spacing between two lines should be larger than the spacing + between two words to guide the eyes of the reader. + +\item[Linelength]\index{linelength} + The length of a line -- or when using multicolumn layout of a + column -- should be about 60 characters. When lines get longer they + are more difficult to read and it is easier to go to the wrong line + after finishing the current. Increasing the linespacing may help a + little. + When lines get to short it is difficult to set them justified and you + will get lots of hyphenated words. + +\item[Pagelayout]\index{pagelayout} + Normal text pages should look the same throughout the document. + Figures, tables and special pages like the index need not appear in + the same layout but should take as much space as needed. + +\item[Margin notes]\index{margin notes} + Margin notes are often more suitable than footnotes because they + appear right next to the text they refer to. Special margin notes are + the ``attention sign'' or the ``dangerous bend'' that guide the user + to important parts of the text. + +\item[Headings and Footings]\index{headings}\index{footings} + Headings and footings should make it easier to orientate in the + document. If you expect readers to copy single pages from the + document they should contain information about the paper as a whole, + just in case you need more information or want to cite the whole paper. + + If you expect the document to change often (like software + manuals), each page should contain a version information or at + least a date. + +\end{description} + +\subsection{Special note for technical descriptions} + +Let us compare three different layouts and check if they are usable for +technical descriptions, User's guides and reference manuals. +\footnote{This hint came from Paul Stiff who teaches layout design at +the University of Reading.} + +\begin{description} + +\item[Plain \TeX] + The standard format use by plain \TeX\ has the great disadvantage + that the lines are much to long which reduces the readability. + +\item[Standard-\LaTeX] + The format used by \LaTeX{}s standard classes isn't ideal. The + linelength is correct, but that leaves us with a wide unused margin. + The font used for section headings is too large. The Koma-Script + classes improve this and offer many ways to configure the fonts. + This is a good design for a paper one usually reads from start to + end. + +\item[Reference Manual Style] + A new design that appeared some years ago and is used in recent + reference manuals, is much more suited for our purpose. + \footnote{The ``PostScript Reference Manual'' is one document that + uses such a design.} +\begin{itemize} +\item + The text is printed in rather short lines in the right part of the + page. This part is used for continuous reading. +\item + The wide left margin is used for headings and margin notes. Since + you now have a wide margin it is easier to use long margin notes to + supply additional information and to lead the reader to important + parts of the documents. Please note that the margin is always on the + left side thus twosided printing does not look symmetrical. This is + done on purpose because the reader will always start reading at the + left side and with this layout section headers really ``stand out''. + In a symmetrical layout, half the headers would be buried in the text. +\item + Figures and tables are either inside the text column, the margin or, + if necessary fill the whole page. +\end{itemize} + +\seealso{\ref{refmanex}} +Section~\ref{refmanex} describes how to implement such a layout in +\LaTeX. + +\end{description} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\section{How to change a \LaTeX\ layout?} +\label{layout} + +\subsection{Advantages and Disadvantages of the text processing system \LaTeX} + +\marginlabel{Advantages:} The big advantage of \LaTeX\ is, that it +implements a ``generic'' or ``logical'' design.\index{design, +logical}\index{design, generic} This means that the author has to +specify the \emph{meaning} of special parts of the test like: +headings, citations, lists, literature references and so on. These +logical definitions will be processed by the system and printed in +the ``correct'' way. The meaning of correct is defined in the +document class and additional packages. + +The opposite of this is the ``visual'' design\index{design, visual} +that most text processors use. Here the author has to know the correct +way to set certain parts of the text and take care of the correct +printing. + +The logical design makes it easier for the author to write +consistent documents (\ie\ same font and fontsize for section headings +of the same level, same layout for lists and enumerations, \dots) + +\marginlabel{Disadvantages:} +The main disadvantage of \LaTeX\ is that the author has only limited +means to change the layout and that she has only four classes to +choose from. This has changed a lot with the appearance of the +Script classes for \LaTeX\ 2.09 in 1992 which have been replaced by +the even further improved Koma-Script classes for \LaTeXe. + +Another disadvantage is that \LaTeX\ seems to be tied to the +``Computer modern'' font family. This is simply not true, at least +not, when you have a PostScript printer. Setting up different fonts +isn't an easy task but once they are installed they are as easy +to use as the standard fonts. + +But \LaTeX\ is much more powerful and flexible: you can define an +arbitrary design by changing the definitions in the class files or +overwrite them by packages. This is easier than you may think and +happens more often than you think. Many universities and publishers +have their own \LaTeX\ class but do not distribute it to the +world.\footnote{You can find a generic \texttt{elsevier.cls} on CTAN +which you can use to prepare article before submission. This will be +replaced by the magazine specific class at the publisher.} + + +\subsection{Input files and class files} + +According to the principle of separation between contents and design +there are two kind of files: + +\begin{itemize} +\item + The contents and the logical structure of a document is defined in + the \LaTeX\ input file. +\item + The design (layout) is defined in the class files and packages. +\end{itemize} +Which class and packages files a document will use is defined at the +beginning of the input file. The \verb|\documentclass| command +selects the class, the \verb+\usepackage+ command specifies +additional packages. + +To generate a paper you need at least two files, the input file an a +class file. + +These two files represent the work of the author and designer as +explained in the introduction. Even if the author and the designer are +the same person, this has some advantages: + +\begin{itemize} +\item + Similar documents (that appear in a series) have the same layout + because the layout is defined in a file of its own and not part of + the document. +\item + You can print the same contents without much work in different + layouts, \eg\ as an article for a magazine and as a chapter for a + dissertation. +\end{itemize} + +\subsection{Class files and Packages} + +\LaTeX\ supports a hierarchy of layout definitions. +\begin{itemize} +\item + The first file processed is the class file that is specified inside + the curly braces of the \verb|\documentclass| command. This + defines the kind of document you want to write. +\item + The optional argument of the \verb|\documentclass| command inside + the square brackets defines class options which select variants of + the basic layout like different font sizes. +\item + The last step is reading the packages specified by the + \verb|\usepackage| command. This command again takes options to + select the layout. +\item + You can change layout parameters in the input file, but this is + discouraged because it violates the principle of separation between + contents and design. + +\end{itemize} + +There are some important differences between class and package files +and ``normal'' input files: +\begin{itemize} +\item + Class and package files should only contain definitions. They must + not output text. +\item + The ``at''-sign \texttt{@} is treated as a letter and therefore may + appear in command names. Most internal commands of \LaTeX\ contain + an \texttt{@} to prevent the author from using them accidently. +\item + The extension of the file is \texttt{.cls}, \texttt{.clo} or + \texttt{.sty} instead of \texttt{.tex}. +\end{itemize} + +\subsection{Changing the layout, step by step} +\index{changing the layout, step by step} + +It is usually easier to change existing class files instead of +writing a new one from scratch. In many cases it is even sufficient +so replace some definitions and put them into a packages instead of +creating a new class. + +Please note, that you are \emph{not} allowed to change the standard +classes distributed with \LaTeX. You \emph{have} to change the name +when you want to make changes. That is another reason to put small +changes in packages. + +\subsubsection{Defining the differences between the desired and +the available layout} + +The first step is to define the difference between the layout you have +and the layout you want. + +\subsubsection{Finding the original definition} + +The next step is to find out where the original layout is defined. It +is best to search the files in the following order:\footnote{This hint +came from Sue Brooks, who held a workshop for ``\LaTeX-Hacker'' at the +1988 \TeX-conference in Exeter.} +\begin{enumerate} +\item the \LaTeX\ manual by Leslie Lamport, +\item the \LaTeX\ documentations files \texttt{*.dtx} for the classes +or packages +\item the \LaTeX\ documentations files \texttt{*.dtx} for the kernel, +\item the \TeX book by Donald E.~Knuth. +\end{enumerate} + +The files are usually documented quite well so you should be able to +change things even if you don't understand everything. + + +\subsubsection{Writing a new package file} + +The third step is to create a new package. You choose an appropriate +name for the package (like \texttt{mysty}) and create a filename by +adding the extension \texttt{.sty}. + +This file will only contain the definitions you want to change or the +new commands you want to define. + +If you want to change definitions or certain parameters the best way +is to copy them from the original file and modify them according to +your liking. + +Defining new commands is easier when you find similar commands in the +original files which you can change. + +It is always a good idea to include the reason you wrote the package, +the changes it makes and the new commands it defines in the file. You +should include the date of the last change and the \LaTeX\ version it +works with just in case some internal \LaTeX\ commands you use will change. + +When writing larger packages, it is an even better idea to use the +docstrip program which is used to document the \LaTeXe\ files. Thus +you have your code and documentation in one file and it's easier to +prevent them from going out of sync. + +\subsubsection{Using the new package} + +To use the new package, you call it with the \verb|\usepackage| command. +This command executes the code of your package and changes the layout +as desired. + +Example: + +\begin{verbatim} + \documentclass[11pt,twoside,a4paper]{article} + \usepackage{mysty} %<- This calls the package "mysty" +\end{verbatim} + +You shouldn't need to change anything else in your input file, unless +you defined new commands or environments that are not available in +standard \LaTeX. + +\attention +When you copy your input file to a different computer you have to +include your new packages as well. Otherwise the document can't be +processed. + +%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%% + +\subsection{A simple example (Equation numbers)} + +Let's assume that you want to write an article where the equations are +numbered separately in every section. In the \LaTeX\ manual you find a +notice that the report class does something similar for every chapter. + +Looking into the file \texttt{report.cls} you will find the following +commands that deal with equation numbers:\nopagebreak +\begin{verbatim} + \@addtoreset{equation}{chapter} + \def\theequation{\thechapter .\arabic{equation}} + % or in LaTeX2e since 1995/06/01: + \renewcommand\theequation{ + \thechapter.\@arabic\c@equation + } +\end{verbatim} + +You don't necessarily need to understand these two commands in detail. + +Now you create an new file with the name +\texttt{eqpersec.sty}\footnote{Depending on the computer you are using +the name may be different like \texttt{EQPERSEC\_STY} on a CYBER +running NOS/VE. But note that you must not use spaces in the +filename.} and copy the commands above into that file. After that +you replace every occurrence of \texttt{chapter} with \texttt{section} +and add some comments.\nopagebreak +\begin{verbatim} + % This is equation_per_section.sty + % Short name: eqpersec.sty + % Original file by Hubert Partl 1988 + % Modified by Axel Kielhorn 1996/01/01 + % to support LaTeX 1995/06/01 and later + % + % reset the equation counter at the start + % of a new section + % + \@addtoreset{equation}{section} + % Equationnumber = sectionnummer.equationnummer + % Use only one of the below + % depending on you LaTeX version + % + %\def\theequation{\thesection .\arabic{equation}} + % or in more recent versions of LaTeX + \renewcommand\theequation{ + \thesection.\@arabic\c@equation + } +\end{verbatim} + + +Whenever you use a \verb|\usepacakge{eqpersec}| command as in +\nopagebreak +\begin{verbatim} +\documentclass[11pt]{article} +\usepackage{eqpersec} +\end{verbatim} +you will get equations numbered according to you conventions. + + +%%%%%%%%%% %%%%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%% %%%%%%%%%%%% + +\subsection{A more complex example (Reference Manual)} +\label{refmanex} + +We want to create a layout similar to the one used in the PostScript +Reference Manual, with a wide left margin for headings and margin +notes and a small margin at the right and bottom. + +\subsubsection{Page layout} + +To define the new layout we use the commands described in the \LaTeX\ +manual. For full details see the file \texttt{refman.dtx}. + +%\pagebreak[2] + +\marginlabel{Horizontal:} +First we define two new names for length that we will use often: + +\verb|\fullwidth| is the width of the whole page minus a margin of 1~inch +on every side. +% +\begin{displaymath} +\texttt{fullwidth} = \texttt{paperwidth} - 2\ \textrm{inch} +\end{displaymath} +% +From this the width of the text is calculated. +% +\begin{displaymath} +\texttt{textwidth} = \texttt{fullwidth} \times \texttt{textfraction} +\end{displaymath} +% +\verb|\leftmarginwidth| is the width of the left margin that will be +used for headings and margin notes. +\begin{displaymath} +\texttt{leftmarginwidth} = \texttt{fullwidth} - \texttt{textwidth} +\end{displaymath} +% +This is a little more difficult in reality because the length have to +be rounded to full points and a possible twocolumn layout -- as used +in the index -- must be taken into consideration. + +\marginlabel{Vertical:} +The vertical layout is a little more difficult because you have to +deal with the page header and footer. +% +\begin{displaymath} +\texttt{textheight} = \texttt{paperheight} - 2.5\ \textrm{inch} +\end{displaymath} +% +The result of this calculation is rounded to full lines. Depending on +the pagestyle -- headings or footings -- it is shifted up or down by one +line. + +\vspace{0pt plus 1cm} + +\subsubsection{Section headings} + +The headings have to be modified to make them extend into the left +margin. + +In file \texttt{classes.dtx} we find the \verb|\@startsection| command +that defines the layout of the headings. Only parameters 4 to 6 are +relevant for us: parameter 4 is the space above and parameter 5 the +space below the section. The 6th parameter does the actual formatting. + +This is the original definition:\nopagebreak +\begin{verbatim} +\newcommand\section{\@startsection + {section}{1}{\z@}% + {-3.5ex plus -1ex minus -.2ex}% + {2.3ex plus .2ex}% + {\normalfont\Large\bfseries}} +\end{verbatim} + +The commands for sub- and subsubsections are similar. Note that the +measures are all in \texttt{ex} thus depending on the fontsize used. + +We define a new command \verb|\secshape| to format the headings. This +command uses the whole width of the page for the heading. To discourage +hyphenation of the heading we give it a high penalty. This still +allows hyphenation when absolutely needed. + +\begin{verbatim} +\newcommand\secshape{% + \leftskip=-\leftmarginwidth% + \rightskip=\@flushglue% + \hyphenpenalty=2000} +\end{verbatim} + +This command is inserted into the 6th parameter of \verb|\@startsection|. + +Since the headings now extend into the left margin, we can use a +smaller font and reduce a space between the text and the heading. The +new definition looks like the following:\nopagebreak +\begin{verbatim} +\newcommand\section{\@startsection + {section}{1}{\z@}% + {-2ex plus -1ex minus -.2ex}% + {0.5ex plus .2ex}% + {\secshape\normalfont\large\bfseries}} +\end{verbatim} + +\vspace{0pt plus 1cm} + +\subsubsection{Setting the margin notes} + +The margin notes should always appear on the left side of the text. +The normal layout puts them into the outer margin in twoside layout. + +The file \texttt{latex.dtx} contains the definition of the +\verb|\@addmarginpar| command which is responsible for the margin +notes. We don't have to understand the whole definition, the important +part is the internal variable \verb|\@tempcnta| that is either +\verb|\@ne| (1) when the note should appear on the right side of the +text or \verb|\m@ne| ($-1$) when it should appear on the left side. + +This is done by the following lines: +\begin{verbatim} + \@tempcnta\@ne + \if@twocolumn + \if@firstcolumn \@tempcnta\m@ne \fi + \else + \if@mparswitch + \ifodd\c@page \else\@tempcnta\m@ne \fi + \fi + \if@reversemargin \@tempcnta -\@tempcnta \fi + \fi +\end{verbatim} + +which we simply replace by: +\begin{verbatim} + \@tempcnta\m@ne +\end{verbatim} + +The remaining lines that handle the setting of the margin note +depending on the parameter \verb|\@tempcnta| are left unchanged. + +\subsubsection{Extensions} + +The definitions described above are sufficient for simple applications +but in practical use one may want some additional commands. +\seealso{\ref{refman}} You will find the description for the whole new +class in the appendix~\ref{refman}. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\input lay_e2 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%\printindex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/refman/refman.upl b/Master/texmf-dist/doc/latex/refman/refman.upl new file mode 100644 index 00000000000..0bfcd534eb8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/refman/refman.upl @@ -0,0 +1,146 @@ +This is version 2.0d[2003/05/31] of the refman class family for LaTeX2e + +Refman is based on classes.dtx (1.4a) and the Refman.sty version 1.1. + +This new class is a class by it's own and no style-option. +I've made this change to support some things which would have +been difficult with a style-option. + +The new class consists of +refart.cls an article-like style (former refman-s) +refrep.cls a report-like style (former refman) + +There is only a little difference between refart and refrep: + +Refrep supports chapters, has a titlepage by default and uses +chaptermark and sectionmark in footings and headings. +Refrep supports \pageperchapter + +Refart supports an optional titlepage and uses sectionmark +and subsectionmark in footings and headings. + +Changes: +======== + +Both classes support different papersizes in the same way as the +original LaTeX2e-classes, including the landscape option. +There is a new option to produce a square-layout. + +The pagelayout is not 100% compatible to refman.sty due to the +multiple-papersize-support. +The running head and foot is not compatible to refman.sty. + +I've changed the footnote-layout since a not indended footnote- +layout fits better to a not indended textlayout. (There have been lots of +fixed for the footnote layout, seems to be a reall problem.) + +I've tried to support an index-environment. +The index is set in twocolumn-layout. + +The maketitle-command sets title *and* autor *and* date. If you +don't want the date use \date{} before calling \maketitle. + +I've followed the example of Markus Kohm and renamed the classes +to refart.cls and refrep.cls. Thus it is easier to remember what is +what and it can't be confused with refman.sty + +Obsolete commands: +================== + +The command setleftmarginwidth is no longer supported. There is no +use setting the leftmargin to a fixed value if you don't know +the fullwidth. (See new commands) + +The makeauthor is no longer supported, this is done by maketitle. + +New commands (not in refman.sty v. 1.1) +======================================= +There are some commands I consider usefull in a reference +manual style: + +\pageperchapter +This will give you new pagenumbers each chapter, +looking like 1-1, 1-2, 1-3, 2-1 ... +Prefacepages will be numberer 1,2,3 since 0-1 is not desireable. +The pagepc-package will implement this for the LaTeX-standard +classes. (This is still experimental and does not work well +with MakeIndex) + +A hack to make MakeIndex happy is included, but sadly MakeIndex +can no longer use the "|" command anymore since it is used to +format the indexentries. + +\settextfraction{fraction} +This will reset the horizontal layout, giving you a textwidth +of fraction*fullwidth. The restriction to lines with 60-70 chars has +been removed. + +Both commands should only be used in the preamble. + +History: +======== + +1.9 a Included redefinition of pagestyle{plain} for twoside printing +1.9 b Refman now works with LaTeX2e [1994/06/01] and is in sync + with classes 1.2 s +1.9 c Fixed refman: There should be an opening { in markright + (every pagestyle, except for plain and empty) + Moved changing of topmargin inside ps definition +1.9 d Fixed the pagestyles for oneside printing + Changed chapter layout (uses fullwidth now) + Changed typeout to ClassError where needed +1.9 e Renamed refman to refrep and refman-s to refart. + Cleaned up fullwidth-environment, now it works on + even-sides too:-) + Added \pageperchapter to refrep.cls + Added \settextfraction + Removed ref{10|11|12}.clo. Refman is now using the + size{10|11|12}.clo files. +1.9 f Synced with classes.dtx v. 1.2x + Ref{art,rep} needs now LaTeX2e[1994/12/01] + Pagestyle plain does not center the pagenumber, it is + always printed at the outside-margin. + Documentation added (layout.tex layout2.tex) +1.9 g Final test release synced with LaTeX2e[1995/06/01] + (Classes.dtx v.1.3e) + Pagestyle plain did center the pagenumber in one-side + documents, fixed it this time. + Fixed fullpage-environment to reset leftmarginwidth and + set hsize to the correct value. (You may now start a new + chapter inside a fullpage environment.(Not encouraged)) + Made settextfraction an onlypreamble-command. + Changed the \pageperchapter-command and included pagepc.sty + which can be used with other LaTeX2e-classes (like report + and scrreprt) In pageperchapter-mode, the index will be in + a chapter of it's own and no longer belong to the last + appendix. +1.9 h Corrected some typos where the a in normalfont was missing + Added my e-mail address to the dtx-file, so bug reports can + reach me faster. Corrected typo in condbreak (There is seems to + be at least one user who uses it) + Synced with classes 1.3p, thus saving some memory. +1.9 i Corrected footnote in titlepage (refart only) + Removed . after the chapternumber. + Changed format of chapter-title. It now hangs after the + chapter number. +1.9 k Corrected appendix in refrep. Now the chapter-counter is used + to generate the chapter-number +1.9 l Again fixes to to the footnote-layout of refart. Now titlepage + and normal text use the same code. +1.9 m Added a forgotten \ to listfigurename +2.0 Synced with Classes 1.3u +2.0a Added missing \renewcommand\thetable in refrep +2.0b Added english documentation, changed layout of footnote again + (Added more space between footnotesymbol and text) Changed the + footnote layout on the titlepage to be compatible with the + footnotelayout used within the class. +2.0c Changed the licence to "LaTeX Project Public License" + Fixed some typos in the documentation + \attention now takes an optional argument + Added \attentionsymbol to allow the use of different symbols for the + \attention command + Added the manfnt package to access symbols from the manfnt font + The manfnt package has been removed from refman. it is now a package + of it's own. No other file has changed, the version number is + unchanged. +2.0d Fixed a typo using the wrong penalty, updated e-mail address. -- cgit v1.2.3