Algorithm2e.sty - Package For Algorithms
Algorithm2e.sty - Package For Algorithms
Contents
1 Introduction 2
10 Known bugs 22
∗ The author is very grateful to David Carlisle, one of the authors of the LaTeX Companion book, for his advices
† Martin Blais ([email protected]) for his suggestions
‡ David A. Bader ([email protected]) for his new option noend
§ Gilles Geeraerts ([email protected]) for his new command SetKwIfElseIf
¶ Ricardo Fukasawa ([email protected]) for the portuguese keywords
k Christian Icking ([email protected]) for the german translation of keywords
∗∗ and the many users as Jean-Baptiste Rouquier ([email protected]) for their remarks
1
1 Introduction
Algorithm2e is an environment for writing algorithms in LATEX2e. An algorithm is defined as a
floating object like figures. It provides macros that allow you to create different sorts of key words,
thus a set of predefined key words is given. You can also change the typography of the keywords.
You can subscribe to algorithm2e-announce mailing list to receive announcements about
revisions of the package and to algorithm2e-discussion to discuss, send comments, ask questions
about the package. In order to subscribe to the mailing lists you have to send an email to
[email protected] with subscribe algorithm2e-announce Firstname Name or
subscribe algorithm2e-discussion Firstname Name in the body of the message.
\begin{algorithm}[H]
\SetLine
\AlgData{this text}
\AlgResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm}
which gives
Data: this text
Result: how to write algorithm with LATEX2e
initialization;
while not at end of this document do
read current section;
if understand then
go to next section;
current section becomes this one;
else
go back to the beginning of current section;
end
end
Algorithm 1: How to write algorithms
1 For longer and more complexe examples see Section 8
2
Very Important : each line MUST end with \; only those with a macro beginning a block
should not end with \;. Note then that you can always use the \; command in math mode to set
a small space.
The caption works as in a figure environment and is used by \listofalgorithms as a reference
name for the list of algorithms. You can also use the title macro given with the package, but this
macro doesn’t insert an entry in the list of algorithms.
3
3 Compatibility issues with other packages
At this time, release 3.3has no known compatibility problem with other packages. Neverthe-
less, when use with some packages, you need to specify some particular options, either from
algorithm2e package or from the other packages.
hyperref if you want to compile in LATEX, you have to use it with naturalnames option. You
don’t need to specify it if you compile with pdflatex.
4
figure: algorithms are put in classical figures and so are numbered as figures and putted in the
\listoffigures.
ruled: to have algorithms with a line at the top and the bottom. Note that the caption is not
centered under the algorithm anymore but is set at the beginning of the algorithm.
algoruled: as above but with extra spaces after the rules.
plain: the default, with no feature.
lined: \SetLine becomes the default, see section 6.2 for explanations about the \SetLine macros.
vlined: \SetVline becomes the default, see section 6.2 for explanations about the \SetVline
macros.
noline: \SetNoline becomes the default, see section 6.2 for explanations about the \SetNoline
macros.
linesnumbered: lines of the algorithms are numbered except for comments and input/output
(KwInput and KwInOut). You must use \nllabel{t}o label thoses lines.
commentsnumbered: makes comments be numbered if numbering is active.
inoutnumbered: makes data input/output be numbered if numbering is active.
resetcount the line numbers are reset to 0 at the beginning of each algorithm (by default).
noresetcount the contreverse of the precedent. To reset the line counter to 0 do:
\setcounter{AlgoLine}{0}
algonl: the line numbers will be prefixed with the number of the current algorithm. Take care
to set the caption of the algorithm at the beginning of the environnement, else you will have
the precedent algorithm number as the current one.
longend: the end keyword are longer and different for each macro. For example endif for a
if-then-else macro.
shortend: the “end keyword” of the macros is just end (default).
noend: the “end keyword” of the macros is not printed.
5
6 The macros provided with the package
6.1 Typesetting macros
\; marks the end of a line. Don’t forget it !. By default, it prints a ‘;’. You can change this
with \dontprintsemicolon.
\Titleofalgo{thetitle} prints: “Algorithm n◦ : thetitle” in the typography and size defined by
\SetTitleSty. Puts a vertical space below.
Beware: \Titleofalgo doesn’t insert an entry in the list of algorithms. So don’t use
\Titleofalgo with \caption. Both increment the counter of the algorithms.
note:with the french option prints Algorithme n◦ :
6
\SetAlgoSkip{skip command} Algorithms puts extra vertical space before and after to avoid
having text bumping lines of boxed or ruled algorithms. By default, this is a . You can
change this value with this macro. The four possibilities are:
• \SetAlgoSkip{}] for no extra vertical skip
• \SetAlgoSkip{smallskip}] to act as the default behaviour
• \SetAlgoSkip{medskip}] to have a bigger skip
• \SetAlgoSkip{bigskip}] to have the bigger skip
Note that you can apply the skip you want by defining a macro doing it and passing its
name (without \) to \SetAlgoSkip
\dontprintsemicolon the ‘;’ are no more printed at the end of each line.
7
\restylealgo{style} sets the style of the following algorithms to that given by this macro (plain,
boxed, ruled, algoruled) unlike those indicated in the options of the package (see options of
the package).
\SetInd{before rule space}{after rule space} sets the size of the space before the vertical
rule and after. In \NoLine mode the indentation space is the sum of these two values, by
default 0.5em and 1em
\Setvlineskip{length} sets the value of the vertical space after the little horizontal line which
closes a block in vlined mode.
\Setnlskip{length} sets the value of the space between the line numbers and the text, by default
1em.
\algomargin this is the value of the margin of all algorithms. You can change it by setting:
\setlength{\algomargin}{2em} for example. The default value is the sum of the two
dimensions \leftskip and \parindent when the algorithm2e package is loaded. Note that
if you change this value, it will take effect with the next algorithm environment. So even if
you change it inside an algorithm environment, it will not affect the current algorithm.
\incmargin{length} increases the size of the \algomargin by the length given in argument.
\decmargin{length} decreases the size of the \algomargin by the length given in argument.
8
• \uIf{condition}{then block without end}
• \lIf{condition}{then’s line text}
• \ElseIf{elseif block}
• \uElseIf{elseif block without end}
• \lElseIf{elseif’s line text}
• \Else{else block}
• \uElse{else block without end}
• \lElse{else’s line text}
• \eIf{condition}{then block}{else block}
7. multiple condition selection:
• \Switch{condition}{Switch block}
• \Case{a case}{case block}
• \uCase{a case}{case block without end}
• \lCase{a case}{case’s line}
• \Other{otherwise block}
• \lOther{otherwise’s line}
8. loops with ”end condition” test at the beginning:
• \For{condition}{text loop}
• \lFor{condition}{line text loop}
• \While{condition}{text loop}
• \lWhile{condition}{line text loop}
• \ForEach{condition}{text loop}
• \lForEach{condition}{line text loop}
• \ForAll{condition}{text loop}
• \lForAll{condition}{line text loop}
1. \SetKwInput{KwData}{Data}
\SetKwInput{KwResult}{Result}
\SetKwInput{KwIn}{Input}
\SetKwInput{KwOut}{Output}
2. \SetKw{KwTo}{to}
3. \SetKw{KwRet}{return}
\SetKw{Return}{return}
4. \SetKwBlock{Begin}{begin}{end}
9
5. \SetKwComment{/*}{*/}
\SetKwComment{//}{}
6. \SetKwIF{If}{ElseIf}{Else}{if}{then}{else if}{else}{endif}
7. \SetKwSwitch{Switch}{Case}{Other}{switch}{do}{case}{otherwise}{endsw}
8. \SetKwFor{For}{for}{do}{endfor}
\SetKwFor{While}{while}{do}{endw}
\SetKwFor{ForEach}{foreach}{do}{endfch}
\SetKwAll{ForEach}{forall}{do}{endfall}
9. \SetKwRepeat{Repeat}{repeat}{until}
10
\SetKwBlock{Begin}{begin}{end} defines a macro \Begin{txt} which denotes a block. The
text is surrounded by the words begin and end in keyword typography and shifted to the
right (indented). In \Vline or \Line mode a straight vertical line is added.
\SetKwComment{Comment}{start}{end} defines a macro \Comment{text comment} which writes
text comment between start and end. Note that start or end can be empty.
The macros which begin with a ‘l’ (l as line) denote that the text passed in argument will
be printed on the same line while with the others the text is printed in a block and shifted.
You should put \; at the end of “l macros”.
The macros which begin with a ‘u’ (u as uncomplete) denote that the text passed in argu-
ment will be printed in a block not terminated by endif. They are useful to chain different
alternatives.
The keywords then and else are automatically printed. cond is always printed in argument
typography just behind the keyword if.
Some examples with \SetKwIF{If}{ElseIf}{Else}{if}{then}{else if}{else}{endif}
the default definition given in the package:
\SetVline
\eIf{cond1}{ if cond1 then
a line\; a line;
a line\; a line;
=⇒ else
}{
another line\; another line;
another line\; another line;
}
11
—
\SetNoline
if cond2 then
\If{cond2}{
=⇒ second if;
second if\;
second if;
second if\;
end
}
—
\lIf{cond4}{ok} \lElse{wrong}\; =⇒ if cond4 then ok else wrong;
—
\SetVline
\lIf{cond5}{cond5 true}\;
if cond5 then cond5 true;
\uElseIf{cond51}{
else if cond51 then
cond 5 false\; cond 5 false;
but cond51 true\; but cond51 true;
=⇒
} else if then
\ElseIf{}{ all is wrong;
all is wrong\; return result52;
\Return result52\;
}
—
\SetLine
\uIf{cond6}{ if cond6 then
cond6 is ok\; cond6 is ok;
always ok\; always ok;
}
\uElseIf{cond62}{ else if cond62 then
choose result62\; =⇒ choose result62;
\Return result62\; return result62;
} else
\Else{ all is wrong;
all is wrong\; do something else;
end
do something else\;
}
\SetKwSwitch{Switch}{Case}{Other}{switch}{do}{case}{otherwise}{endsw} defines several
macros to give a complete Switch-do-case-otherwise environment:
• \Switch{iden}{switch’s block}
• \Case{cond}{Case’s text}
• \uCase{cond}{Case’s text}
• \lCase{cond}{Case’s text}
• \Other{Otherwise’s text}
• \lOther{Otherwise’s text}
The keywords do and endsw are automatically printed. iden and cond are always printed
in argument typography just behind the keywords Switch, Case and Otherwise. Here is an
example with the default keywords:
12
\Switch{the value of T}{
\uCase{a value}{ switch the value of T do
do this\; case a value
do that\; do this;
} do that;
\lCase{another value}{one line}\; case another value one line;
\Case{last value}{ case last value
do this\; =⇒ do this;
break\; break;
} end
\Other{ otherwise
for the other values\; for the other values;
do that\; do that;
end
} end
}
\SetKwFor{For}{for}{do}{endfor} defines a loop environment with stop-test done at the be-
ginning of the loop.
• \For{loop’s condition}{For’s text}
• \lFor{loop’s condition}{For’s text}
The keywords do and endfor are automatically printed. The loop condition is printed in
argument typography. For example:
\SetLine
\ForAll{elements of $S_1$}{ forall elements of S1 do
remove an element e from $S_1$\; remove an element e from S1 ;
put e in the set $S_2$\; put e in the set S2 ;
end
}
=⇒ for i=1 to max do mark i;
\lFor{i=1 \emph{\KwTo}max}{mark i}\;
foreach e in the set do
\ForEach{$e$ in the set}{ put e in E;
put $e$ in ${\cal E}$\; mark e;
mark $e$\; end
}
\SetKwRepeat{Repeat}{repeat}{until} defines a repeat-until environment (loop with stop-test
at the end of the loop):
• \Repeat{end loop condition}{the loop}
• \lRepeat{end loop condition}{only one line}
It prints the loop condition behind the until after the text of the loop.For example:
\Repeat{this stop condition}{ repeat
the text of the loop\; the text of the loop;
another line\; another line;
=⇒
always in the loop\; always in the loop;
} until this stop condition;
\lRepeat{stop}{a one line loop} repeat a one line loop until stop
13
8 Two complete examples
The algorithms 2 and 3 are written with this package.
\usepackage[lined,algonl,boxed]{algorithm2e}
The algorithm was written in LATEX2e code as follow:
\incmargin{1em}
\restylealgo{boxed}\linesnumbered
\begin{algorithm}
\SetKwData{Left}{left}
\SetKwData{This}{this}
\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}
\SetKwFunction{FindCompress}{FindCompress}
\SetKwInOut{Input}{input}
\SetKwInOut{Output}{output}
\caption{disjoint decomposition}
which gives the algorithme 2 on the following page where line 4 denotes the second For:
14
input : a bitmap im of size w × l.
output: A partition of the bitmap.
1 special treatment of the first line;
2 for i ← 2 to l do
3 special treatment of the first element of line i;
4 for j ← 2 to w do
5 left ← FindCompress(Im[i, j − 1]);
6 up ← FindCompress(Im[i − 1, ]);
7 this ← FindCompress(Im[i, j]);
8 if left compatible with this then
9 if left < this then Union(left,this);
10 else Union(this,left)
11 end
12 if up compatible with this then
13 if up < this then Union(up,this);
14 else Union(this,up)
15 end
16 end
17 foreach element e of the line i do FindCompress(p)
18 end
Algorithm 2: disjoint decomposition
15
8.2 Algorithm 3 : IntervalRestriction
Here we suppose we that have done:
\usepackage[ruled,vlined]{algorithm2e}
\begin{algorithm}
\dontprintsemicolon
\KwData{$G=(X,U)$ such that $G^{tc}$ is an order.}
\KwResult{$G’=(X,V)$ with $V\subseteq U$ such that $G’^{tc}$ is an
interval order.}
\Begin{
$V \longleftarrow U$\;
$S \longleftarrow \emptyset$\;
\For{$x\in X$}{
$NbSuccInS(x) \longleftarrow 0$\;
$NbPredInMin(x) \longleftarrow 0$\;
$NbPredNotInMin(x) \longleftarrow |ImPred(x)|$\;
}
\For{$x \in X$}{
\If{$NbPredInMin(x) = 0$ {\bf and} $NbPredNotInMin(x) = 0$}{
$AppendToMin(x)$}
}
\lnl{InRes1}\While{$S \neq \emptyset$}{
\lnlset{InResR}{REM}%
remove $x$ from the list of $T$ of maximal index\;
\lnl{InRes2}\While{$|S \cap ImSucc(x)| \neq |S|$}{
\For{$ y \in S-ImSucc(x)$}{
\{ remove from $V$ all the arcs $zy$ : \}\;
\For{$z \in ImPred(y) \cap Min$}{
remove the arc $zy$ from $V$\;
$NbSuccInS(z) \longleftarrow NbSuccInS(z) - 1$\;
move $z$ in $T$ to the list preceding its present list\;
\{i.e. If $z \in T[k]$, move $z$ from $T[k]$ to
$T[k-1]$\}\;
}
$NbPredInMin(y) \longleftarrow 0$\;
$NbPredNotInMin(y) \longleftarrow 0$\;
$S \longleftarrow S - \{y\}$\;
$AppendToMin(y)$\;
}
}
$RemoveFromMin(x)$\;
}
}
\caption{IntervalRestriction\label{IR}}
\end{algorithm}
which give us the algorithm 3 on the next page with line 1 and line REM.
16
Algorithm 3: IntervalRestriction
Data: G = (X, U ) such that Gtc is an order.
Result: G0 = (X, V ) with V ⊆ U such that G0tc is an interval order.
begin
V ←− U
S ←− ∅
for x ∈ X do
N bSuccInS(x) ←− 0
N bP redInM in(x) ←− 0
N bP redN otInM in(x) ←− |ImP red(x)|
for x ∈ X do
if N bP redInM in(x) = 0 and N bP redN otInM in(x) = 0 then
AppendT oM in(x)
1 while S 6= ∅ do
REM remove x from the list of T of maximal index
2 while |S ∩ ImSucc(x)| = 6 |S| do
for y ∈ S − ImSucc(x) do
{ remove from V all the arcs zy : }
for z ∈ ImP red(y) ∩ M in do
remove the arc zy from V
N bSuccInS(z) ←− N bSuccInS(z) − 1
move z in T to the list preceding its present list
{i.e. If z ∈ T [k], move z from T [k] to T [k − 1]}
N bP redInM in(y) ←− 0
N bP redN otInM in(y) ←− 0
S ←− S − {y}
AppendT oM in(y)
RemoveF romM in(x)
end
17
9 Other language predefined keywords
9.1 french keywords
Hey, I am a frenchy , so I have defined the same as in section 7 but in french.
1. \Donnees{données}
\Res{résultats}
\Entree{entrées}
\Sortie{sorties}
2. \KwA
\Retour{[valeur]}
3. \Deb{intérieur du bloc}
4. \eSi{condition}{bloc du alors}{bloc du sinon}
\Si{condition}{bloc du alors}
\uSi{condition}{bloc du alors sans fin}
\lSi{condition}{ligne du alors}
\SinonSi{condition}{bloc du sinonsi}
\uSinonSi{condition}{bloc du sinonsi sans fin}
\lSinonSi{condition}{ligne du sinonsi sans fin}
\Sinon{bloc du sinon}
\uSinon{bloc du sinon sans fin}
\lSinon{ligne du sinon}
5. \Suivant{condition}{bloc du Suivant-cas-alors} \uCas{cas où}{bloc de ce cas sans fin}
\Cas{cas où}{bloc de ce cas}
\lCas{cas où}{ligne de ce cas}
\Autre{bloc de l’alternative}
\lAutre{ligne de l’alternative}
6. \Pour{condition}{bloc de la boucle}
\lPour{condition}{ligne de la boucle}
7. \Tq{condition}{bloc de la boucle}
\lTq{condition}{ligne de la boucle}
8. \PourCh{condition}{bloc de la boucle}
\lPourCh{condition}{ligne de la boucle}
9. \PourTous{condition}{bloc de la boucle}
\lPourTous{condition}{ligne de la boucle}
10. \Repeter{condition d’arrêt}{bloc de la boucle}
\lRepeter{condition d’arrêt}{ligne de la boucle}
18
1. \SetKwInput{Donnes}{Données}
\SetKwInput{Res}{Résultat}
\SetKwInput{Entree}{Entrées}
\SetKwInput{Sortie}{Sorties}
2. \SetKw{KwA}{à}
\SetKw{Retour}{retourner}
3. \SetKwBlock{Deb}{début}{fin}
4. \SetKwIF{Si}{SinonSi}{Sinon}{si}{alors}{sinon si}{alors}{finsi}
6. \SetKwFor{Pour}{pour}{faire}{finpour}
7. \SetKwFor{Tq}{tant que}{faire}{fintq}
8. \SetKwFor{PourCh}{pour chaque}{faire}{finprch}
9. \SetKwFor{PourTous}{pour tous}{faire}{finprts}
10. \SetKwRepeat{Repeter}{répéter}{jusqu’à}
• \Wiederh{stop condition}{loop}
\lWiederh{stop condition}{line loop}
• \eWenn{condition}{then text}{else text}
\Wenn{condition}{then text}
\uWenn{condition}{then text without end}
\lWenn{condition}{then line}
\SonstWenn{condition}{elseif text}
\uSonstWenn{condition}{elseif text without end}
\lSonstWenn{condition}{elseif line}
\Sonst{else text}
\uSonst{else text without end}
\lSonst{else line}
19
• \Unterscheide{conditions}switch-case-default text\Fall{case of}{text}
\uFall{case of}{text}
\lFall{case of}{line text}
\Anderes{default text}
\lAnderes{default line}
• \Fuer{condition}{loop}
\lFuer{condition}{line loop}
• \FuerPar{condition}{loop}
\lFuerPar{condition}{line}
• \FuerJedes{condition}{loop}
\lFuerJedes{condition}{line}
• \FuerAlle{condition}{loop}
\lFuerAlle{condition}{line}Ende
• \Solange{condition}{loop}Ende
\lSolange{condition}{line}
• \SetKwInput{Ein}{Eingabe}
\SetKwInput{Aus}{Ausgabe}
\SetKwInput{Daten}{Daten}
\SetKwInput{Ergebnis}{Ergebnis}
• \SetKw{Bis}{bis}
\SetKw{KwZurueck}{zurück}
\SetKw{Zurueck}{zurück}
• \SetKwBlock{Beginn}{Beginn}{Ende}
• \SetKwRepeat{Wiederh}{wiederhole}{bis}
• \SetKwIF{Wenn}{SonstWenn}{Sonst}{wenn}{dann}{sonst wenn}{sonst}{Ende}
• \SetKwSwitch{Unterscheide}{Fall}{Anderes}{unterscheide}{tue}{Fall}{sonst}{Ende.}
• \SetKwFor{Fuer}{für}{tue}{Ende}
• \SetKwFor{FuerPar}{für}{tue gleichzeitig}{Ende}
• \SetKwFor{FuerJedes}{für jedes}{tue}{Ende}
• \SetKwFor{FuerAlle}{für alle}{tue}{Ende}
• \SetKwFor{Solange}{solange}{tue}{Ende}
20
9.3 Portuguese keywords
• \Entrada{Entrada}
\Saida{Saı́da}
\Dados{Dados}
\Resultado{Resultado}
• \Ate
\KwRetorna{[val]}
\Retorna{[val]}
• \Iniciob{inside block}
• \eSe{condition}{then block}{else block}
\Se{condition}{then block}
\uSe{condition}{then block without end}
\lSe{condition}{then’s line text}
\Senao{else block}
\uSenao{else block without else}
\lSenao{else’s line text}
\SenaoSe{condition}{elseif block}
\uSenaoSe{condition}{elseif block without end}
\lSenaoSe{condition}{elseif’s line text}
• \Selec{condition}{Switch block}
\Caso{a case}{case block}
\uCaso{a case}{case block without end}
\lCaso{a case}{case’s line}
\Outro{otherwise block}
\lOutro{otherwise’s line}
• \ParaPar{condition}{text loop}
\lParaPar{condition}{line text loop}
• \ParaCada{condition}{text loop}
\lParaCada{condition}{line text loop}
• \ParaTodo{condition}{text loop}
\lParaTodo{condition}{line text loop}
• \Enqto{stop condition}{text loop}
\lEnqto{stop condition}{text loop}
21
1. \SetKwInput{Entrada}{Entrada}
\SetKwInput{Saida}{Saı́da}
\SetKwInput{Dados}{Dados}
\SetKwInput{Resultado}{Resultado}
2. \SetKw{Ate}{até} \SetKw{KwRetorna}{retorna}
\SetKw{Retorna}{retorna}
3. \SetKwBlock{Inicio}{inı́cio}{fim}
4. \SetKwIF{Se}{SenaoSe}{Senao}{se}{ent~
ao}{sen~
ao se}{sen~
ao}{fim se}
5. \SetKwSwitch{Selec}{Caso}{Outro}{selecione}{faça}{caso}{sen~
ao}{fim selec}
6. \SetKwFor{Para}{para}{faça}{fim para}
7. \SetKwFor{ParaPar}{para}{faça em paralelo}{fim para}
8. \SetKwFor{ParaCada}{para cada}{faça}{fim para cada}
9. \SetKwFor{ParaTodo}{para todo}{faça}{fim para todo}
10. \SetKwFor{Enqto}{enquanto}{faça}{fim enqto}
11. \SetKwRepeat{Repita}{repita}{até}
• \Vst
• \Vyst
• \Vysl
1. \SetKwInput{Vst}Vstup
2. \SetKwInput{Vyst}Výstup
3. \SetKwInput{Vysl}Výsledek
10 Known bugs
• no more known bugs actually; if you find one, please sent it to me.
22
List of Algorithms
1 How to write algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 disjoint decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 IntervalRestriction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
23
Index
\;, 3, 6, 11 figure, 5
\Fn, 10
\AlFnt, 6 \For, 3, 9, 13
\algomargin, 8, 8 \ForAll, 9
algonl, 5 \ForEach, 9
algoruled, 5, 7, 8 algo2e, 4
\AlTitleFnt, 6 algochapter, 5
\Anderes, 20 algopart, 5
\ArgSty, 6, 7, 10 algosection, 5
\até, 21 french, 4, 6
\Aus, 19 slide, 4
\Autre, 18 \Fuer, 20
\FuerAlle, 20
\Begin, 3, 8, 11 \FuerJedes, 20
\Beginn, 19 \FuerPar, 20
\Bis, 19 \FuncSty, 6, 7, 10
\BlankLine, 6
boxed, 5, 8 german, 4
boxruled, 5 \gSonstWenn, 19
\caption, 6 \If, 3, 8, 11
\Cas, 18 \incmargin, 8
\Case, 3, 9, 12 \Indm, 6
\Caso, 21 \Indp, 6
\cc, 8 \Iniciob, 21
\Comment, 11 inoutnumbered, 5
commentsnumbered, 5 \Input, 10
\CommentSty, 6
\cpp, 8 \Kw, 10
french, 4 \KwA, 18
\KwDados, 21
\DataSty, 6 \KwData, 3, 8
\Daten, 19 \KwEntrada, 21
\Deb, 18 \KwFn, 10
\decmargin, 8 \KwIn, 3, 8
\Donnees, 18 \KwOut, 3, 8
\dontprintsemicolon, 6, 7 \KwResult, 3, 8
\DoThat, 10 \KwResultado, 21
\KwRet, 3, 8
\eIf, 3, 9, 11 \KwRetorna, 21
\Ein, 19 \KwSaida, 21
\Else, 9, 11 \KwSty, 6
\ElseIf, 9, 11 \KwTo, 3, 8
english, 4 \KwZurueck, 19
\Enqto, 21
\Entree, 18 \lAnderes, 20
\Ergebnis, 19 \lAutre, 18
\eSe, 21 \lCas, 18
\eSi, 18 \lCase, 9, 12
\eWenn, 19 \lCaso, 21
\leftskip, 8
\Fall, 20 \lElse, 9, 11
24
\lElseIf, 9, 11 noresetcount, 5
\lEnqto, 21
\lFall, 20 \Other, 3, 9, 12
\lFor, 9, 13 \Output, 10
\lForAll, 9 \Outro, 21
\lForEach, 9
\lFuer, 20 \ParaCada, 21
\lFuerAlle, 20 \ParaPar, 21
\lFuerJedes, 20 \ParaTodo, 21
\lFuerPar, 20 \parindent, 8
\lIf, 9, 11 plain, 5, 8
\Line, 11 portuguese, 4
lined, ,algonl14 \Pour, 18
lined, 5 \PourCh, 18
\linesnotnumbered, 6 \PourTous, 18
linesnumbered, 5 \printsemicolon, 7
\linesnumbered, 6
\ref, 6
\listofalgorithmes, 4
\Repeat, 3, 9, 13
\listofalgorithms, 3, 6
\Repeter, 18
\lnl, 6, 6
\Repita, 21
\lnlset, 6
\Res, 18
longend, 5
resetcount, 5
\lOther, 9, 12
\ResetInOut, 10
\lOutro, 21
\restorecaptionofalgo, 7
\lParaCada, 21
\restylealgo, 6, 8
\lParaPar, 21
\Retorna, 21
\lParaTodo, 21
\Retour, 18
\lPour, 18
\Return, 8
\lPourCh, 18
ruled, ,vlined16
\lPourTous, 18
ruled, 5, 7, 8
\lRepeat, 9, 13
\lRepeter, 18 \Se, 21
\lRepita, 21 \Selec, 21
\lSe, 21 \Senao, 21
\lSenao, 21 \SetAlFnt, 7
\lSenaoSe, 21 \SetAlgoSkip, 7
\lSi, 18 \SetAlTitleFnt, 7
\lSinon, 18 \SetArgSty, 7
\lSinonSi, 18 \SetCommentSty, 7
\lSolange, 20 \SetDataSty, 7
\lSonst, 19 \SetFuncSty, 7
\lSonstWenn, 19 \SetInd, 8
\lTq, 18 \SetKw, 3, 9, 10, 19, 20, 22
\lWenn, 19 \SetKwAll, 10
\lWhile, 9 \SetKwBlock, 9, 11, 19, 20, 22
\lWiederh, 19 \SetKwComment, 10, 11
\SetKwData, 3, 10
\nl, 6, 6
\SetKwFor, 10, 13, 19, 20, 22
\nllabel, 5, 6
\SetKwFunction, 3, 10, 10
\nlset, 6
\SetKwIF, 10, 11, 19, 20, 22
\nocaptionofalgo, 7, 7
\SetKwInOut, 10, 10
noend, 5
\SetKwInParam, 10
\NoLine, 8
\SetKwInput, 9, 10, 10, 19, 20, 22
noline, 5
25
\SetKwRepeat, 10, 13, 19, 20, 22
\SetKwSty, 7
\SetKwSwitch, 10, 12, 19, 20, 22
\SetLine, 5, 7
\Setnlskip, 8
\Setnlsty, 7, 7
\SetNoline, 5, 7
\SetProcArgSty, 7
\SetProcNameSty, 7
\SetTitleSty, 6, 7
\SetVline, 5, 7
\Setvlineskip, 8
shortend, 5
\Si, 18
\Sinon, 18
\Solange, 20
\Sonst, 19
\Sortie, 18
\Suivant, 18
\Switch, 3, 9, 12
titlenotnumbered, 5
titlenumbered, 5
\Titleofalgo, 5, 6, 6, 7
\Tq, 18
\uCas, 18
\uCase, 9, 12
\uCaso, 21
\uElse, 9, 11
\uElseIf, 9, 11
\uFall, 20
\uIf, 9, 11
\Unterscheide, 20
\uSe, 21
\uSenao, 21
\uSenaoSe, 21
\uSi, 18
\uSinon, 18
\uSinonSi, 18
\uSonst, 19
\uSonstWenn, 19
\uWenn, 19
\Vline, 11
vlined, 5, 8
\Vst, 22
\Vysl, 22
\Vyst, 22
\Wenn, 19
\While, 3, 9
\Wiederh, 19
\Zurueck, 19
26