summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-17 22:22:24 +0000
committerKarl Berry <karl@freefriends.org>2009-06-17 22:22:24 +0000
commit9e135e13f27b412c53fd5b3199a48c5e8f411123 (patch)
treeb3e0a3ad53e14585cf3f25ee4208e8699116ae95 /Master
parentf2eea39fd5c49b41a4f6ab22f4727cbf3dd90d4b (diff)
new context package context-algorithmic (16jun09)
git-svn-id: svn://tug.org/texlive/trunk@13789 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/context/third/algorithmic/t-algorithmic.tex120
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/collection-context.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc1
5 files changed, 124 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/third/algorithmic/t-algorithmic.tex b/Master/texmf-dist/tex/context/third/algorithmic/t-algorithmic.tex
new file mode 100644
index 00000000000..91d23fa4dbe
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/algorithmic/t-algorithmic.tex
@@ -0,0 +1,120 @@
+%D \module
+%D [ file=t-algorithmic,
+%D version=2009.04.21,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Algorithms,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D email=schuster.wolfgang@googlemail.com,
+%D license=Public Domain]
+
+\writestatus{loading}{Context User Module / Algorithms}
+
+\unprotect
+
+\def\????al{@@@@al} % ALgorithmic
+
+\def\startalgorithmic
+ {\bgroup
+ \dosingleempty\dostartalgorithmic}
+
+\def\dostartalgorithmic[#1]%
+ {\iffirstargument
+ \setupalgorithmic[#1]%
+ \fi
+ \def\algorithmiccommands##1%
+ {\uppercase{\expandafter\let\csname##1\expandafter\endcsname}\csname algorithmic!##1\endcsname}%
+ \processcommacommand[\algorithmic!list!commands]\algorithmiccommands
+ \@@@@albefore
+ \setupwhitespace[\v!none]%
+ \doadaptleftskip\@@@@almargin
+ \doif\@@@@alnumbering\v!line
+ {\setuplinenumbering
+ [\c!start=\@@@@alstart,
+ \c!stop=\@@@@alstop,
+ \c!step=\@@@@alstep]%
+ \startlinenumbering}}
+
+\def\stopalgorithmic
+ {\par
+ \doif\@@@@alnumbering\v!line\stoplinenumbering
+ \@@@@alafter
+ \egroup}
+
+\def\setupalgorithmic
+ {\dodoubleargument\getparameters[\????al]}
+
+% Commands
+
+\def\algorithmic!list!commands
+ {state,if,else,elsif,endif,for,forall,endfor,while,endwhile,repeat,%
+ until,loop,endloop,require,ensure,return,true,false,print,comment}
+
+\def\startsubalgorithmic
+ {\par\doadaptleftskip\@@@@alwidth}
+
+\def\stopsubalgorithmic
+ {\par\doadaptleftskip{-\@@@@alwidth}}
+
+\def\algorithmic!state {\par}
+\def\algorithmic!if #1{\par\algorithmicif\ #1 \algorithmicthen\startsubalgorithmic}
+\def\algorithmic!else {\stopsubalgorithmic\algorithmicelse\startsubalgorithmic}
+\def\algorithmic!elsif #1{\stopsubalgorithmic\algorithmicelsif\ #1 \algorithmicthen\startsubalgorithmic}
+\def\algorithmic!endif {\stopsubalgorithmic\algorithmicendif}
+\def\algorithmic!for #1{\par\algorithmicfor\ #1 \algorithmicdo\startsubalgorithmic}
+\def\algorithmic!forall#1{\par\algorithmicforall\ #1 \algorithmicdo\startsubalgorithmic}
+\def\algorithmic!endfor {\stopsubalgorithmic\algorithmicendfor}
+\def\algorithmic!while #1{\par\algorithmicwhile\ #1 \algorithmicdo\startsubalgorithmic}
+\def\algorithmic!endwhile{\stopsubalgorithmic\algorithmicendwhile}
+\def\algorithmic!repeat {\par\algorithmicrepeat\startsubalgorithmic}
+\def\algorithmic!until #1{\stopsubalgorithmic\algorithmicuntil\ #1}
+\def\algorithmic!loop {\par\algorithmicloop\startsubalgorithmic}
+\def\algorithmic!endloop {\stopsubalgorithmic\algorithmicendloop}
+\def\algorithmic!require {\par\algorithmicrequire\space}
+\def\algorithmic!ensure {\par\algorithmicensure\space}
+\def\algorithmic!return {\par\algorithmicreturn\space}
+\def\algorithmic!true {\algorithmictrue}
+\def\algorithmic!false {\algorithmicfalse}
+\def\algorithmic!print {\par\algorithmicprint\space}
+\def\algorithmic!comment {\algorithmiccomment}
+
+% I should make this multilingual
+
+\def\algorithmicrequire {{\bf Require:}}
+\def\algorithmicensure {{\bf Ensure:}}
+\def\algorithmiccomment#1{\{#1\}}
+\def\algorithmicend {{\bf end}}
+\def\algorithmicif {{\bf if}}
+\def\algorithmicthen {{\bf then}}
+\def\algorithmicelse {{\bf else}}
+\def\algorithmicelsif {\algorithmicelse\ \algorithmicif}
+\def\algorithmicendif {\algorithmicend\ \algorithmicif}
+\def\algorithmicfor {{\bf for}}
+\def\algorithmicforall {{\bf for all}}
+\def\algorithmicdo {{\bf do}}
+\def\algorithmicendfor {\algorithmicend\ \algorithmicfor}
+\def\algorithmicwhile {{\bf while}}
+\def\algorithmicendwhile {\algorithmicend\ \algorithmicwhile}
+\def\algorithmicloop {{\bf loop}}
+\def\algorithmicendloop {\algorithmicend\ \algorithmicloop}
+\def\algorithmicrepeat {{\bf repeat}}
+\def\algorithmicuntil {{\bf until}}
+\def\algorithmicprint {{\bf print}}
+\def\algorithmicreturn {{\bf return}}
+\def\algorithmictrue {{\bf true}}
+\def\algorithmicfalse {{\bf false}}
+
+% Default values
+
+\setupalgorithmic
+ [\c!numbering=\v!no,
+ \c!start=1,
+ \c!stop=,
+ \c!step=1,
+ \c!width=1em,
+ \c!margin=1em,
+ \c!before=\blank,
+ \c!after=\blank]
+
+\protect \endinput
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 49f8a4b275c..d04d8f119d9 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -57,7 +57,7 @@ my @WorkingTLP = qw(
collref colorinfo
colortbl colorwav commath compactbib complexity comprehensive
computational-complexity confproc constants
- context-account context-bnf context-chromato
+ context-account context-algorithmic context-bnf context-chromato
context-construction-plan context-degrade context-fixme
context-french context-games context-gnuplot
context-letter context-lettrine context-lilypond context-mathsets
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 2918fd2a7e7..da260d8333b 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -137,6 +137,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'compact', "die 'skipping, nonfree license'",
'concmath', "&MAKEconcmath",
'context', "&MAKEcontext",
+ 'context-algorithmic', "&MAKEcopy",
'context-account', "&MAKEcopy",
'context-bnf', "&MAKEcopy",
'context-chromato', "&MAKEcopy",
diff --git a/Master/tlpkg/tlpsrc/collection-context.tlpsrc b/Master/tlpkg/tlpsrc/collection-context.tlpsrc
index 988f1e43522..11d9d816b6c 100644
--- a/Master/tlpkg/tlpsrc/collection-context.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-context.tlpsrc
@@ -7,6 +7,7 @@ depend context
depend jmn
depend lmextra
depend context-account
+depend context-algorithmic
depend context-bnf
depend context-chromato
depend context-construction-plan
diff --git a/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc b/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc
new file mode 100644
index 00000000000..d07b3818813
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc
@@ -0,0 +1 @@
+runpattern d texmf-dist/tex/context/third/algorithmic