Annotation of embedaddon/bird/doc/tex/birddoc.sty, revision 1.1.1.1
1.1 misho 1: %% This is a LaTeX style file for typesetting BIRD documentation.
2: %% Hacked up by Martin Mares <mj@ucw.cz>
3: %%
4: %% This is a modified version of linuxdoc-qwertz.sty, for use with SGML-generated LaTeX
5: %% by Matt Welsh (mdw@sunsite.unc.edu)
6: %%
7: %% Based on linuxdoc.sty by Michael K. Johnson, and latex.tex by
8: %% Leslie Lamport.
9:
10: \NeedsTeXFormat{LaTeX2e}
11: \ProvidesClass{birddoc}
12:
13: %%% GLOBAL LAYOUT THINGS
14:
15: \marginparwidth 0.0 in
16: \parindent=0 in
17: \parskip=0.5ex
18: %\parindent=0.5in
19: %\parskip=0pt
20: \topmargin -0.5 in
21: \setlength{\textheight}{\paperheight}
22: \addtolength{\textheight}{-2 in}
23: %\advance\headsep 2 ex
24: \advance\textheight -2 ex
25: %\renewcommand{\baselinestretch}{1.14}
26: \setcounter{tocdepth}{1}
27: \oddsidemargin 0.15 in
28: \evensidemargin -0.35 in
29: \textwidth 6.5in
30:
31: \def\ps@headings{\let\@mkboth\markboth
32: \def\@oddfoot{}\def\@evenfoot{}% No feet.
33: \def\@evenhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
34: \rm \thepage\hfil \bf \leftmark} % Left heading.
35: \def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
36: {\bf \rightmark}\hfil \rm\thepage} % Right heading.
37: \def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
38: \@chapapp\ \thechapter. \ \fi ##1}}{}}%
39: \def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
40: \thesection. \ \fi ##1}}}}
41:
42: \def\@makechapterhead#1{%
43: {\parindent \z@ \raggedright \normalfont
44: \huge \bfseries \@chapapp\space\thechapter: #1\par\nobreak
45: \vskip 20\p@
46: }}
47: \def\@makeschapterhead#1{%
48: {\parindent \z@ \raggedright \normalfont
49: \huge \bfseries #1\par\nobreak
50: \vskip 20\p@
51: }}
52:
53: %% Titlepage stuff
54:
55: \gdef\@title{}
56: \gdef\title#1{\gdef\@title{#1}}
57: \gdef\@date{}
58: \gdef\date#1{\gdef\@date{#1}}
59: \gdef\@author{}
60: \gdef\author#1{\gdef\@author{#1}}
61: \gdef\@abstract{}
62: \gdef\abstract#1{\gdef\@abstract{#1}}
63:
64: \def\maketitle{\thispagestyle{empty}\let\footnotesize\small%
65: \let\footnoterule\relax
66: %\setcounter{page}{0}%
67: %\null
68: %\vskip 3 in
69: \noindent
70: {\huge\sf \@title}\\
71: \rule{\textwidth}{1mm}\\
72: \mbox{}\@author\ \hfill \@date\ \\
73: \vskip 1 ex
74: \noindent{\sf \@abstract}
75: \setcounter{footnote}{0}%
76: \gdef\@author{}\gdef\@title{}\gdef\@years{}\gdef\@abstract{}
77: \let\maketitle\relax}
78:
79: \def\birdnarrow{\advance\@totalleftmargin by 0.5in}
80:
81: %% Needs to be here for the previous ps@headings defs to work.
82: \pagestyle{headings}
83:
84: \def\progdoc{
85: \raggedbottom
86: }
87:
88: %%% USEFUL MACROS
89:
90: \newcommand{\linux}{Linux} % Always use this when
91: % refering to the \linux\
92: % operating system, like that.
93: \newcommand{\key}[1]{{\fbox{\small\tt #1}}} % Use this to mark keys, like
94: % \key{del} for the delete key.
95: \newcommand{\ret}{\fbox{\sf return}} % Special case for the return key.
96: \newcommand{\st}{\small\tt} % Small typewriter -- comes in handy.
97: %\newcommand{\lb}{{\tt\char '173}} % Left Brace '{'
98: %\newcommand{\rb}{{\tt\char '175}} % Right Brace '}'
99: \newcommand{\lbr}{$\langle$} % Left Bracket '<'
100: \newcommand{\rbr}{$\rangle$} % Right Bracket '>'
101: \newcommand{\bs}{{\tt\char '134}} % BackSlash '\'
102: \newcommand{\tm}{${}^{\mbox{\tiny\sf TM}}$}
103: \newcommand{\TM}{\tm} % TM trademark symbol in
104: % either case
105: \newcommand{\cparam}[1]{{\rm \lbr{\sl #1}\rbr}}
106: % Metavariables.
107:
108: %% Define NAMEURL macro to handle the optional name argument
109: %% This calls on the \url macro from the url.sty package so the
110: %% URL will be hyphenated correctly.
111: \def\nameurl#1#2{{\em #2} {\tt <\url{#1}>}}
112: \def\onlynameurl#1{{\em #1}}
113:
114: %% the tscreen environment automatically goes into typewriter type,
115: %% but is otherwise like the screen environment
116:
117: \newenvironment{tscreen}%
118: {\begin{quote}\bgroup\small\tt}%
119: {\egroup\end{quote}}
120:
121: %% Typesetting of function descriptions
122:
123: \def\function{\bigbreak\hrule\nobreak\bigskip\nobreak\leftline{\bf Function}\nobreak\smallskip\nobreak\parskip=0pt\relax}
124: \def\funcsect#1{\medbreak\leftline{\bf #1}\nobreak}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>