summaryrefslogtreecommitdiff
path: root/report/pyp_clustering/acl09-short/common/algpseudocode.sty
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 16:13:19 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 16:13:19 +0000
commitfd519b0e45c857b266814994ba8c1421f508e522 (patch)
tree6d50c9b954e3c13e9df627c1ecc25c53544a5f58 /report/pyp_clustering/acl09-short/common/algpseudocode.sty
parent4c5df460c9da5c935438850ef7993463a9113286 (diff)
preso
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@435 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'report/pyp_clustering/acl09-short/common/algpseudocode.sty')
-rw-r--r--report/pyp_clustering/acl09-short/common/algpseudocode.sty92
1 files changed, 92 insertions, 0 deletions
diff --git a/report/pyp_clustering/acl09-short/common/algpseudocode.sty b/report/pyp_clustering/acl09-short/common/algpseudocode.sty
new file mode 100644
index 00000000..fca966ac
--- /dev/null
+++ b/report/pyp_clustering/acl09-short/common/algpseudocode.sty
@@ -0,0 +1,92 @@
+% PSEUDOCODE ALGORITHMIC STYLE -- Released 27 APR 2005
+% for LaTeX version 2e
+%
+% Copyright Szasz Janos
+% E-mail szaszjanos@users.sourceforge.net
+% Based on Peter Williams's algorithmic.sty
+%
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesPackage{algpseudocode}%
+\RequirePackage{ifthen}%
+\RequirePackage{algorithmicx}%
+\typeout{Document Style - pseudocode environments for use with the `algorithmicx' style}%
+%
+\def\ALG@noend{f}%
+\newboolean{ALG@compatible}%
+\setboolean{ALG@compatible}{false}%
+%
+\DeclareOption{noend}{\def\ALG@noend{t}}%
+\DeclareOption{end}{\def\ALG@noend{f}}%
+\DeclareOption{compatible}{\typeout{For compatibility mode use algcompatible.sty!!!}\setboolean{ALG@compatible}{true}}%
+\DeclareOption{noncompatible}{\setboolean{ALG@noncompatible}{false}}%
+\ProcessOptions%
+%
+% *** DECLARATIONS ***
+%
+\algnewlanguage{pseudocode}%
+\alglanguage{pseudocode}%
+%
+% *** KEYWORDS ***
+%
+\algnewcommand\algorithmicend{\textbf{end}}
+\algnewcommand\algorithmicdo{\textbf{do}}
+\algnewcommand\algorithmicwhile{\textbf{while}}
+\algnewcommand\algorithmicfor{\textbf{for}}
+\algnewcommand\algorithmicforall{\textbf{for all}}
+\algnewcommand\algorithmicloop{\textbf{loop}}
+\algnewcommand\algorithmicrepeat{\textbf{repeat}}
+\algnewcommand\algorithmicuntil{\textbf{until}}
+\algnewcommand\algorithmicprocedure{\textbf{procedure}}
+\algnewcommand\algorithmicfunction{\textbf{function}}
+\algnewcommand\algorithmicif{\textbf{if}}
+\algnewcommand\algorithmicthen{\textbf{then}}
+\algnewcommand\algorithmicelse{\textbf{else}}
+\algnewcommand\algorithmicrequire{\textbf{Require:}}
+\algnewcommand\algorithmicensure{\textbf{Ensure:}}
+\algnewcommand\algorithmicreturn{\textbf{return}}
+\algnewcommand\textproc{\textsc}
+%
+% *** DECLARED LOOPS ***
+%
+\algdef{SE}[WHILE]{While}{EndWhile}[1]{\algorithmicwhile\ #1\ \algorithmicdo}{\algorithmicend\ \algorithmicwhile}%
+\algdef{SE}[FOR]{For}{EndFor}[1]{\algorithmicfor\ #1\ \algorithmicdo}{\algorithmicend\ \algorithmicfor}%
+\algdef{S}[FOR]{ForAll}[1]{\algorithmicforall\ #1\ \algorithmicdo}%
+\algdef{SE}[LOOP]{Loop}{EndLoop}{\algorithmicloop}{\algorithmicend\ \algorithmicloop}%
+\algdef{SE}[REPEAT]{Repeat}{Until}{\algorithmicrepeat}[1]{\algorithmicuntil\ #1}%
+\algdef{SE}[IF]{If}{EndIf}[1]{\algorithmicif\ #1\ \algorithmicthen}{\algorithmicend\ \algorithmicif}%
+\algdef{C}[IF]{IF}{ElsIf}[1]{\algorithmicelse\ \algorithmicif\ #1\ \algorithmicthen}%
+\algdef{Ce}[ELSE]{IF}{Else}{EndIf}{\algorithmicelse}%
+\algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}%
+ [2]{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
+ {\algorithmicend\ \algorithmicprocedure}%
+\algdef{SE}[FUNCTION]{Function}{EndFunction}%
+ [2]{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
+ {\algorithmicend\ \algorithmicfunction}%
+%
+\ifthenelse{\equal{\ALG@noend}{t}}%
+ {%
+ \algtext*{EndWhile}%
+ \algtext*{EndFor}%
+ \algtext*{EndLoop}%
+ \algtext*{EndIf}%
+ \algtext*{EndProcedure}%
+ \algtext*{EndFunction}%
+ }{}%
+%
+% *** OTHER DECLARATIONS ***
+%
+\algnewcommand\Require{\item[\algorithmicrequire]}%
+\algnewcommand\Ensure{\item[\algorithmicensure]}%
+\algnewcommand\Return{\algorithmicreturn{} }%
+\algnewcommand\Call[2]{\textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
+%
+%
+%
+\ifthenelse{\boolean{ALG@compatible}}%
+ {%
+ \ifthenelse{\equal{\ALG@noend}{t}}%
+ {\RequirePackage[noend]{algcompatible}}%
+ {\RequirePackage{algcompatible}}%
+ }%
+ {}%
+%