1
% \iffalse meta-comment
5
% Copyright (C) 1993,1994,1995 by Miguel Alabau. All rights reserved.
7
% COMMANDS FOR TYPESETTING KEYWORDS
9
% **WARNING** If the file 'keywords.ins' does not accompany the file
10
% 'keywords.dtx', then you must strip this last file by hand.
11
% (1) Run 'latex docstrip' on 'keywords.dtx' and indicate 'drv' as
12
% suffix file and 'driver' as selector for extraction.
13
% (2) Run 'latex docstrip' on 'keywords.dtx' and indicate 'sty' as
14
% suffix file and 'style' as selector for extraction.
15
% (3) Run 'latex docstrip' on 'keywords.dtx' and indicate 'ist' as
16
% suffix file and 'index' as selector for extraction.
17
% Then, if you want to produce the documentation, proceed as follows:
18
% latex keywords.drv; latex keywords.drv; latex keywords.drv
19
% makeindex -s keywords.ist keywords.idx
22
%<style>\NeedsTeXFormat{LaTeX2e}
23
%<style>\ProvidesPackage{keywords}
28
% \def\fileversion{v1.0}
29
% \def\filedate{95/04/01}
30
% \def\docdate {96/01/31}
39
%% {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
40
%% 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
41
%% Digits \0\1\2\3\4\5\6\7\8\9
42
%% Exclamation \! Double quote \" Hash (number) \#
43
%% Dollar \$ Percent \% Ampersand \&
44
%% Acute accent \' Left paren \( Right paren \)
45
%% Asterisk \* Plus \+ Comma \,
46
%% Minus \- Point \. Solidus \/
47
%% Colon \: Semicolon \; Less than \<
48
%% Equals \= Greater than \> Question mark \?
49
%% Commercial at \@ Left bracket \[ Backslash \\
50
%% Right bracket \] Circumflex \^ Underscore \_
51
%% Grave accent \` Left brace \{ Vertical bar \|
52
%% Right brace \} Tilde \~}
55
% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
56
% \DoNotIndex{\@flushglue,\@gobble,\@input}
57
% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
58
% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
59
% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
60
% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
61
% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
62
% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
63
% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
64
% \DoNotIndex{\cal,\csname,\def,\documentstyle,\dospecials,\edef}
65
% \DoNotIndex{\documentclass}
66
% \DoNotIndex{\egroup}
67
% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
68
% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
69
% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
70
% \DoNotIndex{\ifcase}
71
% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
72
% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
73
% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
74
% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
75
% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
76
% \DoNotIndex{\strutbox}
77
% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
78
% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
79
% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
80
% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
81
% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
82
% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
83
% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
84
% \DoNotIndex{\nopagebreak}
85
% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
86
% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
87
% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
88
% \DoNotIndex{\[,\{,\},\]}
89
% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
90
% \DoNotIndex{\baselineskip,\begin,\tw@}
91
% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
92
% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
93
% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
94
% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
95
% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
96
% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
97
% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
98
% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
99
% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
100
% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
101
% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
102
% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
103
% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
104
% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
105
% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
106
% \DoNotIndex{\bfdefault}
108
% \DoNotIndex{\addtocounter,\baselinestretch,\em,\noindent}
109
% \DoNotIndex{\linewidth,\columnwidth,\newcounter,\newif,\newlength}
110
% \DoNotIndex{\normalsize,\refstepcounter,\rlap,\rule}
111
% \DoNotIndex{\@@tempa,\@@tempb,\@ifnextchar,\@nameuse}
113
% \title{The ``{\sf{}keywords.sty}'' style file\thanks{%
114
% This file has version number \fileversion{} dated \filedate{}.
115
% The documentation was last revised on \docdate{}.}}
117
% \author{Miguel Alabau\\
118
% {\small{}LaBRI, Universit\'e Bordeaux~I (France)}\\
119
% {\small{\em{}e-mail\/}: {\tt{}Miguel.Alabau@labri.u-bordeaux.fr}}}
124
% This style file contains a set of definitions that allow keywords
125
% to be defined and printed in several convenient ways.
126
% For each keyword two definitions may be provided. This is to
127
% allow the use of keywords in two contexts (for instance
128
% English/French translation of the keywords).
129
% At the same time, keyword can be printed in roman, teletype,
130
% boldfaced or underlined.
131
% The user can define other styles for printing keywords.
132
% A set of keywords is provided by default. Of course a user can
133
% define new keywords or redefine existing ones without modifying
139
% \ifhave@multicol\multicolstrue\else\multicolsfalse\fi
142
% \begin{footnotesize}
143
% \ifmulticols \begin{multicols}{2} \fi
145
% \ifmulticols \end{multicols} \fi
150
% \begin{multicols}{2}[\section{Introduction}]
151
% \else \section{Introduction} \fi
153
% When typing programs or algorithms, it often happens for a same
154
% text to appear as an algoritm (pseudo-code) or as a program. In such
155
% cases different fonts are used. For instance, algorithms may appear
156
% with keywords italicised or underlined, while the same keywords
157
% appear boldfaced in the program text.
158
% Moreover algorithms are often typed with keywords belonging to the
159
% native language of the writer while program keywords appear usually
160
% to be english ones.
162
% The file {\em{}keywords.sty\/} provides simple solutions to both of
163
% these problems by giving the user capability to define each keyword
164
% in two simultaneaous different manners and by providing different
167
% Keywords are commands to be issued in text. Hence this style file is
168
% origimally intended to be used in conjunction with the features
169
% provided by the {\em{}programs.sty\/} style file~\cite{alabau95-d}.
170
% However, it can be used independently.
172
% \ifnoprogsfile \relax\else
174
% For instance, let be the following piece of program:
182
% \vspace{-\baselineskip}
184
% where \verb+\BEGIN+ and \verb+\END+ are two predefined commands in
186
% If we issue the command \verb+\ProgKeywords+, then we get:
195
% \vspace{-\baselineskip}
197
% If we prefer to use the second language, we can issue the
198
% \verb+\FProgKeywords+:
207
% \vspace{-\baselineskip}
209
% We can also use other typesetting rules, like underlined emphasized
210
% fonts (\verb+UAlgoKeywords+):
219
% \vspace{-\baselineskip}
221
% It is also possible to define new keywords or to redefine existing
222
% ones, by issuing a command like:
225
% \NewKeyword{\BEGIN}{this is the beginning}
226
% \NewKeyword{\END}{this is the end}
229
% \vspace{-\baselineskip}
231
% which leads to the following piece of code (default typesetting used
232
% is the last one specified, i.e. \verb+UAlgoKeywords+):
234
% \NewKeyword{\BEGIN}{this is the beginning}
235
% \NewKeyword{\END}{this is the end}
244
% \ifmulticols\end{multicols}\fi
246
% ^^A **********************************************
247
% ^^A ** USERS's MANUAL **
248
% ^^A **********************************************
250
% \section{User's Manual}
252
% A set of default keywords is provided in this file (see
253
% section~\ref{default-keywords}). For each keyword, two definitions
254
% are provided: the first one in english, and the second one in french
255
% (because I am French).
256
% The switch between the two languages is performed by global commands
257
% wich serve also to define the font used for printing.
259
% \subsection{Selecting a printing style}
260
% \label{user:selecting-printing-styles}
262
% \DescribeMacro{\ProgKeywords}
263
% \DescribeMacro{\FProgKeywords}
264
% \DescribeMacro{\ttKeywords}
265
% \DescribeMacro{\FttKeywords}
266
% \DescribeMacro{\AlgoKeywords}
267
% \DescribeMacro{\FAlgoKeywords}
268
% \DescribeMacro{\NormalKeywords}
269
% \DescribeMacro{\FNormalKeywords}
271
% The following printing styles are provided:
274
% \begin{tabular}{lll}
276
% \multicolumn{1}{c}{style}
277
% & \multicolumn{1}{c}{definition~1}
278
% & \multicolumn{1}{c}{definition~2}\\
280
% \verb+\bf+ & \verb+\ProgKeywords+ & \verb+\FProgKeywords+\\
281
% \verb+\tt+ & \verb+\ttKeywords+ & \verb+\FttKeywords+\\
282
% \verb+\em+ & \verb+\AlgoKeywords+ & \verb+\FAlgoKeywords+\\
283
% \verb+\rm+ & \verb+\NormalKeywords+ & \verb+\FNormalKeywords+\\
288
% \DescribeMacro{\UAlgoKeywords}
289
% \DescribeMacro{\UFAlgoKeywords}
290
% \DescribeMacro{\FUAlgoKeywords}
291
% There are also two underlined styles:
294
% \begin{tabular}{lll}
296
% \multicolumn{1}{c}{style}
297
% & \multicolumn{1}{c}{definition~1}
298
% & \multicolumn{1}{c}{definition~2}\\
300
% underlined \verb+\em+ & \verb+\UAlgoKeywords+ & \verb+\FUAlgoKeywords+\\
305
% For compatability with previous versions of keywords.sty, the
306
% command \verb+\UFAlgoKeywords+ has been defined as a synonym for
307
% \verb+\FUAlgoKeywords+.
309
% \subsection{Defining and Re-defining keywords}
310
% \label{user:program-keywords}
312
% \DescribeMacro{\NewKeyword}
316
% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE2]
319
% \vspace{-\baselineskip}
320
% defines the command \verb+\WORD+ to issue the text in
321
% \verb+SENTENCE1+ or in \verb+SENTENCE2+ when it is typed, according
322
% to the style currently in use.
324
% For instance, one could use \verb+SENTENCE1+ for defining english
325
% keywords and \verb+SENTENCE2+ for defining their french translation.
327
% If ``\verb+[SENTENCE2]+'' is omitted, all happens as if the
328
% following command had been issued:
331
% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE1]
334
% \vspace{-\baselineskip}
335
% The command \verb+\NewKeyword+ serves also to redefine existing
338
% \subsection{Defining a printing style}
339
% \label{user:defining-printing-styles}
341
% \DescribeMacro{\DefineKeywordsStyles}
345
% \DefineKeywordsStyles{MODE}{\STYLE}
348
% \vspace{-\baselineskip}
349
% allows for the user to define particular printing modes.
350
% Its main effect is to define the commands \verb+\MODEs+ and
351
% \verb+\FMODEs+ that will lead to print respectively the
352
% \verb+SENTENCE1+ part or the \verb+SENTENCE2+ part of the
353
% \verb+\NewKeyword+ definitions.
354
% For instance, the commands \verb+\ProgKeywords+ and
355
% \verb+\FProgKeywords+ have been automatically defined from a
356
% \verb+\DefineKeywordsStyles{ProgKeyword}{\bf}+ command.
358
% \DescribeMacro{\DefineUnderlinedKeywordsStyles}
360
% For \verb+SENTENCE+$_i$ to be underlined, it is necessary to issue a
363
% \DefineUnderlinedKeywordsStyles{MODE}{\STYLE}
366
% \vspace{-\baselineskip}
367
% command, instead of the ``\verb+\DefineKeywordsStyles+'' described
369
% This is how the \verb+\UAlgoKeywords+ and \verb+\FUAlgoKeywords+
370
% commands have been defined, by issuing a
371
% \verb+\DefineUnderlinedKeywordsStyles{UAlgoKeyword}{\em}+ command.
373
% \subsection{The Index File}
375
% In order for the processing of this file to be complete, an index
376
% format file is required. Let us assume that it is named
377
% \verb+keywords.ist+, then the following command must be run and then
378
% another compilation of the current file:
382
%<index>%% -----------------------------------------------------------
383
%<index>%% Assuming this file is named "keywords.ist" (after being
384
%<index>%% generated from "keywords.dtx" by running "latex docstrip"),
385
%<index>%% the following command will produce a well formated index:
387
%<index>%% makeindex -s keywords.ist keywords.idx
388
%<index>%% -----------------------------------------------------------
392
% Another possibility is to set the environment variable
393
% \verb+INDEXSTYLE+ to a directory name where the ``.ist'' files
394
% (index format files) may be found.
396
% A possible index file is given below\footnote{It can be generated by
397
% invoquing the compilation of ``docstrip'' with the ``index''
405
%<index>"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
407
%<index>"\n\n \\end{theindex}\n"
408
%<index>item_x1 "\\efill \n \\subitem "
409
%<index>item_x2 "\\efill \n \\subsubitem "
410
%<index>delim_0 "\\pfill "
411
%<index>delim_1 "\\pfill "
412
%<index>delim_2 "\\pfill "
413
%<index>% The next lines will produce some warnings when
414
%<index>% running Makeindex as they try to cover two different
415
%<index>% versions of the program:
416
%<index>lethead_prefix "{\\bf\\hfil "
417
%<index>lethead_suffix "\\hfil}\\nopagebreak\n"
418
%<index>lethead_flag 1
419
%<index>heading_prefix "{\\bf\\hfil "
420
%<index>heading_suffix "\\hfil}\\nopagebreak\n"
421
%<index>headings_flag 1
424
% \subsection{The Driver File}
426
% There is also a driver file, called {\em{}programs.drv\/}, that is
427
% included in the distribution.
428
% It is devoted to control the latex compilation of the documentation.
429
% Its code is given below.
434
\openin1 programs.sty
435
\ifeof1 \noprogsfiletrue\else\noprogsfilefalse\fi\closein1
436
\ifnoprogsfile \relax\else
437
\openin1 keywords.sty
438
\ifeof1 \noprogsfiletrue\else\noprogsfilefalse\fi\closein1
441
\typeout{*************************************************************}
442
\typeout{To get a more complete documentation, you should:}
443
\typeout{(1) generate the file 'programs.sty'(see 'programs.dtx'), and}
444
\typeout{(2) copy the current file into 'keywords.sty'}
445
\typeout{*************************************************************}
448
\documentclass{ltxdoc}
450
\documentclass{ltxdoc}
451
\usepackage{programs}
452
\usepackage{keywords}
456
\setlength{\textwidth}{31pc}%
457
\setlength{\textheight}{54pc}%
458
\setlength{\parindent}{0pt}%
459
\setlength{\parskip}{2pt plus 1pt minus 1pt}%
460
\setlength{\oddsidemargin}{8pc}%
461
\setlength{\marginparwidth}{8pc}%
462
\setlength{\topmargin}{-2.5pc}%
463
\setlength{\headsep}{20pt}%
464
\setlength{\columnsep}{1.5pc}%
465
\setlength{\columnwidth}{18.75pc}%
467
\setcounter{IndexColumns}{2}%
471
%\OldMakeindex % use if your MakeIndex is pre-v2.9%
473
\DocInput{keywords.dtx}
478
% \subsection{Extracting the documents included in the file keywords.dtx}
480
% There are three documents included in the {\em{}keywords.dtx\/} file:
481
% the style file ({\em{}keywords.sty}),
482
% the index style file for printing a cross-referenced document
483
% ({\em{}keywords.ist}),
484
% and the driver file for printing the document: {\em{}keywords.drv\/}.
486
% For file extraction it is necessary to use the \verb"docstrip"
487
% utility, which is part of the \verb"doc"
488
% distribution~\cite{art:doc}.
489
% Normally, a file \verb"docstrip.tex" should exist on the \LaTeX\
490
% style files directory.
491
% Extraction is performed by typing:
497
% \vspace{-\baselineskip}
498
% This is an interactive program, and the dialogue for generating the
499
% style file should be:
502
% **********************************************************
503
% * This program converts documented macro-files into fast *
504
% * loadable files by stripping off (nearly) all comments! *
505
% **********************************************************
507
% ****************************************************
508
% * First type the extension of your input file(s): *
510
% ****************************************************
512
% ****************************************************
513
% * Now type the extension of your output file(s) : *
515
% ****************************************************
517
% ****************************************************
518
% * Now type the name(s) of option(s) to include : *
520
% ****************************************************
522
% ****************************************************
523
% * Finally give the list of input file(s) without *
524
% * extension seperated by commas if necessary : *
526
% ****************************************************
529
% \vspace{-\baselineskip}
530
% For generating the index file it suffices to rerun the
531
% \verb"docstrip" utility and to answer ``ist/index'' instead of
532
% ``sty/style'' int the above steps~2 and~3.
536
% The three files may be produced in a single pass, by simply latexing
537
% the file {\em{}keywords.ins\/} which goes along with the file
538
% {\em{}keywords.dtx\/}.
542
% Generation of the documentation is then simply performed as follows
543
% (the {\em{}keywords.dtx\/} file includes its own driver):
549
% makeindex -s keywords.ist keywords.idx
554
% \begin{thebibliography}{1}
555
% \bibitem{book:KnuthA} {\sc D.E. Knuth}.
556
% \newblock Computers \& Typesetting (The \TeX book).
557
% \newblock Addison-Wesley, Vol. A, 1986.
558
% \bibitem{lamport86}{\sc L. Lamport}.
559
% \newblock {\em {\LaTeX}: a Document Preparation System}.
560
% \newblock Addison-Wesley Publishing Company, 1986.
561
% \bibitem{art:doc} {\sc F. Mittelbach}.
562
% \newblock The {\tt doc}-option.
563
% \newblock {\sl TUGboat}, Vol.~10(2), {\it pp}.~245--273, July
565
% \bibitem{alabau95-d} {\sc M. Alabau}.
566
% \newblock The ``{\sf{}programs.sty}'' style file.
567
% \newblock March 1995.
568
% {\em{}e-mail:\/} {\tt{}Miguel.Alabau@labri.u-bordeaux.fr}
569
% \end{thebibliography}
571
% } ^^A end \StopEventually
578
% ^^A **********************************************
579
% ^^A ** TECHNICAL DESCRIPTION **
580
% ^^A **********************************************
582
\typeout{Document style `keywords.sty' <1993,1994,1995>}
584
% \section{Description of Macros}
586
% \begin{macro}{\AlreadyDefined@@Keywords}
587
% This macro can be tested by any style file to know if the file
588
% ``{\sf{}keywords.sty}'' has been input. But it allows a modular
589
% programming style similar to the one used with the C~header
591
% Hence, the first time the ``{\sf{}keywords.sty}'' style file is
592
% included all of its body will be included; the second time, the
593
% body will not be included.
595
\expandafter\ifx\csname AlreadyDefined@@Keywords\endcsname\relax%
596
\expandafter\def\csname AlreadyDefined@@Keywords\endcsname{}%
601
% A test for the existence of this macro is performed for
602
% compatability with ancient versions of \LaTeX.
604
\@ifundefined{reset@font}{\global\let\reset@font\relax}{}
607
% \subsection{Defining and Re-defining keywords}
609
% \begin{macro}{\NewKeyword}
610
% \begin{macro}{\@@newkwrd}
611
% The \verb+\NewKeyword+ command has three parameters, but the
612
% third one is optional. By default it is assumed to be equal to
615
\def\NewKeyword#1#2{\@ifnextchar[{\@@newkwrd{#1}{#2}}{\@@newkwrd{#1}{#2}[#2]}}
619
% The \verb+\@@newkwrd+ performs the real work. It calls the
620
% command \verb+\@@KeywordsCurrentStyle+ whose effect is to define
621
% the command \verb+\@@kwrd+ and then invokes this last command.
623
\def\@@newkwrd#1#2[#3]{\def#1{\@@KeywordsCurrentStyle{\@@kwrd}{#2}{#3}\@@kwrd}}
627
% \subsection{Defining printing styles}
629
% \begin{macro}{\@@TypeStyle}
630
% This command is expected to be called with a command name as
631
% first parameter. Its effect is to define \verb+#1+ as the
632
% command that print \verb+#3+ with style \verb+#2+~:
634
\def\@@TypeStyle#1#2#3{\def#1{\mbox{\reset@font#2{}#3\/}}}
638
% \begin{macro}{\DefineKeywordsStyles}
639
% The macro \verb+\DefineKeywordsStyles+ has two parameters, let
640
% them be \verb+toto+ and \verb+bf+. Its effect is to define
641
% two commands called \verb+\@@toto+ and \verb+\F@@toto+. Each of
642
% these two new commands has three parameters: the first one must
643
% be the name of a command (the keyword to be defined) and the
644
% other two must be two texts associated to the keyword. The
645
% \verb+\@@toto+ command will select the first text while the
646
% \verb+\F@@toto+ command will select the second text.
648
\newif\if@@underline \@@underlinefalse
649
\def\DefineKeywordsStyles#1#2{
651
\@namedef{@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{\underline{##2}}}
652
\@namedef{F@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{\underline{##3}}}
654
\@namedef{@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{##2}}
655
\@namedef{F@@#1}##1##2##3{\@@TypeStyle{##1}{#2}{##3}}
658
% A boolean switch is used to select underlined fonts. By default
659
% non underlined fonts are used, and a reset to non boolean fonts
660
% is performed after every definition of keyword:
664
% At last two commands are provided to the user: \verb+\totos+ and
665
% \verb+\Ftotos+ whose effect is to set the command
666
% \verb+\@@KeywordsCurrentStyle+ respectively to \verb+\@@toto+ or
669
\@namedef{#1s}{\def\@@KeywordsCurrentStyle{\@nameuse{@@#1}}}
670
\@namedef{F#1s}{\def\@@KeywordsCurrentStyle{\@nameuse{F@@#1}}}
673
% By this way when a command
676
% \NewKeyword{\WORD}{SENTENCE1}[SENTENCE2]
679
% \vspace{-\baselineskip}
680
% is issued, then \verb+\WORD+ is defined to
683
% \@@KeywordsCurrentStyle{\@@kwrd}{SENTENCE1}{SENTENCE2}\@@kwrd}
686
% \vspace{-\baselineskip}
687
% Hence, every time the command \verb+\WORD+ is issued by the
688
% user in the text of its programs, \verb+\@@kwrd+ is redefined
689
% and invoked under the running definition of
690
% \verb+\@@KeywordsCurrentStyle+.
691
% This complicated trick ensures that every keyword, even if it is
692
% not defined in the style file (e.g. if it is defined in the text
693
% typed by the user) will be typed with the correct font selection.
696
% \begin{macro}{\DefineUnderlinedKeywordsStyles}
697
% This macro serves to switch to underlined fonts:
699
\def\DefineUnderlinedKeywordsStyles#1#2{
701
\DefineKeywordsStyles{#1}{#2}
706
% \subsection{Predefined printing styles}
708
% The commands in the margin are automatically generated (see above and
709
% section~\ref{user:selecting-printing-styles}) by issuing the
710
% following commands:
712
% \begin{macro}{\ProgKeywords}
713
% \begin{macro}{\FProgKeywords}
716
\DefineKeywordsStyles{ProgKeyword}{\bf}
721
% \begin{macro}{\ttKeywords}
722
% \begin{macro}{\FttKeywords}
725
\DefineKeywordsStyles{ttKeyword}{\tt}
730
% \begin{macro}{\AlgoKeywords}
731
% \begin{macro}{\FAlgoKeywords}
734
\DefineKeywordsStyles{AlgoKeyword}{\em}
739
% \begin{macro}{\UAlgoKeywords}
740
% \begin{macro}{\FUAlgoKeywords}
743
\DefineUnderlinedKeywordsStyles{UAlgoKeyword}{\em}
748
% \begin{macro}{\NormalKeywords}
749
% \begin{macro}{\FNormalKeywords}
752
\DefineKeywordsStyles{NormalKeyword}{\relax}
757
% \begin{macro}{\UFAlgoKeywords}
758
% This macro is defined for compatability with previous versions
761
\let\UFAlgoKeywords\FUAlgoKeywords
765
% \subsection{Predefined keywords}
766
% \label{default-keywords}
768
% The macros below are sorted alphabetically:
770
%<style>%% DEFAULT KEYWORDS
771
\NewKeyword{\ABORT}{abort}[avorter]
772
\NewKeyword{\ABS}{abs}
773
\NewKeyword{\ABSTRACT}{abstract}[abstrait]
774
\NewKeyword{\ACCEPT}{accept}[accepter]
775
\NewKeyword{\ACCESS}{access}[acc\`es]
776
\NewKeyword{\ALIASED}{aliased}[alias\'e]
777
\NewKeyword{\ALL}{all}[tout]
778
\NewKeyword{\ALT}{alt}
779
\NewKeyword{\AND}{and}[et]
780
\NewKeyword{\APPEND}{append}[ajouter\_\-en\_\-fin]
781
\NewKeyword{\ARRAY}{array}[tableau]
782
\NewKeyword{\ASSERT}{assert}[assertion]
783
\NewKeyword{\ASSIGN}{:=}
785
\NewKeyword{\BEGIN}{begin}[d\'ebut]
786
\NewKeyword{\BLOCK}{block}[bloc]
787
\NewKeyword{\BOOLEAN}{boolean}[bool\'een]
788
\NewKeyword{\BODY}{body}
789
\NewKeyword{\BOT}{$\bot$}
790
\NewKeyword{\BOX}{$<>$}
791
\NewKeyword{\BY}{by}[pas]
792
\NewKeyword{\CASE}{case}[choix]
793
\NewKeyword{\CATINDEX}{catindex}
794
\NewKeyword{\CHAN}{chan}[canal]
795
\NewKeyword{\CHANNEL}{channel}[canal]
796
\NewKeyword{\CHAR}{char}[car]
797
\NewKeyword{\CHARACTER}{character}[caract\`ere]
798
\NewKeyword{\CLOSE}{close}[fermer]
800
\NewKeyword{\COBEGIN}{cobegin}
801
\NewKeyword{\COEND}{coend}
802
\NewKeyword{\COMMUTATIVE}{commutative}[commutatif]
803
\NewKeyword{\COMPLEX}{complex}[complexe]
804
\NewKeyword{\COMPUTE}{compute}[calculer]
805
\NewKeyword{\CONNECT}{$\longrightarrow$}
806
\NewKeyword{\CONNECTB}{$\Longrightarrow$}
807
\NewKeyword{\CONST}{const}
808
\NewKeyword{\CONSTANT}{constant}[constante]
809
\NewKeyword{\CONSTRAINTS}{constraints}[contraintes]
810
\NewKeyword{\CONTINUE}{continue}
811
\NewKeyword{\DATA}{data}[donn\'ee]
812
\NewKeyword{\DECLARE}{declare}
813
\NewKeyword{\DECOMPOSE}{decompose}
814
\NewKeyword{\DELAY}{delay}[d\'elai]
815
\NewKeyword{\DELTA}{delta}
816
\NewKeyword{\DEPTH}{depth}[profondeur]
817
\NewKeyword{\DIGITS}{digits}[chiffres]
818
\NewKeyword{\DIMENSION}{dimension}
819
\NewKeyword{\DIST}{dist}
820
\NewKeyword{\DISTRIBUTE}{distribute}[r\'epartir]
821
\NewKeyword{\DIV}{div}
822
\NewKeyword{\DO}{do}[faire]
823
\NewKeyword{\DOALL}{doall}[faire en parall\`ele]
824
\NewKeyword{\DOM}{dom}
825
\NewKeyword{\DOMAIN}{domain}[domaine]
826
\NewKeyword{\DOMAINS}{domains}[domaines]
827
\NewKeyword{\DONE}{done}[fait]
828
\NewKeyword{\DOPAR}{dopar}[faire en parall\`ele]
829
\NewKeyword{\DOWNTO}{downto}[jusqu'\`a]
830
\NewKeyword{\DYNAMIC}{dynamic}[dynamique]
831
\NewKeyword{\EACH}{each}[chaque]
832
\NewKeyword{\EGO}{MyId}[EGO]
833
\NewKeyword{\ELSE}{else}[sinon]
834
\NewKeyword{\ELSIF}{elsif}[sinon si]
835
\NewKeyword{\END}{end}[fin]
836
\NewKeyword{\ENDCASE}{end case}[fin choix]
837
\NewKeyword{\ENDIF}{end if}[finsi]
838
\NewKeyword{\ENDDO}{end do}[fait]
839
\NewKeyword{\ENDLOOP}{end loop}[fait]
840
\NewKeyword{\ENTRY}{entry}[entr\'ee]
841
\NewKeyword{\EOT}{eot}
842
\NewKeyword{\EQ}{$=$}
843
\NewKeyword{\EXCEPTION}{exception}
844
\NewKeyword{\EXIT}{exit}[sortir]
845
\NewKeyword{\EXTERNAL}{external}[externe]
846
\NewKeyword{\FI}{fi}[finsi]
847
\NewKeyword{\FILE}{file}[fichier]
848
\NewKeyword{\FIRST}{first}[premier]
849
\NewKeyword{\FOR}{for}[pour]
850
\NewKeyword{\FORALL}{forall}[pour tout]
851
\NewKeyword{\FOREACH}{foreach}[pour chaque]
852
\NewKeyword{\FORWARD}{forward}
853
\NewKeyword{\FUNCTION}{function}[fonction]
854
\NewKeyword{\GE}{$\geq$}
855
\NewKeyword{\GENERIC}{generic}[g\'en\'erique]
856
\NewKeyword{\GETNODE}{getnode}[prendre\_\-noeud]
857
\NewKeyword{\GOTO}{goto}[aller\_\-\`a]
858
\NewKeyword{\GRAPH}{graph}[graphe]
859
\NewKeyword{\GT}{$>$}
860
\NewKeyword{\IF}{if}[si]
861
\NewKeyword{\IMPLICATION}{$\Rightarrow$}
862
\NewKeyword{\IMPLY}{$\Rightarrow$}
863
\NewKeyword{\IMPORT}{import}[importer]
864
\NewKeyword{\IN}{in}[dans]
865
\NewKeyword{\IND}{ind}
866
\NewKeyword{\INDEX}{index}
867
\NewKeyword{\INIT}{init}
868
\NewKeyword{\INOUT}{inout}
869
\NewKeyword{\INPORT}{inport}
870
\NewKeyword{\INPUT}{input}
871
\NewKeyword{\INTEGER}{integer}[entier]
872
\NewKeyword{\INTO}{into}
873
\NewKeyword{\IS}{is}[est]
874
\NewKeyword{\LABEL}{label}[\'etiquette]
875
\NewKeyword{\LAST}{last}[dernier]
876
\NewKeyword{\LE}{$\leq$}
877
\NewKeyword{\LENGTH}{length}[longueur]
878
\NewKeyword{\LIMITED}{limited}[limit\'e]
879
\NewKeyword{\LOOP}{loop}[faire]
880
\NewKeyword{\LT}{$<$}
881
\NewKeyword{\MAP}{map}[placer]
882
\NewKeyword{\MOD}{mod}
883
\NewKeyword{\MODULE}{module}
884
\NewKeyword{\MODULO}{modulo}
885
\NewKeyword{\MULTIPLE}{multiple}
886
\NewKeyword{\MYID}{MyId}[EGO]
887
\NewKeyword{\NE}{$\neq$}
888
\NewKeyword{\NEIGHBOUR}{neighbour}[voisin]
889
\NewKeyword{\NEIGHBOURS}{neighbours}[voisins]
890
\NewKeyword{\NEW}{new}[nouveau]
891
\NewKeyword{\NEWBLOCK}{newblock}
892
\NewKeyword{\NIL}{nil}
893
\NewKeyword{\NODE}{node}[noeud]
894
\NewKeyword{\NOT}{not}[non]
895
\NewKeyword{\NUL}{nul}
896
\NewKeyword{\NULL}{null}[nul]
897
\NewKeyword{\OD}{od}[fait]
898
\NewKeyword{\ODPAR}{odpar}[fait]
901
\NewKeyword{\OPEN}{open}[ouvrir]
902
\NewKeyword{\OR}{or}[ou]
903
\NewKeyword{\OTHERS}{others}
904
\NewKeyword{\OUT}{out}
905
\NewKeyword{\OUTPORT}{outport}
906
\NewKeyword{\OUTPOUT}{outpout}
907
\NewKeyword{\PACKAGE}{package}[paquetage]
908
\NewKeyword{\PARALLEL}{parallel}
909
\NewKeyword{\PARFOR}{parfor}[en parall\`ele: pour]
910
\NewKeyword{\PAR}{par}[en parall\`ele]
911
\NewKeyword{\PERCENT}{\%}
912
\NewKeyword{\PLACE}{place}[placer]
913
\NewKeyword{\PORT}{port}
914
\NewKeyword{\PRAGMA}{pragma}
915
\NewKeyword{\PRI}{pri}
916
\NewKeyword{\PRIVATE}{private}[priv\'e]
917
\NewKeyword{\PROCEDURE}{procedure}[proc\'edure]
918
\NewKeyword{\PROCESS}{process}[processus]
919
\NewKeyword{\PROGRAM}{program}[programme]
920
\NewKeyword{\PROTECTED}{protected}[prot\'eg\'e]
921
\NewKeyword{\RAISE}{raise}[lever]
922
\NewKeyword{\RANGE}{range}[intervalle]
923
\NewKeyword{\READ}{read}[lire]
924
\NewKeyword{\READY}{ready}[pr\^et]
925
\NewKeyword{\REAL}{real}[r\'eel]
926
\NewKeyword{\RECORD}{record}[enregistrement]
927
\NewKeyword{\RECV}{recv}[recevoir]
928
\NewKeyword{\RECEIVE}{receive}[recevoir]
929
\NewKeyword{\REM}{rem}
930
\NewKeyword{\RENAMES}{renames}[renomme]
931
\NewKeyword{\REPEAT}{repeat}[r\'ep\'eter]
932
\NewKeyword{\REQUEUE}{requeue}
933
\NewKeyword{\RESET}{reset}
934
\NewKeyword{\RETURN}{return}[retour]
935
\NewKeyword{\REVERSE}{reverse}
936
\NewKeyword{\REWIND}{rewind}
937
\NewKeyword{\REWRITE}{rewrite}
938
\NewKeyword{\ROOT}{root}[racine]
939
\NewKeyword{\SELECT}{select}
940
\NewKeyword{\SEND}{send}[\'emettre]
941
\NewKeyword{\SENDEOT}{sendeot}[\'emettre eot]
942
\NewKeyword{\SEPARATE}{separate}[s\'epar\'ement]
943
\NewKeyword{\SEQ}{seq}
944
\NewKeyword{\SET}{set}
945
\NewKeyword{\SIZE}{size}[taille]
946
\NewKeyword{\SKIP}{skip}[sauter]
947
\NewKeyword{\STRING}{string}[cha\^{\i}ne de caract\`eres]
948
\NewKeyword{\SUBTYPE}{subtype}[sous\_\-type]
949
\NewKeyword{\SWITCH}{switch}
950
\NewKeyword{\TAGGED}{tagged}[\'etiquett\'e]
951
\NewKeyword{\TASK}{task}[t\^ache]
952
\NewKeyword{\TERMINATE}{terminate}[terminer]
953
\NewKeyword{\THEN}{then}[alors]
954
\NewKeyword{\TO}{to}[jusqu'\`a]
955
\NewKeyword{\TOWARDS}{towards}[vers]
956
\NewKeyword{\TRANSMIT}{transmit}[\'emettre]
957
\NewKeyword{\TUPLE}{tuple}[n\_\-uplet]
958
\NewKeyword{\TYPE}{type}
959
\NewKeyword{\UNDEF}{undef}[ind\'efini]
960
\NewKeyword{\UNTIL}{until}[jusqu'\`a]
961
\NewKeyword{\USE}{use}
962
\NewKeyword{\VAR}{var}
963
\NewKeyword{\VARIABLE}{variable}
964
\NewKeyword{\WHEN}{when}[si]
965
\NewKeyword{\WHERE}{where}[si]
966
\NewKeyword{\WHILE}{while}[tant que]
967
\NewKeyword{\WITH}{with}[avec]
968
\NewKeyword{\WRITE}{write}[\'ecrire]
969
\NewKeyword{\XOR}{xor}
971
%<style>%% French syntax
973
\NewKeyword{\EMETTRE}{send}[\'emettre]
974
\NewKeyword{\RECEVOIR}{receive}[recevoir]
975
\NewKeyword{\POUR}{for}[pour]
976
\NewKeyword{\FAIRE}{do}[faire]
977
\NewKeyword{\FAIT}{end do}[fait]
978
\NewKeyword{\SI}{if}[si]
979
\NewKeyword{\ALORS}{then}[alors]
980
\NewKeyword{\SINON}{else}[sinon]
981
\NewKeyword{\FINSI}{end if}[fin si]
982
\NewKeyword{\DEBUT}{begin}[d\'ebut]
983
\NewKeyword{\FIN}{end}[fin]
985
% Then we terminate by instructing \LaTeX\ to switch to the default
986
% font for typing keywords (which, in the current implementation is
987
% underlined \verb+\em+).
996
% ^^A The four commented lines below may be used to output an index on
997
% ^^A a page layout greater than the one used till now.
1000
% ^^A \setlength{\oddsidemargin}{0pt}
1001
% ^^A \setlength\textwidth{15cm}
1007
% \markboth{Index}{Index}%
1008
% {\it{}The italic numbers denote the pages where the
1009
% corresponding entry is described,
1010
% numbers underlined point to the definition,
1011
% all others indicate the places where it is used
1012
% (ie. the line numbers where it appears).
1016
% \PrintIndex \PrintChanges