summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/progkeys/keywords.dtx
blob: 88b75d85fa7433e1a06e3728d7b6370ac5a1ae2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
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