diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-09 22:20:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-09 22:20:52 +0000 |
commit | ade959d5f7adbbef896062a4245725f1369e1b1f (patch) | |
tree | 6890ee291e0535e02d4ff77abd23a5cf802e4f76 /Master/texmf-dist/tex/latex/thmtools | |
parent | 4b653b7509fc5880c21ce05b56562dda6e8e12f2 (diff) |
thmtools update (9jun10)
git-svn-id: svn://tug.org/texlive/trunk@18850 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thmtools')
14 files changed, 175 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty index 76b8d150a11..89ca277e187 100644 --- a/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty +++ b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {aliasctr}[2010/05/18 v24] +\ProvidesPackage {aliasctr}[2010/06/08 v35] \def\aliasctr@f@llow#1#2\@nil#3{% \ifx#1\@elt \noexpand #3% diff --git a/Master/texmf-dist/tex/latex/thmtools/parseargs.sty b/Master/texmf-dist/tex/latex/thmtools/parseargs.sty index 1216cebb1ad..eeb6af8e3f3 100644 --- a/Master/texmf-dist/tex/latex/thmtools/parseargs.sty +++ b/Master/texmf-dist/tex/latex/thmtools/parseargs.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {parseargs}[2010/05/18 v24] +\ProvidesPackage {parseargs}[2010/06/08 v35] \newtoks\@parsespec \def\parse@endquark{\parse@endquark} diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty b/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty index a96470cc88b..954ce933813 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-amsthm}[2010/05/18 v24] +\ProvidesPackage {thm-amsthm}[2010/06/08 v35] \define@key{thmstyle}{spaceabove}{% \def\thmt@style@spaceabove{#1}% } @@ -136,6 +136,19 @@ }% } +\def\thmt@amsthmlistbreakhack{% + \leavevmode + \vspace{-\baselineskip}% + \par + \everypar{\setbox\z@\lastbox\everypar{}}% +} + +\define@key{thmuse}{listhack}[\relax]{% + \addtotheorempostheadhook[local]{% + \thmt@amsthmlistbreakhack + }% +} + \endinput %% %% End of file `thm-amsthm.sty'. diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty index 73a682d4e39..99b80416d94 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-autoref}[2010/05/18 v24] +\ProvidesPackage {thm-autoref}[2010/06/08 v35] \RequirePackage{thm-patch, aliasctr, parseargs, keyval} @@ -95,10 +95,22 @@ \AtBeginDocument{% \@ifpackageloaded{nameref}{% \addtotheorempostheadhook{% - \expandafter\NR@gettitle\expandafter{\thmt@optarg}% + \expandafter\NR@gettitle\expandafter{\thmt@shortoptarg}% }}{} } +\AtBeginDocument{% + \@ifpackageloaded{cleveref}{% + \@ifpackagelater{cleveref}{2010/04/30}{% + % OK, new enough + }{% + \PackageWarningNoLine{thmtools}{% + Your version of cleveref is too old!\MessageBreak + Update to version 0.16.1 or later% + } + } + }{} +} \endinput %% %% End of file `thm-autoref.sty'. diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty b/Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty index c690a3c6027..04b034e4939 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty @@ -20,12 +20,14 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-beamer}[2010/05/18 v24] +\ProvidesPackage {thm-beamer}[2010/06/08 v35] \newif\ifthmt@hasoverlay \def\thmt@parsetheoremargs#1{% \parse{% {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}% - {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}% + {\parseOpt[]{\def\thmt@optarg{##1}}{% + \let\thmt@shortoptarg\@empty + \let\thmt@optarg\@empty}}% {\ifthmt@hasoverlay\expandafter\@gobble\else\expandafter\@firstofone\fi {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}% }% diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty index d984ebdee4c..47b0808b1ce 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty @@ -20,12 +20,52 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-kv}[2010/05/18 v24] +\ProvidesPackage {thm-kv}[2010/06/08 v35] \let\@xa\expandafter \let\@nx\noexpand \RequirePackage{keyval,kvsetkeys,thm-patch} +\newcommand\thmt@mkignoringkeyhandler[1]{% + \kv@set@family@handler{#1}{% + \thmt@debug{Key `##1' with value `##2' ignored by #1.}% + }% +} +\newcommand\thmt@mkextendingkeyhandler[3]{% + \kv@set@family@handler{#1}{% + \thmt@selfextendingkeyhandler{#1}{#2}{#3}% + {##1}{##2}% + }% +} + +\newcommand\thmt@selfextendingkeyhandler[5]{% + % #1: family + % #2: prefix for file + % #3: key hint for error + % #4: actual key + % #5: actual value + \IfFileExists{#2-#4.sty}{% + \PackageInfo{thmtools}% + {Automatically pulling in `#2-#4'}% + \RequirePackage{#2-#4}% + \ifcsname KV@#1@#4\endcsname + \csname KV@#1@#4\endcsname{#5}% + \else + \PackageError{thmtools}% + {#3 `#4' not known} + {I don't know what that key does.\MessageBreak + I've even loaded the file `#2-#4.sty', but that didn't help. + }% + \fi + }{% + \PackageError{thmtools}% + {#3 `#4' not known} + {I don't know what that key does by myself,\MessageBreak + and no file `#2-#4.sty' to tell me seems to exist. + }% + }% +} + \newif\if@thmt@firstkeyset \def\thmt@trytwice{% @@ -94,7 +134,7 @@ \csname thmt@style #1@defaultkeys\endcsname}% \fi } -\kv@set@family@handler{thmdef0}{}% ignore everything else. +\thmt@mkignoringkeyhandler{thmdef0} \def\thmt@setstyle#1{% \PackageWarning{thm-kv}{% @@ -157,6 +197,7 @@ \kvsetkeys{thmdef0}{#1}% \kvsetkeys{thmdef}{#1}% } +\@onlypreamble\declaretheorem \providecommand\thmt@quark{\thmt@quark} @@ -167,17 +208,27 @@ \ifx\thmt@optarg\@empty\else \@xa\thmt@garbleoptarg\@xa{\thmt@optarg}\fi }% + +\newif\ifthmt@thmuse@iskv + \providecommand\thmt@garbleoptarg[1]{% - \thmt@splitopt#1=\thmt@quark - \ifcsname KV@thmuse@\thmt@tmpkey\endcsname - % looks like a keyval-style argument - \PackageInfo{thmtools}{kv-style argument to `\thmt@envname'} - %\typeout{dbg: new-style arg `#1'}% - \let\thmt@newoptarg\@empty - \kvsetkeys{thmuse}{#1}% - \let\thmt@optarg\thmt@newoptarg - %\else - % \typeout{dbg: old-style arg `#1'}% + \thmt@thmuse@iskvfalse + \def\thmt@newoptarg{\@gobble}% + \def\thmt@newoptargextra{}% + \def\thmt@warn@unusedkeys{}% + \@for\thmt@fam:=\thmt@thmuse@families\do{% + \kvsetkeys{\thmt@fam}{#1}% + }% + \ifthmt@thmuse@iskv + \protected@edef\thmt@optarg{% + \@xa\thmt@newoptarg + \thmt@newoptargextra\@empty + }% + \protected@edef\thmt@shortoptarg{\thmt@newoptarg\@empty}% + \thmt@warn@unusedkeys + \else + \def\thmt@optarg{#1}% + \def\thmt@shortoptarg{#1}% \fi } \def\thmt@splitopt#1=#2\thmt@quark{% @@ -188,13 +239,31 @@ \@onelevel@sanitize\thmt@tmpkey } -\define@key{thmuse}{label}{% - %\typeout{setting label: #1}% +\def\thmt@thmuse@families{thm@track@keys} + +\kv@set@family@handler{thm@track@keys}{% + \@onelevel@sanitize\kv@key + \@namedef{thmt@unusedkey@\kv@key}{% + \PackageWarning{thmtools}{Unused key `#1'}% + }% + \@xa\g@addto@macro\@xa\thmt@warn@unusedkeys\@xa{% + \csname thmt@unusedkey@\kv@key\endcsname + } +} + +\def\thmt@define@thmuse@key#1#2{% + \g@addto@macro\thmt@thmuse@families{,#1}% + \define@key{#1}{#1}{\thmt@thmuse@iskvtrue + \@namedef{thmt@unusedkey@#1}{}% + #2}% + \thmt@mkignoringkeyhandler{#1}% +} + +\thmt@define@thmuse@key{label}{% \addtotheorempostheadhook[local]{\label{#1}}% } -\define@key{thmuse}{name}{% - %\typeout{optarg: #1}% - \def\thmt@newoptarg{#1}% +\thmt@define@thmuse@key{name}{% + \def\thmt@newoptarg{#1\@iden}% } \def\thmt@declaretheoremstyle@setup{} @@ -208,6 +277,7 @@ \kvsetkeys{thmstyle}{#1}% \thmt@declaretheoremstyle{#2}% } +\@onlypreamble\declaretheoremstyle \kv@set@family@handler{thmstyle}{% \PackageInfo{thmtools}{% diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty b/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty index e5e62bfb163..a302e139a0f 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-listof}[2010/05/18 v24] +\ProvidesPackage {thm-listof}[2010/06/08 v35] \let\@xa=\expandafter \let\@nx=\noexpand \RequirePackage{thm-patch,keyval,kvsetkeys} @@ -47,6 +47,11 @@ \def\contentsline##1{% \csname thmt@contentsline@##1\endcsname{##1}% }% + \@for\thmt@envname:=\thmt@allenvs\do{% + \@xa\protected@edef\csname l@\thmt@envname\endcsname{% CHECK: why p@edef? + \@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}% + }% + }% \let\thref@starttoc\@starttoc \def\@starttoc##1{\thref@starttoc{loe}}% % new hack: to allow multiple calls, we defer the opening of the @@ -62,7 +67,8 @@ }{}% \fi }% - \expandafter\listoffigures + %\expandafter + \listoffigures \egroup } @@ -88,13 +94,13 @@ \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\numberline{\protect\let\protect\autodot\protect\@empty}% \thmt@thmname - \ifx\@empty\thmt@optarg\else\protect\thmtformatoptarg{\thmt@optarg}\fi + \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \else \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\numberline{\csname the\thmt@envname\endcsname}% \thmt@thmname - \ifx\@empty\thmt@optarg\else\protect\thmtformatoptarg{\thmt@optarg}\fi + \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \fi \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{% diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty b/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty index 8c5e6e80607..f505ddc2691 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-ntheorem}[2010/05/18 v24] +\ProvidesPackage {thm-ntheorem}[2010/06/08 v35] \def\thmt@declaretheoremstyle@setup{} \def\thmt@declaretheoremstyle#1{% @@ -68,7 +68,13 @@ \thmt@notsupported{ntheorem}{headindent}% } \define@key{thmstyle}{qed}[\qedsymbol]{% - \theoremsymbol{#1}% + \@ifpackagewith{ntheorem}{thmmarks}{% + \theoremsymbol{#1}% + }{% + \thmt@notsupported + {ntheorem without thmmarks option}% + {headindent}% + }% } \let\@upn=\textup diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty index 4d883956bb4..831e32e3459 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-patch}[2010/05/18 v24] +\ProvidesPackage {thm-patch}[2010/06/08 v35] \RequirePackage{parseargs} \newif\ifthmt@isstarred @@ -29,7 +29,9 @@ \def\thmt@parsetheoremargs#1{% \parse{% - {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}% + {\parseOpt[]{\def\thmt@optarg{##1}}{% + \let\thmt@shortoptarg\@empty + \let\thmt@optarg\@empty}}% {% \def\thmt@local@preheadhook{}% \def\thmt@local@postheadhook{}% @@ -42,9 +44,11 @@ \ifx\@empty\thmt@optarg\else [{\thmt@optarg}]\fi }% \csname thmt@original@#1\@xa\endcsname\tmp@args - \thmt@local@postheadhook + %%moved down: \thmt@local@postheadhook + %% (give postheadhooks a chance to re-set nameref data) \csname thmt@#1@postheadhook\endcsname \thmt@generic@postheadhook + \thmt@local@postheadhook \let\@parsecmd\@empty }% }% diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty index bac42e29184..7df9032c04a 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thm-restate}[2010/05/18 v24] +\ProvidesPackage {thm-restate}[2010/06/08 v35] \let\@xa\expandafter \let\@nx\noexpand diff --git a/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty b/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty index c20579eac50..fb7c702151f 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thmdef-shaded}[2010/05/18 v24] +\ProvidesPackage {thmdef-shaded}[2010/06/08 v35] \define@key{thmdef}{shaded}[{}]{% \thmt@trytwice{}{% \RequirePackage{shadethm}% @@ -36,7 +36,6 @@ \define@key{thmt@shade}{rulecolor}{\thmt@definecolor{shaderulecolor}{#1}} \define@key{thmt@shade}{rulewidth}{\setlength\shadeboxrule{#1}} \define@key{thmt@shade}{margin}{\setlength\shadeboxsep{#1}} - \def\thmt@colorlet#1#2{% %\typeout{don't know how to let color `#1' be like color `#2'!}% \@xa\let\csname\string\color@#1\@xa\endcsname @@ -48,7 +47,6 @@ \let\thmt@colorlet\colorlet \fi } - \def\thmt@drop@relax#1\relax{} \def\thmt@definecolor#1#2{% \thmt@def@color{#1}#2\thmt@drop@relax diff --git a/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty b/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty index cc2e82cd1af..bc343754c16 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty @@ -20,8 +20,9 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thmdef-thmbox}[2010/05/18 v24] +\ProvidesPackage {thmdef-thmbox}[2010/06/08 v35] \define@key{thmdef}{thmbox}[L]{% + \thmt@trytwice{% \let\oldproof=\proof \let\oldendproof=\endproof \let\oldexample=\example @@ -32,6 +33,7 @@ \let\example=\oldexample \let\endexample=\oldendexample \def\thmt@theoremdefiner{\newboxtheorem[#1]}% + }{}% }% \endinput %% diff --git a/Master/texmf-dist/tex/latex/thmtools/thmtools.sty b/Master/texmf-dist/tex/latex/thmtools/thmtools.sty index e0c56a950bf..3d7da9e41bf 100644 --- a/Master/texmf-dist/tex/latex/thmtools/thmtools.sty +++ b/Master/texmf-dist/tex/latex/thmtools/thmtools.sty @@ -20,51 +20,46 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {thmtools}[2010/05/18 v24] +\ProvidesPackage {thmtools}[2010/06/08 v35] +\DeclareOption{debug}{% + \def\thmt@debug{\typeout}% +} \let\@xa\expandafter \let\@nx\noexpand +\def\thmt@debug{\@gobble} \def\thmt@quark{\thmt@quark} \newtoks\thmt@toks +\ProcessOptions\relax + \newcounter{thmt@dummyctr}% \def\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}% \def\thethmt@dummyctr{}% -\newcommand\thmt@mkextendingkeyhandler[3]{% - \kv@set@family@handler{#1}{% - \IfFileExists{#2-##1.sty}{% - \PackageInfo{thmtools}% - {Automatically pulling in `#2-##1'}% - \RequirePackage{#2-##1}% - \ifcsname KV@#1@##1\endcsname - \csname KV@#1@##1\endcsname{##2}% - \else - \PackageError{thmtools}% - {#3 `##1' not known} - {I don't know what that key does.\MessageBreak - I've even loaded the file `#2-##1.sty', but that didn't help. - }% - \fi - }{% - \PackageError{thmtools}% - {#3 `##1' not known} - {I don't know what that key does by myself,\MessageBreak - and no file `#2-##1.sty' to tell me seems to exist. - }% - }% - } -} - \RequirePackage{thm-patch, thm-kv, thm-autoref, thm-listof, thm-restate} \@ifpackageloaded{amsthm}{% \RequirePackage{thm-amsthm} -}{} +}{% + \AtBeginDocument{% + \@ifpackageloaded{amsthm}{% + \PackageWarningNoLine{thmtools}{% + amsthm loaded after thmtools + }{}% + }}% +} \@ifpackageloaded{ntheorem}{% \RequirePackage{thm-ntheorem} -}{} +}{% + \AtBeginDocument{% + \@ifpackageloaded{ntheorem}{% + \PackageWarningNoLine{thmtools}{% + ntheorem loaded after thmtools + }{}% + }}% +} \@ifclassloaded{beamer}{% \RequirePackage{thm-beamer} }{} diff --git a/Master/texmf-dist/tex/latex/thmtools/unique.sty b/Master/texmf-dist/tex/latex/thmtools/unique.sty index fa804ce6602..378dd6dce8b 100644 --- a/Master/texmf-dist/tex/latex/thmtools/unique.sty +++ b/Master/texmf-dist/tex/latex/thmtools/unique.sty @@ -20,7 +20,7 @@ %% %% \NeedsTeXFormat {LaTeX2e} -\ProvidesPackage {unique}[2010/05/18 v24] +\ProvidesPackage {unique}[2010/06/08 v35] \DeclareOption{unq}{% \newwrite\uniq@channel |