1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
%
% $Id: fpcman.sty,v 1.1 2000/07/13 09:10:19 michael Exp $
% This file is part of the FPC documentation.
% Copyright (C) 1997, by Michael Van Canneyt
%
% The FPC documentation is free text; you can redistribute it and/or
% modify it under the terms of the GNU Library General Public License as
% published by the Free Software Foundation; either version 2 of the
% License, or (at your option) any later version.
%
% The FPC Documentation is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
% Library General Public License for more details.
%
% You should have received a copy of the GNU Library General Public
% License along with the FPC documentation; see the file COPYING.LIB. If not,
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.
%
\ProvidesPackage{fpcman}[1997/06/25]
\RequirePackage{xspace}
\NeedsTeXFormat{LaTeX2e}
\ExecuteOptions{titlepage}
% Some style elements
\parindent 0pt%
\parskip 0.35\baselineskip%
% First, all definitions for latex only.
\newcommand{\docdescription}[1]{\def\@FPCDescription{#1}}
\gdef\@FPCDescription{}%
\newcommand{\docversion}[1]{\def\@FPCVersion{#1}}
\gdef\@FPCVersion{}%
% For backwards compatibility
\newcommand{\unitdescription}[1]{\def\@FPCDescription{#1}}
\newcommand{\unitversion}[1]{\def\@FPCVersion{#1}}
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\null\vfil
\vskip 4cm%
{\noindent\raggedright\Large\@title\\}%
\noindent \rule{\linewidth}{1.5mm}\\%
{\raggedleft\large%
\begin{tabular}[t]{r}%
\@FPCDescription \\
\@FPCVersion \\
\@date
\end{tabular}\par}%
\vskip 5cm%
{\noindent \large \textsf{\@author} \\%
\rule{\linewidth}{0.5mm}}
\@thanks
\vfil\null
\end{titlepage}%
\setcounter{footnote}{0}%
\let\thanks\relax\let\maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}}
% end of \maketitle
% For the \procedure and \function commands, we don't want heading numbers.
\setcounter{secnumdepth}{1}
% redefine the subsection command to leave less space,
%and to use sans serif
% Now, Let's define the \procedure and \function commands.
\newcommand{\FPClabel}[1]{%
\raggedleft\makebox[0pt][r]{\textsf{#1:}}
}
\newenvironment{FPCList}
{\begin{list}{}{%
\renewcommand{\makelabel}[1]{\FPClabel{##1}\hfil\relax}
\setlength{\labelwidth}{0pt}%
\setlength{\leftmargin}{0pt}}%
\setlength{\labelsep}{0pt}%
}
{\end{list}}
\newcommand{\function}[6]{
\subsection{#1}
\raisebox{1ex}{\rule{\linewidth}{0.5mm}}
\label{fu:#1}
\index{#1}
\begin{FPCList}
\item[Declaration]
\texttt {Function #1 #2 : #3;}
\item[Description]
#4
\item[Errors]
#5
\item[See also]
#6
\end{FPCList}
}
\newcommand{\procedure}[5]{
\subsection{#1}
\raisebox{1ex}{\rule{\linewidth}{0.5mm}}
\label{pro:#1}
\index{#1}
\begin{FPCList}
\item[Declaration]
\texttt {Function #1 #2;}
\item[Description]
#3
\item[Errors]
#4
\item[See also]
#5
\end{FPCList}
}
% define a capital version,
% for function/command which has no options passed to it.
\newcommand{\Function}[5]{\function{#1}{}{#2}{#3}{#4}{#5}}
\newcommand{\Procedure}[4]{\procedure{#1}{}{#2}{#3}{#4}}
% Now the referencing commands.
\newcommand{\seef}[1]{
\textsf{#1} (\pageref{fu:#1})}
\newcommand{\seep}[1]{
\textsf{#1} (\pageref{pro:#1})}
% man page references...
\newcommand{\seem}[2] {#1(#2) }
% for easy typesetting of variables and files.
\newcommand{\var}[1]{\texttt {#1}}
\newcommand{\file}[1]{\textsf {#1}}
%
% Useful references.
%
\newcommand{\progref}{\htmladdnormallink{Programmer's guide}{../prog/prog.html}\xspace}
\newcommand{\refref}{\htmladdnormallink{Reference guide}{../ref/ref.html}\xspace}
\newcommand{\userref}{\htmladdnormallink{Users' guide}{../user/user.html}\xspace}
\newcommand{\unitsref}{\htmladdnormallink{Unit reference}{../units/units.html}\xspace}
\newcommand{\seecrt}{\htmladdnormallink{CRT}{../crt/crt.html}\xspace}
\newcommand{\seelinux}{\htmladdnormallink{Linux}{../linux/linux.html}\xspace}
\newcommand{\seestrings}{\htmladdnormallink{strings}{../strings/strings.html}\xspace}
\newcommand{\seedos}{\htmladdnormallink{DOS}{../dos/dos.html}\xspace}
\newcommand{\seegetopts}{\htmladdnormallink{getopts}{../getopts/getopts.html}\xspace}
\newcommand{\seeobjects}{\htmladdnormallink{objects}{../objects/objects.html}\xspace}
\newcommand{\seegraph}{\htmladdnormallink{graph}{../graph/graph.html}\xspace}
\newcommand{\seeprinter}{\htmladdnormallink{printer}{../printer/printer.html}\xspace}
\newcommand{\seego}{\htmladdnormallink{GO32}{../go32/go32.html}\xspace}
\newcommand{\seec}[1]{chapter \ref{ch:#1}\xspace}
\newcommand{\sees}[1]{section \ref{se:#1}\xspace}
%
% Nice environments
%
% For Tables.
\newenvironment{FPCtable}[2]{\begin{table}[h]\caption{#2}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
% The same, but with label in third argument (tab:#3)
\newenvironment{FPCltable}[3]{\begin{table}\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
%
% Commands to reference these things.
%
\newcommand{\seet}[1]{table (\ref{tab:#1}) }
% some OSes
\newcommand{\linux}{\textsc{linux}\xspace}
\newcommand{\dos} {\textsc{dos}\xspace}
\newcommand{\msdos}{\textsc{ms-dos}\xspace}
\newcommand{\ostwo}{\textsc{os/2}\xspace}
\newcommand{\windowsnt}{\textsc{WindowsNT}\xspace}
\newcommand{\windows}{\textsc{Windows}\xspace}
\newcommand{\fpc}{Free Pascal\xspace}
\newcommand{\gnu}{\textsc{gnu}\xspace}
\newcommand{\atari}{\textsc{Atari}\xspace}
\newcommand{\amiga}{\textsc{Amiga}\xspace}
\newcommand{\win}{\textsc{Win32}\xspace}
\newcommand{\freebsd}{\textsc{FreeBSD}\xspace}
%
\newcommand{\fpcversion}{0.99.12}
%
% PDF support
%
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi
%
% end of fpcman.sty
|