Statistics
| Branch: | Revision:

iof-bird-daemon / doc / tex / birddoc.sty @ 2debcb9e

History | View | Annotate | Download (3.79 KB)

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
\topmargin -0.5 in
18
\setlength{\textheight}{\paperheight}
19
\addtolength{\textheight}{-2 in}
20
\advance\headsep 2 ex
21
\advance\textheight -2 ex
22
\renewcommand{\baselinestretch}{1.14}
23
\addtolength{\parskip}{0.5 ex}
24
\setcounter{tocdepth}{1}
25

    
26
\oddsidemargin 0.0 in
27
\evensidemargin 0 in
28
\textwidth 7 in
29
\def\ps@headings{\let\@mkboth\markboth
30
 \def\@oddfoot{}\def\@evenfoot{}%       No feet.
31
 \def\@evenhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
32
                \rm \thepage\hfil \bf \leftmark}     % Left heading.
33
 \def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
34
               {\bf \rightmark}\hfil \rm\thepage}    % Right heading.
35
 \def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
36
     \@chapapp\ \thechapter. \ \fi ##1}}{}}%
37
 \def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
38
  \thesection. \ \fi ##1}}}}
39

    
40
\def\@makechapterhead#1{%
41
  {\parindent \z@ \raggedright \normalfont
42
    \huge \bfseries \@chapapp\space\thechapter: #1\par\nobreak
43
    \vskip 20\p@
44
  }}
45
\def\@makeschapterhead#1{%
46
  {\parindent \z@ \raggedright \normalfont
47
    \huge \bfseries #1\par\nobreak
48
    \vskip 20\p@
49
  }}
50

    
51
%% Titlepage stuff
52

    
53
\gdef\@title{}
54
\gdef\title#1{\gdef\@title{#1}}
55
\gdef\@date{}
56
\gdef\date#1{\gdef\@date{#1}}
57
\gdef\@author{}
58
\gdef\author#1{\gdef\@author{#1}}
59
\gdef\@abstract{}
60
\gdef\abstract#1{\gdef\@abstract{#1}}
61

    
62
\def\maketitle{\thispagestyle{empty}\let\footnotesize\small%
63
\let\footnoterule\relax
64
%\setcounter{page}{0}%
65
%\null
66
%\vskip 3 in
67
\noindent
68
{\huge\sf \@title}\\
69
\rule{\textwidth}{1mm}\\
70
\mbox{}\@author\ \hfill \@date\ \\
71
\vskip 1 ex
72
\noindent{\sf \@abstract}
73
\setcounter{footnote}{0}%
74
\gdef\@author{}\gdef\@title{}\gdef\@years{}\gdef\@abstract{}
75
\let\maketitle\relax}
76

    
77
\def\birdnarrow{\advance\@totalleftmargin by 0.5in}
78

    
79
%% Needs to be here for the previous ps@headings defs to work.
80
\pagestyle{headings}
81

    
82
%%% USEFUL MACROS
83

    
84
\newcommand{\linux}{Linux}              % Always use this when
85
				        % refering to the \linux\
86
				        % operating system, like that.
87
\newcommand{\key}[1]{{\fbox{\small\tt #1}}}   % Use this to mark keys, like
88
				              % \key{del} for the delete key.
89
\newcommand{\ret}{\fbox{\sf return}}    % Special case for the return key.
90
\newcommand{\st}{\small\tt}             % Small typewriter -- comes in handy.
91
%\newcommand{\lb}{{\tt\char '173}}       % Left Brace '{'
92
%\newcommand{\rb}{{\tt\char '175}}       % Right Brace '}'
93
\newcommand{\lbr}{$\langle$}		% Left Bracket '<'
94
\newcommand{\rbr}{$\rangle$}		% Right Bracket '>'
95
\newcommand{\bs}{{\tt\char '134}}       % BackSlash '\'
96
\newcommand{\tm}{${}^{\mbox{\tiny\sf TM}}$}
97
\newcommand{\TM}{\tm}                   % TM trademark symbol in
98
				        % either case
99
\newcommand{\cparam}[1]{{\rm \lbr{\sl #1}\rbr}}
100
					% Metavariables.
101

    
102
%% Define NAMEURL macro to handle the optional name argument
103
%% This calls on the \url macro from the url.sty package so the 
104
%% URL will be hyphenated correctly.
105
\def\nameurl#1#2{{\em #2} {\tt <\url{#1}>}}
106
\def\onlynameurl#1{{\em #1}}
107

    
108
%% the tscreen environment automatically goes into typewriter type,
109
%%  but is otherwise like the screen environment
110

    
111
\newenvironment{tscreen}%
112
 {\begin{quote}\bgroup\small\tt}%
113
 {\egroup\end{quote}}
114

    
115
%% Typesetting of function descriptions
116

    
117
\def\function{\bigbreak\hrule\nobreak\bigskip\nobreak\leftline{\bf Function}\nobreak\smallskip\nobreak\parskip=0pt\relax}
118
\def\funcsect#1{\medbreak\leftline{\bf #1}\nobreak}