From 8ff57bdca1f2f31861913ebc22961fdb89240cbd Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 14 Jul 2012 16:22:32 +0000 Subject: computational-complexity 2.24 (18jun12) git-svn-id: svn://tug.org/texlive/trunk@27047 c570f23f-e606-0410-a88d-b1316a301751 --- .../bib/computational-complexity/journals.bib | 1 + .../computational-complexity/cc-cls-inline.tex | 36 +++++++++---- .../doc/latex/computational-complexity/cc.pdf | Bin 789692 -> 790584 bytes .../source/latex/computational-complexity/cc.dtx | 56 ++++++++++++++++----- .../tex/latex/computational-complexity/cc.cls | 2 +- .../tex/latex/computational-complexity/ccalgo.sty | 14 ++++-- .../tex/latex/computational-complexity/ccthm.sty | 12 ++++- .../tex/latex/computational-complexity/thcc.sty | 8 +-- 8 files changed, 94 insertions(+), 35 deletions(-) diff --git a/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib b/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib index 131a37b2146..4541e4c3683 100644 --- a/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib +++ b/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib @@ -134,6 +134,7 @@ Und jetzt Strings f{\"{u}}r Zeitschriften udgl. @string{CHES01 = "Cryptographic Hardware and Embedded Systems, Workshop, CHES'01, {\rm Paris,~France}"} @string{CHES05 = "Cryptographic Hardware and Embedded Systems, Workshop, CHES'05, {\rm Edinburgh,~Scotland}"} @string{CHES06 = "Cryptographic Hardware and Embedded Systems, Workshop, CHES'06, {\rm Yokohama,~Japan}"} +@String{CHES07 = "Cryptographic Hardware and Embedded Systems, Workshop, CHES'07, {\rm Vienna, Austria}"} @String{CHES08 = "Cryptographic Hardware and Embedded Systems, Workshop, CHES'08, {\rm Washington, DC,~USA}"} @string{COCOON99 = "5th Annual International Computing and Combinatorics Conference (COCOON '99), {\rm Tokyo, Japan}, July 1999"} diff --git a/Master/texmf-dist/doc/latex/computational-complexity/cc-cls-inline.tex b/Master/texmf-dist/doc/latex/computational-complexity/cc-cls-inline.tex index d465949e58c..18527d03224 100644 --- a/Master/texmf-dist/doc/latex/computational-complexity/cc-cls-inline.tex +++ b/Master/texmf-dist/doc/latex/computational-complexity/cc-cls-inline.tex @@ -39,7 +39,7 @@ \ifclass\expandafter\ProvidesClass\else\expandafter\ProvidesPackage\fi {\ifclass cc\else cc-cls\fi} [% CC MAIN DATE AND VERSION ON NEXT LINE -2012/05/07 v2.23 +2012/06/21 v2.25 computational complexity \ifclass document class\else package\fi] \RequirePackage{ccaux} @@ -1505,12 +1505,13 @@ computational complexity \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? @@ -1518,11 +1519,13 @@ computational complexity \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} @@ -1550,6 +1553,7 @@ computational complexity \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} % @@ -3605,8 +3609,15 @@ computational complexity \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 @@ -3682,18 +3693,21 @@ computational complexity {\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] @@ -4653,16 +4667,16 @@ Submit \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ ##2\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1\ ##2]% + {\normalfont({\activate@shortcite{}##3}).}}% } \def\th@ccnn{% \normalfont\slshape \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1]% + {\normalfont({\activate@shortcite{}##3}).}}% } \def\th@ccproof{% \normalfont\upshape diff --git a/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf b/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf index f20fd75156a..a27144f7188 100644 Binary files a/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf and b/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf differ diff --git a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx index 84f2eb8840b..ac68b13ba4d 100644 --- a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx +++ b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx @@ -2833,6 +2833,10 @@ multilingual,english]{cc} % planned to advance to 3.0 soon. Michael N{\"{u}}sken, Bonn} % \changes{v2.23}{2012/05/22}{Increased compatibility with hyperref. % Michael N{\"{u}}sken, Bonn} +% \changes{v2.24}{2012/06/18}{Another bugfix to equation counting. +% Michael N{\"{u}}sken, Bonn} +% \changes{v2.25}{2012/06/21}{Allowing longer theorem comments. +% Michael N{\"{u}}sken, Bonn} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \providecommand\ignorespacesafterend{\@ignoretrue} @@ -2841,7 +2845,7 @@ multilingual,english]{cc} \ifclass\expandafter\ProvidesClass\else\expandafter\ProvidesPackage\fi {\ifclass cc\else cc-cls\fi} [% CC MAIN DATE AND VERSION ON NEXT LINE -2012/05/07 v2.23 +2012/06/21 v2.25 computational complexity \ifclass document class\else package\fi] % \end{macrocode} @@ -5764,14 +5768,17 @@ computational complexity % typeset slanted, the header terminates with a dot. Inside the % optional argument |\cite| is |\shortcite| which avoids double % parentheses. +% \changes{v2.25}{2012/06/21}{Changed \cs{th@cc} and \cs{th@ccnn} so +% that more than single line comments are possible. Michael +% N{\"{u}}sken, Bonn} % \begin{macrocode} \def\th@cc{% \normalfont\slshape \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ ##2\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1\ ##2]% + {\normalfont({\activate@shortcite{}##3}).}}% } % \end{macrocode} % @@ -5784,8 +5791,8 @@ computational complexity \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1]% + {\normalfont({\activate@shortcite{}##3}).}}% } % \end{macrocode} % @@ -5959,9 +5966,19 @@ computational complexity % |\theorembodyfont| as a hook. In the present version of % \Lpackage{theorem}, we access the theorem counter and the theorem % title by the following construction. +% \changes{v2.24}{2012/06/18}{Bugfix: Dirty hacks to ensure correct +% theorem, algorithm and equation counting and +% referencing. MNuesken, Bonn} % \begin{macrocode} +\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 @@ -6110,6 +6127,8 @@ computational complexity % \begin{macrocode} \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 @@ -6158,12 +6177,13 @@ computational complexity % \lclo{noseparateequationcounting}). % Michael N{\"{u}}sken, Bonn.} % \begin{macrocode} -\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] @@ -7077,19 +7097,23 @@ computational complexity % used comes from the package \Lpackage{thcc}. We ensure that the % counter used is the same as the one used for equations. % \changes{v2.03}{2002/02/01}{Removed a bug, now -% \cs{thenamed@lg@r@thm} equals \cs{thenamedth@@r@m}.} +% \cs{thenamed@lg@r@thm} equals \cs{thenamedth@@r@m}.} +% \changes{v2.23+}{2012/06/08}{Removed a bug, now named@al@r@thm is +% defined like all other theorems with the v2.23 update in +% mind. Michael N{\"{u}}sken, Bonn.} % \begin{macrocode} \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 % \end{macrocode} % % \begin{environment}{namedalgorithm} -% This combines all necessary to typeset an algorithm. +% This combines all necessary stuff to typeset an algorithm. % The environment takes up to four arguments. The first argument % is the \meta{heading}, in the standard |Algorithm|. The second % argument is optional and gives a comma separated list of titles @@ -7101,6 +7125,9 @@ computational complexity % \changes{v2.10}{2010/05/11}{Added extra optional argument to allow % specification of a longest label. But that is of no use at % present since this information is never used.} +% \changes{v2.24}{2012/06/18}{Bugfix: Dirty hacks to ensure correct +% theorem, algorithm and equation counting and +% referencing. MNuesken, Bonn} % \begin{macrocode} \babel\def\babelInput{Input}[german=Eingabe,french=Entr\'ee] \babel\def\babelOutput{Output}[german=Ausgabe,french=Sortie] @@ -7109,11 +7136,13 @@ computational complexity \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} @@ -7141,6 +7170,7 @@ computational complexity \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} % diff --git a/Master/texmf-dist/tex/latex/computational-complexity/cc.cls b/Master/texmf-dist/tex/latex/computational-complexity/cc.cls index 869f236810a..32627eb8c7c 100644 --- a/Master/texmf-dist/tex/latex/computational-complexity/cc.cls +++ b/Master/texmf-dist/tex/latex/computational-complexity/cc.cls @@ -38,7 +38,7 @@ \ifclass\expandafter\ProvidesClass\else\expandafter\ProvidesPackage\fi {\ifclass cc\else cc-cls\fi} [% CC MAIN DATE AND VERSION ON NEXT LINE -2012/05/07 v2.23 +2012/06/21 v2.25 computational complexity \ifclass document class\else package\fi] \RequirePackage{ccaux} 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} % 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] diff --git a/Master/texmf-dist/tex/latex/computational-complexity/thcc.sty b/Master/texmf-dist/tex/latex/computational-complexity/thcc.sty index d8d68d502ef..7b18b8a21e2 100644 --- a/Master/texmf-dist/tex/latex/computational-complexity/thcc.sty +++ b/Master/texmf-dist/tex/latex/computational-complexity/thcc.sty @@ -65,16 +65,16 @@ \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1\ ##2.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ ##2\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1\ ##2]% + {\normalfont({\activate@shortcite{}##3}).}}% } \def\th@ccnn{% \normalfont\slshape \def\@begintheorem##1##2{\item [\hskip\labelsep \theorem@headerfont ##1.]}% \def\@opargbegintheorem##1##2##3{\item - [\hskip\labelsep \theorem@headerfont ##1\ % - \normalfont({\activate@shortcite{}##3}).]}% + [\hskip\labelsep \theorem@headerfont ##1]% + {\normalfont({\activate@shortcite{}##3}).}}% } \def\th@ccproof{% \normalfont\upshape -- cgit v1.2.3