summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty')
-rw-r--r--Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty b/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty
index caf4578dad1..17d739808eb 100644
--- a/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty
+++ b/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty
@@ -427,12 +427,13 @@
\newtheorem{named@lg@r@thm*}{\the\algotitle}
\defprefix{named@lg@r@thm*}#1{\the\algotitle}
\theoremstyle{ccalgo}
-\newtheorem{named@lg@r@thm}{\the\algotitle}
+\providecommand{\cc@thmcnter}{equation}
+\newtheorem{named@lg@r@thm}[\cc@thmcnter]{\the\algotitle}
\defprefix{named@lg@r@thm}#1{\the\algotitle~#1}
-\ifx\c@namedth@@r@m\@undefined\else
-\let\c@named@lg@r@thm\c@namedth@@r@m
-\let\thenamed@lg@r@thm\thenamedth@@r@m
-\fi
+%%% \ifx\c@namedth@@r@m\@undefined\else
+%%% \let\c@named@lg@r@thm\c@namedth@@r@m
+%%% \let\thenamed@lg@r@thm\thenamedth@@r@m
+%%% \fi
\babel\def\babelInput{Input}[german=Eingabe,french=Entr\'ee]
\babel\def\babelOutput{Output}[german=Ausgabe,french=Sortie]
\babel\def\babelstep{step}[german=Schritt,french=pas]%% ??? pas?
@@ -440,11 +441,13 @@
\newtoks\algorithmmasterkey
\newenvironment{namedalgorithm}[1]{%
\pagebreak[3]%
+ \defprefix{\cc@thmcnter}##1{\the\algotitle~##1}%
\def\algo@theorem{named@lg@r@thm}%
\algotitle{#1}%
\n@medalgorithm}
{\endalgonumerate\csname end\algo@theorem\endcsname}
\newenvironment{namedalgorithm*}[1]{%
+ \defprefix{\cc@thmcnter}##1{\the\algotitle}%
\def\algo@theorem{named@lg@r@thm*}%
\algotitle{#1}%
\n@medalgorithm}
@@ -472,6 +475,7 @@
\ifx\@tempa\@empty\csname\algo@theorem\endcsname
\else\csname\algo@theorem\endcsname[#1]\fi%
\label{\the\algorithmmasterkey}%
+ \defprefix{equation}##1{(##1)}% reset equation prefix
\algo@keywords
\defprefix{algonumerate}{%
\Iflabelchanged{\algo@theorem}{\uselabel{\algo@theorem} %