
samer@2: %			SWI-Prolog document-style
samer@2: 
samer@2: % Test for PDF generation using pdflatex
samer@2: 
samer@2: \usepackage{ifpdf}
samer@2: %Old tex versions
samer@2: %\newif\ifpdf
samer@2: %\ifx\pdfoutput\undefined
samer@2: %   \pdffalse
samer@2: %\else
samer@2: %   \pdfoutput=1
samer@2: %   \pdftrue
samer@2: %\fi
samer@2: 
samer@2: % Get hyperrefs to work
samer@2: 
samer@2: \usepackage{makeidx}
samer@2: \usepackage{url}
samer@2: 
samer@2: \ifpdf
samer@2:   \usepackage[pdftex,colorlinks=true,urlcolor=blue]{hyperref}
samer@2:   \pdfcompresslevel=9
samer@2: %  \pdfcatalog{
samer@2: %    /PageMode /UseOutLines
samer@2: %  }
samer@2:   \usepackage[pdftex]{graphicx}
samer@2:   \DeclareGraphicsExtensions{.pdf,.jpg,.png}
samer@2: \else
samer@2:   \usepackage[dvips]{graphicx}
samer@2:   \DeclareGraphicsExtensions{.eps,.ps}
samer@2: \fi
samer@2: \graphicspath{{figs/}{./}}
samer@2: 
samer@2: %	Other styles
samer@2: 
samer@2: \usepackage{a4wide}
samer@2: \usepackage{longtable}
samer@2: \usepackage{ifthen}
samer@2: \usepackage{dcolumn}
samer@2: \usepackage{calc}
samer@2: \setlongtables
samer@2: 
samer@2: \catcode`\^^A=8% downarrow are for subscripts
samer@2: \catcode`\_=\active
samer@2: \def_{\ifmmode\else\_\fi}
samer@2: \def\vobeyspaces{\@vobeyspaces}
samer@2: 
samer@2: \newcommand{\onlinebreak}{}
samer@2: 
samer@2: %	References
samer@2: 
samer@2: \newcommand{\secref}[1]{section~\ref{sec:#1}}
samer@2: \newcommand{\appref}[1]{appendix~\ref{sec:#1}}
samer@2: \newcommand{\chapref}[1]{chapter~\ref{sec:#1}}
samer@2: \newcommand{\figref}[1]{figure~\ref{fig:#1}}
samer@2: \newcommand{\tabref}[1]{table~\ref{tab:#1}}
samer@2: 
samer@2: \newcommand{\Secref}[1]{Section~\ref{sec:#1}}
samer@2: \newcommand{\Appref}[1]{Appendix~\ref{sec:#1}}
samer@2: \newcommand{\Chapref}[1]{Chapter~\ref{sec:#1}}
samer@2: \newcommand{\Figref}[1]{Figure~\ref{fig:#1}}
samer@2: \newcommand{\Tabref}[1]{Table~\ref{tab:#1}}
samer@2: 
samer@2: \newcommand{\tm}{$^{tm}$}
samer@2: 
samer@2: \newcommand{\reffont}{\tt}
samer@2: \newcommand{\predref}[2]{%		% functor/arity
samer@2: 	\mbox{\reffont #1/#2}}
samer@2: \newcommand{\funcref}[2]{%		% functor/arity
samer@2: 	\mbox{\reffont #1/#2}}
samer@2: \newcommand{\dcgref}[2]{%		% functor//arity
samer@2: 	\mbox{\reffont #1//#2}}
samer@2: \newcommand{\qpredref}[3]{%		% module:functor/arity
samer@2: 	\mbox{\reffont #1:#2/#3}}
samer@2: \newcommand{\qdcgref}[3]{%		% module:functor//arity
samer@2: 	\mbox{\reffont #1:#2//#3}}
samer@2: \newcommand{\nopredref}[2]{%		% functor/arity (external)
samer@2: 	\mbox{\reffont #1/#2}}
samer@2: \newcommand{\functor}[2]{%		% functor/arity (no predicate)
samer@2: 	\mbox{\reffont #1/#2}}
samer@2: \newcommand{\manref}[2]{%		% page(n)
samer@2: 	\mbox{{\reffont #1(}{\rm #2}{\tt )}}}
samer@2: \newcommand{\cfuncref}[2]{%		% function(Args...)
samer@2: 	\mbox{{\reffont #1(}{\it #2}{\tt )}}}
samer@2: \newcommand{\prologflag}[1]{%
samer@2: 	\mbox{\reffont #1}}
samer@2: 
samer@2: %	Descriptions (definitions) of various things
samer@2: %	Note: I do not know where the 1ex comes from. This should fit
samer@2: %	exactly, but appearently some dimension is missing.  I suspect
samer@2: %	a space creaping in somewhere.
samer@2: 
samer@2: \def\@nodescription{false}
samer@2: 
samer@2: \newcommand{\defentry}[1]{\definition{#1}}
samer@2: \newcommand{\definition}[1]{%
samer@2: 	\onlinebreak%
samer@2: 	\ifthenelse{\equal{\@nodescription}{true}}{%
samer@2: 	    \def\@nodescription{false}%
samer@2: 	    \makebox[-\leftmargin]{\mbox{}}\makebox[\linewidth+\leftmargin-1ex][l]{\bf #1}\\}{%
samer@2: 	    \item[{\makebox[\linewidth+\leftmargin-1ex][l]{#1}}]}}
samer@2: \newcommand{\nodescription}{\def\@nodescription{true}}
samer@2: 
samer@2: \makeatletter
samer@2: \def\cmdlineoptionitem{\@ifstar{\@gluedcmdoptitem}{\@cmdoptitem}}
samer@2: \def\@gluedcmdoptitem#1#2{\definition{\texttt{#1}\var{#2}}}
samer@2: \def\@cmdoptitem#1#2{\definition{\texttt{#1} \var{#2}}}
samer@2: \makeatother
samer@2: \newcommand{\longoptionitem}[2]{%
samer@2: 	\ifthenelse{\equal{}{#2}}{%
samer@2: 	    \definition{-{}-#1}}{%
samer@2: 	    \definition{-{}-#1={\it #2}}}\ignorespaces}
samer@2: \newcommand{\longoption}[2]{%
samer@2: 	\ifthenelse{\equal{}{#2}}{%
samer@2: 	    \mbox{\reffont -{}-#1}}{%
samer@2: 	    \mbox{\reffont -{}-#1={\it #2}}}}
samer@2: 
samer@2: \newcommand{\traceoption}[3]{%
samer@2: 	\definition{{\tt #1} (#2)}#3%
samer@2: 	\ignorespaces}
samer@2: \newcommand{\pleaseoption}[3]{%
samer@2: 	\definition{#1 {\it #2} {\rm(default: \it #3)}}%
samer@2: 	\ignorespaces}
samer@2: %\prologflagitem{Name}{Type}{Access}
samer@2: \newcommand{\prologflagitem}[3]{%
samer@2: 	\definition{#1 {\it (#2%
samer@2: 	    \ifthenelse{\equal{rw}{#3}}{, changeable}{})}}%
samer@2: 	\index{flag:#1}\ignorespaces}
samer@2: \newcommand{\escapeitem}[1]{%
samer@2: 	\definition{\Sesc{\tt #1}}
samer@2: 	\ignorespaces}
samer@2: \newcommand{\fmtchar}[1]{%
samer@2: 	\item[\tt #1]%
samer@2: 	\ignorespaces}
samer@2: 
samer@2: %	\directive{Name}{Arity}{Args}
samer@2: %	\predicate[Attibutes]{Name}{Arity}{Args}
samer@2: %	\function[Attibutes]{Name}{Arity}{Args}
samer@2: %	\infixop{Name}{Left}{Right}
samer@2: %	\prefixop{Name}{Right}
samer@2: %	\infixfunction{Name}{Left}{Right}
samer@2: %	\prefixfunction{Name}{Right}
samer@2: %	\dcg[Attibutes]{Name}{Arity}{Args}
samer@2: %
samer@2: %	Predicate   descriptions.   Must   appear   in   a   description
samer@2: %	environment.
samer@2: 
samer@2: \newcommand{\resitem}[1]{%
samer@2: 	\defentry{#1}%
samer@2: 	\index{#1}\ignorespaces}
samer@2: \makeatletter
samer@2: \def\predatt#1{\hfill{\it\footnotesize[#1]}}
samer@2: \def\predicate{\@ifnextchar[{\@attpredicate}{\@predicate}}
samer@2: \def\qpredicate{\@ifnextchar[{\@attqpredicate}{\@qpredicate}}
samer@2: \def\@predicate#1#2#3{%
samer@2: 	\ifthenelse{\equal{#2}{0}}{%
samer@2: 	    \defentry{#1}}{%
samer@2: 	    \defentry{#1({\it #3})}}%
samer@2: 	\index{#1/#2}\ignorespaces}
samer@2: \def\@attpredicate[#1]#2#3#4{%
samer@2: 	\ifthenelse{\equal{#3}{0}}{%
samer@2: 	    \defentry{#2\predatt{#1}}}{%
samer@2: 	    \defentry{#2({\it #4})\predatt{#1}}}%
samer@2: 	\index{#2/#3}\ignorespaces}
samer@2: \def\@qpredicate#1#2#3#4{%
samer@2: 	\ifthenelse{\equal{#3}{0}}{%
samer@2: 	    \defentry{#1:#2}}{%
samer@2: 	    \defentry{#1:#2({\it #4})}}%
samer@2: 	\index{#1/#2}\ignorespaces}
samer@2: \def\@attqpredicate[#1]#2#3#4#5{%
samer@2: 	\ifthenelse{\equal{#4}{0}}{%
samer@2: 	    \defentry{#2:#3\predatt{#1}}}{%
samer@2: 	    \defentry{#2:#3({\it #5})\predatt{#1}}}%
samer@2: 	\index{#2/#3}\ignorespaces}
samer@2: \def\directive{\@ifnextchar[{\@attdirective}{\@directive}}
samer@2: \def\@directive#1#2#3{%
samer@2: 	\ifthenelse{\equal{#2}{0}}{%
samer@2: 	    \defentry{:- #1}}{%
samer@2: 	    \defentry{:- #1({\it #3})}}%
samer@2: 	\index{#1/#2}\ignorespaces}
samer@2: \def\@attdirective[#1]#2#3#4{%
samer@2: 	\ifthenelse{\equal{#3}{0}}{%
samer@2: 	    \defentry{:- #2\predatt{#1}}}{%
samer@2: 	    \defentry{:- #2({\it #4})\predatt{#1}}}%
samer@2: 	\index{#2/#3}\ignorespaces}
samer@2: \def\dcg{\@ifnextchar[{\@attdcg}{\@dcg}}
samer@2: \def\@dcg#1#2#3{%
samer@2: 	\ifthenelse{\equal{#2}{0}}{%
samer@2: 	    \defentry{#1}}{%
samer@2: 	    \defentry{#1({\it #3}) \texttt{//}}}%
samer@2: 	\index{#1/#2}\ignorespaces}
samer@2: \def\@attdcg[#1]#2#3#4{%
samer@2: 	\ifthenelse{\equal{#3}{0}}{%
samer@2: 	    \defentry{#2 \texttt{//}\predatt{#1}}}{%
samer@2: 	    \defentry{#2({\it #4}) \texttt{//}\predatt{#1}}}%
samer@2: 	\index{#2//#3}\ignorespaces}
samer@2: \def\infixop{\@ifnextchar[{\@attinfixop}{\@infixop}}
samer@2: \def\@infixop#1#2#3{%
samer@2: 	\defentry{{\it #2} #1 {\it #3}}%
samer@2: 	\index{#1/2}\ignorespaces}
samer@2: \def\@attinfixop[#1]#2#3#4{%
samer@2: 	\defentry{{\it #3} #2 {\it #4}\predatt{#1}}%
samer@2: 	\index{#2/2}\ignorespaces}
samer@2: \def\prefixop{\@ifnextchar[{\@attprefixop}{\@prefixop}}
samer@2: \def\@prefixop#1#2{%
samer@2: 	\defentry{#1 {\it #2}}%
samer@2: 	\index{#1/1}\ignorespaces}
samer@2: \def\@attprefixop[#1]#2#3{%
samer@2: 	\defentry{#2 {\it #3}\predatt{#1}}%
samer@2: 	\index{#2/1}\ignorespaces}
samer@2: \let\function\predicate
samer@2: \let\infixfunction\infixop
samer@2: \let\prefixfunction\prefixop
samer@2: \makeatother
samer@2: 
samer@2: %	\termitem{functor}{Args}
samer@2: %	\infixtermitem{functor}{Left}{Right}
samer@2: %	\prefixtermitem{functor}{Right}
samer@2: %	\postfixtermitem{functor}{Left}
samer@2: %
samer@2: %	Terms in description lists. Typically used to describe various
samer@2: %	possible values or types for a term.
samer@2: 
samer@2: \newcommand{\termitem}[2]{%
samer@2: 	\ifthenelse{\equal{}{#2}}{%
samer@2: 	    \definition{#1}}{%
samer@2: 	    \definition{#1({\it #2})}}\ignorespaces}
samer@2: \newcommand{\infixtermitem}[3]{%
samer@2: 	    \definition{{\it #2} #1 {\it #3}}\ignorespaces}
samer@2: \newcommand{\prefixtermitem}[2]{%
samer@2: 	    \definition{#1 {\it #2}}\ignorespaces}
samer@2: \newcommand{\postfixtermitem}[2]{%
samer@2: 	    \definition{{\it #2} #1}\ignorespaces}
samer@2: 
samer@2: %	\term{functor}{Args}
samer@2: %	\infixterm{functor}{Left}{Right}
samer@2: %	\prefixterm{functor}{Right}
samer@2: %	\postfixterm{functor}{Left}
samer@2: %
samer@2: %	Terms used in running text.
samer@2: 
samer@2: \def\term{}
samer@2: \renewcommand{\term}[2]{%
samer@2: 	\ifthenelse{\equal{\protect}{\protect#2}}{%
samer@2: 	    {\reffont #1}}{%
samer@2: 	    {\reffont #1}({\it #2})}}
samer@2: \newcommand{\infixterm}[3]{{\it #2} #1 {\it #3}}
samer@2: \newcommand{\prefixterm}[2]{#1 {\it #2}}
samer@2: \newcommand{\postfixterm}[2]{{\it #2} #1}
samer@2: \newcommand{\errorterm}[2]{\mbox{\tt%
samer@2: 	\ifthenelse{\equal{}{#2}}{%
samer@2: 	    #1}{%
samer@2: 	    #1(#2)}}}
samer@2: 
samer@2: 
samer@2: \newcommand{\cfunction}[3]{%
samer@2: 	\defentry{{\tt #1} #2{\rm (}{\it #3}{\rm )}}%
samer@2: 	\index{#2()}\ignorespaces}
samer@2: \newcommand{\constructor}[2]{%
samer@2: 	\defentry{#1::#1{\rm (}{\it #2}{\rm )}}%
samer@2: 	\index{#1::#1()}\ignorespaces}
samer@2: \newcommand{\destructor}[1]{%
samer@2: 	\defentry{#1::\Stilde{}#1{\rm ()}}%
samer@2: 	\index{#1::\Stilde{}#1()}\ignorespaces}
samer@2: \newcommand{\cppcast}[2]{%
samer@2: 	\defentry{#1::operator #2{\rm ({\it void})}}%
samer@2: 	\index{#1::operator #2()}\ignorespaces}
samer@2: \newcommand{\cdecl}[2]{{\tt #1} {\em #2}}
samer@2: \newcommand{\cmacro}[3]{%
samer@2: 	\defentry{{\it #1} #2({\it #3})}%
samer@2: 	\index{#2()}\ignorespaces}
samer@2: \newcommand{\constitem}[1]{%
samer@2: 	\definition{#1}%
samer@2: 	\index{#1}\ignorespaces}
samer@2: \newcommand{\cglobalvar}[1]{{\tt #1}}
samer@2: \newcommand{\classitem}[1]{%
samer@2: 	\definition{Class #1}%
samer@2: 	\index{#1 \string\idxtype{class}}\ignorespaces}
samer@2: \newcommand{\menuitem}[2]{%
samer@2: 	\ifthenelse{\equal{\protect}{\protect#2}}{%
samer@2: 	    \definition{\textsf #1}}{%
samer@2: 	    \definition{\textsf #1 ({\it #2})}}%
samer@2: 	\index{#1 \string\idxtype{menu}}%
samer@2: 	\ignorespaces}
samer@2: 
samer@2: 
samer@2: %	\tag{Keyword}
samer@2: %
samer@2: %	PlDoc @keyword expansion.  \mtag{Keyword} is a multi-valued tag
samer@2: 
samer@2: \newcommand{\tag}[1]{%
samer@2: 	\item[#1]}
samer@2: \newcommand{\mtag}[1]{%
samer@2: 	\item[#1]\mbox{}\\}
samer@2: 
samer@2: \newcommand{\bnfmeta}[1]{\ifmmode{\langle\mbox{\it #1}\rangle}\else$\langle\mbox{\it #1}\rangle$\fi}
samer@2: \newcommand{\bnfor}{\ifmmode\mid\else$\mid$\fi}
samer@2: \newcommand{\isa}{& ::= &}
samer@2: \newcommand{\ora}{& $\mid$ &}
samer@2: 
samer@2: \renewcommand{\arg}[1]{\ifmmode\mbox{\em #1}\else{\it #1}\fi}
samer@2: \newcommand{\class}[1]{{\em #1}\index{#1 \string\idxtype{class}}}
samer@2: \newcommand{\classs}[1]{{\em #1s}\index{#1 \string\idxtype{class}}}
samer@2: \newcommand{\demo}[1]{{\sf #1}\index{#1 \string\idxtype{demo}}}
samer@2: \newcommand{\pllib}[1]{{\texttt{#1}}\index{#1 \string\idxtype{library}}}
samer@2: \newcommand{\clib}[1]{{\tt #1}\index{#1 \string\idxtype{library}}}
samer@2: \newcommand{\tool}[1]{{\em #1}\index{#1 \string\idxtype{tool}}}
samer@2: \newcommand{\menuref}[1]{\textsf{#1}\index{#1 \string\idxtype{menu}}}
samer@2: \newcommand{\constf}[1]{{\reffont #1}}
samer@2: \newcommand{\const}[1]{{\tt #1}}
samer@2: \newcommand{\plflag}[1]{{\tt #1}}
samer@2: \newcommand{\type}[1]{{\reffont #1}}
samer@2: \newcommand{\idx}[1]{#1\index{#1}}
samer@2: \newcommand{\foreseen}[1]{\footnote{#1}}
samer@2: \newcommand{\metafile}[1]{\mbox{\tt #1}}
samer@2: \newcommand\file{\begingroup \urlstyle{tt}\Url}
samer@2: \newcommand\email{\begingroup \urlstyle{tt}\Url}
samer@2: \newcommand{\env}[1]{\mbox{\tt #1}}
samer@2: \newcommand{\except}[1]{\mbox{\tt #1}}
samer@2: \newcommand{\exam}[1]{\mbox{\tt #1}}
samer@2: \newcommand{\module}[1]{\mbox{\reffont #1}}
samer@2: \newcommand{\fileext}[1]{\mbox{\texttt{.#1}}}
samer@2: \newcommand{\option}[1]{\mbox{\tt #1}}
samer@2: \newcommand{\resource}[1]{\mbox{\reffont #1}}
samer@2: \newcommand{\cmdlineoption}[1]{\mbox{\tt #1}}
samer@2: \newcommand{\argoption}[2]{\mbox{\tt #1 \em #2}}
samer@2: \newcommand{\ctype}[1]{{\texttt{#1}}}
samer@2: \newcommand{\op}[1]{{\tt #1}}
samer@2: \newcommand{\program}[1]{\texttt{#1}}
samer@2: \newcommand{\manpage}[2]{{\bf #1}(#2)}
samer@2: \newcommand{\chr}[1]{{\tt #1}}
samer@2: \newcommand{\jargon}[1]{{\em #1}}
samer@2: \newcommand{\strong}[1]{{\bf #1}}
samer@2: \newcommand{\texcmd}[1]{{\Sesc}{\tt #1}}
samer@2: \newcommand{\texenv}[1]{{\tt #1}}
samer@2: \newcommand{\texmode}[1]{{\tt #1}}
samer@2: \newcommand{\HTML}[1]{{\bf #1}}
samer@2: \newcommand{\libdoc}[2]{\section{\pllib{#1}: #2}}
samer@2: \newcommand{\key}[1]{{\sf #1}}
samer@2: \newcommand{\menu}[2]{%
samer@2: 	{\sf #1}%
samer@2: 	\ifthenelse{\equal{#2}{}}{%
samer@2: 	    }{%
samer@2: 	    ~(\texttt{#2})}}
samer@2: 
samer@2: \newcommand\satom{\begingroup \urlstyle{tt}\Url}
samer@2: \newcommand\fmtseq{\begingroup \urlstyle{tt}\Url}
samer@2: 
samer@2: \urldef{\Sexe}\satom{#!}		% #!
samer@2: \urldef{\Scgt}\satom{#>}		% #>
samer@2: \urldef{\Scge}\satom{#>=}		% #>=
samer@2: \urldef{\Sclt}\satom{#<}		% #<
samer@2: \urldef{\Scle}\satom{#=<}		% #=<
samer@2: \urldef{\Sceq}\satom{#=}		% #=
samer@2: \urldef{\Scne}\satom{#\=}		% #\=
samer@2: \urldef{\Scnot}\satom{#\}		% #\
samer@2: \urldef{\Scor}\satom{#\/}		% #\/
samer@2: \urldef{\Scand}\satom{#/\}		% #/\
samer@2: \urldef{\Sequiv}\satom{#<=>}            % #<=>
samer@2: \urldef{\Slimpl}\satom{#<=}             % #<=
samer@2: \urldef{\Srimpl}\satom{#=>}             % #=>
samer@2: \urldef{\Slimplies}\satom{#<==}         % #<==
samer@2: \urldef{\Srimplies}\satom{#==>}         % #==>
samer@2: \urldef{\Scequal}\satom{#<==>}          % #<==>
samer@2: \urldef{\Scieq}\satom{#=:=}		% #=:=
samer@2: \urldef{\Scine}\satom{#=\=}		% #=\=
samer@2: \urldef{\Shash}\satom{#}		% #
samer@2: \urldef{\Scut}\satom{!}			% !
samer@2: \urldef{\Scomma}\satom{,}		% ,
samer@2: \urldef{\Sifthen}\satom{->}		% ->
samer@2: \urldef{\Ssoftcut}\satom{*->}		% *->
samer@2: \urldef{\Sdot}\satom{.}			% .
samer@2: \urldef{\Ssemicolon}\satom{;}		% ;
samer@2: \urldef{\Slt}\satom{<}			% <
samer@2: \urldef{\Sxor}\satom{><}		% ><
samer@2: \urldef{\Seq}\satom{=}			% =
samer@2: \urldef{\Suniv}\satom{=..}		% =..
samer@2: \urldef{\Saeq}\satom{=:=}		% =:=
samer@2: \urldef{\Sle}\satom{=<}			% =<
samer@2: \urldef{\Sel}\satom{<=}			% <=
samer@2: \urldef{\Sequal}\satom{==}		% ==
samer@2: \urldef{\Sstructeq}\satom{=@=}		% =@=
samer@2: \urldef{\Sstructneq}\satom{\=@=}	% \=@=
samer@2: \urldef{\Sane}\satom{=\=}		% =\=
samer@2: \urldef{\Sgt}\satom{>}			% >
samer@2: \urldef{\Sge}\satom{>=}			% >=
samer@2: \urldef{\Stlt}\satom{@<}		% @<
samer@2: \urldef{\Stle}\satom{@=<}		% @=<
samer@2: \urldef{\Stgt}\satom{@>}		% @>
samer@2: \urldef{\Stge}\satom{@>=}		% @>=
samer@2: \urldef{\Snot}\satom{\+}		% \+
samer@2: \urldef{\Sne}\satom{\=}			% \=
samer@2: \urldef{\Snequal}\satom{\==}		% \==
samer@2: \urldef{\Shat}\satom{^}			% ^
samer@2: \urldef{\Sbar}\satom{|}			% |
samer@2: \urldef{\Stimes}\satom{*}		% *
samer@2: \urldef{\Spow}\satom{**}		% **
samer@2: \urldef{\Splus}\satom{+}		% +
samer@2: \urldef{\Sminus}\satom{-}		% -
samer@2: \urldef{\Sdiv}\satom{/}			% /
samer@2: \urldef{\Sidiv}\satom{//}		% //
samer@2: \urldef{\Sand}\satom{/\}		% /\
samer@2: \urldef{\Slshift}\satom{<<}		% <<
samer@2: \urldef{\Srshift}\satom{>>}		% >>
samer@2: \urldef{\Sneg}\satom{\}			% \
samer@2: \urldef{\Sesc}\satom{\}			% \
samer@2: \urldef{\Sor}\satom{\/}			% \/
samer@2: \urldef{\Sdollar}\satom{$}		% $
samer@2: \urldef{\Squest}\satom{?}		% ?
samer@2: \urldef{\Smodule}\satom{:}		% :
samer@2: \urldef{\Sneck}\satom{:-}		% :-
samer@2: \urldef{\Sdirective}\satom{?-}		% ?-
samer@2: \urldef{\Sdcg}\satom{-->}		% -->
samer@2: \urldef{\Bc}\satom{\c}			% \c
samer@2: \urldef{\Bn}\satom{\n}			% \n
samer@2: \urldef{\Br}\satom{\r}			% \r
samer@2: \urldef{\Bl}\satom{\l}			% \l
samer@2: \urldef{\BB}\satom{\\}			% \\
samer@2: \urldef{\Stilde}\satom{~}		% ~
samer@2: \urldef{\Spercent}\satom{%}		% %
samer@2: \urldef{\Shash}\satom{#}		% #
samer@2: \urldef{\Scurl}\satom{{}}		% {}
samer@2: \urldef{\SxXX}\satom{xXX..\}		% xXX..\
samer@2: 
samer@2: \newcommand{\bug}[1]{\footnote{BUG: #1}}
samer@2: 
samer@2: \newcommand{\mod}[2]{#1 \mbox{\rm mod} #2}
samer@2: \newcommand{\rem}[2]{#1 \mbox{\rm rem} #2}
samer@2: \newcommand{\pow}[2]{{#1}^{#2}}
samer@2: \newcommand{\bsl}[0]{\Sesc}
samer@2: 
samer@2: %	Index handling
samer@2: 
samer@2: \newcommand{\idxtype}[1]{{\small\em #1}}
samer@2: 
samer@2: %	Prolog predicate summary
samer@2: 
samer@2: \newenvironment{summarylist}[1]{\begin{longtable}[l]{#1}}{\end{longtable}}
samer@2: \newcommand{\predicatesummary}[3]{#1/#2 & #3 \\}
samer@2: \newcommand{\oppredsummary}[5]{#1/#2 & #5 \\}
samer@2: \newcommand{\functionsummary}[3]{#1/#2 & #3 \\}
samer@2: \newcommand{\opfuncsummary}[5]{#1/#2 & #5 \\}
samer@2: \newcommand{\opsummary}[4]{#3 & #1 & #2 & #4 \\}
samer@2: \newcommand{\hook}[1]{(hook)}
samer@2: 
samer@2: 
samer@2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
samer@2: %			CODE environment			%
samer@2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
samer@2: 
samer@2: \usepackage{fancyvrb}
samer@2: \usepackage{color}
samer@2: 
samer@2: %\definecolor{codeboxcolor}{rgb}{0.7,0.7,0.7}
samer@2: \definecolor{codeboxcolor}{rgb}{0.4,0.4,0.4}
samer@2: \DefineVerbatimEnvironment%
samer@2:   {code}{Verbatim}
samer@2:   {frame=single,
samer@2:    framerule=0.2pt,
samer@2:    rulecolor=\color{codeboxcolor},
samer@2:   }
samer@2: 
samer@2: 
samer@2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
samer@2: %			INCLUDE FIGURES				%
samer@2: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
samer@2: 
samer@2: %	PostScript figures
samer@2: %	\postscriptfig[width=5in]{label}{Title}
samer@2: 
samer@2: \makeatletter
samer@2: \def\postscriptfig{\@ifnextchar[{\@scaledpostscriptfig}{\@postscriptfig}}
samer@2: \def\@scaledpostscriptfig[#1]#2#3{%
samer@2: 	\begin{figure}%
samer@2: 	    \centerline{\includegraphics[#1]{#2}}
samer@2: 	    \caption{#3}
samer@2: 	    \label{fig:#2}
samer@2: 	\end{figure}}
samer@2: \def\@postscriptfig#1#2{%
samer@2: 	\begin{figure}%
samer@2: 	    \centerline{\includegraphics{#1}}
samer@2: 	    \caption{#2}
samer@2: 	    \label{fig:#1}
samer@2: 	\end{figure}}
samer@2: \makeatother
samer@2: 
samer@2: %	\begin{tabularlp}{longest-text}
samer@2: 
samer@2: \newlength{\tabDright}
samer@2: \newlength{\tabDleft}
samer@2: \newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
samer@2: \newcommand{\raggedrightcolumn}{\PreserveBackslash\raggedright\hspace{0pt}}
samer@2: \newenvironment{tabularlp}[1]%
samer@2: 	{\settowidth{\tabDleft}{#1}%
samer@2: 	 \setlength{\tabDright}{\linewidth-\columnsep*3-\tabDleft}%
samer@2: 	 \begin{tabular}{|p{\tabDleft}|>{\raggedrightcolumn}p{\tabDright}|}}%
samer@2: 	{\end{tabular}}
samer@2: 
samer@2: %	\begin{tags} ... \end{tags}
samer@2: 
samer@2: \newenvironment{tags}%
samer@2: 	{\begin{quote}\begin{description}%
samer@2: 		\setlength{\itemsep}{0pt}%
samer@2: 		\footnotesize}%
samer@2: 	{\end{description}\end{quote}}
samer@2: 
samer@2: 
samer@2: %	\begin{parameters} ... \end{parameters}
samer@2: 
samer@2: \newenvironment{parameters}%
samer@2: 	{\par%
samer@2: 	 \makebox[\linewidth]{\hfill\footnotesize Parameters}
samer@2: 	 \begin{tabular*}{\linewidth}{lp{0.7\linewidth}}
samer@2: 	 \hline}%
samer@2: 	{\end{tabular*}}
samer@2: 
samer@2: 




