ia64/xen-unstable

view docs/style.tex @ 2570:30a9b33481dc

bitkeeper revision 1.1159.90.2 (415be9d5hTw1zLV9fA-AYcekmwhMwg)

Discard devices early for local migrate.
author mjw@wray-m-3.hpl.hp.com
date Thu Sep 30 11:11:17 2004 +0000 (2004-09-30)
parents aadd0dc51c45
children
line source
2 \usepackage{parskip,fancyheadings}
4 \setcounter{secnumdepth}{10}
5 \setcounter{tocdepth}{2}
7 %\usepackage{sabon}
8 \def\textos#1{#1}
10 %
11 % From PRB: Use FancyPlain style -- set up to produce draft
12 % information and disable rules and section headings in headers and
13 % footers.
14 %
16 % \filename
18 \def\filename{thesis.tex}
19 \let\savedinclude\include
20 \def\include#1{\def\filename{#1.tex}\savedinclude{#1}}
22 % \prtinttime
24 \newcounter{hours}\newcounter{mins}
25 \newcommand{\printtime}{%
26 \setcounter{hours}{\time/60}%
27 \setcounter{mins}{\time-\value{hours}*60}%
28 \ifthenelse{\value{hours}<10}{0}{}\thehours:%
29 \ifthenelse{\value{mins}<10}{0}{}\themins}
32 % Final tweaks to the layout -- PRB/SMH/TLH
34 \newcommand{\verylongpage}{\enlargethispage{2.5\baselineskip}}
35 \newcommand{\longpage}{\enlargethispage{2\baselineskip}}
36 \newcommand{\shortpage}{\enlargethispage{-2\baselineskip}}
37 \newcommand{\quitelongpage}{\enlargethispage{1\baselineskip}}
38 \newcommand{\quiteshortpage}{\enlargethispage{-1\baselineskip}}
40 % Use instead of / to allow hyphenation -- PRB/SMH
42 \def\slash{/\penalty 0\hskip 0pt\relax}
44 %
45 % Header/Footer
46 %
48 \pagestyle{fancyplain}
49 \headrulewidth=0pt
50 \footrulewidth=0pt
51 \plainheadrulewidth=0pt
52 \plainfootrulewidth=0pt
54 \lhead[]{}
55 \chead[]{}
56 \rhead[]{}
58 \lfoot[\sl\thepage]{}
59 \cfoot[]{}
60 \rfoot[]{\sl\thepage}
62 %
63 % Captions (from RF: make captions hang properly)
64 %
66 \makeatletter
67 \long\def\@makecaption#1#2{%
68 \vskip 10\p@
69 \setbox\@tempboxa\hbox{\small #1: #2}%
70 \ifdim \wd\@tempboxa >\hsize
71 \@hangfrom{\small #1: }{\small #2}\par
72 \else
73 \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
74 \fi}
75 \makeatother
77 \makeatletter
79 %
80 % Keep mpars on the same side (we use them for hanging section
81 % numbers).
82 %
84 \@mparswitchfalse
85 \marginparsep=1ex
87 %
88 % Abandon ugly vertical justification
89 %
91 \raggedbottom
93 %
94 % Poor-mans small caps
95 %
97 %\font \psc = ptmr8t scaled 800
98 %\renewcommand{\scdefault}{psc}
100 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
102 %
103 % Let footnotes fall right to the bottom of the page
104 %
106 \renewcommand\footnoterule{\vfill\hrule\vspace{6pt}}
108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 %
110 % Headings
112 %
113 % Fonts
114 %
116 % \font\sectionfont = phvr8t scaled 1400
117 % \font\subsectionfont = phvr8t scaled 1200
118 % \font\subsubsectionfont = phvr8t scaled 1000
120 %
121 % Chapter/Section names
122 %
124 \def\chaptermark#1{%
125 \markboth {{\ifnum \c@secnumdepth >\m@ne
126 \@chapapp\ \thechapter. \ \fi
127 #1}}{}
128 }
130 \def\sectionmark#1{%
131 \markright {{\ifnum \c@secnumdepth >\z@
132 \thesection. \ \fi
133 #1}}
134 }
136 %
137 % Chapter heading components
138 %
140 \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
141 \refstepcounter{chapter}%
142 \typeout{\@chapapp\space\thechapter.}%
143 \addcontentsline{toc}{chapter}%
144 {\protect\numberline{\thechapter}#1}%
145 \else
146 \addcontentsline{toc}{chapter}{#1}
147 \fi
148 \chaptermark{#1}%
149 \addtocontents{lof}{\protect\addvspace{10\p@}}%
150 \addtocontents{lot}{\protect\addvspace{10\p@}}%
151 \if@twocolumn
152 \@topnewpage[\@makechapterhead{#2}]%
153 \else
154 \@makechapterhead{#2}%
155 \@afterheading
156 \fi
157 }
159 \def\@makechapterhead#1{%
160 \vspace*{50\p@}%
161 {\parindent \z@ \raggedright \reset@font
162 \ifnum \c@secnumdepth >\m@ne
163 \LARGE \@chapapp{} \thechapter
164 \par
165 \vskip 10\p@
166 \fi
167 \Huge #1\par
168 \nobreak
169 \vskip 20\p@
170 }}
172 \def\@schapter#1{\if@twocolumn
173 \@topnewpage[\@makeschapterhead{#1}]%
174 \else
175 \@makeschapterhead{#1}%
176 \@afterheading
177 \fi}
179 \def\@makeschapterhead#1{%
180 \vspace*{50\p@}%
181 {\parindent \z@ \raggedright
182 \reset@font
183 \Huge #1\par
184 \nobreak
185 \vskip 40\p@
186 }}
188 %
189 % *Section heading components
190 %
192 \def\@startsection#1#2#3#4#5#6{%
193 \if@noskipsec \leavevmode \fi
194 \par
195 \@tempskipa #4\relax
196 \@afterindenttrue
197 \ifdim \@tempskipa <\z@
198 \@tempskipa -\@tempskipa \@afterindentfalse
199 \fi
200 \if@nobreak
201 \everypar{}%
202 \else
203 \addpenalty\@secpenalty\addvspace\@tempskipa
204 \fi
205 \@ifstar
206 {\@ssect{#3}{#4}{#5}{#6}}%
207 {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
209 \def\@sect#1#2#3#4#5#6[#7]#8{%
210 \ifnum #2>\c@secnumdepth
211 \let\@svsec\@empty
212 \else
213 \refstepcounter{#1}%
214 \protected@edef\@svsec{\@seccntformat{#1}\relax}%
215 \fi
216 \@tempskipa #5\relax
217 \ifdim \@tempskipa>\z@
218 \begingroup
219 #6{\interlinepenalty \@M #8\@@par}%
220 \reversemarginpar{\marginpar{{\rightline{\@svsec}}}}
221 \endgroup
222 \csname #1mark\endcsname{#7}%
223 \addcontentsline{toc}{#1}{%
224 \ifnum #2>\c@secnumdepth \else
225 \protect\numberline{\csname the#1\endcsname}%
226 \fi
227 #7}%
228 \else
229 \def\@svsechd{%
230 #6{\hskip #3\relax
231 \@svsec #8}%
232 \csname #1mark\endcsname{#7}%
233 \addcontentsline{toc}{#1}{%
234 \ifnum #2>\c@secnumdepth \else
235 \protect\numberline{\csname the#1\endcsname}%
236 \fi
237 #7}}%
238 \fi
239 \@xsect{#5}
240 }
242 %
243 % Table of contents
244 %
246 \renewcommand\contentsname{Table of contents}
247 \renewcommand\tableofcontents{%
248 \if@twocolumn
249 \@restonecoltrue\onecolumn
250 \else
251 \@restonecolfalse
252 \fi
253 \chapter*{\contentsname
254 \@mkboth{\contentsname}{}}%
255 \@starttoc{toc}%
256 \if@restonecol\twocolumn\fi
257 }
259 %
260 % List of Figures
261 %
263 \renewcommand\listfigurename{List of figures}
264 \renewcommand\listoffigures{%
265 \if@twocolumn
266 \@restonecoltrue\onecolumn
267 \else
268 \@restonecolfalse
269 \fi
270 \chapter*{\listfigurename
271 \@mkboth{\listfigurename}{}}%
272 \@starttoc{lof}%
273 \if@restonecol\twocolumn\fi
274 }
276 %
277 % List of Tables
278 %
280 \renewcommand\listtablename{List of tables}
281 \renewcommand\listoftables{%
282 \if@twocolumn
283 \@restonecoltrue\onecolumn
284 \else
285 \@restonecolfalse
286 \fi
287 \chapter*{\listtablename
288 \@mkboth{\listtablename}{}}%
289 \@starttoc{lot}%
290 \if@restonecol\twocolumn\fi
291 }
293 %
294 % Glossary
295 %
297 \newcommand\gloname{Glossary}
298 \newcommand\gloss{%
299 \if@twocolumn
300 \@restonecoltrue\onecolumn
301 \else
302 \@restonecolfalse
303 \fi
304 \chapter*{\gloname
305 \@mkboth{\gloname}{}}%
306 \input{glossary}
307 \vfill
308 \if@restonecol\twocolumn\fi
309 }
311 %
312 % Bibliography
313 %
315 \renewenvironment{thebibliography}[1]
316 {\chapter*{\bibname
317 \@mkboth{\bibname}{}}%
318 \list{\@biblabel{\arabic{enumiv}}}%
319 {\settowidth\labelwidth{\@biblabel{#1}}%
320 \leftmargin\labelwidth
321 \advance\leftmargin\labelsep
322 % \if@openbib
323 % \advance\leftmargin\bibindent
324 % \itemindent -\bibindent
325 % \listparindent \itemindent
326 % \parsep \z@
327 % \fi
328 \usecounter{enumiv}%
329 \let\p@enumiv\@empty
330 \renewcommand\theenumiv{\arabic{enumiv}}}%
331 % \if@openbib
332 % \renewcommand\newblock{\par}
333 % \else
334 \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
335 % \fi
336 \sloppy\clubpenalty4000\widowpenalty4000%
337 \sfcode`\.=\@m}
338 {\def\@noitemerr
339 {\@latex@warning{Empty `thebibliography' environment}}%
340 \endlist}
342 %
343 % Chapter
344 %
346 \renewcommand\chapter{%
347 \if@openright\cleardoublepage\else\clearpage\fi
348 \thispagestyle{plain}%
349 \global\@topnum\z@
350 \@afterindentfalse
351 \secdef\@chapter\@schapter
352 }
354 %
355 % *Sections
356 %
358 % \z@ -- zero?
360 % \@startsection{name}{depth}
361 % {indent}
362 % {beforeskip \@plus foo \@minus bar}
363 % foo: ... ; bar: jitter back up page?
364 % {afterskip}
365 % {style}
367 \renewcommand\section{%
368 \@startsection{section}{1}
369 {\z@}%
370 {-5ex \@plus 5ex \@minus -.5ex}%
371 {2.5ex \@minus .5ex}%
372 {\reset@font\Large}%
373 }
375 \renewcommand\subsection{%
376 \@startsection{subsection}{2}
377 {\z@}%
378 {-3ex \@plus 3ex \@minus -.5ex}%
379 {1.5ex \@minus .5ex}%
380 {\reset@font\large}%
381 }
383 \renewcommand\subsubsection{%
384 \@startsection{subsubsection}{3}
385 {\z@}%
386 {-1ex \@plus 1ex \@minus -.5ex}%
387 {1ex \@minus .5ex}%
388 {\reset@font\normalsize\sl}%
389 }
391 \makeatother
392 \endinput