fpc-hevea.tex 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. %
  2. % $Id$
  3. %
  4. % This file is part of the FPC documentation.
  5. % Copyright (C) 1997, by Michael Van Canneyt
  6. %
  7. % The FPC documentation is free text; you can redistribute it and/or
  8. % modify it under the terms of the GNU Library General Public License as
  9. % published by the Free Software Foundation; either version 2 of the
  10. % License, or (at your option) any later version.
  11. %
  12. % The FPC Documentation is distributed in the hope that it will be useful,
  13. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. % Library General Public License for more details.
  16. %
  17. % You should have received a copy of the GNU Library General Public
  18. % License along with the FPC documentation; see the file COPYING.LIB. If not,
  19. % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. % Boston, MA 02111-1307, USA.
  21. \usepackage{makeidx}
  22. \usepackage{ifthen}
  23. %
  24. % Fake packages
  25. %
  26. \newcommand{\xspace}{ }
  27. \newenvironment{multicols}[1]{}{}
  28. \newcommand{\docdescription}[1]{\def\@FPCDescription{#1}}
  29. \gdef\@FPCDescription{}%
  30. \newcommand{\docversion}[1]{\def\@FPCVersion{#1}}
  31. \gdef\@FPCVersion{}%
  32. %
  33. % FPC environments
  34. %
  35. % Remarks
  36. \newenvironment{remark}{\par\textbf{Remark:} }{\par}
  37. % List
  38. \newenvironment{FPCList}{\begin{list}}{\end{list}}
  39. % For Tables.
  40. \newenvironment{FPCtable}[2]{\begin{table}\caption{#2}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
  41. % The same, but with label in third argument (tab:#3)
  42. \newenvironment{FPCltable}[3]{\begin{table}\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
  43. %
  44. % Refs
  45. %
  46. \newcommand{\seefig}[1]{Figure \ref{fig:#1}\xspace}
  47. \newcommand{\seefl}[2]{\ahref{fu:#2}{#1}}
  48. \newcommand{\seepl}[2]{\ahref{pro:#2}{#1}}
  49. \newcommand{\seetypel}[2]{\ahref{ty:#2}{#1}}
  50. \newcommand{\seeconstl}[2]{\ahref{co:#2}{#1}}
  51. \newcommand{\seevarl}[2]{\ahref{var:#2}{#1}}
  52. \newcommand{\seec}[1]{chapter \ref{ch:#1}\xspace}
  53. \newcommand{\sees}[1]{section \ref{se:#1}\xspace}
  54. \newcommand{\seeo}[1]{\var{-#1}, (see \ref{option:#1})\xspace}
  55. \newcommand{\seet}[1]{table (\ref{tab:#1})\xspace}
  56. %
  57. % Function/procedure environments
  58. %
  59. \newenvironment{functionl}[2]{\subsection{#1}\index{#1}\label{fu:#2}\begin{FPCList}}{\end{FPCList}}
  60. \newenvironment{procedurel}[2]{\subsection{#1}\index{#1}\label{pro:#2}\begin{FPCList}}{\end{FPCList}}
  61. \newenvironment{method}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
  62. \newenvironment{property}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
  63. \newenvironment{function}[1]{\begin{functionl}{#1}{#1}}{\end{functionl}}
  64. \newenvironment{procedure}[1]{\begin{procedurel}{#1}{#1}}{\end{procedurel}}
  65. \newenvironment{typel}[2]{\subsection{#1}\index{#1}\label{ty:#2}\begin{FPCList}}{\end{FPCList}}
  66. \newenvironment{type}[1]{\begin{typel}{#1}{#1}}{\end{typel}}
  67. \newenvironment{constantl}[2]{\subsection{#1}\index{#1}\label{co:#2}\begin{FPCList}}{\end{FPCList}}
  68. \newenvironment{constant}[1]{\begin{constantl}{#1}{#1}}{\end{constantl}}
  69. \newenvironment{variablel}[2]{\subsection{#1}\index{#1}\label{var:#2}\begin{FPCList}}{\end{FPCList}}
  70. \newenvironment{variable}[1]{\begin{variablel}{#1}{#1}}{\end{variablel}}
  71. \newenvironment{ver2}{\par\textbf{version 2.0 only:}}{\par}
  72. \newcommand{\Declaration}{\item[Declaration]\ttfamily}
  73. \newcommand{\Description}{\item[Description]\rmfamily}
  74. \newcommand{\Portability}{\item[Portability]\rmfamily}
  75. \newcommand{\Errors}{\item[Errors]\rmfamily}
  76. \newcommand{\Visibility}{\item[Visibility]\rmfamily}
  77. \newcommand{\Access}{\item[Access]\rmfamily}
  78. \newcommand{\Synopsis}{\item[Synopsis]\rmfamily}
  79. \newcommand{\Arguments}{\item[Arguments]\rmfamily}
  80. \newcommand{\SeeAlso}{\item[See also]\rmfamily}
  81. %
  82. % Ref without labels
  83. %
  84. \newcommand{\seef}[1]{\seefl{#1}{#1}}
  85. \newcommand{\seep}[1]{\seepl{#1}{#1}}
  86. \newcommand{\seetype}[1]{\seetypel{#1}{#1}}
  87. \newcommand{\seevar}[1]{\seevarl{#1}{#1}}
  88. \newcommand{\seeconst}[1]{\seeconstl{#1}{#1}}
  89. %
  90. % man page references don't need labels.
  91. %
  92. \newcommand{\seem}[2]{\texttt{#1} (#2) }
  93. %
  94. % HTML references
  95. %
  96. \newcommand{\seeurl}[2]{\ahref{#2}{#1}}
  97. %
  98. % for easy typesetting of variables.
  99. %
  100. \newcommand{\var}[1]{\texttt {#1}}
  101. \newcommand{\file}[1]{\textsf {#1}}
  102. \newcommand{\key}[1]{\textsc{#1}}
  103. \newcommand{\menu}[1]{\textbf{"#1"}}
  104. %
  105. % Useful references.
  106. %
  107. \newcommand{\progref}{\ahref{../prog/prog.html}{Programmers guide}\xspace}
  108. \newcommand{\refref}{\ahref{../ref/ref.html}{Reference guide}\xspace}
  109. \newcommand{\userref}{\ahref{../user/user.html}{Users guide}\xspace}
  110. \newcommand{\unitsref}{\ahref{../units/units.html}{Unit reference}\xspace}
  111. %
  112. % Commands to reference these things.
  113. %
  114. \newcommand{\olabel}[1]{\label{option:#1}}
  115. %
  116. % some OSes
  117. %
  118. \newcommand{\linux}{\textsc{linux}\xspace}
  119. \newcommand{\unix}{\textsc{unix}\xspace}
  120. \newcommand{\dos} {\textsc{dos}\xspace}
  121. \newcommand{\msdos}{\textsc{ms-dos}\xspace}
  122. \newcommand{\ostwo}{\textsc{os/2}\xspace}
  123. \newcommand{\windows}{\textsc{Windows}\xspace}
  124. \newcommand{\windowsnt}{\textsc{Windows NT}\xspace}
  125. \newcommand{\fpc}{Free Pascal\xspace}
  126. \newcommand{\gnu}{\textsc{gnu}\xspace}
  127. \newcommand{\atari}{\textsc{Atari}\xspace}
  128. \newcommand{\amiga}{\textsc{Amiga}\xspace}
  129. \newcommand{\solaris}{\textsc{Solaris}\xspace}
  130. \newcommand{\qnx}{\textsc{QNX Realtime platform}\xspace}
  131. \newcommand{\beos}{\textsc{BeOS}\xspace}
  132. \newcommand{\palmos}{\textsc{PalmOS}\xspace}
  133. \newcommand{\netbsd}{\textsc{NetBSD}\xspace}
  134. \newcommand{\openbsd}{\textsc{OpenBSD}\xspace}
  135. \newcommand{\win}{\textsc{Win32}\xspace}
  136. \newcommand{\freebsd}{\textsc{FreeBSD}\xspace}
  137. \newcommand{\tp}{Turbo Pascal\xspace}
  138. \newcommand{\delphi}{Delphi}
  139. %
  140. % Some versions
  141. %
  142. \newcommand{\fpcversion}{1.0.8}
  143. %
  144. % For examples
  145. %
  146. \newcommand{\FPCexample}[1]{\begin{verbatim}\input{\exampledir/#1.pp}\end{verbatim}}
  147. \newcommand{\Cexample}[1]{\begin{verbatim}\input{\exampledir/#1.c}\end{verbatim}}
  148. \newcommand{\exampledir}{.}
  149. \newcommand{\FPCexampledir}[1]{\renewcommand{\exampledir}{#1}}
  150. %
  151. % Picture including
  152. %
  153. \newcommand{\FPCpic}[3]{%
  154. \linebreak%
  155. \begin{center}
  156. \textbf{Figure \ref{fig:#3} #1}%
  157. \linebreak%
  158. \label{fig:#3}%
  159. \imgsrc{../pics/#2/#3.png}%
  160. \end{center}
  161. \linebreak%
  162. }
  163. %
  164. % Categorical Function/procedure overviews
  165. %
  166. \newenvironment{funclist}{\begin{list}}{\end{list}}
  167. \newcommand{\funcrefl}[3]{\item[\ahref{#2}{fu:#2} #3]}
  168. \newcommand{\funcref}[2]{\item[\ahref{#1}{fu:#1} #2]}
  169. \newcommand{\procrefl}[3]{\item[\ahref{#2}{pro:#2} #3]}
  170. \newcommand{\procref}[2]{\item[\ahref{#1}{pro:#1} #2]}
  171. %
  172. % end of fpc-html.tex
  173. %