summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/progkeys/keywords.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/progkeys/keywords.dtx')
-rw-r--r--macros/latex/contrib/progkeys/keywords.dtx1016
1 files changed, 1016 insertions, 0 deletions
diff --git a/macros/latex/contrib/progkeys/keywords.dtx b/macros/latex/contrib/progkeys/keywords.dtx
new file mode 100644
index 0000000000..88b75d85fa
--- /dev/null
+++ b/macros/latex/contrib/progkeys/keywords.dtx
@@ -0,0 +1,1016 @@
+% \iffalse meta-comment
+%
+% 'keywords.dtx'
+%
+% Copyright (C) 1993,1994,1995 by Miguel Alabau. All rights reserved.
+%
+% COMMANDS FOR TYPESETTING KEYWORDS
+%
+% **WARNING** If the file 'keywords.ins' does not accompany the file
+% 'keywords.dtx', then you must strip this last file by hand.
+% (1) Run 'latex docstrip' on 'keywords.dtx' and indicate 'drv' as
+% suffix file and 'driver' as selector for extraction.
+% (2) Run 'latex docstrip' on 'keywords.dtx' and indicate 'sty' as
+% suffix file and 'style' as selector for extraction.
+% (3) Run 'latex docstrip' on 'keywords.dtx' and indicate 'ist' as
+% suffix file and 'index' as selector for extraction.
+% Then, if you want to produce the documentation, proceed as follows:
+% latex keywords.drv; latex keywords.drv; latex keywords.drv
+% makeindex -s keywords.ist keywords.idx
+% latex keywords.drv
+%
+%<style>\NeedsTeXFormat{LaTeX2e}
+%<style>\ProvidesPackage{keywords}
+%
+% \fi
+%
+%
+% \def\fileversion{v1.0}
+% \def\filedate{95/04/01}
+% \def\docdate {96/01/31}
+%
+%
+% ^^A -*-LaTeX-*-
+%
+%\catcode`\<=12
+
+% \CheckSum{564}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+%
+% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
+% \DoNotIndex{\@flushglue,\@gobble,\@input}
+% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
+% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
+% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
+% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
+% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
+% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
+% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
+% \DoNotIndex{\cal,\csname,\def,\documentstyle,\dospecials,\edef}
+% \DoNotIndex{\documentclass}
+% \DoNotIndex{\egroup}
+% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
+% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
+% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
+% \DoNotIndex{\ifcase}
+% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
+% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
+% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
+% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
+% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
+% \DoNotIndex{\strutbox}
+% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
+% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
+% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
+% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
+% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
+% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
+% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
+% \DoNotIndex{\nopagebreak}
+% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
+% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
+% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
+% \DoNotIndex{\[,\{,\},\]}
+% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
+% \DoNotIndex{\baselineskip,\begin,\tw@}
+% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
+% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
+% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
+% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
+% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
+% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
+% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
+% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
+% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
+% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
+% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
+% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
+% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
+% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
+% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
+% \DoNotIndex{\bfdefault}
+%
+% \DoNotIndex{\addtocounter,\baselinestretch,\em,\noindent}
+% \DoNotIndex{\linewidth,\columnwidth,\newcounter,\newif,\newlength}
+% \DoNotIndex{\normalsize,\refstepcounter,\rlap,\rule}
+% \DoNotIndex{\@@tempa,\@@tempb,\@ifnextchar,\@nameuse}
+%
+% \title{The ``{\sf{}keywords.sty}'' style file\thanks{%
+% This file has version number \fileversion{} dated \filedate{}.
+% The documentation was last revised on \docdate{}.}}
+%
+% \author{Miguel Alabau\\
+% {\small{}LaBRI, Universit\'e Bordeaux~I (France)}\\
+% {\small{\em{}e-mail\/}: {\tt{}Miguel.Alabau@labri.u-bordeaux.fr}}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This style file contains a set of definitions that allow keywords
+% to be defined and printed in several convenient ways.
+% For each keyword two definitions may be provided. This is to
+% allow the use of keywords in two contexts (for instance
+% English/French translation of the keywords).
+% At the same time, keyword can be printed in roman, teletype,
+% boldfaced or underlined.
+% The user can define other styles for printing keywords.
+% A set of keywords is provided by default. Of course a user can
+% define new keywords or redefine existing ones without modifying
+% the style file.
+% \end{abstract}%
+%
+% \newif\ifmulticols
+% \makeatletter
+% \ifhave@multicol\multicolstrue\else\multicolsfalse\fi
+% \makeatother
+%
+% \begin{footnotesize}
+% \ifmulticols \begin{multicols}{2} \fi
+% \tableofcontents
+% \ifmulticols \end{multicols} \fi
+% \end{footnotesize}
+%
+%
+% \ifmulticols
+% \begin{multicols}{2}[\section{Introduction}]
+% \else \section{Introduction} \fi
+%
+% When typing programs or algorithms, it often happens for a same
+% text to appear as an algoritm (pseudo-code) or as a program. In such
+% cases different fonts are used. For instance, algorithms may appear
+% with keywords italicised or underlined, while the same keywords
+% appear boldfaced in the program text.
+% Moreover algorithms are often typed with keywords belonging to the
+% native language of the writer while program keywords appear usually
+% to be english ones.
+%
+% The file {\em{}keywords.sty\/} provides simple solutions to both of
+% these problems by giving the user capability to define each keyword
+% in two simultaneaous different manners and by providing different
+% printing styles.
+%
+% Keywords are commands to be issued in text. Hence this style file is
+% origimally intended to be used in conjunction with the features
+% provided by the {\em{}programs.sty\/} style file~\cite{alabau95-d}.
+% However, it can be used independently.
+%
+% \ifnoprogsfile \relax\else
+%
+% For instance, let be the following piece of program:
+%
+% \begin{verbatim}
+% \BEGIN
+% statements
+% \END
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% \noindent%
+% where \verb+\BEGIN+ and \verb+\END+ are two predefined commands in
+% this style file.
+% If we issue the command \verb+\ProgKeywords+, then we get:
+%
+% \ProgKeywords
+% \begin{programf}*
+% \BEGIN
+% statements
+% \END
+% \end{programf}
+%
+% \vspace{-\baselineskip}
+% \noindent%
+% If we prefer to use the second language, we can issue the
+% \verb+\FProgKeywords+:
+%
+% \FProgKeywords
+% \begin{programf}*
+% \BEGIN
+% statements
+% \END
+% \end{programf}
+%
+% \vspace{-\baselineskip}
+% \noindent%
+% We can also use other typesetting rules, like underlined emphasized
+% fonts (\verb+UAlgoKeywords+):
+%
+% \UAlgoKeywords
+% \begin{programf}*
+% \BEGIN
+% statements
+% \END
+% \end{programf}
+%
+% \vspace{-\baselineskip}
+% \noindent%
+% It is also possible to define new keywords or to redefine existing
+% ones, by issuing a command like:
+%
+% \begin{verbatim}
+% \NewKeyword{\BEGIN}{this is the beginning}
+% \NewKeyword{\END}{this is the end}
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% \noindent%
+% which leads to the following piece of code (default typesetting used
+% is the last one specified, i.e. \verb+UAlgoKeywords+):
+%
+% \NewKeyword{\BEGIN}{this is the beginning}
+% \NewKeyword{\END}{this is the end}
+% \begin{programf}*
+% \BEGIN
+% statements
+% \END
+% \end{programf}
+%
+% \fi
+%
+% \ifmulticols\end{multicols}\fi
+%
+% ^^A **********************************************
+% ^^A ** USERS's MANUAL **
+% ^^A **********************************************
+%
+% \section{User's Manual}
+%
+% A set of default keywords is provided in this file (see
+% section~\ref{default-keywords}). For each keyword, two definitions
+% are provided: the first one in english, and the second one in french
+% (because I am French).
+% The switch between the two languages is performed by global commands
+% wich serve also to define the font used for printing.
+%
+% \subsection{Selecting a printing style}
+% \label{user:selecting-printing-styles}
+%
+% \DescribeMacro{\ProgKeywords}
+% \DescribeMacro{\FProgKeywords}
+% \DescribeMacro{\ttKeywords}
+% \DescribeMacro{\FttKeywords}
+% \DescribeMacro{\AlgoKeywords}
+% \DescribeMacro{\FAlgoKeywords}
+% \DescribeMacro{\NormalKeywords}
+% \DescribeMacro{\FNormalKeywords}
+%
+% The following printing styles are provided:
+%
+% \begin{center}
+% \begin{tabular}{lll}
+% \hline
+% \multicolumn{1}{c}{style}
+% & \multicolumn{1}{c}{definition~1}
+% & \multicolumn{1}{c}{definition~2}\\
+% \hline\hline
+% \verb+\bf+ & \verb+\ProgKeywords+ & \verb+\FProgKeywords+\\
+% \verb+\tt+ & \verb+\ttKeywords+ & \verb+\FttKeywords+\\
+% \verb+\em+ & \verb+\AlgoKeywords+ & \verb+\FAlgoKeywords+\\
+% \verb+\rm+ & \verb+\NormalKeywords+ & \verb+\FNormalKeywords+\\
+% \hline
+% \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\UAlgoKeywords}
+% \DescribeMacro{\UFAlgoKeywords}
+% \DescribeMacro{\FUAlgoKeywords}
+% There are also two underlined styles:
+%
+% \begin{center}
+% \begin{tabular}{lll}
+% \hline
+% \multicolumn{1}{c}{style}
+% & \multicolumn{1}{c}{definition~1}
+% & \multicolumn{1}{c}{definition~2}\\
+% \hline\hline
+% underlined \verb+\em+ & \verb+\UAlgoKeywords+ & \verb+\FUAlgoKeywords+\\
+% \hline
+% \end{tabular}
+% \end{center}
+%
+% For compatability with previous versions of keywords.sty, the
+% command \verb+\UFAlgoKeywords+ has been defined as a synonym for
+% \verb+\FUAlgoKeywords+.
+%
+% \subsection{Defining and Re-defining keywords}
+% \label{user:program-keywords}
+%
+% \DescribeMacro{\NewKeyword}
+% The command
+%
+% \begin{verbatim}
+% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE2]
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% defines the command \verb+\WORD+ to issue the text in
+% \verb+SENTENCE1+ or in \verb+SENTENCE2+ when it is typed, according
+% to the style currently in use.
+%
+% For instance, one could use \verb+SENTENCE1+ for defining english
+% keywords and \verb+SENTENCE2+ for defining their french translation.
+%
+% If ``\verb+[SENTENCE2]+'' is omitted, all happens as if the
+% following command had been issued:
+%
+% \begin{verbatim}
+% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE1]
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% The command \verb+\NewKeyword+ serves also to redefine existing
+% keywords.
+%
+% \subsection{Defining a printing style}
+% \label{user:defining-printing-styles}
+%
+% \DescribeMacro{\DefineKeywordsStyles}
+% The command
+%
+% \begin{verbatim}
+% \DefineKeywordsStyles{MODE}{\STYLE}
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% allows for the user to define particular printing modes.
+% Its main effect is to define the commands \verb+\MODEs+ and
+% \verb+\FMODEs+ that will lead to print respectively the
+% \verb+SENTENCE1+ part or the \verb+SENTENCE2+ part of the
+% \verb+\NewKeyword+ definitions.
+% For instance, the commands \verb+\ProgKeywords+ and
+% \verb+\FProgKeywords+ have been automatically defined from a
+% \verb+\DefineKeywordsStyles{ProgKeyword}{\bf}+ command.
+%
+% \DescribeMacro{\DefineUnderlinedKeywordsStyles}
+% \ \\
+% For \verb+SENTENCE+$_i$ to be underlined, it is necessary to issue a
+%
+% \begin{verbatim}
+% \DefineUnderlinedKeywordsStyles{MODE}{\STYLE}
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% command, instead of the ``\verb+\DefineKeywordsStyles+'' described
+% above.
+% This is how the \verb+\UAlgoKeywords+ and \verb+\FUAlgoKeywords+
+% commands have been defined, by issuing a
+% \verb+\DefineUnderlinedKeywordsStyles{UAlgoKeyword}{\em}+ command.
+%
+% \subsection{The Index File}
+%
+% In order for the processing of this file to be complete, an index
+% format file is required. Let us assume that it is named
+% \verb+keywords.ist+, then the following command must be run and then
+% another compilation of the current file:
+%
+% \begin{macrocode}
+%<index>
+%<index>%% -----------------------------------------------------------
+%<index>%% Assuming this file is named "keywords.ist" (after being
+%<index>%% generated from "keywords.dtx" by running "latex docstrip"),
+%<index>%% the following command will produce a well formated index:
+%<index>%%
+%<index>%% makeindex -s keywords.ist keywords.idx
+%<index>%% -----------------------------------------------------------
+%<index>
+% \end{macrocode}
+%
+% Another possibility is to set the environment variable
+% \verb+INDEXSTYLE+ to a directory name where the ``.ist'' files
+% (index format files) may be found.
+%
+% A possible index file is given below\footnote{It can be generated by
+% invoquing the compilation of ``docstrip'' with the ``index''
+% option.}:
+%
+% \begin{macrocode}
+%<index>actual '='
+%<index>quote '!'
+%<index>level '>'
+%<index>preamble
+%<index>"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
+%<index>postamble
+%<index>"\n\n \\end{theindex}\n"
+%<index>item_x1 "\\efill \n \\subitem "
+%<index>item_x2 "\\efill \n \\subsubitem "
+%<index>delim_0 "\\pfill "
+%<index>delim_1 "\\pfill "
+%<index>delim_2 "\\pfill "
+%<index>% The next lines will produce some warnings when
+%<index>% running Makeindex as they try to cover two different
+%<index>% versions of the program:
+%<index>lethead_prefix "{\\bf\\hfil "
+%<index>lethead_suffix "\\hfil}\\nopagebreak\n"
+%<index>lethead_flag 1
+%<index>heading_prefix "{\\bf\\hfil "
+%<index>heading_suffix "\\hfil}\\nopagebreak\n"
+%<index>headings_flag 1
+% \end{macrocode}
+%
+% \subsection{The Driver File}
+%
+% There is also a driver file, called {\em{}programs.drv\/}, that is
+% included in the distribution.
+% It is devoted to control the latex compilation of the documentation.
+% Its code is given below.
+%
+% \begin{macrocode}
+%<*driver>
+\newif\ifnoprogsfile
+\openin1 programs.sty
+\ifeof1 \noprogsfiletrue\else\noprogsfilefalse\fi\closein1
+\ifnoprogsfile \relax\else
+\openin1 keywords.sty
+\ifeof1 \noprogsfiletrue\else\noprogsfilefalse\fi\closein1
+\fi
+\ifnoprogsfile
+ \typeout{*************************************************************}
+ \typeout{To get a more complete documentation, you should:}
+ \typeout{(1) generate the file 'programs.sty'(see 'programs.dtx'), and}
+ \typeout{(2) copy the current file into 'keywords.sty'}
+ \typeout{*************************************************************}
+\fi
+\ifnoprogsfile
+ \documentclass{ltxdoc}
+\else
+ \documentclass{ltxdoc}
+ \usepackage{programs}
+ \usepackage{keywords}
+\fi
+\MakePercentIgnore%
+%
+\setlength{\textwidth}{31pc}%
+\setlength{\textheight}{54pc}%
+\setlength{\parindent}{0pt}%
+\setlength{\parskip}{2pt plus 1pt minus 1pt}%
+\setlength{\oddsidemargin}{8pc}%
+\setlength{\marginparwidth}{8pc}%
+\setlength{\topmargin}{-2.5pc}%
+\setlength{\headsep}{20pt}%
+\setlength{\columnsep}{1.5pc}%
+\setlength{\columnwidth}{18.75pc}%
+%%
+\setcounter{IndexColumns}{2}%
+\EnableCrossrefs%
+\RecordChanges
+\CodelineIndex
+%\OldMakeindex % use if your MakeIndex is pre-v2.9%
+\begin{document}%
+ \DocInput{keywords.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \subsection{Extracting the documents included in the file keywords.dtx}
+%
+% There are three documents included in the {\em{}keywords.dtx\/} file:
+% the style file ({\em{}keywords.sty}),
+% the index style file for printing a cross-referenced document
+% ({\em{}keywords.ist}),
+% and the driver file for printing the document: {\em{}keywords.drv\/}.
+%
+% For file extraction it is necessary to use the \verb"docstrip"
+% utility, which is part of the \verb"doc"
+% distribution~\cite{art:doc}.
+% Normally, a file \verb"docstrip.tex" should exist on the \LaTeX\
+% style files directory.
+% Extraction is performed by typing:
+%
+% \begin{verbatim}
+% latex docstrip
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% This is an interactive program, and the dialogue for generating the
+% style file should be:
+%
+% \begin{verbatim}
+% **********************************************************
+% * This program converts documented macro-files into fast *
+% * loadable files by stripping off (nearly) all comments! *
+% **********************************************************
+%
+% ****************************************************
+% * First type the extension of your input file(s): *
+% \infileext=doc
+% ****************************************************
+%
+% ****************************************************
+% * Now type the extension of your output file(s) : *
+% \outfileext=sty
+% ****************************************************
+%
+% ****************************************************
+% * Now type the name(s) of option(s) to include : *
+% \Options=style
+% ****************************************************
+%
+% ****************************************************
+% * Finally give the list of input file(s) without *
+% * extension seperated by commas if necessary : *
+% \filelist=Programs
+% ****************************************************
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% For generating the index file it suffices to rerun the
+% \verb"docstrip" utility and to answer ``ist/index'' instead of
+% ``sty/style'' int the above steps~2 and~3.
+%
+% \medskip
+%
+% The three files may be produced in a single pass, by simply latexing
+% the file {\em{}keywords.ins\/} which goes along with the file
+% {\em{}keywords.dtx\/}.
+%
+% \medskip
+%
+% Generation of the documentation is then simply performed as follows
+% (the {\em{}keywords.dtx\/} file includes its own driver):
+%
+% \begin{verbatim}
+% latex keywords.dtx
+% latex keywords.dtx
+% latex keywords.dtx
+% makeindex -s keywords.ist keywords.idx
+% latex keywords.dtx
+% \end{verbatim}
+%
+% \StopEventually{
+% \begin{thebibliography}{1}
+% \bibitem{book:KnuthA} {\sc D.E. Knuth}.
+% \newblock Computers \& Typesetting (The \TeX book).
+% \newblock Addison-Wesley, Vol. A, 1986.
+% \bibitem{lamport86}{\sc L. Lamport}.
+% \newblock {\em {\LaTeX}: a Document Preparation System}.
+% \newblock Addison-Wesley Publishing Company, 1986.
+% \bibitem{art:doc} {\sc F. Mittelbach}.
+% \newblock The {\tt doc}-option.
+% \newblock {\sl TUGboat}, Vol.~10(2), {\it pp}.~245--273, July
+% 1989.
+% \bibitem{alabau95-d} {\sc M. Alabau}.
+% \newblock The ``{\sf{}programs.sty}'' style file.
+% \newblock March 1995.
+% {\em{}e-mail:\/} {\tt{}Miguel.Alabau@labri.u-bordeaux.fr}
+% \end{thebibliography}
+%
+% } ^^A end \StopEventually
+%
+% \begin{macrocode}
+%<*style>
+% \end{macrocode}
+%
+
+% ^^A **********************************************
+% ^^A ** TECHNICAL DESCRIPTION **
+% ^^A **********************************************
+
+\typeout{Document style `keywords.sty' <1993,1994,1995>}
+
+% \section{Description of Macros}
+%
+% \begin{macro}{\AlreadyDefined@@Keywords}
+% This macro can be tested by any style file to know if the file
+% ``{\sf{}keywords.sty}'' has been input. But it allows a modular
+% programming style similar to the one used with the C~header
+% files.
+% Hence, the first time the ``{\sf{}keywords.sty}'' style file is
+% included all of its body will be included; the second time, the
+% body will not be included.
+% \begin{macrocode}
+\expandafter\ifx\csname AlreadyDefined@@Keywords\endcsname\relax%
+\expandafter\def\csname AlreadyDefined@@Keywords\endcsname{}%
+\else\endinput\fi
+% \end{macrocode}
+% \end{macro}%
+%
+% A test for the existence of this macro is performed for
+% compatability with ancient versions of \LaTeX.
+% \begin{macrocode}
+\@ifundefined{reset@font}{\global\let\reset@font\relax}{}
+% \end{macrocode}
+
+% \subsection{Defining and Re-defining keywords}
+%
+% \begin{macro}{\NewKeyword}
+% \begin{macro}{\@@newkwrd}
+% The \verb+\NewKeyword+ command has three parameters, but the
+% third one is optional. By default it is assumed to be equal to
+% the second one:
+% \begin{macrocode}
+\def\NewKeyword#1#2{\@ifnextchar[{\@@newkwrd{#1}{#2}}{\@@newkwrd{#1}{#2}[#2]}}
+% \end{macrocode}
+% \end{macro}
+%
+% The \verb+\@@newkwrd+ performs the real work. It calls the
+% command \verb+\@@KeywordsCurrentStyle+ whose effect is to define
+% the command \verb+\@@kwrd+ and then invokes this last command.
+% \begin{macrocode}
+\def\@@newkwrd#1#2[#3]{\def#1{\@@KeywordsCurrentStyle{\@@kwrd}{#2}{#3}\@@kwrd}}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Defining printing styles}
+%
+% \begin{macro}{\@@TypeStyle}
+% This command is expected to be called with a command name as
+% first parameter. Its effect is to define \verb+#1+ as the
+% command that print \verb+#3+ with style \verb+#2+~:
+% \begin{macrocode}
+\def\@@TypeStyle#1#2#3{\def#1{\mbox{\reset@font#2{}#3\/}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DefineKeywordsStyles}
+% The macro \verb+\DefineKeywordsStyles+ has two parameters, let
+% them be \verb+toto+ and \verb+bf+. Its effect is to define
+% two commands called \verb+\@@toto+ and \verb+\F@@toto+. Each of
+% these two new commands has three parameters: the first one must
+% be the name of a command (the keyword to be defined) and the
+% other two must be two texts associated to the keyword. The
+% \verb+\@@toto+ command will select the first text while the
+% \verb+\F@@toto+ command will select the second text.
+% \begin{macrocode}
+\newif\if@@underline \@@underlinefalse
+\def\DefineKeywordsStyles#1#2{
+ \if@@underline
+ \@namedef{@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{\underline{##2}}}
+ \@namedef{F@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{\underline{##3}}}
+ \else
+ \@namedef{@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{##2}}
+ \@namedef{F@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{##3}}
+ \fi
+% \end{macrocode}
+% A boolean switch is used to select underlined fonts. By default
+% non underlined fonts are used, and a reset to non boolean fonts
+% is performed after every definition of keyword:
+% \begin{macrocode}
+ \@@underlinefalse
+% \end{macrocode}
+% At last two commands are provided to the user: \verb+\totos+ and
+% \verb+\Ftotos+ whose effect is to set the command
+% \verb+\@@KeywordsCurrentStyle+ respectively to \verb+\@@toto+ or
+% \verb+\F@@toto+~:
+% \begin{macrocode}
+ \@namedef{#1s}{\def\@@KeywordsCurrentStyle{\@nameuse{@@#1}}}
+ \@namedef{F#1s}{\def\@@KeywordsCurrentStyle{\@nameuse{F@@#1}}}
+}
+% \end{macrocode}
+% By this way when a command
+%
+% \begin{verbatim}
+% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE2]
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% is issued, then \verb+\WORD+ is defined to
+%
+% \begin{verbatim}
+% \@@KeywordsCurrentStyle{\@@kwrd}{SENTENCE1}{SENTENCE2}\@@kwrd}
+% \end{verbatim}
+%
+% \vspace{-\baselineskip}
+% Hence, every time the command \verb+\WORD+ is issued by the
+% user in the text of its programs, \verb+\@@kwrd+ is redefined
+% and invoked under the running definition of
+% \verb+\@@KeywordsCurrentStyle+.
+% This complicated trick ensures that every keyword, even if it is
+% not defined in the style file (e.g. if it is defined in the text
+% typed by the user) will be typed with the correct font selection.
+% \end{macro}
+
+% \begin{macro}{\DefineUnderlinedKeywordsStyles}
+% This macro serves to switch to underlined fonts:
+% \begin{macrocode}
+\def\DefineUnderlinedKeywordsStyles#1#2{
+ \@@underlinetrue
+ \DefineKeywordsStyles{#1}{#2}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Predefined printing styles}
+%
+% The commands in the margin are automatically generated (see above and
+% section~\ref{user:selecting-printing-styles}) by issuing the
+% following commands:
+%
+% \begin{macro}{\ProgKeywords}
+% \begin{macro}{\FProgKeywords}
+% \
+% \begin{macrocode}
+\DefineKeywordsStyles{ProgKeyword}{\bf}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ttKeywords}
+% \begin{macro}{\FttKeywords}
+% \
+% \begin{macrocode}
+\DefineKeywordsStyles{ttKeyword}{\tt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\AlgoKeywords}
+% \begin{macro}{\FAlgoKeywords}
+% \
+% \begin{macrocode}
+\DefineKeywordsStyles{AlgoKeyword}{\em}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\UAlgoKeywords}
+% \begin{macro}{\FUAlgoKeywords}
+% \
+% \begin{macrocode}
+\DefineUnderlinedKeywordsStyles{UAlgoKeyword}{\em}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NormalKeywords}
+% \begin{macro}{\FNormalKeywords}
+% \
+% \begin{macrocode}
+\DefineKeywordsStyles{NormalKeyword}{\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \
+% \begin{macro}{\UFAlgoKeywords}
+% This macro is defined for compatability with previous versions
+% of the style:
+% \begin{macrocode}
+\let\UFAlgoKeywords\FUAlgoKeywords
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Predefined keywords}
+% \label{default-keywords}
+%
+% The macros below are sorted alphabetically:
+% \begin{macrocode}
+%<style>%% DEFAULT KEYWORDS
+\NewKeyword{\ABORT}{abort}[avorter]
+\NewKeyword{\ABS}{abs}
+\NewKeyword{\ABSTRACT}{abstract}[abstrait]
+\NewKeyword{\ACCEPT}{accept}[accepter]
+\NewKeyword{\ACCESS}{access}[acc\`es]
+\NewKeyword{\ALIASED}{aliased}[alias\'e]
+\NewKeyword{\ALL}{all}[tout]
+\NewKeyword{\ALT}{alt}
+\NewKeyword{\AND}{and}[et]
+\NewKeyword{\APPEND}{append}[ajouter\_\-en\_\-fin]
+\NewKeyword{\ARRAY}{array}[tableau]
+\NewKeyword{\ASSERT}{assert}[assertion]
+\NewKeyword{\ASSIGN}{:=}
+\NewKeyword{\AT}{at}
+\NewKeyword{\BEGIN}{begin}[d\'ebut]
+\NewKeyword{\BLOCK}{block}[bloc]
+\NewKeyword{\BOOLEAN}{boolean}[bool\'een]
+\NewKeyword{\BODY}{body}
+\NewKeyword{\BOT}{$\bot$}
+\NewKeyword{\BOX}{$<>$}
+\NewKeyword{\BY}{by}[pas]
+\NewKeyword{\CASE}{case}[choix]
+\NewKeyword{\CATINDEX}{catindex}
+\NewKeyword{\CHAN}{chan}[canal]
+\NewKeyword{\CHANNEL}{channel}[canal]
+\NewKeyword{\CHAR}{char}[car]
+\NewKeyword{\CHARACTER}{character}[caract\`ere]
+\NewKeyword{\CLOSE}{close}[fermer]
+\NewKeyword{\CO}{co}
+\NewKeyword{\COBEGIN}{cobegin}
+\NewKeyword{\COEND}{coend}
+\NewKeyword{\COMMUTATIVE}{commutative}[commutatif]
+\NewKeyword{\COMPLEX}{complex}[complexe]
+\NewKeyword{\COMPUTE}{compute}[calculer]
+\NewKeyword{\CONNECT}{$\longrightarrow$}
+\NewKeyword{\CONNECTB}{$\Longrightarrow$}
+\NewKeyword{\CONST}{const}
+\NewKeyword{\CONSTANT}{constant}[constante]
+\NewKeyword{\CONSTRAINTS}{constraints}[contraintes]
+\NewKeyword{\CONTINUE}{continue}
+\NewKeyword{\DATA}{data}[donn\'ee]
+\NewKeyword{\DECLARE}{declare}
+\NewKeyword{\DECOMPOSE}{decompose}
+\NewKeyword{\DELAY}{delay}[d\'elai]
+\NewKeyword{\DELTA}{delta}
+\NewKeyword{\DEPTH}{depth}[profondeur]
+\NewKeyword{\DIGITS}{digits}[chiffres]
+\NewKeyword{\DIMENSION}{dimension}
+\NewKeyword{\DIST}{dist}
+\NewKeyword{\DISTRIBUTE}{distribute}[r\'epartir]
+\NewKeyword{\DIV}{div}
+\NewKeyword{\DO}{do}[faire]
+\NewKeyword{\DOALL}{doall}[faire en parall\`ele]
+\NewKeyword{\DOM}{dom}
+\NewKeyword{\DOMAIN}{domain}[domaine]
+\NewKeyword{\DOMAINS}{domains}[domaines]
+\NewKeyword{\DONE}{done}[fait]
+\NewKeyword{\DOPAR}{dopar}[faire en parall\`ele]
+\NewKeyword{\DOWNTO}{downto}[jusqu'\`a]
+\NewKeyword{\DYNAMIC}{dynamic}[dynamique]
+\NewKeyword{\EACH}{each}[chaque]
+\NewKeyword{\EGO}{MyId}[EGO]
+\NewKeyword{\ELSE}{else}[sinon]
+\NewKeyword{\ELSIF}{elsif}[sinon si]
+\NewKeyword{\END}{end}[fin]
+\NewKeyword{\ENDCASE}{end case}[fin choix]
+\NewKeyword{\ENDIF}{end if}[finsi]
+\NewKeyword{\ENDDO}{end do}[fait]
+\NewKeyword{\ENDLOOP}{end loop}[fait]
+\NewKeyword{\ENTRY}{entry}[entr\'ee]
+\NewKeyword{\EOT}{eot}
+\NewKeyword{\EQ}{$=$}
+\NewKeyword{\EXCEPTION}{exception}
+\NewKeyword{\EXIT}{exit}[sortir]
+\NewKeyword{\EXTERNAL}{external}[externe]
+\NewKeyword{\FI}{fi}[finsi]
+\NewKeyword{\FILE}{file}[fichier]
+\NewKeyword{\FIRST}{first}[premier]
+\NewKeyword{\FOR}{for}[pour]
+\NewKeyword{\FORALL}{forall}[pour tout]
+\NewKeyword{\FOREACH}{foreach}[pour chaque]
+\NewKeyword{\FORWARD}{forward}
+\NewKeyword{\FUNCTION}{function}[fonction]
+\NewKeyword{\GE}{$\geq$}
+\NewKeyword{\GENERIC}{generic}[g\'en\'erique]
+\NewKeyword{\GETNODE}{getnode}[prendre\_\-noeud]
+\NewKeyword{\GOTO}{goto}[aller\_\-\`a]
+\NewKeyword{\GRAPH}{graph}[graphe]
+\NewKeyword{\GT}{$>$}
+\NewKeyword{\IF}{if}[si]
+\NewKeyword{\IMPLICATION}{$\Rightarrow$}
+\NewKeyword{\IMPLY}{$\Rightarrow$}
+\NewKeyword{\IMPORT}{import}[importer]
+\NewKeyword{\IN}{in}[dans]
+\NewKeyword{\IND}{ind}
+\NewKeyword{\INDEX}{index}
+\NewKeyword{\INIT}{init}
+\NewKeyword{\INOUT}{inout}
+\NewKeyword{\INPORT}{inport}
+\NewKeyword{\INPUT}{input}
+\NewKeyword{\INTEGER}{integer}[entier]
+\NewKeyword{\INTO}{into}
+\NewKeyword{\IS}{is}[est]
+\NewKeyword{\LABEL}{label}[\'etiquette]
+\NewKeyword{\LAST}{last}[dernier]
+\NewKeyword{\LE}{$\leq$}
+\NewKeyword{\LENGTH}{length}[longueur]
+\NewKeyword{\LIMITED}{limited}[limit\'e]
+\NewKeyword{\LOOP}{loop}[faire]
+\NewKeyword{\LT}{$<$}
+\NewKeyword{\MAP}{map}[placer]
+\NewKeyword{\MOD}{mod}
+\NewKeyword{\MODULE}{module}
+\NewKeyword{\MODULO}{modulo}
+\NewKeyword{\MULTIPLE}{multiple}
+\NewKeyword{\MYID}{MyId}[EGO]
+\NewKeyword{\NE}{$\neq$}
+\NewKeyword{\NEIGHBOUR}{neighbour}[voisin]
+\NewKeyword{\NEIGHBOURS}{neighbours}[voisins]
+\NewKeyword{\NEW}{new}[nouveau]
+\NewKeyword{\NEWBLOCK}{newblock}
+\NewKeyword{\NIL}{nil}
+\NewKeyword{\NODE}{node}[noeud]
+\NewKeyword{\NOT}{not}[non]
+\NewKeyword{\NUL}{nul}
+\NewKeyword{\NULL}{null}[nul]
+\NewKeyword{\OD}{od}[fait]
+\NewKeyword{\ODPAR}{odpar}[fait]
+\NewKeyword{\OF}{of}
+\NewKeyword{\ON}{on}
+\NewKeyword{\OPEN}{open}[ouvrir]
+\NewKeyword{\OR}{or}[ou]
+\NewKeyword{\OTHERS}{others}
+\NewKeyword{\OUT}{out}
+\NewKeyword{\OUTPORT}{outport}
+\NewKeyword{\OUTPOUT}{outpout}
+\NewKeyword{\PACKAGE}{package}[paquetage]
+\NewKeyword{\PARALLEL}{parallel}
+\NewKeyword{\PARFOR}{parfor}[en parall\`ele: pour]
+\NewKeyword{\PAR}{par}[en parall\`ele]
+\NewKeyword{\PERCENT}{\%}
+\NewKeyword{\PLACE}{place}[placer]
+\NewKeyword{\PORT}{port}
+\NewKeyword{\PRAGMA}{pragma}
+\NewKeyword{\PRI}{pri}
+\NewKeyword{\PRIVATE}{private}[priv\'e]
+\NewKeyword{\PROCEDURE}{procedure}[proc\'edure]
+\NewKeyword{\PROCESS}{process}[processus]
+\NewKeyword{\PROGRAM}{program}[programme]
+\NewKeyword{\PROTECTED}{protected}[prot\'eg\'e]
+\NewKeyword{\RAISE}{raise}[lever]
+\NewKeyword{\RANGE}{range}[intervalle]
+\NewKeyword{\READ}{read}[lire]
+\NewKeyword{\READY}{ready}[pr\^et]
+\NewKeyword{\REAL}{real}[r\'eel]
+\NewKeyword{\RECORD}{record}[enregistrement]
+\NewKeyword{\RECV}{recv}[recevoir]
+\NewKeyword{\RECEIVE}{receive}[recevoir]
+\NewKeyword{\REM}{rem}
+\NewKeyword{\RENAMES}{renames}[renomme]
+\NewKeyword{\REPEAT}{repeat}[r\'ep\'eter]
+\NewKeyword{\REQUEUE}{requeue}
+\NewKeyword{\RESET}{reset}
+\NewKeyword{\RETURN}{return}[retour]
+\NewKeyword{\REVERSE}{reverse}
+\NewKeyword{\REWIND}{rewind}
+\NewKeyword{\REWRITE}{rewrite}
+\NewKeyword{\ROOT}{root}[racine]
+\NewKeyword{\SELECT}{select}
+\NewKeyword{\SEND}{send}[\'emettre]
+\NewKeyword{\SENDEOT}{sendeot}[\'emettre eot]
+\NewKeyword{\SEPARATE}{separate}[s\'epar\'ement]
+\NewKeyword{\SEQ}{seq}
+\NewKeyword{\SET}{set}
+\NewKeyword{\SIZE}{size}[taille]
+\NewKeyword{\SKIP}{skip}[sauter]
+\NewKeyword{\STRING}{string}[cha\^{\i}ne de caract\`eres]
+\NewKeyword{\SUBTYPE}{subtype}[sous\_\-type]
+\NewKeyword{\SWITCH}{switch}
+\NewKeyword{\TAGGED}{tagged}[\'etiquett\'e]
+\NewKeyword{\TASK}{task}[t\^ache]
+\NewKeyword{\TERMINATE}{terminate}[terminer]
+\NewKeyword{\THEN}{then}[alors]
+\NewKeyword{\TO}{to}[jusqu'\`a]
+\NewKeyword{\TOWARDS}{towards}[vers]
+\NewKeyword{\TRANSMIT}{transmit}[\'emettre]
+\NewKeyword{\TUPLE}{tuple}[n\_\-uplet]
+\NewKeyword{\TYPE}{type}
+\NewKeyword{\UNDEF}{undef}[ind\'efini]
+\NewKeyword{\UNTIL}{until}[jusqu'\`a]
+\NewKeyword{\USE}{use}
+\NewKeyword{\VAR}{var}
+\NewKeyword{\VARIABLE}{variable}
+\NewKeyword{\WHEN}{when}[si]
+\NewKeyword{\WHERE}{where}[si]
+\NewKeyword{\WHILE}{while}[tant que]
+\NewKeyword{\WITH}{with}[avec]
+\NewKeyword{\WRITE}{write}[\'ecrire]
+\NewKeyword{\XOR}{xor}
+%<style>%%
+%<style>%% French syntax
+%<style>%%
+\NewKeyword{\EMETTRE}{send}[\'emettre]
+\NewKeyword{\RECEVOIR}{receive}[recevoir]
+\NewKeyword{\POUR}{for}[pour]
+\NewKeyword{\FAIRE}{do}[faire]
+\NewKeyword{\FAIT}{end do}[fait]
+\NewKeyword{\SI}{if}[si]
+\NewKeyword{\ALORS}{then}[alors]
+\NewKeyword{\SINON}{else}[sinon]
+\NewKeyword{\FINSI}{end if}[fin si]
+\NewKeyword{\DEBUT}{begin}[d\'ebut]
+\NewKeyword{\FIN}{end}[fin]
+% \end{macrocode}
+% Then we terminate by instructing \LaTeX\ to switch to the default
+% font for typing keywords (which, in the current implementation is
+% underlined \verb+\em+).
+% \begin{macrocode}
+\FUAlgoKeywords
+% \end{macrocode}
+
+% \begin{macrocode}
+%</style>
+% \end{macrocode}
+
+% ^^A The four commented lines below may be used to output an index on
+% ^^A a page layout greater than the one used till now.
+% ^^A -----
+% ^^A \newpage
+% ^^A \setlength{\oddsidemargin}{0pt}
+% ^^A \setlength\textwidth{15cm}
+% ^^A \normalsize
+% ^^A -----
+%
+% \IndexPrologue{%
+% \section*{Index}%
+% \markboth{Index}{Index}%
+% {\it{}The italic numbers denote the pages where the
+% corresponding entry is described,
+% numbers underlined point to the definition,
+% all others indicate the places where it is used
+% (ie. the line numbers where it appears).
+% }}
+% \Finale
+% \newpage
+% \PrintIndex \PrintChanges