diff options
author | Norbert Preining <preining@logic.at> | 2006-10-12 01:40:37 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2006-10-12 01:40:37 +0000 |
commit | a3e5f4189a145472017be9745847e9d05ebbc0a0 (patch) | |
tree | abbb504a0ce2402455d54547f127c93a57a9b3fc /Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty | |
parent | 9078ab149a4827ec032de77b4d8b4ff8f48f4628 (diff) |
add algorithmicx to ctan2tl (MAKEnosymlink), add algorithmicx to tpm-ctan-check,
update algorithmicx
git-svn-id: svn://tug.org/texlive/trunk@2311 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty b/Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty new file mode 100644 index 00000000000..075f8512e27 --- /dev/null +++ b/Master/texmf-dist/tex/latex/algorithmicx/algcompatible.sty @@ -0,0 +1,89 @@ +% 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{algcompatible}% +\RequirePackage{ifthen}% +\RequirePackage{algorithmicx}% +\typeout{Document Style - algorithmic compatible environments for the `algorithmicx' style}% +% +\def\ALG@noend{f}% +% +\DeclareOption{noend}{\def\ALG@noend{t}}% +\DeclareOption{end}{\def\ALG@noend{f}}% +\ProcessOptions% +% +% *** DECLARATIONS *** +% +\algnewlanguage{algorithmic}% +\alglanguage{algorithmic}% +% +% *** 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\algorithmicif{\textbf{if}} +\algnewcommand\algorithmicthen{\textbf{then}} +\algnewcommand\algorithmicelse{\textbf{else}} +\algnewcommand\algorithmicrequire{\textbf{Require:}} +\algnewcommand\algorithmicensure{\textbf{Ensure:}} +% +% *** DECLARED LOOPS *** +% +% lines... +\let\ALG@loopmark\ALG@x@nomark% +% default line and marks +\def\ALG@startmark{nomark}% +\def\ALG@blockline{noline}% +\def\ALG@continuemark{nomark}% +\def\ALG@endmark{nomark}% +% +\newcommand\ALG@compatcomm[1]{\ifthenelse{\equal{#1}{default}}{}{\ \algorithmiccomment{#1}}}% +\algrenewcomment[1]{\{#1\}}% +\algdef{SE}[WHILE]{WHILE}{ENDWHILE}% + [2][default]{\algorithmicwhile\ #2\ \algorithmicdo\ALG@compatcomm{#1}}% + {\algorithmicend\ \algorithmicwhile}% +\algdef{SE}[FOR]{FOR}{ENDFOR}% + [2][default]{\algorithmicfor\ #2\ \algorithmicdo\ALG@compatcomm{#1}}% + {\algorithmicend\ \algorithmicfor}% +\algdef{S}[FOR]{FORALL}% + [2][default]{\algorithmicforall\ #2\ \algorithmicdo\ALG@compatcomm{#1}}% +\algdef{SE}[LOOP]{LOOP}{ENDLOOP}% + [1][default]{\algorithmicloop\ALG@compatcomm{#1}}% + {\algorithmicend\ \algorithmicloop}% +\algdef{SE}[REPEAT]{REPEAT}{UNTIL}% + [1][default]{\algorithmicrepeat\ALG@compatcomm{#1}}% + [1]{\algorithmicuntil\ #1}% +\algdef{SE}[IF]{IF}{ENDIF}% + [2][default]{\algorithmicif\ #2\ \algorithmicthen\ALG@compatcomm{#1}}% + {\algorithmicend\ \algorithmicif}% +\algdef{C}[IF]{IF}{ELSIF}% + [2][default]{\algorithmicelse\ \algorithmicif\ #2\ \algorithmicthen\ALG@compatcomm{#1}}% +\algdef{Ce}[ELSE]{IF}{ELSE}{ENDIF}% + [1][default]{\algorithmicelse\ALG@compatcomm{#1}}% +\algnewcommand\REQUIRE{\item[\algorithmicrequire]}% +\algnewcommand\ENSURE{\item[\algorithmicensure]}% +\algnewcommand\STATE{\State}% +\algnewcommand\STATEx{\Statex}% +\algnewcommand\COMMENT{\Comment}% +% +\ifthenelse{\equal{\ALG@noend}{t}}% + {% + \algtext*{ENDWHILE}% + \algtext*{ENDFOR}% + \algtext*{ENDLOOP}% + \algtext*{ENDIF}% + }{}% +% +\algrenewcommand\algorithmicindent{1em}% +% |