diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-14 18:21:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-14 18:21:27 +0000 |
commit | 5149405bc761d8518999021fd0019b463bee1fd0 (patch) | |
tree | 0619a25bb5299d52477ffc861561338a76b178c9 /Master/texmf-dist | |
parent | 91ea5ca6c438abff6a9ed0c13431ac5d4265f067 (diff) |
computational-complexity 2.11 (13may10)
git-svn-id: svn://tug.org/texlive/trunk@18244 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib | 98 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/computational-complexity/cc-cls-inline.tex | 169 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/computational-complexity/cc.pdf | bin | 752835 -> 752553 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/computational-complexity/cc.dtx | 276 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/computational-complexity/cc.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty | 165 |
6 files changed, 480 insertions, 230 deletions
diff --git a/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib b/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib index 56bc53e8a6c..3c4da9ade85 100644 --- a/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib +++ b/Master/texmf-dist/bibtex/bib/computational-complexity/journals.bib @@ -16,6 +16,8 @@ F{\"{u}}r "urltext"-Felder hier ein paar Strings: @String{LITFILE = "file:litfiles/"} @String{PUBFILE = "http://www-math.upb.de/~aggathen/Publications/"} +@String{BNURL = "http://cosec.bit.uni-bonn.de/science/publications/pub-ia/\#"} + @String{LINKSERVICE = "http://link.springer.de/link/service/"} @String{LINKOPENURL = "http://www.springerlink.com/openurl.asp?"} @@ -92,6 +94,7 @@ Und jetzt Strings f{\"{u}}r Zeitschriften udgl. @string{AAECC12 = "Applied Algebra, Algebraic Algorithms and Error-Correcting Codes: AAECC-12, {\rm Toulouse, France}"} @string{AAECC13 = "Applied Algebra, Algebraic Algorithms and Error-Correcting Codes: AAECC-13, {\rm Hawaii}"} @string{AAECC14 = "Applied Algebra, Algebraic Algorithms and Error-Correcting Codes: AAECC-14, {\rm Melbourne, Australia}"} +@string{AAECC19 = "Applied Algebra, Algebraic Algorithms and Error-Correcting Codes: AAECC-19"} @string{ACO = "Algebraic Coding, First French-Israeli Workshop, {\rm Paris, France, 1993}"} @@ -148,7 +151,7 @@ Und jetzt Strings f{\"{u}}r Zeitschriften udgl. @string{CRYPTO02 = "Advances in Cryptology: Proceedings of CRYPTO~'02, {\rm Santa Barbara~CA}"} @String{CRYPTO03 = "Advances in Cryptology: Proceedings of CRYPTO '03: {\rm Santa Barbara, CA}"} @String{CRYPTO04 = "Advances in Cryptology: Proceedings of CRYPTO '04: {\rm Santa Barbara, CA}"} - +@String{CRYPTO06 = "Advances in Cryptology: Proceedings of CRYPTO '06: {\rm Santa Barbara, CA}"} @string{EUCAL82 = "Proceedings of EUROCAL 1982"} @string{EUCAL83 = "Proceedings of EUROCAL 1983, {\rm London,~UK}"} @@ -173,14 +176,16 @@ Und jetzt Strings f{\"{u}}r Zeitschriften udgl. @string{EUCRY00 = "Advances in Cryptology: Proceedings of EUROCRYPT 2000, {\rm Bruges, Belgium}"} @string{EUCRY01 = "Advances in Cryptology: Proceedings of EUROCRYPT 2001, {\rm Aarhus, Denmark}"} @string{EUCRY02 = "Advances in Cryptology: Proceedings of EUROCRYPT 2002, {\rm Amsterdam, The Netherlands}"} +@String{EUCRY06 = "Advances in Cryptology: Proceedings of EUROCRYPT 2006, {\rm St. Petersburg, Russia}"} +@string{EUCRY09 = "Advances in Cryptology: Proceedings of EUROCRYPT 2009, {\rm Cologne, Germany}"} @string{ASCRY94 = "Advances in Cryptology: Proceedings of ASIACRYPT 1994, {\rm Wollongong, Australia}"} -@string{ASCRY96 = "Advances in Cryptology: Proceedings of ASIACRYPT 1996, {\rm -Kyongju, Korea}"} +@string{ASCRY96 = "Advances in Cryptology: Proceedings of ASIACRYPT 1996, {\rm Kyongju, Korea}"} @string{ASCRY98 = "Advances in Cryptology: Proceedings of ASIACRYPT 1998, {\rm Beijing, China}"} @string{ASCRY00 = "Advances in Cryptology: Proceedings of ASIACRYPT 2000, {\rm Kyoto, Japan}"} @string{ASCRY01 = "Advances in Cryptology: Proceedings of ASIACRYPT 2001, {\rm Gold Coast, Australia}"} +@string{ASCRY06 = "Advances in Cryptology: Proceedings of ASIACRYPT 2006, {\rm Shanghai, China}"} @string{ASCRY07 = "Advances in Cryptology: Proceedings of ASIACRYPT 2007, {\rm Kuching, Sarawak, Malaysia}"} @string{EUSAM79 = "Proceedings of EUROSAM~'79, {\rm Marseille, France}"} @string{EUSAM84 = "Proceedings of EUROSAM~'84, {\rm Cambridge,~UK}"} @@ -277,7 +282,6 @@ Kyongju, Korea}"} @string{ISAAC01 = "Proceedings of 12th International Symposium on Algorithms and Computation ISAAC~2001, {\rm Chirstchurch, New Zealand}"} @string{ISAAC03 = "Proceedings of 14th International Symposium on Algorithms and Computation ISAAC~2003, {\rm Kyoto, Japan}"} - @string{ISSAC71 = "Proceedings 2nd ACM Symposium on Symbolic and Algebraic Manipulation, {\rm Los Angeles~CA}"} @string{ISSAC76 = "Proceedings of the 1976 ACM Symposium on Symbolic and Algebraic Computation SYMSAC~'76, {\rm Yorktown Heights~NY}"} @@ -305,6 +309,7 @@ Kyongju, Korea}"} @String{ISSAC07 = "Proceedings of the 2007 International Symposium on Symbolic and Algebraic Computation ISSAC2007, {\rm Waterloo, Ontario, Canada}"} @String{ISSAC08 = "Proceedings of the 2008 International Symposium on Symbolic and Algebraic Computation ISSAC2008, {\rm Hagenberg, Austria}"} @String{ISSAC09 = "Proceedings of the 2009 International Symposium on Symbolic and Algebraic Computation ISSAC2009, {\rm Seoul, Korea}"} +@String{ISSAC10 = "Proceedings of the 2010 International Symposium on Symbolic and Algebraic Computation ISSAC2010, {\rm Munich, Germany}"} @String{ISCAS02 = "Proceedings of the 2002 IEEE International Symposium on @@ -319,6 +324,7 @@ on Circuits and Systems, {\rm Bangkok, Thailand}"} @string{LATIN02 = "Proceedings of LATIN~2002, {\rm Cancun, Mexico}"} @string{LATIN04 = "Proceedings of LATIN~2004, {\rm Buenos Aires, Argentina}"} @string{LATIN08 = "Proceedings of LATIN~2008, {\rm B{\'{u}}zios, Rio de Janeiro, Brazil}"} +@string{LATIN10 = "Proceedings of LATIN~2010, {\rm Oaxaca, Mexico}"} @string{MACSYMA77 = "Proceedings of the 1977 MACSYMA Users Conference, {\rm Berkeley~CA}"} @@ -338,51 +344,46 @@ on Circuits and Systems, {\rm Bangkok, Thailand}"} @String{SNC09 = "Proceedings of the 2009 conference on Symbolic numeric computation, {\rm Kyoto, Japan}"} %ISBN: 978-1-60558-664-9 -@string{STOC69 = "Proceedings of the First Annual ACM Symposium on Theory of Computing, {\rm Marina del Rey~CA}"} -@string{STOC70 = "Proceedings of the Second Annual ACM Symposium on Theory of Computing, {\rm Northampton~MA}"} -@string{STOC71 = "Proceedings of the Third Annual ACM Symposium on Theory of Computing, {\rm Shaker Heights~OH}"} -@string{STOC72 = "Proceedings of the Fourth Annual ACM Symposium on Theory of Computing, {\rm Denver~CO}"} -@string{STOC73 = "Proceedings of the Fifth Annual ACM Symposium on Theory of Computing, {\rm Austin~TX}"} -@string{STOC74 = "Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, {\rm Seattle~WA}"} -@string{STOC75 = "Proceedings of the Seventh Annual ACM Symposium on Theory of Computing, {\rm Albuquerque~NM}"} -@string{STOC76 = "Proceedings of the Eighth Annual ACM Symposium on Theory of Computing, {\rm Hershey~PA}"} -@string{STOC77 = "Proceedings of the Ninth Annual ACM Symposium on Theory of Computing, {\rm Boulder~CO}"} -@string{STOC78 = "Proceedings of the Tenth Annual ACM Symposium on Theory of Computing, {\rm San Diego~CA}"} -@string{STOC79 = "Proceedings of the Eleventh Annual ACM Symposium on Theory of Computing, {\rm Atlanta~GA}"} -@string{STOC80 = "Proceedings of the Twelfth Annual ACM Symposium on Theory of Computing, {\rm Los Angeles~CA}"} -@string{STOC81 = "Proceedings of the Thirteenth Annual ACM Symposium on Theory of Computing, {\rm Milwaukee~WI}"} -@string{STOC82 = "Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing, {\rm San Francisco~CA}"} -@string{STOC83 = "Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, {\rm Boston~MA}"} -@string{STOC84 = "Proceedings of the Sixteenth Annual ACM Symposium on Theory of Computing, {\rm Washington~DC}"} -@string{STOC85 = "Proceedings of the Seventeenth Annual ACM Symposium on Theory of Computing, {\rm Providence~RI}"} -@string{STOC86 = "Proceedings of the Eighteenth Annual ACM Symposium on Theory of Computing, {\rm Berkeley~CA}"} -@string{STOC87 = "Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, {\rm New York}"} -@string{STOC88 = "Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, {\rm Chicago~IL}"} -@string{STOC89 = "Proceedings of the Twenty-first Annual ACM Symposium on Theory of Computing, {\rm Seattle~WA}"} -@string{STOC90 = "Proceedings of the Twenty-second Annual ACM Symposium on Theory of Computing, {\rm Baltimore~MD}"} -@string{STOC91 = "Proceedings of the Twenty-third Annual ACM Symposium on Theory of Computing, {\rm New Orleans~LA}"} -@string{STOC92 = "Proceedings of the Twenty-fourth Annual ACM Symposium on Theory of Computing, {\rm Victoria, British Columbia, Canada}"} -@string{STOC93 = "Proceedings of the Twenty-fifth Annual ACM Symposium on Theory of Computing, {\rm San Diego~CA}"} -@string{STOC94 = "Proceedings of the Twenty-sixth Annual ACM Symposium on Theory of Computing, {\rm Montr\'{e}al, Qu\'{e}bec, Canada}"} -@string{STOC95 = "Proceedings of the Twenty-seventh Annual ACM Symposium on Theory of Computing, {\rm Las Vegas~NV}"} -@string{STOC96 = "Proceedings of the Twenty-eighth Annual ACM Symposium on Theory of Computing, {\rm Philadelphia~PA}"} -@string{STOC97 = "Proceedings of the Twenty-ninth Annual ACM Symposium on Theory of Computing, {\rm El Paso~TX}"} -@string{STOC98 = "Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, {\rm Dallas~TX}"} -@string{STOC99 = "Proceedings of the Thirty-first Annual ACM Symposium on Theory of Computing, {\rm Atlanta~GA}"} -@string{STOC00 = "Proceedings of the Thirty-second Annual ACM Symposium on Theory of Computing, {\rm Portland~OR}"} -@string{STOC01 = "Proceedings of the Thirty-third Annual ACM Symposium on Theory of Computing, {\rm Hersonissos, Crete, Greece}"} -@string{STOC05 = "Proceedings of the Thirty-seventh Annual ACM Symposium on Theory of Computing, {\rm Baltimore, Maryland, USA}"} +@string{STOC69 = "Proceedings of the First Annual ACM Symposium on Theory of Computing, {\rm Marina del Rey~CA}"} +@string{STOC70 = "Proceedings of the Second Annual ACM Symposium on Theory of Computing, {\rm Northampton~MA}"} +@string{STOC71 = "Proceedings of the Third Annual ACM Symposium on Theory of Computing, {\rm Shaker Heights~OH}"} +@string{STOC72 = "Proceedings of the Fourth Annual ACM Symposium on Theory of Computing, {\rm Denver~CO}"} +@string{STOC73 = "Proceedings of the Fifth Annual ACM Symposium on Theory of Computing, {\rm Austin~TX}"} +@string{STOC74 = "Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, {\rm Seattle~WA}"} +@string{STOC75 = "Proceedings of the Seventh Annual ACM Symposium on Theory of Computing, {\rm Albuquerque~NM}"} +@string{STOC76 = "Proceedings of the Eighth Annual ACM Symposium on Theory of Computing, {\rm Hershey~PA}"} +@string{STOC77 = "Proceedings of the Ninth Annual ACM Symposium on Theory of Computing, {\rm Boulder~CO}"} +@string{STOC78 = "Proceedings of the Tenth Annual ACM Symposium on Theory of Computing, {\rm San Diego~CA}"} +@string{STOC79 = "Proceedings of the Eleventh Annual ACM Symposium on Theory of Computing, {\rm Atlanta~GA}"} +@string{STOC80 = "Proceedings of the Twelfth Annual ACM Symposium on Theory of Computing, {\rm Los Angeles~CA}"} +@string{STOC81 = "Proceedings of the Thirteenth Annual ACM Symposium on Theory of Computing, {\rm Milwaukee~WI}"} +@string{STOC82 = "Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing, {\rm San Francisco~CA}"} +@string{STOC83 = "Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, {\rm Boston~MA}"} +@string{STOC84 = "Proceedings of the Sixteenth Annual ACM Symposium on Theory of Computing, {\rm Washington~DC}"} +@string{STOC85 = "Proceedings of the Seventeenth Annual ACM Symposium on Theory of Computing, {\rm Providence~RI}"} +@string{STOC86 = "Proceedings of the Eighteenth Annual ACM Symposium on Theory of Computing, {\rm Berkeley~CA}"} +@string{STOC87 = "Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, {\rm New York}"} +@string{STOC88 = "Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, {\rm Chicago~IL}"} +@string{STOC89 = "Proceedings of the Twenty-first Annual ACM Symposium on Theory of Computing, {\rm Seattle~WA}"} +@string{STOC90 = "Proceedings of the Twenty-second Annual ACM Symposium on Theory of Computing, {\rm Baltimore~MD}"} +@string{STOC91 = "Proceedings of the Twenty-third Annual ACM Symposium on Theory of Computing, {\rm New Orleans~LA}"} +@string{STOC92 = "Proceedings of the Twenty-fourth Annual ACM Symposium on Theory of Computing, {\rm Victoria, British Columbia, Canada}"} +@string{STOC93 = "Proceedings of the Twenty-fifth Annual ACM Symposium on Theory of Computing, {\rm San Diego~CA}"} +@string{STOC94 = "Proceedings of the Twenty-sixth Annual ACM Symposium on Theory of Computing, {\rm Montr\'{e}al, Qu\'{e}bec, Canada}"} +@string{STOC95 = "Proceedings of the Twenty-seventh Annual ACM Symposium on Theory of Computing, {\rm Las Vegas~NV}"} +@string{STOC96 = "Proceedings of the Twenty-eighth Annual ACM Symposium on Theory of Computing, {\rm Philadelphia~PA}"} +@string{STOC97 = "Proceedings of the Twenty-ninth Annual ACM Symposium on Theory of Computing, {\rm El Paso~TX}"} +@string{STOC98 = "Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, {\rm Dallas~TX}"} +@string{STOC99 = "Proceedings of the Thirty-first Annual ACM Symposium on Theory of Computing, {\rm Atlanta~GA}"} +@string{STOC00 = "Proceedings of the Thirty-second Annual ACM Symposium on Theory of Computing, {\rm Portland~OR}"} +@string{STOC01 = "Proceedings of the Thirty-third Annual ACM Symposium on Theory of Computing, {\rm Hersonissos, Crete, Greece}"} +@string{STOC05 = "Proceedings of the Thirty-seventh Annual ACM Symposium on Theory of Computing, {\rm Baltimore, Maryland, USA}"} @String{STOC07 = "Proceedings of the Thirty-ninth Annual ACM Symposium on Theory of Computing, {\rm San Diego, California, USA}"} @String{STOC08 = "Proceedings of the Fourtieth Annual ACM Symposium on Theory of Computing, {\rm Victoria, BC, Canada}"} - - - +@String{STOC09 = "Proceedings of the Fourty-first Annual ACM Symposium on Theory of Computing, {\rm Bethesda, Maryland, USA}"} @String{SYMSAC76 = "Proceedings of the third ACM Symposium on Symbolic and Algebraic Computation"} %%%ORT unbekannt - - - @String{CTRSA10 = "RSA Conference 2010, Cryptographers' Track, {\rm San Francisco, CA, USA}"} @String{TCC10 = "Seventh IACR Theory of Cryptography Conference, {\rm Z{\"{u}}rich, Switzerland}"} @@ -403,6 +404,7 @@ on Circuits and Systems, {\rm Bangkok, Thailand}"} @string{AMCT = "Mathematisch Centrum, Amsterdam"} @String{AGJSC = "Arab Gulf Journal of Scientific Research"} @string{AMS = "American Mathematical Society"} +@String{AMS/IP = "The American Mathematical Society and International Press"} @string{ACM = "ACM Press"} @string{ADW = "Akademie der Wissenschaften"} @string{ADWL-GSK51 = "Akademie der Wissenschaften und der Literatur, Abhandlungen der geistes- und sozialwissenschaftlichen Klasse, Jahrgang 1951"} @@ -414,6 +416,7 @@ on Circuits and Systems, {\rm Bangkok, Thailand}"} @string{BB = "Birkh{\"{a}}user Verlag"} @string{BIW = "BI Wissenschaftsverlag"} @String{BV = "Braunschweig F. Vieweg"} +@String{CEDAM = "Casa Editrice Dott. Antonio Milani"} @string{CPUC = "Chelsea Publishing Company"} @string{CRC = "CRC Press"} @string{CUP = "Cambridge University Press"} @@ -504,6 +507,7 @@ on Circuits and Systems, {\rm Bangkok, Thailand}"} @String{AMK = "Archiv f{\"{u}}r mittelrheinische Kirchengeschichte"} @string{AML = "Applied Mathematics Letters"} @string{AMM = "The American Mathematical Monthly"}% ISSN = "0002-9890", + @string{AMST = "American Mathematical Society Translations"} @string{AMST2 = "American Mathematical Society Translations, Series 2"} @string{ANMS = "Annals of Mathematical Statistics"} @@ -727,7 +731,7 @@ Computer Science"} @string{NAM = "Nouvelles Annales de Mathematiques"} @string{NAMS = "Notices of the American Mathematical Society"} % ISSN = "0002-9920 (Print) and 1088-9477 (Electronic)", @string{NAR = "The North American Review"} -@string{NAS = "Proceedings of the National Acadamy of Sciences of the USA"} +@string{NAS = "Proceedings of the National Academy of Sciences of the USA"} @string{NAVW = "Nieuw Archief voor Wiskunde"} @string{NAASP = "Nova Acta Academiae Scientiarum Imperalis Petropolitanae"} @string{NCASP = "Novi commentarii academiae scientiarum imperalis @@ -810,6 +814,7 @@ Computer Science"} @string{SA = "Scientific American"} @string{SAS = "Scientific American Supplement"} @string{SAM = "Studies in Applied Mathematics"} +@String{SAdM = "Studies in Advanced Mathematics"} @String{SB = "Studies in Bibliography"} @string{SBMG = "Sitzungsberichte der Berliner Mathematischen Gesellschaft"} @string{SCB = "Signal Corps Bulletin"} @@ -837,12 +842,13 @@ Computer Science"} @string{TSBA="Transactions of the Society of Biblical Arch{\ae}ology"} @string{TCS = "Theoretical Computer Science"}% ISSN = "0304-3975, @string{TJM = "Tokyo Journal of Mathematics"} +@String{JIPAM = "Journal of Inequalities in Pure and Applied Mathematics"} @String{JIH = "The Journal of Intelligence History"} @string{TLS = "The Times Literary Supplement"} @string{TOPLAS = "ACM Transactions on Programming Languages and Systems"} @string{UMN = "{\cyr Uspekhi Matematicheskikh Nauk}"} @string{UMNengl = "{\cyr Uspekhi Matematicheski Nauk} (Uspekhi Matematicheski Nauk)"}% English translation: Russian Mathematical Surveys -@string{VKCSN = "V{\v e}stn{\'i}k Kr{\'a}lovsk{\'e} {\v C}esk{\'e} Spole{\v c}nosti Nauk, T{\v r}{\'i}da Matematiko-P{\v r}irodov{\v e}deck{\' a}"} +@string{VKCSN = "V{\v e}stn{\'i}k Kr{\'a}lovsk{\'e} {\v C}esk{\'e} Spole{\v c}nosti Nauk, T{\v r}{\'i}da Matematiko-P{\v r}irodov{\v e}deck{\' a}"} @string{WW = "The World's Work"} @string{ZDA = "Zeitschrift f{\"u}r deutsches Altertum und deutsche Litteratur"} @string{ZMP = "Zeitschrift fuer Mathematik und Physik"} 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 51ea6b00645..f3fc6c834fa 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 -2010/01/25 v2.10 +2010/01/25 v2.11 computational complexity \ifclass document class\else package\fi] \RequirePackage{ccaux} @@ -1051,7 +1051,6 @@ computational complexity \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{ccalgo}[2005/08/27 v2.05 algorithm environment for cc. Michael Nuesken, Bonn.] -\RequirePackage{ccaux} \let\namedalgorithm\@undefined \let\endnamedalgorithm\@undefined \let\algorithm\@undefined @@ -1123,6 +1122,7 @@ computational complexity Command \protect\@item\space has changed.\MessageBreak Check if current package is valid} \fi} +\RequirePackage{ccaux} \RequirePackage{theorem} \RequirePackage{thcc} \RequirePackage{relabel} @@ -1164,69 +1164,127 @@ computational complexity \newcommand{\labelalgonumerate}{% \count@\value{algonumerate}% \ifnum\count@<\z@ - \algonumfield:% + \algonumfield% \else - \makealgolabel{\thealgonumerate}\fi + \makealgolabel{\thealgonumerate}% + \fi }% \newdimen\algo@labelsep \newdimen\steplabelwidth \newtoks\AtNextItem \newif\if@requireditemscomplete +\newif\if@noitemargcopy +\let\orig@item\item +\def\item{\@ifnextchar[{\@noitemargcopyfalse\orig@item}{\@noitemargcopytrue\orig@item}} +\newcount\last@algolabeltype +\newcount\this@algolabeltype \newcommand{\algonumerate@label}[1]{% - \def\@tempa{#1}\def\@tempc{\@itemlabel}% - %%\show\@tempa\show\@tempc - \ifx\@tempa\@tempc\global\@speciallabelfalse - \else\global\@speciallabeltrue\fi - \expandafter\ifnum\value{algonumerate}<\z@ - #1\hskip\algo@labelsep% - \else - \ifx\@tempa\@empty - \hskip\steplabelwidth\hskip\algo@labelsep + \expandafter\count@\value{algonumerate}% + \if@noitemargcopy + \ifnum\count@<\z@ + \let\next\algonumerate@labelautomatic + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\m@ne + \else + \let\next\algonumerate@labelnumber + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\@ne + \fi \else + \def\@tempa{#1}% + \ifx\@tempa\@empty + \let\next\algonumerate@labelempty + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\tw@ + \else + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\z@ + \let\next\algonumerate@labelexplicit + \fi + \fi\next{#1}} +\newcommand{\algonumerate@makelabelexplicit}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelempty}[1]{% + \hskip\steplabelwidth\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelautomatic}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelnumber}[1]{% \hb@xt@\steplabelwidth{\hss - \hb@xt@\steplabelwidth{\hfill - \if@speciallabel - \makeoptalgolabel{#1}% - \else + %\hb@xt@\steplabelwidth{\hfill #1% - \fi - }}\hskip\algo@labelsep% - \fi\fi - \global\let\algonumerate@global\global - \gdef\global{\algonumerate@global\let\global\algonumerate@global + %} + }\hskip\algo@labelsep% +} +\newcommand{\algonumerate@postprocess}[1]{% \expandafter\count@\value{algonumerate}% %%{\tracingall\nonstopmode\showbox\@tempboxa}% - \ifnum\count@=\m@ne - \stepcounter{algonumerate}% - \fi - \ifnum\count@=\z@ - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi - \fi - \ifnum\count@=\@ne - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi + \ifnum\last@algolabeltype<\@ne + \ifnum\this@algolabeltype=\@ne + \medskip \fi - \if@speciallabel - \protected@edef\@currentlabel{\csname p@\@listctr\endcsname - {\makeoptalgocurrentlabel{#1}}}% - \protected@edef\@bare@currentlabel{#1}% \fi + #1% \global\let\latest@item@currentlabel\@currentlabel \global\let\latest@item@bare@currentlabel\@bare@currentlabel + \ifnum\count@=\m@ne + \stepcounter{algonumerate}% + \fi \global\@speciallabeltrue \the\AtNextItem \global\AtNextItem{}% \reinit@list@label +} +\newcommand{\algonumerate@labelexplicit}[1]{% For algorithm i/o + \typeout{item explicit [#1]}% + \algonumerate@makelabelexplicit{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% \global}% - } +} +\newcommand{\algonumerate@labelempty}[1]{% For algorithm i/o + \typeout{item empty [#1]}% + \algonumerate@makelabelempty{}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +\newcommand{\algonumerate@labelautomatic}[1]{% For algorithm steps + \typeout{item automatic [#1]}% + \algonumerate@makelabelautomatic{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% + \global}% +} +\newcommand{\algonumerate@labelnumber}[1]{% For algorithm steps + \typeout{item numbered [#1]}% + \algonumerate@makelabelnumber{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +%%% \newdimen\algonumerate@maxindent +\newdimen\@algolongestlabel \AtBeginDocument{\ifdim\algonumerate@maxindent=\z@ \algonumerate@maxindent.2\textwidth\fi} \def\algonumerateinit#1{% + \setcounter{algonumerate}{-1}% + \this@algolabeltype=\@M + \@algolongestlabel\z@ \def\@algonumfield{}% \let\ccorg@or\or\let\or\relax \algonumerate@items\z@ @@ -1235,6 +1293,9 @@ computational complexity \@temptokena\expandafter{\@tempa}% \toks@\expandafter{\@algonumfield}% \edef\@algonumfield{\the\@temptokena\or\the\toks@}% + \setbox\@tempboxa\hbox{\algonumerate@makelabelautomatic{\the\toks@}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi }% \let\or\ccorg@or \toks@\expandafter{\@algonumfield}% @@ -1278,6 +1339,7 @@ computational complexity \let\endbody\endalgo@block \let\meta\algo@meta \let\endmeta\endalgo@meta + \def\skipremainingspecialitems{\setcounter{algonumerate}{0}}% }{% \endlist\vskip\topskip} \newdimen\blockindent \blockindent\parindent @@ -1407,8 +1469,10 @@ computational complexity \theoremstyle{ccalgo} \newtheorem{named@lg@r@thm}{\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 \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? @@ -1425,12 +1489,24 @@ computational complexity \algotitle{#1}% \n@medalgorithm} {\endalgonumerate\csname end\algo@theorem\endcsname} -\newcommand{\n@medalgorithm}[2][\babelInput,\protect\babelOutput]{% +\newcommand{\n@medalgorithm}[1][\babelInput,\protect\babelOutput]{% \algonumerateinit{#1}% - \algorithmmasterkey{#2}% + \n@m@d@lgorithmgetlongestlabel} +\newcommand{\n@m@d@lgorithmgetlongestlabel}[1][]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else + \setbox\@tempboxa\hbox{\algonumerate@makelabel{#1}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi + \fi + \n@m@d@lgorithmgetmasterkey +} +\newcommand{\n@m@d@lgorithmgetmasterkey}[1]{% + \algorithmmasterkey{#1}% \edef\@tempa{\the\algorithmmasterkey}\ifx\@tempa\@empty \PackageError{ccalgo}{Empty key for algorithm like environment}{}\fi% - \n@m@d@lgorithm} + \n@m@d@lgorithm +} \newcommand{\n@m@d@lgorithm}[1][]{% \def\@tempa{#1}% \ifx\@tempa\@empty\csname\algo@theorem\endcsname @@ -1478,7 +1554,8 @@ computational complexity \babel\def\endIF{}[]% \babel\def\CALL{\keyword{Call}}[german=\keyword{Rufe}]% \babel\def\RETURN{\keyword{Return}}[german=\keyword{Antworte}]% - \expandafter\selectlanguage\expandafter{\languagename} + \def\@tempa{nohyphenation}\ifx\languagename\@tempa\else% + \expandafter\selectlanguage\expandafter{\languagename}\fi% \def\COMMENT##1{$\{$ ##1 $\}$}% } \newcommand{\optitem}[1]{% @@ -3259,6 +3336,8 @@ computational complexity %% %% End of file `ccthm.sty'. \end{filecontents*} +\begin{filecontents*}{develop.sty} +\end{filecontents*} \begin{filecontents*}{relabel.sty} %% %% This is file `relabel.sty', diff --git a/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf b/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf Binary files differindex e0577a7edce..617d332b87b 100644 --- a/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf +++ b/Master/texmf-dist/doc/latex/computational-complexity/cc.pdf diff --git a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx index ef1dbd79db4..1d214947826 100644 --- a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx +++ b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx @@ -2641,6 +2641,8 @@ multilingual,english]{cc} % Bonn} % \changes{v2.09}{2010/01/26}{Advanced version to 2.10, just a few % minor changes, Michael N{\"{u}}sken, Bonn} +% \changes{v2.10}{2010/05/11}{Advanced version to 2.11, redesign of +% algorithms, Michael N{\"{u}}sken, Bonn} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \providecommand\ignorespacesafterend{\@ignoretrue} @@ -2649,7 +2651,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 -2010/01/25 v2.10 +2010/01/25 v2.11 computational complexity \ifclass document class\else package\fi] % \end{macrocode} @@ -5515,12 +5517,13 @@ computational complexity % % Announce the package and its version: % \changes{v0.91}{2000/02/29}{Advanced version to official 2.00} -% \changes{v2.05}{2010/01/25}{Requiring ccaux now.} +% \changes{v2.10}{2010/05/11}{Redesign. Now at any time item with +% text label and hanging indentation are possible as used for input +% and output: \cs{item}[itemtitle] does it.} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{ccalgo}[2005/08/27 v2.05 algorithm environment for cc. Michael Nuesken, Bonn.] -\RequirePackage{ccaux} % \end{macrocode} % Next we undefine some macros in case of overloading. % \begin{macrocode} @@ -5584,7 +5587,10 @@ computational complexity \fi \sbox\@tempboxa{\makelabel{#1}}% % \end{macrocode} -% We require that |\global| follows this |\makelabel| to insert a hook. +% We require that |\global| follows this |\makelabel| to insert a +% hook. Moreover we use that the produced label is put in +% \cs{@tempboxa} to reinitialize the paragraph indention in +% \cs{reinit@list@label}. % \begin{macrocode} \global\setbox\@labels\hbox{% \unhbox\@labels @@ -5607,7 +5613,9 @@ computational complexity % We load Frank Mittelbach's theorem style, \cc's add-on and the % \Lpackage{relabel} package. (The latter is for adding prefixes to % labels and thelike.) +% \changes{v2.05}{2010/01/25}{Requiring ccaux now.} % \begin{macrocode} +\RequirePackage{ccaux} \RequirePackage{theorem} \RequirePackage{thcc} \RequirePackage{relabel} @@ -5677,7 +5685,7 @@ computational complexity \newcounter{algonumerate} \defprefix{algonumerate}{} % \end{macrocode} -% This count is the number of named items. +% This count holds the number of named items. % \begin{macrocode} \newcount\algonumerate@items % \end{macrocode} @@ -5704,14 +5712,16 @@ computational complexity % \begin{macrocode} \newif\if@speciallabel % \end{macrocode} -% This macro produces the labels in all cases. +% This macro produces the labels in all cases. +% \changes{v2.10}{2010/05/11}{Redesign.} % \begin{macrocode} \newcommand{\labelalgonumerate}{% \count@\value{algonumerate}% \ifnum\count@<\z@ - \algonumfield:% + \algonumfield% \else - \makealgolabel{\thealgonumerate}\fi + \makealgolabel{\thealgonumerate}% + \fi }% % \end{macrocode} % These two dimensions define the width of a label and its distance @@ -5725,126 +5735,173 @@ computational complexity \newtoks\AtNextItem % \end{macrocode} % A toggle noting whether the named items are complete or not. +% \changes{v2.10}{2010/05/11}{Redesign: implement another mechanism +% to get information about the type of \cs{item} that was called.} % \begin{macrocode} \newif\if@requireditemscomplete +\newif\if@noitemargcopy +\let\orig@item\item +\def\item{\@ifnextchar[{\@noitemargcopyfalse\orig@item}{\@noitemargcopytrue\orig@item}} +\newcount\last@algolabeltype +\newcount\this@algolabeltype % \end{macrocode} % This is |\makelabel| for our list. It produces the label, % inserts the hook and makes all necessary modifications. % \begin{macrocode} \newcommand{\algonumerate@label}[1]{% -% \end{macrocode} -% Decide whether this is a special item and set the corresponding -% toggle. -% \begin{macrocode} - \def\@tempa{#1}\def\@tempc{\@itemlabel}% - %%\show\@tempa\show\@tempc - \ifx\@tempa\@tempc\global\@speciallabelfalse - \else\global\@speciallabeltrue\fi -% \end{macrocode} -% Distinguish cases: named items, first non-named items, numbered items, -% and special (labelled) items. -% \begin{macrocode} - \expandafter\ifnum\value{algonumerate}<\z@ -% \end{macrocode} -% A named item's label is simply typeset with some space. -% \begin{macrocode} - #1\hskip\algo@labelsep% - \else - \ifx\@tempa\@empty -% \end{macrocode} -% An empty special item's label remains invisible. -% \begin{macrocode} - \hskip\steplabelwidth\hskip\algo@labelsep + \expandafter\count@\value{algonumerate}% +% \typeout{algonumerate@label #1}% +% \typeout{...counter=\the\count@}% +% \if@noitemargcopy\typeout{...noitemarg}\else\typeout{...explicititemarg}\fi +% \end{macrocode} +% Now, fork with respect to the item type. There are four variants: +% a numbered item with negative counter procudes an item with hanging +% indention and a text label from the list supplied at the list +% initialisation. A numbered item with positive counter produces a +% numbered item. The counter is stepped in these two cases and zero +% is skipped. An item with empty optional argument produces an +% item like a numbered one just without a number. An item with a +% non-empty optional argument produces an item with hanging indention +% and the optional argument as label. +% \begin{macrocode} + \if@noitemargcopy + \ifnum\count@<\z@ + \let\next\algonumerate@labelautomatic + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\m@ne + \else + \let\next\algonumerate@labelnumber + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\@ne + \fi \else + \def\@tempa{#1}% + \ifx\@tempa\@empty + \let\next\algonumerate@labelempty + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\tw@ + \else + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\z@ + \let\next\algonumerate@labelexplicit + \fi + \fi\next{#1}} % \end{macrocode} -% A non-named item's label is typeset in a box using -% |\makeoptalgolabel| to format a special label. +% For each of the four variants we now specify how to typeset them. % \begin{macrocode} +\newcommand{\algonumerate@makelabelexplicit}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelempty}[1]{% + \hskip\steplabelwidth\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelautomatic}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelnumber}[1]{% \hb@xt@\steplabelwidth{\hss - \hb@xt@\steplabelwidth{\hfill - \if@speciallabel - \makeoptalgolabel{#1}% - \else + %\hb@xt@\steplabelwidth{\hfill #1% - \fi - }}\hskip\algo@labelsep% - \fi\fi + %} + }\hskip\algo@labelsep% +} % \end{macrocode} -% -% The following two lines are a dirty trick!!! This establishes -% the hook. -% \begin{macrocode} - \global\let\algonumerate@global\global - \gdef\global{\algonumerate@global\let\global\algonumerate@global -% \end{macrocode} -% This code is then executed in the |\item| command outside any -% extra groups. -% -% First, we handle the boundary between named and numbered items. +% The macro \cs{algonumerate@postprocess} contains all the stuff to +% be done after producing the label and putting it into +% \cs{@tempboxa}. % \begin{macrocode} +\newcommand{\algonumerate@postprocess}[1]{% \expandafter\count@\value{algonumerate}% %%{\tracingall\nonstopmode\showbox\@tempboxa}% % \end{macrocode} -% The counter jumpes over the value $0$. -% \begin{macrocode} - \ifnum\count@=\m@ne - \stepcounter{algonumerate}% - \fi -% \end{macrocode} -% Test whether we bypassed the boundary and issue |\medskip| once. +% We insert a \cs{medskip} if a (positively) numbered item follows an +% automatic or explicit text item. % \begin{macrocode} - \ifnum\count@=\z@ - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi - \fi - \ifnum\count@=\@ne - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi + \ifnum\last@algolabeltype<\@ne + \ifnum\this@algolabeltype=\@ne + \medskip \fi -% \end{macrocode} -% To enable referencing of special label's we need to define -% |\@currentlabel| and (for the |\bare| version) -% |\@bare@currentlabel|. -% \begin{macrocode} - \if@speciallabel - \protected@edef\@currentlabel{\csname p@\@listctr\endcsname - {\makeoptalgocurrentlabel{#1}}}% - \protected@edef\@bare@currentlabel{#1}% \fi % \end{macrocode} -% Remember the reference globally. (This is used in the -% \Lenv{block} environment below.) +% Next, we execute case specific commands. (For text items we need to +% set \cs{@currentlabel} here.) % \begin{macrocode} + #1% \global\let\latest@item@currentlabel\@currentlabel \global\let\latest@item@bare@currentlabel\@bare@currentlabel -% \end{macrocode} -% Reset the special label toggle. -% \begin{macrocode} + \ifnum\count@=\m@ne + \stepcounter{algonumerate}% + \fi \global\@speciallabeltrue % \end{macrocode} -% Execute |\AtNextItem| once. +% Execute |\AtNextItem| once and clear it. % \begin{macrocode} \the\AtNextItem \global\AtNextItem{}% % \end{macrocode} % Reinitialize the list indentions. % \begin{macrocode} \reinit@list@label +} +% \end{macrocode} +% The next four macros are similar. For each item type they produces +% the label and use the dirty trick to get counting and paragraph +% formatting as desired. +% \begin{macrocode} +\newcommand{\algonumerate@labelexplicit}[1]{% For algorithm i/o + \typeout{item explicit [#1]}% + \algonumerate@makelabelexplicit{#1}% +% \end{macrocode} +% +% The following two lines are a dirty trick!!! This establishes +% the hook. +% \begin{macrocode} + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% % \end{macrocode} % Execute the |\global| which was used to implement this hook. % \begin{macrocode} \global}% - } +} +\newcommand{\algonumerate@labelempty}[1]{% For algorithm i/o + \typeout{item empty [#1]}% + \algonumerate@makelabelempty{}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +\newcommand{\algonumerate@labelautomatic}[1]{% For algorithm steps + \typeout{item automatic [#1]}% + \algonumerate@makelabelautomatic{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% + \global}% +} +\newcommand{\algonumerate@labelnumber}[1]{% For algorithm steps + \typeout{item numbered [#1]}% + \algonumerate@makelabelnumber{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +%%% +\newdimen\algonumerate@maxindent % \end{macrocode} -% -% Named items will be indented as far as the label, unless this -% exceeds the maximal value stored in |\algonumerate@maxindent|. -% Its default value is $20\%$ of the |\textwidth|. +% We add a mechanism to find and store the length of the longest +% macro. However, at present it is not used. % \begin{macrocode} -\newdimen\algonumerate@maxindent +\newdimen\@algolongestlabel \AtBeginDocument{\ifdim\algonumerate@maxindent=\z@ \algonumerate@maxindent.2\textwidth\fi} % \end{macrocode} @@ -5853,6 +5910,9 @@ computational complexity % is just the comma separated list of the names. % \begin{macrocode} \def\algonumerateinit#1{% + \setcounter{algonumerate}{-1}% + \this@algolabeltype=\@M + \@algolongestlabel\z@ \def\@algonumfield{}% \let\ccorg@or\or\let\or\relax \algonumerate@items\z@ @@ -5861,6 +5921,9 @@ computational complexity \@temptokena\expandafter{\@tempa}% \toks@\expandafter{\@algonumfield}% \edef\@algonumfield{\the\@temptokena\or\the\toks@}% + \setbox\@tempboxa\hbox{\algonumerate@makelabelautomatic{\the\toks@}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi }% \let\or\ccorg@or \toks@\expandafter{\@algonumfield}% @@ -5876,6 +5939,9 @@ computational complexity % from initiation the list, it also activates the environments % \Lenv{block} (aka \Lenv{body}), \Lenv{range}, \Lenv{indention}, % and \Lenv{meta}. +% \changes{v2.10}{2010/05/11}{Added the macro +% \cs{skipremainingspecialitems} to allow the user to override the +% standard label item list.} % \begin{macrocode} \newenvironment{algonumerate}{% \if@inlabel~\fi\par @@ -5914,6 +5980,7 @@ computational complexity \let\endbody\endalgo@block \let\meta\algo@meta \let\endmeta\endalgo@meta + \def\skipremainingspecialitems{\setcounter{algonumerate}{0}}% }{% \endlist\vskip\topskip} % \end{macrocode} @@ -6131,8 +6198,10 @@ computational complexity \theoremstyle{ccalgo} \newtheorem{named@lg@r@thm}{\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 % \end{macrocode} % % \begin{environment}{namedalgorithm} @@ -6145,6 +6214,9 @@ computational complexity % reference to the algorithm and in |\algolabel| to prefix % references inside the algorithm. The forth argument is again % optional and specifies a title. +% \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.} % \begin{macrocode} \babel\def\babelInput{Input}[german=Eingabe,french=Entr\'ee] \babel\def\babelOutput{Output}[german=Ausgabe,french=Sortie] @@ -6162,12 +6234,24 @@ computational complexity \algotitle{#1}% \n@medalgorithm} {\endalgonumerate\csname end\algo@theorem\endcsname} -\newcommand{\n@medalgorithm}[2][\babelInput,\protect\babelOutput]{% +\newcommand{\n@medalgorithm}[1][\babelInput,\protect\babelOutput]{% \algonumerateinit{#1}% - \algorithmmasterkey{#2}% + \n@m@d@lgorithmgetlongestlabel} +\newcommand{\n@m@d@lgorithmgetlongestlabel}[1][]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else + \setbox\@tempboxa\hbox{\algonumerate@makelabel{#1}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi + \fi + \n@m@d@lgorithmgetmasterkey +} +\newcommand{\n@m@d@lgorithmgetmasterkey}[1]{% + \algorithmmasterkey{#1}% \edef\@tempa{\the\algorithmmasterkey}\ifx\@tempa\@empty \PackageError{ccalgo}{Empty key for algorithm like environment}{}\fi% - \n@m@d@lgorithm} + \n@m@d@lgorithm +} \newcommand{\n@m@d@lgorithm}[1][]{% \def\@tempa{#1}% \ifx\@tempa\@empty\csname\algo@theorem\endcsname @@ -6246,6 +6330,9 @@ computational complexity % these things are only accessible inside algorithm like % environments. % \changes{v2.01}{2004/01/26}{Babelized algo@keywords.} +% \changes{v2.10}{2010/05/11}{Use \cs{selectlanguage} only if +% \cs{language} is not \texttt{nohyphenation}. This avoids strange +% errors.} % \begin{macrocode} \def\algo@keywords{% \def\keyword##1{\textsf{##1} \ignorespaces}% @@ -6263,7 +6350,8 @@ computational complexity \babel\def\endIF{}[]% \babel\def\CALL{\keyword{Call}}[german=\keyword{Rufe}]% \babel\def\RETURN{\keyword{Return}}[german=\keyword{Antworte}]% - \expandafter\selectlanguage\expandafter{\languagename} + \def\@tempa{nohyphenation}\ifx\languagename\@tempa\else% + \expandafter\selectlanguage\expandafter{\languagename}\fi% \def\COMMENT##1{$\{$ ##1 $\}$}% } % \end{macrocode} diff --git a/Master/texmf-dist/tex/latex/computational-complexity/cc.cls b/Master/texmf-dist/tex/latex/computational-complexity/cc.cls index e6ef25205cf..7175c083f08 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 -2010/01/25 v2.10 +2010/01/25 v2.11 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 432507a3513..6912029eb6e 100644 --- a/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty +++ b/Master/texmf-dist/tex/latex/computational-complexity/ccalgo.sty @@ -34,7 +34,6 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{ccalgo}[2005/08/27 v2.05 algorithm environment for cc. Michael Nuesken, Bonn.] -\RequirePackage{ccaux} \let\namedalgorithm\@undefined \let\endnamedalgorithm\@undefined \let\algorithm\@undefined @@ -106,6 +105,7 @@ Command \protect\@item\space has changed.\MessageBreak Check if current package is valid} \fi} +\RequirePackage{ccaux} \RequirePackage{theorem} \RequirePackage{thcc} \RequirePackage{relabel} @@ -147,69 +147,127 @@ \newcommand{\labelalgonumerate}{% \count@\value{algonumerate}% \ifnum\count@<\z@ - \algonumfield:% + \algonumfield% \else - \makealgolabel{\thealgonumerate}\fi + \makealgolabel{\thealgonumerate}% + \fi }% \newdimen\algo@labelsep \newdimen\steplabelwidth \newtoks\AtNextItem \newif\if@requireditemscomplete +\newif\if@noitemargcopy +\let\orig@item\item +\def\item{\@ifnextchar[{\@noitemargcopyfalse\orig@item}{\@noitemargcopytrue\orig@item}} +\newcount\last@algolabeltype +\newcount\this@algolabeltype \newcommand{\algonumerate@label}[1]{% - \def\@tempa{#1}\def\@tempc{\@itemlabel}% - %%\show\@tempa\show\@tempc - \ifx\@tempa\@tempc\global\@speciallabelfalse - \else\global\@speciallabeltrue\fi - \expandafter\ifnum\value{algonumerate}<\z@ - #1\hskip\algo@labelsep% - \else - \ifx\@tempa\@empty - \hskip\steplabelwidth\hskip\algo@labelsep + \expandafter\count@\value{algonumerate}% + \if@noitemargcopy + \ifnum\count@<\z@ + \let\next\algonumerate@labelautomatic + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\m@ne + \else + \let\next\algonumerate@labelnumber + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\@ne + \fi \else + \def\@tempa{#1}% + \ifx\@tempa\@empty + \let\next\algonumerate@labelempty + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\tw@ + \else + \global\last@algolabeltype\this@algolabeltype + \global\this@algolabeltype\z@ + \let\next\algonumerate@labelexplicit + \fi + \fi\next{#1}} +\newcommand{\algonumerate@makelabelexplicit}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelempty}[1]{% + \hskip\steplabelwidth\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelautomatic}[1]{% + #1:\hskip\algo@labelsep% +} +\newcommand{\algonumerate@makelabelnumber}[1]{% \hb@xt@\steplabelwidth{\hss - \hb@xt@\steplabelwidth{\hfill - \if@speciallabel - \makeoptalgolabel{#1}% - \else + %\hb@xt@\steplabelwidth{\hfill #1% - \fi - }}\hskip\algo@labelsep% - \fi\fi - \global\let\algonumerate@global\global - \gdef\global{\algonumerate@global\let\global\algonumerate@global + %} + }\hskip\algo@labelsep% +} +\newcommand{\algonumerate@postprocess}[1]{% \expandafter\count@\value{algonumerate}% %%{\tracingall\nonstopmode\showbox\@tempboxa}% - \ifnum\count@=\m@ne - \stepcounter{algonumerate}% - \fi - \ifnum\count@=\z@ - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi - \fi - \ifnum\count@=\@ne - \if@requireditemscomplete\else - \global\@requireditemscompletetrue - \ifnum\algonumerate@items>\z@\medskip\fi - \fi + \ifnum\last@algolabeltype<\@ne + \ifnum\this@algolabeltype=\@ne + \medskip \fi - \if@speciallabel - \protected@edef\@currentlabel{\csname p@\@listctr\endcsname - {\makeoptalgocurrentlabel{#1}}}% - \protected@edef\@bare@currentlabel{#1}% \fi + #1% \global\let\latest@item@currentlabel\@currentlabel \global\let\latest@item@bare@currentlabel\@bare@currentlabel + \ifnum\count@=\m@ne + \stepcounter{algonumerate}% + \fi \global\@speciallabeltrue \the\AtNextItem \global\AtNextItem{}% \reinit@list@label +} +\newcommand{\algonumerate@labelexplicit}[1]{% For algorithm i/o + \typeout{item explicit [#1]}% + \algonumerate@makelabelexplicit{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% \global}% - } +} +\newcommand{\algonumerate@labelempty}[1]{% For algorithm i/o + \typeout{item empty [#1]}% + \algonumerate@makelabelempty{}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +\newcommand{\algonumerate@labelautomatic}[1]{% For algorithm steps + \typeout{item automatic [#1]}% + \algonumerate@makelabelautomatic{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{% + \protected@edef\@currentlabel{\csname p@\@listctr\endcsname + {\makeoptalgocurrentlabel{#1}}}% + \protected@edef\@bare@currentlabel{#1}% + }% + \global}% +} +\newcommand{\algonumerate@labelnumber}[1]{% For algorithm steps + \typeout{item numbered [#1]}% + \algonumerate@makelabelnumber{#1}% + \global\let\algonumerate@global\global + \gdef\global{\algonumerate@global\let\global\algonumerate@global + \algonumerate@postprocess{}% + \global}% +} +%%% \newdimen\algonumerate@maxindent +\newdimen\@algolongestlabel \AtBeginDocument{\ifdim\algonumerate@maxindent=\z@ \algonumerate@maxindent.2\textwidth\fi} \def\algonumerateinit#1{% + \setcounter{algonumerate}{-1}% + \this@algolabeltype=\@M + \@algolongestlabel\z@ \def\@algonumfield{}% \let\ccorg@or\or\let\or\relax \algonumerate@items\z@ @@ -218,6 +276,9 @@ \@temptokena\expandafter{\@tempa}% \toks@\expandafter{\@algonumfield}% \edef\@algonumfield{\the\@temptokena\or\the\toks@}% + \setbox\@tempboxa\hbox{\algonumerate@makelabelautomatic{\the\toks@}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi }% \let\or\ccorg@or \toks@\expandafter{\@algonumfield}% @@ -261,6 +322,7 @@ \let\endbody\endalgo@block \let\meta\algo@meta \let\endmeta\endalgo@meta + \def\skipremainingspecialitems{\setcounter{algonumerate}{0}}% }{% \endlist\vskip\topskip} \newdimen\blockindent \blockindent\parindent @@ -390,8 +452,10 @@ \theoremstyle{ccalgo} \newtheorem{named@lg@r@thm}{\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 \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? @@ -408,12 +472,24 @@ \algotitle{#1}% \n@medalgorithm} {\endalgonumerate\csname end\algo@theorem\endcsname} -\newcommand{\n@medalgorithm}[2][\babelInput,\protect\babelOutput]{% +\newcommand{\n@medalgorithm}[1][\babelInput,\protect\babelOutput]{% \algonumerateinit{#1}% - \algorithmmasterkey{#2}% + \n@m@d@lgorithmgetlongestlabel} +\newcommand{\n@m@d@lgorithmgetlongestlabel}[1][]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else + \setbox\@tempboxa\hbox{\algonumerate@makelabel{#1}}% + \ifdim\wd\@tempboxa>\@algolongestlabel\relax + \@algolongestlabel\wd\@tempboxa\fi + \fi + \n@m@d@lgorithmgetmasterkey +} +\newcommand{\n@m@d@lgorithmgetmasterkey}[1]{% + \algorithmmasterkey{#1}% \edef\@tempa{\the\algorithmmasterkey}\ifx\@tempa\@empty \PackageError{ccalgo}{Empty key for algorithm like environment}{}\fi% - \n@m@d@lgorithm} + \n@m@d@lgorithm +} \newcommand{\n@m@d@lgorithm}[1][]{% \def\@tempa{#1}% \ifx\@tempa\@empty\csname\algo@theorem\endcsname @@ -461,7 +537,8 @@ \babel\def\endIF{}[]% \babel\def\CALL{\keyword{Call}}[german=\keyword{Rufe}]% \babel\def\RETURN{\keyword{Return}}[german=\keyword{Antworte}]% - \expandafter\selectlanguage\expandafter{\languagename} + \def\@tempa{nohyphenation}\ifx\languagename\@tempa\else% + \expandafter\selectlanguage\expandafter{\languagename}\fi% \def\COMMENT##1{$\{$ ##1 $\}$}% } \newcommand{\optitem}[1]{% |