summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty')
-rw-r--r--Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty12
1 files changed, 11 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty b/Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty
index 927aaf1fe99..3138eb30e1a 100644
--- a/Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty
+++ b/Master/texmf-dist/tex/latex/computational-complexity/ccthm.sty
@@ -92,8 +92,15 @@
\defprefix{enumiv}##1{(\theenumi.\theenumii.\theenumiii##1)}
}
\fi
+\def\reset@prefixrefstepcounter#1{%
+ \let\refstepcounter\cc@normal@refstepcounter% Put refstepcounter back to normal
+ \refstepcounter{#1}% do normal operation
+ \defprefix{equation}##1{(##1)}% reset equation prefix
+}
\def\theorempreamblenn\@thm#1#2{%
\defprefix{#1}##1{#2}%
+ \let\cc@normal@refstepcounter\refstepcounter
+ \let\refstepcounter\reset@prefixrefstepcounter
\EnumerationInTheorems{#1}%
\pagebreak[3]\relax
\the\everytheorem
@@ -169,18 +176,21 @@
{\qed\csname endnamedtheorem*\endcsname}
\def\theorempreamble\@thm#1#2{%
\defprefix{#1}##1{#2~##1}%
+ \let\cc@normal@refstepcounter\refstepcounter
+ \let\refstepcounter\reset@prefixrefstepcounter
\EnumerationInTheorems{#1}%
\pagebreak[3]\relax
\the\everytheorem
\@thm{#1}{#2}}
\theorem@bodyfont{\theorempreamble}
\theoremstyle{cc}
-\newtheorem{namedth@@r@m}{\the\theoremtitle}
\if@ccnosepeqncnt
%%% \let\c@namedth@@r@m\c@equation
%%% \def\thenamedth@@r@m{\theequation}
\def\cc@thmcnter{equation}
+\newtheorem{namedth@@r@m}[\cc@thmcnter]{\the\theoremtitle}
\else
+\newtheorem{namedth@@r@m}{\the\theoremtitle}
\def\cc@thmcnter{namedth@@r@m}
\fi
\newenvironment{namedtheorem}[1]