| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright 2000 by Hanspeter Schmid |
| 4 |
% |
| 5 |
% This file may be distributed under the terms of the |
| 6 |
% GNU General Public License. The latest version of this license |
| 7 |
% can be found at http://www.gnu.org/copyleft/gpl.html |
| 8 |
% |
| 9 |
% \fi |
| 10 |
% \iffalse |
| 11 |
% |
| 12 |
%<*driver> |
| 13 |
% \fi |
| 14 |
\ProvidesFile{hpsdiss.dtx}[2000/10/26 v1.0 Hanspeter's dissertation style] |
| 15 |
% \iffalse |
| 16 |
\documentclass{ltxdoc} |
| 17 |
\GetFileInfo{hpsdiss.dtx} |
| 18 |
\title{hpsdiss: Dissertation class for ETH Z\"urich} |
| 19 |
\date{\filedate} |
| 20 |
\author{% |
| 21 |
Hanspeter Schmid, [email protected]} |
| 22 |
\begin{document} |
| 23 |
\maketitle |
| 24 |
\DocInput{\filename} |
| 25 |
\end{document} |
| 26 |
%</driver> |
| 27 |
% \fi |
| 28 |
% |
| 29 |
% \CheckSum{1517} |
| 30 |
% |
| 31 |
% \section{Please \ldots} |
| 32 |
% |
| 33 |
% rename this class when you make \emph{any} changes. I absolutely |
| 34 |
% don't want different versions floating around. I will not give |
| 35 |
% any support to anybody who breaks this rule. |
| 36 |
% Questions? Use e-mail, my address is |[email protected]|. |
| 37 |
% |
| 38 |
% \section{Introduction} |
| 39 |
% |
| 40 |
% I developed this \LaTeX\ class to typeset my own dissertation at the |
| 41 |
% ETH Z\"urich. I was never satisfied with the conventional layout, |
| 42 |
% which was to fill an A5 page with a font size of 10pt. Then the lines |
| 43 |
% become too long, in my opinion. |
| 44 |
% |
| 45 |
% The class |hpsdiss.cls| produces shorter lines, has wide outer |
| 46 |
% margins, and prints section numbers, figure and table numbers, and of |
| 47 |
% course margin notes into these wide margins. In my dissertation, |
| 48 |
% I used the command |\Abstract| (see |
| 49 |
% below) to give every single paragraph its little abstract in the |
| 50 |
% margin, as an aid for the reader who browses through the book and also |
| 51 |
% to communicate what the main idea behind every paragraph is. |
| 52 |
% |
| 53 |
% Other features of this class are: |
| 54 |
% \begin{itemize} |
| 55 |
% \item It can typeset everything with a ragged right margin (that's how I |
| 56 |
% prefer it). |
| 57 |
% \item It redefines the environments |sidewaysfigure| and |
| 58 |
% |sidewaystable| such that they produce sensible captions. |
| 59 |
% \item It provides several commands to let material extend into the |
| 60 |
% margins (figures, tables \ldots). |
| 61 |
% \item It provides a special chapter title page that contains the |
| 62 |
% title, a quote, and a chapter abstract. |
| 63 |
% \item It provides a special environment |bkgnd| for historical and |
| 64 |
% personal information, which uses a different font to differ it |
| 65 |
% optically from the purely scientific part of the dissertation. |
| 66 |
% \item It has an option |specialfonts| that switches to a nice font |
| 67 |
% combination: Times for main text, Gill Sans for headings, and Codex |
| 68 |
% for the background information. Unfortunately, this option is |
| 69 |
% useless for most users, since it relies on fonts that are not in the |
| 70 |
% public domain. |
| 71 |
% \item It generates the official title page of the dissertation |
| 72 |
% ``Series in Signal and Information Processing,'' and also the back |
| 73 |
% of the book. |
| 74 |
% \end{itemize} |
| 75 |
% |
| 76 |
% Many things in this class are configurable by class options, and it |
| 77 |
% also provides several commands. The commands and environments that |
| 78 |
% are interesting for the users of this class are marked in the margin |
| 79 |
% and are described there. |
| 80 |
% |
| 81 |
% \StopEventually{} |
| 82 |
% |
| 83 |
% \changes{v1.0}{2000/10/26}{Generated from my old hpsdiss.cls} |
| 84 |
% |
| 85 |
% \begin{macrocode} |
| 86 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 87 |
\ProvidesClass{hpsdiss}[2000/10/26 PhD thesis class by Hanspeter Schmid] |
| 88 |
% \end{macrocode} |
| 89 |
% |
| 90 |
% \section{Class Options} |
| 91 |
% |
| 92 |
% This class bases on book.cls, and almost all options that it does not |
| 93 |
% understand itself are passed on to |book.cls|. Only the option |
| 94 |
% |twocolumn| is rejected, because it does not make sense. Font size |
| 95 |
% options like |11pt| \ldots should not be used, since the font sizes |
| 96 |
% are hard-wired. |
| 97 |
% |
| 98 |
% |hpsdiss| has quite a few options of its own. |raggedright| lets all |
| 99 |
% text appear with a ragged right margin, using the macro |\RaggedRight| |
| 100 |
% from the package |ragged2e|. |specialfonts| is described above. |
| 101 |
% |
| 102 |
% Most options are there to determine what the title page looks like. |
| 103 |
% The options belong to three sets: language, gender, and degree. The |
| 104 |
% default language is English, other languages can be used with the |
| 105 |
% options |deutsch|, |italiano|, and |francais|. The default gender of |
| 106 |
% the author is male, use the option |female| if you're a woman. This |
| 107 |
% plays a role in conjunction with the options |deutsch| and |francais|. |
| 108 |
% The default doctoral degree is ``Doctor of Technical Sciences,'' use |
| 109 |
% the option |scnat| for ``Natural Sciences'' and |scmath| for |
| 110 |
% ``Mathematics.'' |
| 111 |
% |
| 112 |
% \begin{macrocode} |
| 113 |
\DeclareOption{twocolumn}{% |
| 114 |
\@latex@warning{hpsdiss.cls does not accept the option `twocolumn'.}% |
| 115 |
\OptionNotUsed} |
| 116 |
\DeclareOption{raggedright}{\newcommand{\TextAlignment}{\RaggedRight}} |
| 117 |
\DeclareOption{specialfonts}{\newcommand{\SpecialFonts}{\relax}} |
| 118 |
\DeclareOption{deutsch}{\newcommand{\DT@deutsch}{\relax}} |
| 119 |
\DeclareOption{francais}{\newcommand{\DT@francais}{\relax}} |
| 120 |
\DeclareOption{italiano}{\newcommand{\DT@italiano}{\relax}} |
| 121 |
\DeclareOption{scnat}{\newcommand{\DT@scnat}{\relax}} |
| 122 |
\DeclareOption{scmath}{\newcommand{\DT@scmath}{\relax}} |
| 123 |
\DeclareOption{female}{\newcommand{\DT@female}{\relax}} |
| 124 |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} |
| 125 |
\PassOptionsToClass{twoside}{book} |
| 126 |
\ProcessOptions |
| 127 |
\LoadClass{book} |
| 128 |
% \end{macrocode} |
| 129 |
% |
| 130 |
% This packages requires several other packages that we now |
| 131 |
% load: |geometry| to set the page |
| 132 |
% layout, |calc| for arithemtics within arguments, |ragged2e| for |
| 133 |
% producing ragged-right text, |rotating| for tables and figures |
| 134 |
% that are turned sideways, and |mparhack| such that the margin |
| 135 |
% paragraphs work (more) properly. Finally, |graphicx| and |
| 136 |
% |colordvi| are required for the title page. |
| 137 |
% |
| 138 |
% \begin{macrocode} |
| 139 |
\RequirePackage{geometry} |
| 140 |
\RequirePackage{calc} |
| 141 |
\RequirePackage{ragged2e} |
| 142 |
\RequirePackage{rotating} |
| 143 |
\RequirePackage{mparhack} |
| 144 |
\RequirePackage{graphicx} |
| 145 |
\RequirePackage{colordvi} |
| 146 |
% \end{macrocode} |
| 147 |
% |
| 148 |
% \section{Page Layout} |
| 149 |
% |
| 150 |
% \begin{macro}{\MarginParWidth} |
| 151 |
% \begin{macro}{\MarginParSep} |
| 152 |
% \begin{macro}{\TotalWidth} |
| 153 |
% |
| 154 |
% The page is laid out as a main text block with a 26-mm outer margin |
| 155 |
% to be printed on A5 paper. These dimensions can be changed by modifying |
| 156 |
% |\MarginParWidth|, |\MarginParSep|, and |\TotalWidth|, but please don't |
| 157 |
% change this unless you are prepared to find out what else you need to |
| 158 |
% change as well. |
| 159 |
% |
| 160 |
% \begin{macrocode} |
| 161 |
\newcommand{\MarginParWidth}{26mm} |
| 162 |
\newcommand{\MarginParSep}{4mm} |
| 163 |
\newcommand{\TotalWidth}{118.5mm} |
| 164 |
\geometry{paper=a5paper,dvips=true,twoside=true} |
| 165 |
\geometry{width=\TotalWidth,height=192mm,top=7mm,twosideshift=7mm} |
| 166 |
\geometry{headheight=4mm,headsep=9mm} |
| 167 |
\geometry{nofoot} |
| 168 |
\geometry{marginparsep=\MarginParSep,marginparwidth=\MarginParWidth} |
| 169 |
% \end{macrocode} |
| 170 |
% \end{macro} |
| 171 |
% \end{macro} |
| 172 |
% \end{macro} |
| 173 |
% |
| 174 |
% \begin{macro}{\CapFont} |
| 175 |
% \begin{macro}{\CapNumFont} |
| 176 |
% \begin{macro}{\SecFont} |
| 177 |
% \begin{macro}{\SecNumFont} |
| 178 |
% \begin{macro}{\ChapFont} |
| 179 |
% \begin{macro}{\TitleFont} |
| 180 |
% \begin{macro}{\HeaderFont} |
| 181 |
% \begin{macro}{\BackgroundFont} |
| 182 |
% |
| 183 |
% The following macros define, in this order, the fonts used for |
| 184 |
% captions, caption lables, section titles, section numbers, chapter |
| 185 |
% titles, the document title, the page headings, and the |background| |
| 186 |
% environment, and the fonts used on the official title page. |
| 187 |
% There is a conventional version and a version called by |
| 188 |
% the option |specialfonts|. |
| 189 |
% |
| 190 |
% \begin{macrocode} |
| 191 |
\ifx\SpecialFonts\undefined |
| 192 |
\newcommand{\CapFont}{\em} |
| 193 |
\newcommand{\CapNumFont}{\sf\bfseries} |
| 194 |
\newcommand{\SecFont}{\sf\bfseries} |
| 195 |
\newcommand{\SecNumFont}{\sf\bfseries} |
| 196 |
\newcommand{\ChapFont}{\sf\bfseries} |
| 197 |
\newcommand{\TitleFont}{\sf\bfseries} |
| 198 |
\newcommand{\HeaderFont}{\sf\small} |
| 199 |
\newcommand{\BackgroundFont}{\em} |
| 200 |
\newcommand{\DTfont@author}{\sf\bfseries} |
| 201 |
\newcommand{\DTfont@normal}{\sf} |
| 202 |
\newcommand{\DTfont@series}{\sf\bfseries} |
| 203 |
\newcommand{\DTfont@title}{\sf\bfseries} |
| 204 |
\else |
| 205 |
\newcommand{\CapFont}{\em} |
| 206 |
\newcommand{\CapNumFont}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 207 |
\newcommand{\SecFont}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 208 |
\newcommand{\SecNumFont}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 209 |
\newcommand{\ChapFont}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 210 |
\newcommand{\TitleFont}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 211 |
\newcommand{\HeaderFont}{\usefont{T1}{bgs}{r}{r}\selectfont} |
| 212 |
\newcommand{\BackgroundFont}{% |
| 213 |
\usefont{T1}{bc9}{r}{r}\selectfont% |
| 214 |
\renewcommand{\emph}[1]{{##1}}} |
| 215 |
\newcommand{\DTfont@author}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 216 |
\newcommand{\DTfont@normal}{\usefont{T1}{bgs}{r}{r}\selectfont} |
| 217 |
\newcommand{\DTfont@series}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 218 |
\newcommand{\DTfont@title}{\usefont{T1}{bgs}{b}{r}\selectfont} |
| 219 |
\fi |
| 220 |
% \end{macrocode} |
| 221 |
% \end{macro} |
| 222 |
% \end{macro} |
| 223 |
% \end{macro} |
| 224 |
% \end{macro} |
| 225 |
% \end{macro} |
| 226 |
% \end{macro} |
| 227 |
% \end{macro} |
| 228 |
% \end{macro} |
| 229 |
% |
| 230 |
% \begin{macro}{\noparskip} |
| 231 |
% |
| 232 |
% This class uses the European book layout, i.e., a layout that has |
| 233 |
% no paragraph identations, but some paragraph skip. This is sometimes |
| 234 |
% not wanted in tables of contents, so we provide a macro that makes |
| 235 |
% it possible to produce tables of contents with tight vertical spacing |
| 236 |
% by writing something like |{\noparskip \tableofcontents}|. |
| 237 |
% |
| 238 |
% \begin{macrocode} |
| 239 |
\newcommand{\noparskip}{\parskip=\z@ \@plus\z@ \@minus\z@} |
| 240 |
% \end{macrocode} |
| 241 |
% |
| 242 |
% \end{macro} |
| 243 |
% |
| 244 |
% Now come the details of the paragraph layout. If |raggedright| is not |
| 245 |
% used, |\TextAlignment| must be set anyway, and |\parindent| must be |
| 246 |
% set to zero. (The command |\RaggedRight| does that too). The text |
| 247 |
% alignement command is issued at the begin of the document, and the |
| 248 |
% parskip is also set to a reasonable, non-zero value. Finally, clubs |
| 249 |
% and widows are punished hard. |
| 250 |
% \begin{macrocode} |
| 251 |
\ifx\TextAlignment\undefined |
| 252 |
\newcommand{\TextAlignment}{\relax} |
| 253 |
\parindent=0pt |
| 254 |
\else\fi |
| 255 |
\AtBeginDocument{\TextAlignment} |
| 256 |
\parskip=2ex \@plus 0.5ex \@minus 0.5ex |
| 257 |
\widowpenalty 10000 |
| 258 |
\clubpenalty 10000 |
| 259 |
\@clubpenalty 10000 |
| 260 |
% \end{macrocode} |
| 261 |
% Lists are generally defined with tighter vertical spacing, the |
| 262 |
% following was adapted from |book.cls|. |
| 263 |
% \begin{macrocode} |
| 264 |
\def\@listi{\leftmargin\leftmargini |
| 265 |
\parsep \z@ \@plus2\p@ \@minus\z@ |
| 266 |
\topsep \z@ \@plus2\p@ \@minus\z@ |
| 267 |
\itemsep\z@ \@plus2\p@ \@minus\z@} |
| 268 |
\let\@listI\@listi |
| 269 |
\@listi |
| 270 |
\def\@listii{\leftmargin\leftmarginii |
| 271 |
\labelwidth\leftmarginii |
| 272 |
\advance\labelwidth-\labelsep |
| 273 |
\topsep \z@ \@plus2\p@ \@minus\z@ |
| 274 |
\parsep \z@ \@plus\p@ \@minus\z@ |
| 275 |
\itemsep \parsep} |
| 276 |
\def\@listiii{\leftmargin\leftmarginiii |
| 277 |
\labelwidth\leftmarginiii |
| 278 |
\advance\labelwidth-\labelsep |
| 279 |
\topsep \z@ \@plus\p@ \@minus\z@ |
| 280 |
\parsep \z@ \@minus\z@ |
| 281 |
\partopsep \z@ \plus\z@ \@minus\z@ |
| 282 |
\itemsep \topsep} |
| 283 |
\def\@listiv {\leftmargin\leftmarginiv |
| 284 |
\labelwidth\leftmarginiv |
| 285 |
\advance\labelwidth-\labelsep} |
| 286 |
\def\@listv {\leftmargin\leftmarginv |
| 287 |
\labelwidth\leftmarginv |
| 288 |
\advance\labelwidth-\labelsep} |
| 289 |
\def\@listvi {\leftmargin\leftmarginvi |
| 290 |
\labelwidth\leftmarginvi |
| 291 |
\advance\labelwidth-\labelsep} |
| 292 |
% \end{macrocode} |
| 293 |
% I use font size 10pt, and noything else, thus it is hard-wired. |
| 294 |
% The following is adapted from |bk10.clo|. |
| 295 |
% \begin{macrocode} |
| 296 |
\renewcommand\normalsize{% |
| 297 |
\@setfontsize\normalsize\@xpt\@xiipt |
| 298 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus\z@ |
| 299 |
\abovedisplayshortskip \z@ \@plus3\p@ \@minus\z@ |
| 300 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 301 |
\belowdisplayskip \abovedisplayskip |
| 302 |
\let\@listi\@listI} |
| 303 |
\normalsize |
| 304 |
\renewcommand\small{% |
| 305 |
\@setfontsize\small\@ixpt{11}% |
| 306 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus\z@ |
| 307 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 308 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 309 |
\def\@listi{\leftmargin\leftmargini |
| 310 |
\topsep \z@ \@plus2\p@ \@minus\z@ |
| 311 |
\parsep \z@ \@plus\p@ \@minus\z@ |
| 312 |
\itemsep \parsep}% |
| 313 |
\belowdisplayskip \abovedisplayskip |
| 314 |
} |
| 315 |
\renewcommand\footnotesize{% |
| 316 |
\@setfontsize\footnotesize\@viiipt{9.5}% |
| 317 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus\z@ |
| 318 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 319 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ |
| 320 |
\def\@listi{\leftmargin\leftmargini |
| 321 |
\topsep \z@ \@plus\p@ \@minus\z@ |
| 322 |
\parsep \z@ \@plus\p@ \@minus\z@ |
| 323 |
\itemsep \parsep}% |
| 324 |
\belowdisplayskip \abovedisplayskip |
| 325 |
} |
| 326 |
% \end{macrocode} |
| 327 |
% |
| 328 |
% \section{Page Headings} |
| 329 |
% |
| 330 |
% The running feet are empty in this page style. |
| 331 |
% \begin{macrocode} |
| 332 |
\def\ps@headings{% |
| 333 |
\let\@oddfoot\@empty\let\@evenfoot\@empty |
| 334 |
% \end{macrocode} |
| 335 |
% On left pages: skip to the left of the margin, typeset the page |
| 336 |
% number, and then typeset the heading text above the normal text. |
| 337 |
% \begin{macrocode} |
| 338 |
\def\@evenhead{% |
| 339 |
\hskip-\marginparsep\hskip-\marginparwidth% |
| 340 |
\makebox[\marginparsep+\marginparwidth][l]{\HeaderFont\thepage}% |
| 341 |
{\makebox[\textwidth][l]{\HeaderFont\vphantom{g}\leftmark}}} |
| 342 |
% \end{macrocode} |
| 343 |
% Right pages: Typeset the heading text above the normal text, |
| 344 |
% and then typeset the page number at the right edge of the |
| 345 |
% margin. The trailing |\hskip|s prevent overfull hboxes. |
| 346 |
% \begin{macrocode} |
| 347 |
\def\@oddhead{% |
| 348 |
{\makebox[\textwidth][r]{\HeaderFont\vphantom{g}\rightmark}}% |
| 349 |
\makebox[\marginparsep+\marginparwidth][r]{\HeaderFont\thepage}% |
| 350 |
\hskip-\marginparsep\hskip-\marginparwidth} |
| 351 |
% \end{macrocode} |
| 352 |
% When using this page style, the content of the running heading is |
| 353 |
% determined by the chapter and section titles. |
| 354 |
% \begin{macrocode} |
| 355 |
\let\@mkboth\markboth |
| 356 |
% \end{macrocode} |
| 357 |
% |book.cls| uses the |\chaptermark| and |\sectionmark| macros to fill |
| 358 |
% the running heads. In contrast to the standard |book.cls|, |
| 359 |
% I don't want headings to appear in capital letters, so I had |
| 360 |
% to remove all the |\makeuppercase| commands. |
| 361 |
% \begin{macrocode} |
| 362 |
\def\chaptermark##1{% |
| 363 |
\markboth {% |
| 364 |
\ifnum \c@secnumdepth >\m@ne % |
| 365 |
\if@mainmatter \@chapapp\ \thechapter. \ \fi % |
| 366 |
\fi % |
| 367 |
##1}{}}% |
| 368 |
\def\sectionmark##1{% |
| 369 |
\markright {% |
| 370 |
\ifnum \c@secnumdepth >\z@ % |
| 371 |
\thesection. \ % |
| 372 |
\fi % |
| 373 |
##1}}} |
| 374 |
% \end{macrocode} |
| 375 |
% And now execute |\ps@headings|. |
| 376 |
% \begin{macrocode} |
| 377 |
\pagestyle{headings} |
| 378 |
% \end{macrocode} |
| 379 |
% Unfortunatley, the original |book.cls| makes all headings in |
| 380 |
% Tables of Contents, Lists of Figures, Lists of Tables, and |
| 381 |
% in the Bibliography section appear in capital letters too. |
| 382 |
% I don't want this, and remove all the |\makeuppercase| commands |
| 383 |
% from the definitions made in |book.cls|. |
| 384 |
% \begin{macrocode} |
| 385 |
\renewcommand\tableofcontents{% |
| 386 |
\chapter*{\contentsname\@mkboth{\contentsname}{\contentsname}}% |
| 387 |
\@starttoc{toc}} |
| 388 |
\renewcommand\listoffigures{% |
| 389 |
\chapter*{\listfigurename\@mkboth{\listfigurename}{\listfigurename}}% |
| 390 |
\@starttoc{lof}} |
| 391 |
\renewcommand\listoftables{% |
| 392 |
\chapter*{\listtablename\@mkboth{\listtablename}{\listtablename}}% |
| 393 |
\@starttoc{lot}} |
| 394 |
% \end{macrocode} |
| 395 |
% |
| 396 |
% \section{Bibliography} |
| 397 |
% |
| 398 |
% In addition to the headings problem, I want the bibliography |
| 399 |
% to show the reference fields in the margin. |
| 400 |
% I use a global variable |\ThePage| that will contain the |
| 401 |
% page number of the page on which a particular bibliography |
| 402 |
% entry is printed. Unfortunatley, this can only be determined |
| 403 |
% when the box containing the entry is shipped out. So I have |
| 404 |
% to use the |.aux| file to store and retrieve this information. |
| 405 |
% First, define a counter that is used to generate the |
| 406 |
% internally used labels. |
| 407 |
% \begin{macrocode} |
| 408 |
\newcounter{autolabels}% |
| 409 |
\renewenvironment{thebibliography}[1] |
| 410 |
{\chapter*{\bibname\@mkboth{\bibname}{\bibname}}% |
| 411 |
\small % |
| 412 |
\addcontentsline{toc}{chapter}{\bibname} |
| 413 |
% \end{macrocode} |
| 414 |
% Now re-define the command that makes the bibliography labels. |
| 415 |
% I'll comment that in detail, the same trick is used below with |
| 416 |
% fewer comments for all sorts of other things. |
| 417 |
% \begin{macrocode} |
| 418 |
\renewcommand{\@mklab}[1]{% |
| 419 |
% \end{macrocode} |
| 420 |
% Increase the counter and automatically generate a label. |
| 421 |
% \begin{macrocode} |
| 422 |
\refstepcounter{autolabels}% |
| 423 |
\label{autolabel:\theautolabels}% |
| 424 |
% \end{macrocode} |
| 425 |
% In the first run of \LaTeX, the label does not exists yet |
| 426 |
% (it has to be read back from an |.aux| file). To prevent |
| 427 |
% an error, assume that the page on which |
| 428 |
% this bibliography entry starts is page number 1. |
| 429 |
% \begin{macrocode} |
| 430 |
\expandafter\ifx\csname r@autolabel:\theautolabels \endcsname\relax % |
| 431 |
\edef\ThePage{1}% |
| 432 |
\else % |
| 433 |
\edef\ThePage{\pageref{autolabel:\theautolabels}}% |
| 434 |
\fi % |
| 435 |
% \end{macrocode} |
| 436 |
% Now typeset the lable into \emph{both} margins and align it to |
| 437 |
% the right if it is in the right margin. Display it only on the |
| 438 |
% side where it is needed. Doinf this is very important, if the |
| 439 |
% boxes are not precisely identical, \LaTeX might typeset it at |
| 440 |
% the bottom of page~130 in the first run, then flip the label to |
| 441 |
% the other side in the second run, but find out that the whole |
| 442 |
% thing should better be placed at the top of page~131. Then it |
| 443 |
% would go back again in the run after, and oscillate for ever. |
| 444 |
% I really don't whant this! |
| 445 |
% \begin{macrocode} |
| 446 |
\makebox[0pt][l]{\hbox{}\hskip\textwidth \hskip\marginparsep % |
| 447 |
\ifodd\ThePage {##1}\else \phantom{##1}\fi}% |
| 448 |
\makebox[0pt][l]{\hbox{}\hskip-\marginparsep \makebox[0pt][r]{% |
| 449 |
\ifodd\ThePage \phantom{##1}\else{##1}\fi }}% |
| 450 |
\hfil\hbox{}} |
| 451 |
\list{\@biblabel{\@arabic\c@enumiv}}% |
| 452 |
% \end{macrocode} |
| 453 |
% Since the labels are now in the margin, I have to remove the |
| 454 |
% space that is normally assigned to the labels. |
| 455 |
% \begin{macrocode} |
| 456 |
{\labelwidth=0pt% |
| 457 |
\leftmargin=0pt% |
| 458 |
\labelsep=0pt% |
| 459 |
\itemsep=1ex% |
| 460 |
\@openbib@code |
| 461 |
\usecounter{enumiv}% |
| 462 |
\let\p@enumiv\@empty |
| 463 |
\renewcommand\theenumiv{\@arabic\c@enumiv}}% |
| 464 |
\sloppy |
| 465 |
\clubpenalty4000 |
| 466 |
\@clubpenalty \clubpenalty |
| 467 |
\widowpenalty4000% |
| 468 |
\sfcode`\.\@m} |
| 469 |
{% |
| 470 |
\normalsize % |
| 471 |
\def\@noitemerr |
| 472 |
{\@latex@warning{Empty `thebibliography' environment}}% |
| 473 |
\endlist} |
| 474 |
% \end{macrocode} |
| 475 |
% |
| 476 |
% \section{Captions} |
| 477 |
% |
| 478 |
% Rotated figures need a conventional caption style, so I generate |
| 479 |
% a flag saying whether we are inside a rotated float |
| 480 |
% (adapted from |rotating.sty|). |
| 481 |
% \begin{macrocode} |
| 482 |
\renewcommand\sidewaysfigure{\let\inside@rotated@float=\relax % |
| 483 |
\@rotfloat{figure}} |
| 484 |
\renewcommand\sidewaystable{\let\inside@rotated@float=\relax % |
| 485 |
\@rotfloat{table}} |
| 486 |
% \end{macrocode} |
| 487 |
% The command |\caption| generates the automatic label. |
| 488 |
% \begin{macrocode} |
| 489 |
\def\caption{% |
| 490 |
\ifx\@captype\@undefined |
| 491 |
\@latex@error{\noexpand\caption outside float}\@ehd |
| 492 |
\expandafter\@gobble |
| 493 |
\else |
| 494 |
\stepcounter{autolabels}% |
| 495 |
\refstepcounter\@captype |
| 496 |
\label{autolabel:\theautolabels}% |
| 497 |
\expandafter\@firstofone |
| 498 |
\fi |
| 499 |
{\@dblarg{\@caption\@captype}}% |
| 500 |
} |
| 501 |
% \end{macrocode} |
| 502 |
% The definition of the following macro is |\long| in order to allow more |
| 503 |
% than one paragraph in the argument of |\caption|. |
| 504 |
% \begin{macrocode} |
| 505 |
\long\def\@makecaption#1#2{% |
| 506 |
\vskip\abovecaptionskip |
| 507 |
\expandafter\ifx\csname r@autolabel:\theautolabels \endcsname\relax % |
| 508 |
\edef\ThePage{1}% |
| 509 |
\else % |
| 510 |
\edef\ThePage{\pageref{autolabel:\theautolabels}}% |
| 511 |
\fi |
| 512 |
% \end{macrocode} |
| 513 |
% Captions of normal floats: |
| 514 |
% Place a zero-width box that puts its contents |
| 515 |
% right-aligned. The contents are a zero-width box that |
| 516 |
% places a left-aligned label, and two horizontal spaces. |
| 517 |
% Then typeset the caption text |\raggedright| (without |
| 518 |
% hyphenation) and |\raggedleft| into full-width parboxes. |
| 519 |
% Finally, append a zero-width |
| 520 |
% box. Inside, move to the right edge of the margin, and |
| 521 |
% put another zero-width box that places a right-aligned |
| 522 |
% caption label. (Note how the trick against oscillations |
| 523 |
% is used again.) |
| 524 |
% \begin{macrocode} |
| 525 |
\ifx\inside@rotated@float\undefined |
| 526 |
\makebox[0pt][r]{\makebox[0pt][l]{\CapNumFont % |
| 527 |
\ifodd\ThePage \phantom{#1}\else {#1}\fi}% |
| 528 |
\hskip\marginparsep \hskip\marginparwidth \hbox{}}% |
| 529 |
\makebox[0pt][l]{% |
| 530 |
\ifodd\ThePage % |
| 531 |
\parbox[t]{\TotalWidth-\MarginParWidth-\MarginParSep}% |
| 532 |
{\raggedleft \CapFont #2}% |
| 533 |
\else % |
| 534 |
\phantom{\parbox[t]{\TotalWidth-\MarginParWidth-\MarginParSep}% |
| 535 |
{\raggedleft \CapFont #2}}% |
| 536 |
\fi}% |
| 537 |
\makebox[0pt][l]{% |
| 538 |
\ifodd\ThePage % |
| 539 |
\phantom{\parbox[t]{\TotalWidth-\MarginParWidth-\MarginParSep}% |
| 540 |
{\raggedright \CapFont #2}}% |
| 541 |
\else % |
| 542 |
\parbox[t]{\TotalWidth-\MarginParWidth-\MarginParSep}% |
| 543 |
{\raggedright \CapFont #2}% |
| 544 |
\fi}% |
| 545 |
\hfill % |
| 546 |
\makebox[0pt][l]{\hbox{}\hskip\marginparsep \hskip\marginparwidth % |
| 547 |
\makebox[0pt][r]{\CapNumFont % |
| 548 |
\ifodd\ThePage {#1}\else \phantom{#1}\fi}}% |
| 549 |
\vskip\belowcaptionskip % |
| 550 |
% \end{macrocode} |
| 551 |
% Captions of rotated floats are treated as in |books.cls|. |
| 552 |
% \begin{macrocode} |
| 553 |
\else |
| 554 |
\sbox\@tempboxa{{\CapNumFont #1:} \CapFont #2}% |
| 555 |
\ifdim \wd\@tempboxa >\hsize |
| 556 |
{\CapNumFont #1:} \CapFont #2\par |
| 557 |
\else |
| 558 |
\global \@minipagefalse |
| 559 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
| 560 |
\fi % |
| 561 |
\fi} |
| 562 |
% \end{macrocode} |
| 563 |
% Finally, set the vertical spacing of captions. |
| 564 |
% \begin{macrocode} |
| 565 |
\setlength\abovecaptionskip{6\p@} |
| 566 |
\setlength\belowcaptionskip{10\p@} |
| 567 |
% \end{macrocode} |
| 568 |
% |
| 569 |
% \section{Parts, Chapters, Sections, \ldots} |
| 570 |
% |
| 571 |
% No headings on the page where a part begins. |
| 572 |
% \begin{macrocode} |
| 573 |
\renewcommand\part{% |
| 574 |
\if@openright \cleardoublepage \else \clearpage \fi |
| 575 |
\thispagestyle{empty}% |
| 576 |
% \end{macrocode} |
| 577 |
% Never ever swap to twocolumn-mode afterwards! |
| 578 |
% \begin{macrocode} |
| 579 |
\@tempswafalse |
| 580 |
% \end{macrocode} |
| 581 |
% I need an empty box to prevent the fil glue from disappearing. |
| 582 |
% \begin{macrocode} |
| 583 |
\null\vfil |
| 584 |
% \end{macrocode} |
| 585 |
% Use |\secdef| to indicate which commands to use to make |
| 586 |
% the actual heading. |
| 587 |
% \begin{macrocode} |
| 588 |
\secdef\@part\@spart} |
| 589 |
\def\@part[#1]#2{% |
| 590 |
\ifnum \c@secnumdepth >-2\relax |
| 591 |
\refstepcounter{part}% |
| 592 |
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% |
| 593 |
\else |
| 594 |
\addcontentsline{toc}{part}{#1}% |
| 595 |
\fi |
| 596 |
% \end{macrocode} |
| 597 |
% Clear the mark registers and center the title on the page. |
| 598 |
% Also prevent breaking between |
| 599 |
% lines, and reset the font. Finally, use a box that spans the full |
| 600 |
% width of the page (defined below). |
| 601 |
% \begin{macrocode} |
| 602 |
\markboth{}{}% |
| 603 |
\fullwidthbox{% |
| 604 |
\centering |
| 605 |
\interlinepenalty \@M |
| 606 |
\normalfont |
| 607 |
\ifnum \c@secnumdepth >-2\relax |
| 608 |
\huge\ChapFont \partname~\thepart |
| 609 |
\par |
| 610 |
\vskip 20\p@ |
| 611 |
\fi |
| 612 |
\Huge \ChapFont #2\par% |
| 613 |
} |
| 614 |
\@endpart} |
| 615 |
% \end{macrocode} |
| 616 |
% The following macro does the actual formatting of the title of |
| 617 |
% the part when the star form of the user command was used. |
| 618 |
% In this case never print a number. Otherwise the formatting |
| 619 |
% is the same. |
| 620 |
% \begin{macrocode} |
| 621 |
\def\@spart#1{% |
| 622 |
\fullwidthbox{ |
| 623 |
\centering |
| 624 |
\interlinepenalty \@M |
| 625 |
\normalfont |
| 626 |
\Huge \ChapFont #1\par% |
| 627 |
} |
| 628 |
\@endpart} |
| 629 |
% \end{macrocode} |
| 630 |
% |
| 631 |
% The chapter start page gets a special layout: |
| 632 |
% \begin{macrocode} |
| 633 |
\renewcommand\chapter{% |
| 634 |
\if@openright \cleardoublepage \else \clearpage \fi |
| 635 |
\thispagestyle{empty}% |
| 636 |
\@tempswafalse |
| 637 |
% \end{macrocode} |
| 638 |
% Prevent floats from appearing at the top of this page |
| 639 |
% because it looks weird to see a floating object above a chapter |
| 640 |
% title. |
| 641 |
% \begin{macrocode} |
| 642 |
\global\@topnum\z@ |
| 643 |
% \end{macrocode} |
| 644 |
% Supress the indentation of the first paragraph by |
| 645 |
% setting the switch |\@afterindent| to false. Use |\secdef| |
| 646 |
% to specify the macros to use for actually setting the chapter |
| 647 |
% title. |
| 648 |
% \begin{macrocode} |
| 649 |
\@afterindentfalse |
| 650 |
\secdef\@chapter\@schapter} |
| 651 |
% \end{macrocode} |
| 652 |
% The chapter always starts on an odd page, so playing with |
| 653 |
% spaces is not difficult here. First normal chapters, |
| 654 |
% then the ones where the star form was used. |
| 655 |
% Note that the |\vskip| after the numbered version of the |
| 656 |
% chapter head is only |12\p@|, since a |\chapquote| is |
| 657 |
% expected afterwards that gives the remaining |40\p@|. |
| 658 |
% \begin{macrocode} |
| 659 |
\def\@makechapterhead#1{% |
| 660 |
{\parindent \z@ \raggedleft \normalfont |
| 661 |
\ifnum \c@secnumdepth >\m@ne |
| 662 |
\if@mainmatter |
| 663 |
\huge \ChapFont \@chapapp\space \thechapter |
| 664 |
\par\nobreak |
| 665 |
\vskip 12\p@ |
| 666 |
\fi |
| 667 |
\fi |
| 668 |
\interlinepenalty\@M |
| 669 |
\Huge \ChapFont #1\par\nobreak |
| 670 |
\vskip 12\p@ |
| 671 |
}} |
| 672 |
\def\@makeschapterhead#1{% |
| 673 |
{\parindent \z@ \raggedleft |
| 674 |
\normalfont |
| 675 |
\interlinepenalty\@M |
| 676 |
\Huge \ChapFont #1\par\nobreak |
| 677 |
\vskip 40\p@ |
| 678 |
}} |
| 679 |
% \end{macrocode} |
| 680 |
% |
| 681 |
% \begin{macro}{\chapquote} |
| 682 |
% \begin{macro}{\chapnoquote} |
| 683 |
% And here comes the macro for quotations, use as |
| 684 |
% |\chapquote{Quotation}{Author}|. If you don't want |
| 685 |
% quotes after chapter titles, use |\chapnoquote| |
| 686 |
% to correct the vertical spacing. |
| 687 |
% \begin{macrocode} |
| 688 |
\newcommand{\chapquote}[2]{% |
| 689 |
{\ChapFont |
| 690 |
\RaggedLeft #1 |
| 691 |
|
| 692 |
(#2) |
| 693 |
\vskip 40\p@ |
| 694 |
}} |
| 695 |
\newcommand{\chapnoquote}{\null\vskip 28\p@} |
| 696 |
% \end{macrocode} |
| 697 |
% \end{macro} |
| 698 |
% \end{macro} |
| 699 |
% |
| 700 |
% \begin{environment}{chapabstract} |
| 701 |
% In my dissertation, I used raggedright, but this looks ugly on |
| 702 |
% the chapter title page. So I wrote the following environment |
| 703 |
% that switches |\RaggedRight| off and used it for writing |
| 704 |
% the abstracts of the chapters. |
| 705 |
% \begin{macrocode} |
| 706 |
\newenvironment{chapabstract}{% |
| 707 |
\setlength{\leftskip} {\z@skip}% |
| 708 |
\setlength{\@rightskip} {\z@skip}% |
| 709 |
\setlength{\rightskip} {\@rightskip}% |
| 710 |
\parfillskip=0pt plus 1fil % |
| 711 |
}{\par} |
| 712 |
% \end{macrocode} |
| 713 |
% \end{environment} |
| 714 |
% |
| 715 |
% Use a different font for sections: |
| 716 |
% The following gives a normal heading with white space above |
| 717 |
% and below the section heading, the title set in |\SecFont\Large|, |
| 718 |
% and no indentation on the first paragraph. |
| 719 |
% \begin{macrocode} |
| 720 |
\renewcommand{\section}{% |
| 721 |
\@startsection {section}{1}{\z@}% |
| 722 |
{-3.5ex \@plus -1ex \@minus -.2ex}% |
| 723 |
{2.3ex \@plus.2ex}% |
| 724 |
{\SecFont\Large}} |
| 725 |
\renewcommand{\subsection}{% |
| 726 |
\@startsection{subsection}{2}{\z@}% |
| 727 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 728 |
{1.5ex \@plus .2ex}% |
| 729 |
{\SecFont\large}} |
| 730 |
\renewcommand{\subsubsection}{% |
| 731 |
\@startsection{subsubsection}{3}{\z@}% |
| 732 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 733 |
{1.5ex \@plus .2ex}% |
| 734 |
{\SecFont\normalsize}} |
| 735 |
% \end{macrocode} |
| 736 |
% Paragraphs are never numbered; they just make their |
| 737 |
% Argument bold. |
| 738 |
% \begin{macrocode} |
| 739 |
\renewcommand{\paragraph}[1]{\noindent\textbf{#1}} |
| 740 |
% \end{macrocode} |
| 741 |
% No trailing period in the section number |
| 742 |
% \begin{macrocode} |
| 743 |
\def\@seccntformat#1{\csname the#1\endcsname} |
| 744 |
\def\@sect#1#2#3#4#5#6[#7]#8{% |
| 745 |
\ifnum #2>\c@secnumdepth |
| 746 |
\let\@svsec\@empty |
| 747 |
% \end{macrocode} |
| 748 |
% If the present section is not numbered, assume that |
| 749 |
% it is on an odd page. This does not matter since |
| 750 |
% no section number will be typeset (see below). |
| 751 |
% \begin{macrocode} |
| 752 |
\edef\ThePage{1} |
| 753 |
\else |
| 754 |
\stepcounter{autolabels} |
| 755 |
\refstepcounter{#1}% |
| 756 |
\expandafter\ifx\csname r@autolabel:\theautolabels \endcsname\relax % |
| 757 |
\edef\ThePage{1}% |
| 758 |
\else % |
| 759 |
\edef\ThePage{\pageref{autolabel:\theautolabels}}% |
| 760 |
\fi |
| 761 |
% \end{macrocode} |
| 762 |
% Since |\@seccntformat| might end with an improper |\hskip| which |
| 763 |
% is scanning forward for plus or minus, we end the definition |
| 764 |
% of |\@svsec| with |\relax| as a precaution. |
| 765 |
% \begin{macrocode} |
| 766 |
\protected@edef\@svsec{\@seccntformat{#1}\relax}% |
| 767 |
\fi |
| 768 |
\@tempskipa #5\relax |
| 769 |
\ifdim \@tempskipa>\z@ |
| 770 |
\begingroup |
| 771 |
% \end{macrocode} |
| 772 |
% To prevent oscillation as well as possible, always typeset |
| 773 |
% the section number on both sides of the section heading, but |
| 774 |
% one will always be invisible. |
| 775 |
% \begin{macrocode} |
| 776 |
{% |
| 777 |
% \end{macrocode} |
| 778 |
% Label in the right margin: typeset a zero-width box whose |
| 779 |
% argument is left-aligned. The argument contains spaces to move |
| 780 |
% the inner zero-width box to the right edge of the margin. |
| 781 |
% \begin{macrocode} |
| 782 |
\makebox[0pt][l]{% |
| 783 |
\hbox{}\hskip\textwidth \hskip\marginparsep % |
| 784 |
\hskip\marginparwidth \makebox[0pt][r]{#6\SecNumFont % |
| 785 |
\ifodd \ThePage \@svsec \else \phantom{\@svsec}\fi % |
| 786 |
}}% |
| 787 |
% \end{macrocode} |
| 788 |
% Label in the left margin: analogous. |
| 789 |
% \begin{macrocode} |
| 790 |
\makebox[0pt][r]{% |
| 791 |
\makebox[0pt][l]{#6\SecNumFont % |
| 792 |
\ifodd \ThePage \phantom{\@svsec}\else \@svsec \fi }% |
| 793 |
\hskip\marginparwidth \hskip\marginparsep}% |
| 794 |
% \end{macrocode} |
| 795 |
% And now comes the section title itself. |
| 796 |
% \begin{macrocode} |
| 797 |
#6{\interlinepenalty \@M #8\@@par}}% |
| 798 |
\endgroup |
| 799 |
\csname #1mark\endcsname{#7}% |
| 800 |
\addcontentsline{toc}{#1}{% |
| 801 |
\ifnum #2>\c@secnumdepth \else |
| 802 |
\protect\numberline{\csname the#1\endcsname}% |
| 803 |
\fi |
| 804 |
#7}% |
| 805 |
\else |
| 806 |
% \end{macrocode} |
| 807 |
% Unnumbered sections |
| 808 |
% \begin{macrocode} |
| 809 |
\def\@svsechd{% |
| 810 |
#6{\hskip #3\relax |
| 811 |
\@svsec #8}% |
| 812 |
\csname #1mark\endcsname{#7}% |
| 813 |
\addcontentsline{toc}{#1}{% |
| 814 |
\ifnum #2>\c@secnumdepth \else |
| 815 |
\protect\numberline{\csname the#1\endcsname}% |
| 816 |
\fi |
| 817 |
#7}}% |
| 818 |
\fi |
| 819 |
\@xsect{#5}% |
| 820 |
\ifnum #2>\c@secnumdepth % |
| 821 |
% \end{macrocode} |
| 822 |
% Don't generate an automatic label for unnumbered sections. |
| 823 |
% \begin{macrocode} |
| 824 |
\else % |
| 825 |
\label{autolabel:\theautolabels}% |
| 826 |
\fi % |
| 827 |
} |
| 828 |
% \end{macrocode} |
| 829 |
% |
| 830 |
% \section{Boxes extending into the margin} |
| 831 |
% |
| 832 |
% \begin{macro}{\fullwidthbox} |
| 833 |
% Macro that can typeset things into the margin and uses |
| 834 |
% the full available width of the document |
| 835 |
% \begin{macrocode} |
| 836 |
\long\def\fullwidthbox#1{% |
| 837 |
\stepcounter{autolabels}% |
| 838 |
% \end{macrocode} |
| 839 |
% Save the label of this box for later, in case |
| 840 |
% the counter |autolabels| is changed within the argument. |
| 841 |
% \begin{macrocode} |
| 842 |
\def\@fullwidthboxlabel{autolabel:\theautolabels}% |
| 843 |
\expandafter\ifx\csname r@autolabel:\theautolabels \endcsname\relax % |
| 844 |
\edef\ThePage{1}% |
| 845 |
\else % |
| 846 |
\edef\ThePage{\pageref{autolabel:\theautolabels}}% |
| 847 |
\fi % |
| 848 |
\ifodd\ThePage % |
| 849 |
% \end{macrocode} |
| 850 |
% No shift on odd pages. |
| 851 |
% \begin{macrocode} |
| 852 |
\else % |
| 853 |
% \end{macrocode} |
| 854 |
% Shift to the left edge of the margin on even pages. |
| 855 |
% \begin{macrocode} |
| 856 |
\hbox{}\hskip-\marginparwidth \hskip-\marginparsep % |
| 857 |
\fi % |
| 858 |
\makebox[0pt][l]{% |
| 859 |
\begin{minipage}{\linewidth+\marginparwidth+\marginparsep}% |
| 860 |
#1% |
| 861 |
\end{minipage}% |
| 862 |
}% |
| 863 |
% \end{macrocode} |
| 864 |
% The following line is adapted from the definition of |
| 865 |
% |\refstepcounter| in |latex.ltx| (actually |ltxref.dtx|). It |
| 866 |
% forces |\label| on the line after to write down the correct |
| 867 |
% page number. |
| 868 |
% \begin{macrocode} |
| 869 |
\protected@edef\@currentlabel{\relax}% |
| 870 |
\label{\@fullwidthboxlabel}% |
| 871 |
} |
| 872 |
% \end{macrocode} |
| 873 |
% \end{macro} |
| 874 |
% |
| 875 |
% \begin{macro}{\fullwidthinfloat} |
| 876 |
% The same again for use in Figures and other floats that already |
| 877 |
% have a label. Arguments: |#1| is the label, |#2| contains whatever |
| 878 |
% goes into the box. |
| 879 |
% \begin{macrocode} |
| 880 |
\long\def\fullwidthinfloat#1#2{% |
| 881 |
\expandafter\ifx\csname r@#1\endcsname\relax % |
| 882 |
\edef\ThePage{1}% |
| 883 |
\else % |
| 884 |
\edef\ThePage{\pageref{#1}}% |
| 885 |
\fi % |
| 886 |
\ifodd\ThePage % |
| 887 |
\else % |
| 888 |
\hbox{}\hskip-\marginparwidth \hskip-\marginparsep % |
| 889 |
\fi % |
| 890 |
\makebox[0pt][l]{% |
| 891 |
\parbox{\linewidth+\marginparwidth+\marginparsep}{% |
| 892 |
\ifodd\ThePage % |
| 893 |
\else % |
| 894 |
\null \hfill % |
| 895 |
\fi % |
| 896 |
\ifodd\ThePage \raggedright \else \raggedleft \fi % |
| 897 |
#2% |
| 898 |
}% |
| 899 |
}% |
| 900 |
}% |
| 901 |
% \end{macrocode} |
| 902 |
% \end{macro} |
| 903 |
% |
| 904 |
% \begin{macro}{\Abstract} |
| 905 |
% \begin{macro}{\MarginPar} |
| 906 |
% \begin{macro}{\MarginParVar} |
| 907 |
% Margin Paragraphs whose contents are aligned differently on even and odd |
| 908 |
% pages. |\Abstract| makes a margin paragraph in |\foortnotesize| |
| 909 |
% that is left-aligned on even pages and right-aligned on odd pages. |
| 910 |
% |\MarginPar| does the same without changing the font size. |
| 911 |
% |\MarginParVar| is right-aligned on even pages and left-aligned |
| 912 |
% on odd pages. |
| 913 |
% \begin{macrocode} |
| 914 |
\newcommand{\Abstract}[1]{% |
| 915 |
{\footnotesize % |
| 916 |
\marginpar[\footnotesize\raggedright\hspace{0pt}{#1}]% |
| 917 |
{\footnotesize\raggedleft\hspace{0pt}{#1}}}} |
| 918 |
\newcommand{\MarginPar}[1]{% |
| 919 |
\marginpar[\RaggedRight\hspace{0pt}{#1}]{\RaggedLeft\hspace{0pt}{#1}}} |
| 920 |
\newcommand{\MarginParVar}[1]{% |
| 921 |
\marginpar[\RaggedLeft\hspace{0pt}{#1}]{\RaggedRight\hspace{0pt}{#1}}} |
| 922 |
% \end{macrocode} |
| 923 |
% \end{macro} |
| 924 |
% \end{macro} |
| 925 |
% \end{macro} |
| 926 |
% |
| 927 |
% \section{Background environment} |
| 928 |
% |
| 929 |
% \begin{environment}{background} |
| 930 |
% Described in the introduction. It just changes the font. |
| 931 |
% \begin{macrocode} |
| 932 |
\newenvironment{bkgnd}{\begingroup \BackgroundFont}{\endgroup} |
| 933 |
% \end{macrocode} |
| 934 |
% \end{environment} |
| 935 |
% |
| 936 |
% \clearpage |
| 937 |
% \section{Title Page \ldots} |
| 938 |
% |
| 939 |
% \begin{macro}{\DTauthor} |
| 940 |
% \begin{macro}{\DTborn} |
| 941 |
% \begin{macro}{\DTcitizen} |
| 942 |
% \begin{macro}{\DTdate} |
| 943 |
% \begin{macro}{\DTdegree} |
| 944 |
% \begin{macro}{\DTexaminers} |
| 945 |
% \begin{macro}{\DTnumber} |
| 946 |
% \begin{macro}{\DTtitle} |
| 947 |
% \begin{macro}{\DTvolume} |
| 948 |
% \begin{macro}{\DTissn} |
| 949 |
% \begin{macro}{\DTisbn} |
| 950 |
% \begin{macro}{\DTprice} |
| 951 |
% \begin{macro}{\DTimage} |
| 952 |
% These thirteen macros contain the information to be typeset on the |
| 953 |
% title page. |\DTimage| may contain the file name of image, |
| 954 |
% which must be in EPS and have aspect ratio 32x202\@. The image |
| 955 |
% should be comparatively dark, since the writing on top of it is white. |
| 956 |
% If no image file is given, a black rectangle is used. |
| 957 |
% \begin{macrocode} |
| 958 |
\newcommand{\DTauthor}{Hanspeter Schmid} |
| 959 |
\newcommand{\DTborn}{February 8, 1969} |
| 960 |
\newcommand{\DTcitizen}{H\"arkingen SO} |
| 961 |
\newcommand{\DTdate}{November 2000} |
| 962 |
\newcommand{\DTdegree}{dipl.\ El.-Ing.\ ETH} |
| 963 |
\newcommand{\DTexaminers}{Prof.\ Dr.\ George S. Moschytz, examiner\\ |
| 964 |
Prof.\ Dr.\ Qiuting Huang, co-examiner} |
| 965 |
\newcommand{\DTnumber}{13878} |
| 966 |
\newcommand{\DTtitle}{Single-Amplifier\\ Biquadratic\\ MOSFET--C Filters} |
| 967 |
\newcommand{\DTvolume}{1} |
| 968 |
\newcommand{\DTissn}{1616-671X} |
| 969 |
\newcommand{\DTisbn}{3-89649-616-6} |
| 970 |
\newcommand{\DTprice}{98,--} |
| 971 |
%\newcommand{\DTimage}{test1g.eps} |
| 972 |
% \end{macrocode} |
| 973 |
% \end{macro} |
| 974 |
% \end{macro} |
| 975 |
% \end{macro} |
| 976 |
% \end{macro} |
| 977 |
% \end{macro} |
| 978 |
% \end{macro} |
| 979 |
% \end{macro} |
| 980 |
% \end{macro} |
| 981 |
% \end{macro} |
| 982 |
% \end{macro} |
| 983 |
% \end{macro} |
| 984 |
% \end{macro} |
| 985 |
% \end{macro} |
| 986 |
% |
| 987 |
% The following code defines the text for the title page |
| 988 |
% according to the options passed to |hpsdiss.cls|. |
| 989 |
% \begin{macrocode} |
| 990 |
\newcommand{\DT@accepted}{accepted on the recommendation of} |
| 991 |
\newcommand{\DT@born}{born on} |
| 992 |
\newcommand{\DT@citizen}{citizen of} |
| 993 |
\newcommand{\DT@dissertation}{A dissertation submitted to the\\ |
| 994 |
Swiss Federal Institute of Technology, Z\"urich\\ |
| 995 |
for the degree of} |
| 996 |
\newcommand{\DT@dissertationB}{} |
| 997 |
\newcommand{\DT@doctor}{Doctor of Technical Sciences} |
| 998 |
\ifx\DT@scnat\undefined\else |
| 999 |
\renewcommand{\DT@doctor}{Doctor of Natural Sciences} |
| 1000 |
\fi |
| 1001 |
\ifx\DT@scmath\undefined\else |
| 1002 |
\renewcommand{\DT@doctor}{Doctor of Mathematics} |
| 1003 |
\fi |
| 1004 |
\newcommand{\DT@number}{Diss.~ETH No~} |
| 1005 |
\newcommand{\DT@presented}{presented by} |
| 1006 |
\ifx\DT@deutsch\undefined\else |
| 1007 |
\renewcommand{\DT@accepted}{Angenommen auf Antrag von} |
| 1008 |
\renewcommand{\DT@born}{geboren am} |
| 1009 |
\renewcommand{\DT@citizen}{von} |
| 1010 |
\renewcommand{\DT@dissertation}{Abhandlung\\ |
| 1011 |
zur Erlangung des Titels} |
| 1012 |
\renewcommand{\DT@dissertationB}{\\der Eidgen\"ossischen |
| 1013 |
Technischen Hochschule Z\"urich} |
| 1014 |
\ifx\DT@female\undefdined |
| 1015 |
\newcommand{\DT@@doctor}{Doktor} |
| 1016 |
\else |
| 1017 |
\newcommand{\DT@@doctor}{Doktorin} |
| 1018 |
\fi |
| 1019 |
\renewcommand{\DT@doctor}{\DT@@doctor\ der technischen |
| 1020 |
Wissenschaften} |
| 1021 |
\ifx\DT@scnat\undefined\else |
| 1022 |
\renewcommand{\DT@doctor}{\DT@@doctor\ der Naturwissenschaften} |
| 1023 |
\fi |
| 1024 |
\ifx\DT@scmath\undefined\else |
| 1025 |
\renewcommand{\DT@doctor}{\DT@@doctor\ der Mathematik} |
| 1026 |
\fi |
| 1027 |
\renewcommand{\DT@number}{Diss.~ETH Nr.~} |
| 1028 |
\renewcommand{\DT@presented}{vorgelegt von} |
| 1029 |
\fi |
| 1030 |
\ifx\DT@italiano\undefined\else |
| 1031 |
\renewcommand{\DT@accepted}{accettata su proposta di} |
| 1032 |
\renewcommand{\DT@born}{nato il} |
| 1033 |
\renewcommand{\DT@citizen}{attinente di} |
| 1034 |
\renewcommand{\DT@dissertation}{Dissertatzione presentata al\\ |
| 1035 |
Politecnico Federale di Zurigo\\ |
| 1036 |
per il conseguimento del titolo di} |
| 1037 |
\renewcommand{\DT@doctor}{Dottore in scienze techniche} |
| 1038 |
\ifx\DT@scnat\undefined\else |
| 1039 |
\renewcommand{\DT@doctor}{Dottore in scienze naturali} |
| 1040 |
\fi |
| 1041 |
\ifx\DT@scmath\undefined\else |
| 1042 |
\renewcommand{\DT@doctor}{Dottore in matematica} |
| 1043 |
\fi |
| 1044 |
\renewcommand{\DT@number}{Diss.~ETH no~} |
| 1045 |
\renewcommand{\DT@presented}{da} |
| 1046 |
\fi |
| 1047 |
\ifx\DT@francais\undefined\else |
| 1048 |
\renewcommand{\DT@accepted}{accept\'ee sur proposition du} |
| 1049 |
\ifx\female\undefined |
| 1050 |
\renewcommand{\DT@born}{n\'e le} |
| 1051 |
\else |
| 1052 |
\renewcommand{\DT@born}{n\'ee le} |
| 1053 |
\fi |
| 1054 |
\renewcommand{\DT@citizen}{originaire de} |
| 1055 |
\renewcommand{\DT@dissertation}{pr\'esent\'ee \`a\\ |
| 1056 |
L'\'Ecole Polytechnique F\'ed\'erale Z\"urich\\ |
| 1057 |
pour l'obtention du titre de} |
| 1058 |
\renewcommand{\DT@doctor}{Docteur d\'es sciences techniques} |
| 1059 |
\ifx\DT@scnat\undefined\else |
| 1060 |
\renewcommand{\DT@doctor}{Docteur d\'es sciences naturelles} |
| 1061 |
\fi |
| 1062 |
\ifx\DT@scmath\undefined\else |
| 1063 |
\renewcommand{\DT@doctor}{Docteur d\'es sciences math\'ematiques} |
| 1064 |
\fi |
| 1065 |
\renewcommand{\DT@number}{Th\`ese~EPFZ No~} |
| 1066 |
\renewcommand{\DT@presented}{par} |
| 1067 |
\fi |
| 1068 |
% \end{macrocode} |
| 1069 |
% |
| 1070 |
% \begin{macro}{\disstitle} |
| 1071 |
% \begin{macro}{\dissinnertitle} |
| 1072 |
% \begin{macro}{\dissback} |
| 1073 |
% These macros print the title page, the internal title page |
| 1074 |
% (without the image or black rectangle, but with the name |
| 1075 |
% of the publisher in front of the date), |
| 1076 |
% and the back side of the book. |
| 1077 |
% |
| 1078 |
% The correct numbers in the command |\begin{picture}(0,0)(220,110)| |
| 1079 |
% depend on the page layout. |
| 1080 |
% \begin{macrocode} |
| 1081 |
\newcommand{\dissinnertitle}{% |
| 1082 |
\newcommand{\DT@innertitle}{\relax}% |
| 1083 |
\disstitle} |
| 1084 |
\newcommand{\disstitle}{% |
| 1085 |
\thispagestyle{empty}% |
| 1086 |
{\parskip=0pt% |
| 1087 |
\parindent=0pt% |
| 1088 |
\unitlength=0.1mm% |
| 1089 |
\null\vfill% |
| 1090 |
\begin{picture}(0,0)(220,110)% |
| 1091 |
\ifx\DT@innertitle\undefined |
| 1092 |
\put(40,40){% |
| 1093 |
\makebox(0,0)[bl]{% |
| 1094 |
\ifx\DTimage\undefined % |
| 1095 |
\rule{32mm}{202mm}% |
| 1096 |
\else % |
| 1097 |
\includegraphics[width=32mm,height=202mm]{\DTimage}% |
| 1098 |
\fi % |
| 1099 |
}} |
| 1100 |
\fi |
| 1101 |
\put(60,2020){% |
| 1102 |
\makebox(0,0)[tl]{% |
| 1103 |
\hbox to 28mm{% |
| 1104 |
\vbox to 194mm{% |
| 1105 |
\begin{minipage}[t]{28mm} |
| 1106 |
\DTfont@series \Large \raggedleft |
| 1107 |
\White{Series in}% |
| 1108 |
\makebox[0cm][l]{\null\hspace*{6mm}\hbox{% |
| 1109 |
\normalsize \DTfont@normal % |
| 1110 |
\DT@number \DTnumber}}\\ |
| 1111 |
\White{Signal and}\\ |
| 1112 |
\White{Information}\\ |
| 1113 |
\White{Processing}\\[1.5ex] |
| 1114 |
\White{Volume \DTvolume} |
| 1115 |
\end{minipage} |
| 1116 |
|
| 1117 |
\vfill |
| 1118 |
|
| 1119 |
\begin{minipage}[b]{28mm} |
| 1120 |
\DTfont@series \Large \raggedleft |
| 1121 |
\White{Hartung}\\ |
| 1122 |
\White{Gorre}\\ |
| 1123 |
\White{Konstanz}% |
| 1124 |
\makebox[0cm][l]{\null\hspace*{6mm}\hbox{% |
| 1125 |
\normalsize \DTfont@normal % |
| 1126 |
\ifx\DT@innertitle\undefined\else % |
| 1127 |
Hartung-Gorre Verlag, Konstanz, % |
| 1128 |
\fi % |
| 1129 |
\DTdate}} |
| 1130 |
\end{minipage}}}}} |
| 1131 |
\put(400,2020){% |
| 1132 |
\makebox(0,0)[tl]{% |
| 1133 |
\hbox to 97mm{% |
| 1134 |
\vbox to 194mm{% |
| 1135 |
\DTfont@normal \phantom{\DT@number \DTnumber} |
| 1136 |
|
| 1137 |
\vfill |
| 1138 |
|
| 1139 |
\Huge {\DTfont@title \DTtitle} |
| 1140 |
|
| 1141 |
\normalsize |
| 1142 |
|
| 1143 |
\vfill |
| 1144 |
|
| 1145 |
\DT@dissertation\\ |
| 1146 |
\DT@doctor \DT@dissertationB |
| 1147 |
|
| 1148 |
\vfill |
| 1149 |
|
| 1150 |
\DT@presented |
| 1151 |
|
| 1152 |
\medskip |
| 1153 |
|
| 1154 |
\LARGE {\DTfont@author \DTauthor} |
| 1155 |
\normalsize |
| 1156 |
|
| 1157 |
\medskip |
| 1158 |
\DTdegree\\ |
| 1159 |
\DT@born\ \DTborn\\ |
| 1160 |
\DT@citizen\ \DTcitizen |
| 1161 |
|
| 1162 |
\vfill |
| 1163 |
|
| 1164 |
\DT@accepted\\ |
| 1165 |
\DTexaminers |
| 1166 |
|
| 1167 |
\bigskip |
| 1168 |
|
| 1169 |
\phantom{\DTdate} |
| 1170 |
}}}}% |
| 1171 |
\end{picture}% |
| 1172 |
}% |
| 1173 |
\clearpage |
| 1174 |
\thispagestyle{empty} |
| 1175 |
\hbox{} |
| 1176 |
\clearpage} |
| 1177 |
\newcommand{\dissback}{% |
| 1178 |
\thispagestyle{empty} |
| 1179 |
\hbox{} |
| 1180 |
\clearpage |
| 1181 |
\thispagestyle{empty}% |
| 1182 |
{\parskip=0pt% |
| 1183 |
\parindent=0pt% |
| 1184 |
\unitlength=0.1mm% |
| 1185 |
\null\vfill% |
| 1186 |
\begin{picture}(0,0)(360,110)% |
| 1187 |
\put(80,2020){% |
| 1188 |
\makebox(0,0)[tl]{% |
| 1189 |
\hbox to 132.5mm{% |
| 1190 |
\vbox to 194mm{% |
| 1191 |
\null\vfill |
| 1192 |
|
| 1193 |
\begin{minipage}[b]{132.5mm} |
| 1194 |
\Large |
| 1195 |
\DTfont@series |
| 1196 |
Series in Signal and Information Processing\\ |
| 1197 |
\DTfont@normal edited by Hans-Andrea Loeliger\\[1.5ex] |
| 1198 |
$\boldsymbol \sum$ Hartung-Gorre Verlag |
| 1199 |
Konstanz\\[1.5ex] |
| 1200 |
ISSN \DTissn\quad ISBN \DTisbn\quad DM \DTprice |
| 1201 |
\end{minipage} |
| 1202 |
}}}}% |
| 1203 |
\end{picture}% |
| 1204 |
}} |
| 1205 |
% \end{macrocode} |
| 1206 |
% \end{macro} |
| 1207 |
% \end{macro} |
| 1208 |
% \end{macro} |
| 1209 |
% |
| 1210 |
% \section{Conclusion} |
| 1211 |
% |
| 1212 |
% I was convinced by people on |comp.text.tex| to submit this class |
| 1213 |
% to CTAN such that people might learn from it. Thanks to everybody |
| 1214 |
% who commented on my layout, I have used some of the comments to |
| 1215 |
% improve the look of my dissertation. |
| 1216 |
% |
| 1217 |
% \Finale |
| 1218 |
% |