Browse Source

* Better makefile and styles

marco 24 years ago
parent
commit
c40808289f
4 changed files with 458 additions and 10 deletions
  1. 24 9
      docs/internal/Makefile
  2. 1 1
      docs/internal/comparch.tex
  3. 127 0
      docs/internal/fakehtml.sty
  4. 306 0
      docs/internal/intfpc.sty

+ 24 - 9
docs/internal/Makefile

@@ -26,24 +26,39 @@ PNGOBJECTS=$(addsuffix .png, $(SOURCEOBJECTS))
 
 PSOBJECTS=$(addsuffix .eps, $(SOURCEOBJECTS))
 
-pdf : $(PDFOBJECTS)
+all : pdfdoc  epsdoc
 
-png : $(PNGOBJECTS)
+pdffig : $(PDFOBJECTS)
 
-eps  : $(PSOBJECTS)
+pngfig : $(PNGOBJECTS)
 
-all : pdf png eps
+epsfig  : $(PSOBJECTS)
+
+# 4 times latex because of longtable. Theoretically it can even be higher, but we
+# don't use multicol.
+
+pdfdoc : pdffig
+	pdflatex comparch
+	pdflatex comparch
+	pdflatex comparch
+	pdflatex comparch
+
+epsdoc  :  epsfig
+	latex comparch
+	latex comparch
+	latex comparch
+	latex comparch
 
 clean : 
-	rm -f $(PDFOBJECTS) $(PNGOBJECTS) $(PSOBJECTS)
+	rm -f $(PDFOBJECTS) $(PNGOBJECTS) $(PSOBJECTS) *.aux *.idx *.toc *.lof *.log *.out comparch.pdf comparch.ps comparch.dvi
  
 $(PDFOBJECTS): %.pdf: %.fig
 	$(FIG2DEV) pdf $*.fig $*.pdf 
 
-$(PNGOBJECTS): %.png: %.fig
-	$(FIG2DEV) png $*.fig $*.png 
-
 $(PSOBJECTS): %.eps: %.fig
 	$(FIG2DEV) eps $*.fig $*.eps
 
- 
+# Could be handy for latex2html:
+
+$(PNGOBJECTS): %.png: %.fig
+	$(FIG2DEV) png $*.fig $*.png 

+ 1 - 1
docs/internal/comparch.tex

@@ -1,6 +1,6 @@
 \documentclass [12pt]{article}
 \usepackage {graphicx}
-\usepackage {fpc}
+\usepackage {intfpc}
 \usepackage {longtable}
 %\usepackage {float}
 \usepackage{listings}

+ 127 - 0
docs/internal/fakehtml.sty

