% \iffalse meta-comment % % 'keywords.doc' % % 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.doc', then you must strip this last file by hand. % (1) Run 'latex docstrip' on 'keywords.doc' and indicate 'drv' as % suffix file and 'driver' as selector for extraction. % (2) Run 'latex docstrip' on 'keywords.doc' and indicate 'sty' as % suffix file and 'style' as selector for extraction. % (3) Run 'latex docstrip' on 'keywords.doc' 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 % % \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{\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} % %%% ----------------------------------------------------------- %%% Assuming this file is named "keywords.ist" (after being %%% generated from "keywords.doc" by running "latex docstrip"), %%% the following command will produce a well formated index: %%% %%% makeindex -s keywords.ist keywords.idx %%% ----------------------------------------------------------- % % \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} %actual '=' %quote '!' %level '>' %preamble %"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n" %postamble %"\n\n \\end{theindex}\n" %item_x1 "\\efill \n \\subitem " %item_x2 "\\efill \n \\subsubitem " %delim_0 "\\pfill " %delim_1 "\\pfill " %delim_2 "\\pfill " %% The next lines will produce some warnings when %% running Makeindex as they try to cover two different %% versions of the program: %lethead_prefix "{\\bf\\hfil " %lethead_suffix "\\hfil}\\nopagebreak\n" %lethead_flag 1 %heading_prefix "{\\bf\\hfil " %heading_suffix "\\hfil}\\nopagebreak\n" %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.doc'), and} \typeout{(2) copy the current file into 'keywords.sty'} \typeout{*************************************************************} \fi \ifnoprogsfile \documentstyle[doc]{article}% \else \documentstyle[doc,programs,keywords]{article}% \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.doc} \end{document} % % \end{macrocode} % % \subsection{Extracting the documents included in the file keywords.doc} % % There are three documents included in the {\em{}keywords.doc\/} 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.doc\/}. % % \medskip % % Generation of the documentation is then simply performed as follows % (the {\em{}keywords.doc\/} file includes its own driver): % % \begin{verbatim} % latex keywords.doc % latex keywords.doc % latex keywords.doc % makeindex -s keywords.ist keywords.idx % latex keywords.doc % \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} % % \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