Statistics
| Branch: | Revision:

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

History | View | Annotate | Download (3.83 KB)

1 6cba2d5e Martin Mares
%% 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 f1aa23d4 Martin Mares
\parindent=0 in
17
\parskip=0.5ex
18
%\parindent=0.5in
19
%\parskip=0pt
20 6cba2d5e Martin Mares
\topmargin -0.5 in
21
\setlength{\textheight}{\paperheight}
22
\addtolength{\textheight}{-2 in}
23 f1aa23d4 Martin Mares
%\advance\headsep 2 ex
24 6cba2d5e Martin Mares
\advance\textheight -2 ex
25 f1aa23d4 Martin Mares
%\renewcommand{\baselinestretch}{1.14}
26 6cba2d5e Martin Mares
\setcounter{tocdepth}{1}
27 2a56bb3b Martin Mares
\oddsidemargin 0.5 in
28 6cba2d5e Martin Mares
\evensidemargin 0 in
29 2a56bb3b Martin Mares
\textwidth 6.5in
30
31 6cba2d5e Martin Mares
\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 a13eaf21 Martin Mares
\def\progdoc{
85
\raggedbottom
86
}
87
88 6cba2d5e Martin Mares
%%% 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 2debcb9e Martin Mares
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}