fpcman.sty 5.3 KB

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