freebsd-dev/share/sgml/FreeBSD/linuxdoc.sty

130 lines
4.2 KiB
Plaintext
Raw Normal View History

%% This is linuxdoc-qwertz.sty, for use with SGML-generated LaTeX
%% by Matt Welsh (mdw@sunsite.unc.edu)
%%
%% Based on linuxdoc.sty by Michael K. Johnson, and latex.tex by
%% Leslie Lamport.
%%
%% Modified by John Fieber <jfieber@freebsd.org> for the FreeBSD
%% Documentation Project.
\typeout{Linux Documentation Style `linuxdoc, version 0.02 <6 May 1995>}
% qwertz TeX macros
\catcode`\"=12
\sloppy
\newtheorem{definition}{Definition}
\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{theorem}{Theorem}
\newcommand{\mch}[1]{{\ifmmode#1 \else\(#1\)\fi}}
\newcommand{\lt}{{\ifmmode{<}\else{\verb+<+}\fi}}
\newcommand{\gt}{{\ifmmode{>}\else{\verb+>+}\fi}}
\newcommand{\verbar}{{\ifmmode{|}\else{\tt|}\fi}}
\newcommand{\idx}[1]{#1\index{#1}}
\newcommand{\cdx}[1]{#1\index{#1@{\tt #1}}}
%%% GLOBAL LAYOUT THINGS
\marginparwidth 0.0 in
\parindent 0.0 in
\topmargin -0.5 in
\textheight 8.5 in
\advance\headsep 2 ex
\advance\textheight -2 ex
\renewcommand{\baselinestretch}{1.14}
\addtolength{\parskip}{1.2 ex}
%%% ONE-SIDED/TWO-SIDED DEPENDENCIES
\if@twoside % ``book'' style was chosen
\oddsidemargin 0.0 in
\evensidemargin 0 in
\textwidth 6 in
\def\ps@headings{\let\@mkboth\markboth
\def\@oddfoot{}\def\@evenfoot{}% No feet.
\def\@evenhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
\rm \thepage\hfil \bf \leftmark} % Left heading.
\def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
{\bf \rightmark}\hfil \rm\thepage} % Right heading.
\def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}{}}%
\def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
\thesection. \ \fi ##1}}}}
\else % if not book style, then
\oddsidemargin 0.0 in
\evensidemargin\oddsidemargin
\textwidth 6.5 in
\def\ps@headings{\let\@mkboth\markboth
\def\@oddfoot{}\def\@evenfoot{}% No feet.
\def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
{\bf \rightmark}\hfil \rm\thepage} % Right heading.
\def\@evenhead\@oddhead
\def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}{}}%
\def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
\thesection. \ \fi ##1}}}}
\fi
%% Titlepage stuff
\gdef\@title{}
\gdef\title#1{\gdef\@title{#1}}
\gdef\@date{}
\gdef\date#1{\gdef\@date{#1}}
\gdef\@author{}
\gdef\author#1{\gdef\@author{#1}}
\gdef\@abstract{}
\gdef\abstract#1{\gdef\@abstract{#1}}
\def\maketitle{\thispagestyle{empty}\let\footnotesize\small%
\let\footnoterule\relax
%\setcounter{page}{0}%
%\null
%\vskip 3 in
\noindent
{\huge\sf \@title}\\
\rule{\textwidth}{1mm}\\
\mbox{} \@author\ \hfill \@date\ \\
\vskip 1 ex
\noindent{\sf \@abstract}
\setcounter{footnote}{0}%
\gdef\@author{}\gdef\@title{}\gdef\@years{}\gdef\@abstract{}
\let\maketitle\relax}
%% Needs to be here for the previous ps@headings defs to work.
\pagestyle{headings}
%%% USEFUL MACROS
\newcommand{\linux}{Linux} % Always use this when
% refering to the \linux\
% operating system, like that.
\newcommand{\key}[1]{{\fbox{\small\tt #1}}} % Use this to mark keys, like
% \key{del} for the delete key.
\newcommand{\ret}{\fbox{\sf return}} % Special case for the return key.
\newcommand{\st}{\small\tt} % Small typewriter -- comes in handy.
%\newcommand{\lb}{{\tt\char '173}} % Left Brace '{'
%\newcommand{\rb}{{\tt\char '175}} % Right Brace '}'
\newcommand{\lbr}{$\langle$} % Left Bracket '<'
\newcommand{\rbr}{$\rangle$} % Right Bracket '>'
\newcommand{\bs}{{\tt\char '134}} % BackSlash '\'
\newcommand{\tm}{${}^{\mbox{\tiny\sf TM}}$}
\newcommand{\TM}{\tm} % TM trademark symbol in
% either case
\newcommand{\cparam}[1]{{\rm \lbr{\sl #1}\rbr}}
% Metavariables.
%% define URL macro to handle the optional name argument
\def\url#1#2{{\em #2} {\tt (#1)}}
%% the tscreen environment automatically goes into typewriter type,
%% but is otherwise like the screen environment
\newenvironment{tscreen}%
{\begin{quote}\bgroup\small\tt}%
{\egroup\end{quote}}