@@ -0,0 +1,127 @@
+%
+%   $Id$
+%   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{fakehtml}[2001/07/01]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% based upon Eijkhout's  comment.sty v2.0
+% with modifications to avoid conflicts with later versions
+% of this package, should a user be requiring it.
+%	Ross Moore,  10 March 1999
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Comment.sty   version 2.0, 19 June 1992
+% selectively in/exclude pieces of text: the user can define new
+% comment versions, and each is controlled separately.
+% This style can be used with plain TeX or LaTeX, and probably
+% most other packages too.
+%
+% Examples of use in LaTeX and TeX follow \endinput
+%
+% Author
+%    Victor Eijkhout
+%    Department of Computer Science
+%    University Tennessee at Knoxville
+%    104 Ayres Hall
+%    Knoxville, TN 37996
+%    USA
+%
+%    [email protected]
+%
+% Usage: all text included in between
+%    \comment ... \endcomment
+% or \begin{comment} ... \end{comment}
+% is discarded. The closing command should appear on a line
+% of its own. No starting spaces, nothing after it.
+% This environment should work with arbitrary amounts
+% of comment.
+%
+% Other 'comment' environments are defined by
+% and are selected/deselected with
+% \includecomment{versiona}
+% \excludecoment{versionb}
+%
+% These environments are used as
+% \versiona ... \endversiona
+% or \begin{versiona} ... \end{versiona}
+% with the closing command again on a line of its own.
+%
+% Basic approach:
+% to comment something out, scoop up  every line in verbatim mode
+% as macro argument, then throw it away.
+% For inclusions, both the opening and closing comands
+% are defined as noop
+%
+% Changed \next to \html@next to prevent clashes with other sty files
+% ([email protected])
+% Changed \html@next to \htmlnext so the \makeatletter and
+% \makeatother commands could be removed (they were causing other
+% style files - changebar.sty - to crash) ([email protected])
+% Changed \htmlnext back to \html@next...
+
+\def\makeinnocent#1{\catcode`#1=12 }
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+
+\def\ThrowAwayComment#1{\begingroup
+    \def\CurrentComment{#1}%
+    \let\do\makeinnocent \dospecials
+    \makeinnocent\^^L% and whatever other special cases
+%%RRM
+%%  use \xhtmlComment for \xComment
+%%  use \html@next    for \next
+    \endlinechar`\^^M \catcode`\^^M=12 \xhtmlComment}
+{\catcode`\^^M=12 \endlinechar=-1 %
+ \gdef\xhtmlComment#1^^M{\def\test{#1}\edef\test{\meaning\test}
+      \csarg\ifx{PlainEnd\CurrentComment Test}\test
+          \let\html@next\endgroup
+      \else \csarg\ifx{LaLaEnd\CurrentComment Test}\test
+            \edef\html@next{\endgroup\noexpand\end{\CurrentComment}}
+      \else \csarg\ifx{LaInnEnd\CurrentComment Test}\test
+            \edef\html@next{\endgroup\noexpand\end{\CurrentComment}}
+      \else \let\html@next\xhtmlComment
+      \fi \fi \fi \html@next}
+}
+
+%%\def\includecomment	%%RRM
+\def\htmlincludecomment
+ #1{\expandafter\def\csname#1\endcsname{}%
+    \expandafter\def\csname end#1\endcsname{}}
+%%\def\excludecomment	%%RRM
+\def\htmlexcludecomment
+ #1{\expandafter\def\csname#1\endcsname{\ThrowAwayComment{#1}}%
+    {\escapechar=-1\relax
+     \edef\tmp{\string\\end#1}%
+      \csarg\xdef{PlainEnd#1Test}{\meaning\tmp}%
+     \edef\tmp{\string\\end\string\{#1\string\}}%
+      \csarg\xdef{LaLaEnd#1Test}{\meaning\tmp}%
+     \edef\tmp{\string\\end \string\{#1\string\}}%
+      \csarg\xdef{LaInnEnd#1Test}{\meaning\tmp}%
+    }}
+
+%%\excludecomment{comment}	%%RRM
+\htmlexcludecomment{comment}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% end Comment.sty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\let\includecomment=\htmlincludecomment
+\let\excludecomment=\htmlexcludecomment
+
+\newcommand{\latex}[1]{#1}
+\newcommand{\html}[1]{}
+\htmlexcludecomment{htmlonly}
+\newenvironment{latexonly}{}{}

+ 306 - 0
docs/internal/intfpc.sty

@@ -0,0 +1,306 @@
+%
+%   $Id$
+%   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{intfpc}[1996/12/09]
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{multicol}
+\RequirePackage{epsfig}
+\RequirePackage{xspace}
+\RequirePackage{ifthen}
+\RequirePackage{listings}
+\RequirePackage{makeidx}
+\RequirePackage{a4}
+\RequirePackage{fancyhdr}
+\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}{4}
+% redefine the subsection command to leave less space,
+%and to use sans serif
+\renewcommand\subsection{\@startsection%
+{subsection}%
+{2}%
+{\z@}%
+{-4.25ex\@plus -1ex \@minus -.2ex}%
+{1pt}%
+{\normalfont\large\sffamily\bfseries}}
+% Now, Let's define the \procedure and \function commands.
+\newcommand{\FPClabel}[1]{%
+\raggedleft\makebox[0pt][r]{\textsf{#1:}}
+}
+%
+% FPC environments
+%
+% Lists
+\newenvironment{FPCList}
+{\begin{list}{}{%
+  \renewcommand{\makelabel}[1]{\FPClabel{##1}\hfil\relax}
+  \setlength{\labelwidth}{0pt}%
+  \setlength{\leftmargin}{0pt}}%
+  \setlength{\labelsep}{0pt}%
+}
+{\end{list}}
+%
+% remarks
+%
+\newenvironment{remark}{\par\makebox[0pt][r]{\bfseries{}Remark:\hspace{.25em}}}{\par}
+% For Tables.
+\newenvironment{FPCtable}[2]{\begin{table}[ht]\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}[ht]\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
+%
+% Refs
+%
+\newcommand{\seefig}[1]{figure (\ref{fig:#1})\xspace}
+\newcommand{\seefl}[2]{\textsf{#1} (\pageref{fu:#2})}
+\newcommand{\seepl}[2]{\textsf{#1} (\pageref{pro:#2})}
+\newcommand{\seetypel}[2]{\textsf{#1} (\pageref{ty:#2})}
+\newcommand{\seeconstl}[2]{\textsf{#1} (\pageref{co:#2})}
+\newcommand{\seevarl}[2]{\textsf{#1} (\pageref{var:#2})}
+\newcommand{\seec}[1]{chapter \ref{ch:#1}, page \pageref{ch:#1}\xspace}
+\newcommand{\sees}[1]{section \ref{se:#1}, page \pageref{se:#1}\xspace}
+\newcommand{\seeo}[1]{\var{-#1}, (see page \ref{option:#1})\xspace}
+\newcommand{\seet}[1]{table (\ref{tab:#1})\xspace}
+%
+% Function/procedure environments
+%
+\newenvironment{functionl}[2]{\paragraph{#1}\index{#1}\label{fu:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{procedurel}[2]{\paragraph{#1}\index{#1}\label{pro:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{method}[2]{\paragraph{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{property}[2]{\paragraph{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{function}[1]{\begin{functionl}{#1}{#1}}{\end{functionl}}
+\newenvironment{procedure}[1]{\begin{procedurel}{#1}{#1}}{\end{procedurel}}
+\newenvironment{typel}[2]{\paragraph{#1}\index{#1}\label{ty:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{type}[1]{\begin{typel}{#1}{#1}}{\end{typel}}
+\newenvironment{constantl}[2]{\subsection{#1}\index{#1}\label{co:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{constant}[1]{\begin{constantl}{#1}{#1}}{\end{constantl}}
+\newenvironment{variablel}[2]{\paragraph{#1}\index{#1}\label{var:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{variable}[1]{\begin{variablel}{#1}{#1}}{\end{variablel}}
+\newenvironment{functionl3}[2]{\paragraph{#1}\index{#1}\label{fu:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{procedurel3}[2]{\paragraph{#1}\index{#1}\label{pro:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{method3}[2]{\paragraph{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{property3}[2]{\paragraph{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{function3}[1]{\begin{functionl3}{#1}{#1}}{\end{functionl}}
+\newenvironment{procedure3}[1]{\begin{procedurel3}{#1}{#1}}{\end{procedurel}}
+\newenvironment{typel3}[2]{\paragraph{#1}\index{#1}\label{ty:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{type3}[1]{\begin{typel3}{#1}{#1}}{\end{typel}}
+\newenvironment{constantl3}[2]{\subsection{#1}\index{#1}\label{co:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{constant3}[1]{\begin{constantl3}{#1}{#1}}{\end{constantl}}
+\newenvironment{variablel3}[2]{\paragraph{#1}\index{#1}\label{var:#2}\begin{FPCList}}{\end{FPCList}}
+\newenvironment{variable3}[1]{\begin{variablel3}{#1}{#1}}{\end{variablel}}
+
+\newcommand{\Declaration}{\item[Declaration]\ttfamily}
+\newcommand{\Description}{\item[Description]\rmfamily}
+\newcommand{\Parameters}{\item[Parameters]\rmfamily}
+\newcommand{\Errors}{\item[Errors]\rmfamily}
+\newcommand{\Visibility}{\item[Visibility]\ttfamily}
+\newcommand{\Notes}{\item[Notes]\rmfamily}
+\newcommand{\Algorithm}{\item[Algorithm]\rmfamily}
+\newcommand{\Synopsis}{\item[Synopsis]\rmfamily}
+\newcommand{\Arguments}{\item[Arguments]\rmfamily}
+\newcommand{\SeeAlso}{\item[See also]\rmfamily}
+%
+% Ref without labels
+%
+\newcommand{\seef}[1]{\seefl{#1}{#1}}
+\newcommand{\seep}[1]{\seepl{#1}{#1}}
+\newcommand{\seetype}[1]{\seetypel{#1}{#1}}
+\newcommand{\seevar}[1]{\seevarl{#1}{#1}}
+\newcommand{\seeconst}[1]{\seeconstl{#1}{#1}}
+%
+% man page references don't need labels.
+%
+\newcommand{\seem}[2]{\texttt{#1} (#2) }
+%
+% for easy typesetting of variables.
+%
+\newcommand{\var}[1]{\texttt {#1}}
+\newcommand{\file}[1]{\textsf {#1}}
+\newcommand{\key}[1]{\textsc{#1}}
+\newcommand{\menu}[1]{\textbf{"#1"}}
+%
+% Useful references.
+%
+\newcommand{\progref}{\htmladdnormallink{Programmers 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}
+%
+% Commands to reference these things.
+%
+\newcommand{\olabel}[1]{\label{option:#1}}
+%
+% some OSes
+%
+\newcommand{\linux}{\textsc{linux}\xspace}
+\newcommand{\unix}{\textsc{unix}\xspace}
+\newcommand{\dos}  {\textsc{dos}\xspace}
+\newcommand{\msdos}{\textsc{ms-dos}\xspace}
+\newcommand{\ostwo}{\textsc{os/2}\xspace}
+\newcommand{\windows}{\textsc{Windows}\xspace}
+\newcommand{\windowsnt}{\textsc{Windows NT}\xspace}
+\newcommand{\fpc}{Free Pascal\xspace}
+\newcommand{\gnu}{\textsc{gnu}\xspace}
+\newcommand{\atari}{\textsc{Atari}\xspace}
+\newcommand{\amiga}{\textsc{Amiga}\xspace}
+\newcommand{\solaris}{\textsc{Solaris}\xspace}
+\newcommand{\qnx}{\textsc{QNX Realtime platform}\xspace}
+\newcommand{\beos}{\textsc{BeOS}\xspace}
+\newcommand{\palmos}{\textsc{PalmOS}\xspace}
+\newcommand{\netbsd}{\textsc{NetBSD}\xspace}
+\newcommand{\win}{\textsc{Win32}\xspace}
+\newcommand{\freebsd}{\textsc{FreeBSD}\xspace}
+\newcommand{\tp}{Turbo Pascal\xspace}
+\newcommand{\delphi}{Delphi}
+%
+% Some versions
+%
+\newcommand{\fpcversion}{1.0.2}
+%
+% PDF support
+%
+\newif\ifpdf
+\ifx\pdfoutput\undefined
+  \pdffalse
+\else
+  \pdfoutput=1
+  \pdftrue
+\fi
+
+%
+% PDF stuff
+%
+\ifpdf
+  \usepackage[pdftex,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref}
+  \usepackage{times}
+  \usepackage[T1]{fontenc}
+  \setcounter{secnumdepth}{4}
+  \pdfcompresslevel=9
+  \pdfpagewidth=210mm
+  \pdfpageheight=297mm
+\else
+  \usepackage[dvips,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref}
+\fi
+%
+% Fake Latex2Html support, so latex2html is not required
+%
+\RequirePackage{fakehtml}
+%
+%
+% For examples
+%
+\latex{%
+  \newcommand{\FPCexample}[1]{%
+    \par \file{\textbf{Listing:} \exampledir/#1.pp}%
+    \lstinputlisting{\exampledir/#1.pp}%
+  }
+  \newcommand{\Cexample}[1]{%
+    \par \file{\textbf{Listing:} \exampledir/#1.c}%
+    \lstinputlisting[language=c]{\exampledir/#1.c}%
+  }
+}
+\newcommand{\exampledir}{.}
+\newcommand{\FPCexampledir}[1]{\renewcommand{\exampledir}{#1}}
+%
+% Categorical Function/procedure overviews
+%
+\newenvironment{funclist}{%
+\par
+\raisebox{-1em}{\makebox[\textwidth]{Name\hfill Description \hfill Page}}\\
+\rule{\textwidth}{1pt}
+\html{Name\hfill Description \hfill Page}
+\begin{list}{}{%
+\setlength{\rightmargin}{0pt}\setlength{\topsep}{0cm}\setlength{\partopsep}{0pt}%
+\setlength{\itemsep}{0pt}\setlength{\labelwidth}{3.5cm}%
+\setlength{\leftmargin}{4cm}%
+\renewcommand{\makelabel}[1]{\textsf{##1\hfil}}%
+}}%
+{\end{list}}
+\newcommand{\funcrefl}[3]{\item[#1] #3 \hfill\pageref{fu:#2}}
+\newcommand{\funcref}[2]{\item[#1] #2 \hfill\pageref{fu:#1}}
+\newcommand{\procrefl}[3]{\item[#1] #3 \hfill\pageref{pro:#2}}
+\newcommand{\procref}[2]{\item[#1] #2 \hfill\pageref{pro:#1}}
+%
+% Set some listings options.
+%
+\latex{%
+  \usepackage{listings}%
+  \lstset{language=Delphi}%
+  \lstset{basicstyle=\sffamily\small}%
+  \lstset{commentstyle=\itshape}%
+  \lstset{keywordstyle=\bfseries}%
+  \lstset{frame=tb}%
+}
+%
+% Page settings
+\setlength{\oddsidemargin}{20pt}
+\addtolength{\textwidth}{39pt}
+%
+% FancyHeader settings.
+%
+\pagestyle{fancy}
+\fancyhead[LO,RE]{}
+\addtolength{\headwidth}{\marginparsep}
+\addtolength{\headwidth}{\marginparwidth}
+\addtolength{\headwidth}{-59pt}
+%
+% end of fpc.sty