diff options
author | Karl Berry <karl@freefriends.org> | 2012-04-19 16:53:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-04-19 16:53:20 +0000 |
commit | f17434595759bd2eb2cf02b2f042956adb23eb04 (patch) | |
tree | dca1875eff688e7fae19bbf8562636fa6be6a1f8 /Master/texmf-dist/source | |
parent | a2b539be57596e35eac0c7860004eec5b838c447 (diff) |
computational-complexity (18apr12)
git-svn-id: svn://tug.org/texlive/trunk@26045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/computational-complexity/cc.dtx | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx index ac72dc55fa4..6055cce872a 100644 --- a/Master/texmf-dist/source/latex/computational-complexity/cc.dtx +++ b/Master/texmf-dist/source/latex/computational-complexity/cc.dtx @@ -1369,6 +1369,8 @@ year = {about 300 BC}, \end{texexamplesize} +% \changes{v2.20}{2012/03/27}{Removed cctest from doc} +\iffalse \subsection{Testing your final file} Once your source file is prepared like this, send it via email to @@ -1380,7 +1382,7 @@ log files and the resulting \ps{} file will be sent back to you. everything is ok. If so, submit your \LaTeX{} file as the final version to \emailsubmit{}. Mail sent to \emailtest{} is not read by anyone; only the software described above is automatically executed. - +\fi \section{Using the document class \Lclass{cc}} @@ -2672,6 +2674,11 @@ longer example, see \ref{tab:algo}. \item[\Lpackage{hyperref}] This package must be loaded after \Lpackage{cc-cls}. Otherwise, references will not work as expected with \Lpackage{hyperref}. +\item[\Lpackage{beamer}] If you want to use \Lpackage{cc-cls}, + \Lpackage{ccthm} and/or \Lpackage{ccalgo} you must use the option + \Lclo{noamsthm} to \Lclass{beamer} and make sure that + \Lpackage{babel} is loaded with at least the language \Lclo{english} + before calling \Lpackage{ccthm} or \Lpackage{ccalgo}. \end{description} @@ -2817,8 +2824,11 @@ multilingual,english]{cc} % comments. Michael % N{\"{u}}sken, Bonn} % \changes{v2.20}{2011/07/29}{Advanced version to 2.20, bug fixes, -% removed some It is planned to advance to 3.0 soon. Michael +% removed some. It is planned to advance to 3.0 soon. Michael % N{\"{u}}sken, Bonn} +% \changes{v2.21}{2012/04/17}{Advanced version to 2.21, bug fixes in +% relation to \cs{bare}\cs{ref}. It is planned to advance to 3.0 +% soon. Michael N{\"{u}}sken, Bonn} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \providecommand\ignorespacesafterend{\@ignoretrue} @@ -2827,7 +2837,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 -2011/07/28 v2.20 +2012/04/17 v2.21 computational complexity \ifclass document class\else package\fi] % \end{macrocode} @@ -3047,9 +3057,11 @@ computational complexity \PassOptionsToClass{\CurrentOption}{article}} % \end{macrocode} % Now, all options are defined. We execute the default options. +% \changes{v2.20}{2011/09/12}{Removed default option balancedmargin. +% Michael N{\"{u}}sken, Bonn.} % \begin{macrocode} \ifclass -\ExecuteOptions{a4paper,12pt,cctextarea,balancedmargins,twoside,% +\ExecuteOptions{a4paper,12pt,cctextarea,twoside,% OT1,nolatin1,nobabel,% localnumbering,bare,% leqno,ams,ccpublish,cclayout,autotitle,ccsectioning,% @@ -3580,6 +3592,8 @@ computational complexity % % \subsection{New ifs for document class options} % +% \changes{v2.20}{2011/09/12}{Default marginmode now is -1 (noothermargins). +% Michael N{\"{u}}sken, Bonn.} % \begin{macrocode} \newif\if@longarticle \@longarticletrue \newif\if@cclayout \@cclayouttrue @@ -3606,7 +3620,7 @@ computational complexity \def\@cctextareafalse{\@textareaversion\z@} \def\@cctextareatrue{\@textareaversion\tw@} \@cctextareatrue -\newcount\@marginmode \@marginmode\tw@ +\newcount\@marginmode \@marginmode\m@ne % \end{macrocode} % % \subsection{Number equations and theorems within sections or chapter} @@ -3720,11 +3734,16 @@ computational complexity % \cs{ccaddtonow} now use only global defs.)} % \changes{v2.07}{2008/03/18}{Changed \cs{cc@ifempty} to long, MN, Bonn} % \begin{macrocode} +% \changes{v2.20}{2012/03/19}{Detangled \cs{addto} by using the new +% name \cs{cc@addto}.} % \providecommand{\extdef}[2]{% % \ifx#1\@undefined\relax\def#1{}\fi% % \toks@=\expandafter{#1}% % \toks255={#2}% % \edef#1{\the\toks@\the\toks255}} +\newcommand{\cc@addto}[2]{% + \expandafter\ccaddto\expandafter{\csname + cc@\string#1\endcsname}{#2}{#1}} \providecommand{\addto}[2]{% \expandafter\ccaddto\expandafter{\csname cc@\string#1\endcsname}{#2}{#1}} @@ -3794,12 +3813,12 @@ computational complexity \@ifnextchar[{\n@wbabel{#1}{#2}}{\n@wbabel{#1}{#2}[]}} \def\n@wbabel#1#2[#3]{% \def#1{#2}% - \cc@ifnotempty{#2}{\addto\captionsenglish{\def#1{#2}}}% + \cc@ifnotempty{#2}{\cc@addto\captionsenglish{\def#1{#2}}}% \babeladdtranslations#1{#3}% } \def\b@beladdlang#1=#2=#3\@@@#4{% \cc@ifnotempty{#2}{% - \expandafter\addto\csname captions#1\endcsname{\def#4{#2}}% + \expandafter\cc@addto\csname captions#1\endcsname{\def#4{#2}}% }% } % \end{macrocode} @@ -4396,6 +4415,8 @@ computational complexity colorlinks=\ifKV@ccsps@xlink true\else false\fi, linkcolor=\ifKV@ccsps@xlink blue\else black\fi, unicode]{hyperref}[2011/04/17 v6.82g]% +% Make sure \cs{init@bare} is executed/repeated after hyperref's commands. + \AtBeginDocument{\init@bare} \RequirePackage{breakurl}[2009/01/24 v1.30]% \def\l@title##1{\@dottedtocline{-1}{0pt}{0pt}{{\large\textbf{##1}}}}% \let\l@title\l@part @@ -4834,7 +4855,7 @@ computational complexity % |\evensidemargin| + 1~in = |\paperwidth|. (Note that the margins % are usually measured with an offset of 1~in on each side.) % \begin{macrocode} -\typeout{Now adjusting margins.} +\typeout{Now adjusting margins (\the\@marginmode).} \ifcase\@marginmode % marginmode 0 \AtEndOfClass{% @@ -5581,16 +5602,21 @@ computational complexity % \begin{macro}{\label} % Modify \texttt{\string\label} to allow to store also the bare % value of the label. +% \changes{v2.20}{2012/03/01}{Modified bare part to allow +% \Lpackage{hyperref} to change \cs{label} before we use change it +% for \cs{bare}.} % \begin{macrocode} \if@bare -\let\relabel@label\label -\def\label#1{\ifx\@currentlabel\@bare@currentlabel\else - {\let\@currentlabel\@bare@currentlabel\relabel@label{bare@#1}}% - \fi\relabel@label{#1}} +\def\relabel@label#1{\ifx\@currentlabel\@bare@currentlabel\else + {\let\@currentlabel\@bare@currentlabel\relabel@olabel{bare@#1}}% + \fi\relabel@olabel{#1}} +\def\init@bare{\if@bare\let\relabel@olabel\label\let\label\relabel@label\fi} +\AtBeginDocument{\init@bare}% \def\bare\ref#1{\@ifundefined{r@bare@#1}{\ref{#1}}{\ref{bare@#1}}} \else \def\bare{\PackageWarning{relabel}{\string\bare\space disabled! (Use option bare to enable it.)}} +\def\init@bare{} \fi \let\@bare@currentlabel\@currentlabel % \end{macrocode} @@ -6851,10 +6877,13 @@ computational complexity % argument 2, each argument is interpreted as a \meta{subkey}. The % current reference will be empty if the range is known to be % trivial. +% \changes{v2.20}{2011/10/06}{Removed bug when namedalgorithm has +% \cs{index} in its title, Michael N{\"{u}}sken, Bonn} % \begin{macrocode} \newif\if@trivialrange \newcommand{\refsetrange}[2]{% {\shortlabeltrue + \let\index\relax \let\@tempa\relax \protected@edef\@tempa{% \csname r@\the\algorithmmasterkey-#1\endcsname}% |