diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-06 22:19:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-06 22:19:15 +0000 |
commit | 66916111abcb055475dec91a00495559d341472a (patch) | |
tree | 219674127f4100ff14fdb814c97f5dc629b4bd62 /Master/texmf-dist/tex/latex/ntheorem | |
parent | b6497536e6cd73690c11f64736a30f2a9fc3fc4c (diff) |
ntheorem (6sep12)
git-svn-id: svn://tug.org/texlive/trunk@27609 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ntheorem')
-rw-r--r-- | Master/texmf-dist/tex/latex/ntheorem/ntheorem.std | 7 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ntheorem/ntheorem.sty | 181 |
2 files changed, 149 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/ntheorem/ntheorem.std b/Master/texmf-dist/tex/latex/ntheorem/ntheorem.std index 43da68568db..6f086419a0c 100644 --- a/Master/texmf-dist/tex/latex/ntheorem/ntheorem.std +++ b/Master/texmf-dist/tex/latex/ntheorem/ntheorem.std @@ -20,9 +20,9 @@ %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) -\def\filedate{2011/02/16} -\def\docdate{2011/02/16} -\def\fileversion{1.31} +\def\filedate{2011/08/15} +\def\docdate{2011/08/15} +\def\fileversion{1.33} \def\basename{ntheorem} %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.2 @@ -46,6 +46,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} + \theoremnumbering{arabic} \theoremstyle{plain} \RequirePackage{latexsym} diff --git a/Master/texmf-dist/tex/latex/ntheorem/ntheorem.sty b/Master/texmf-dist/tex/latex/ntheorem/ntheorem.sty index 4f60c1f3320..385bfa94b8d 100644 --- a/Master/texmf-dist/tex/latex/ntheorem/ntheorem.sty +++ b/Master/texmf-dist/tex/latex/ntheorem/ntheorem.sty @@ -20,9 +20,9 @@ %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) -\def\filedate{2011/02/16} -\def\docdate{2011/02/16} -\def\fileversion{1.31} +\def\filedate{2011/08/15} +\def\docdate{2011/08/15} +\def\fileversion{1.33} \def\basename{ntheorem} %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.2 @@ -46,11 +46,13 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} + \typeout{Style `\basename', Version \fileversion\space <\filedate>} \ProvidesPackage{ntheorem}[\filedate \space\fileversion] \RequirePackage{ifthen}% \newif\if@thmmarks\@thmmarksfalse \newif\if@thref\@threffalse +\newif\ifthm@inframe\thm@inframefalse \newif\ifthm@tempif \DeclareOption{thmmarks}{%********************************* \PackageInfo{\basename}{Option `thmmarks' loaded}% @@ -160,11 +162,14 @@ \gdef\NoEndMark{\global\setendmarkfalse} \gdef\qed{\expandafter\def\csname \InTheoType Symbol\endcsname {\the\qedsymbol}}% -\gdef\PotEndMark#1{\SetEndMark{\InTheoType}{#1}}% -\gdef\SetEndMark#1#2{% +\gdef\PotEndMark#1{ + \@ifnextchar[%] + {\PotEndMark@opt{#1}}{\SetEndMark{\InTheoType}{#1}{\relax}}}% +\gdef\PotEndMark@opt#1[#2]{\SetEndMark{\InTheoType}{#1}{#2}}% +\gdef\SetEndMark#1#2#3{% \stepcounter{end#1ctr}% \@ifundefined{mark\thm@romannum{curr#1ctr}#1\thm@romannum{end#1ctr}}% - {\relax}% + {#3}% {#2{\csname mark\thm@romannum{curr#1ctr}#1\thm@romannum{end#1ctr}\endcsname \ifdim\rightmargin>\z@\hskip-\rightmargin\fi \hbox to 0cm{}}}}% @@ -281,7 +286,7 @@ \expandafter\ifx\csname r@#1@type\endcsname\None \PackageWarning{\basename}{thref: Reference Type of `#1' on page \thepage \space undefined}\G@refundefinedtrue - \else\csname r@#1@type\endcsname~\fi% + \else\csname r@#1@type\endcsname~\fi \expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} \newcommand\org@testdef{} @@ -378,7 +383,7 @@ \gdef\df@tag{\hbox to \displaywidth{\hss\PotEndMark{\maketag@@@}}}% \else - \gdef\df@tag{\PotEndMark{\maketag@@@}}% + \gdef\df@tag{\PotEndMark{\maketag@@@}[\ifhmode\else\hbox to .1pt{}\fi]}% \fi} \newdimen{\tagwidth} \gdef\SetTagPlusEndMark{% @@ -392,9 +397,13 @@ \gdef\maketag@@@##1{\hbox{\m@th\normalfont##1% \llap{\hss\PotEndMark{\raisebox{-1.3em}}}}}% \fi} -\let\ams@@maketag@@@\maketag@@@ -\gdef\tagform@#1{% - \ams@@maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} +\let\th@ams@@maketag@@@\maketag@@@ +\gdef\th@ams@tagopen{(} +\gdef\th@ams@tagclose{)} +\gdef\th@ams@tagform@#1{% + \th@ams@@maketag@@@{\th@ams@tagopen\ignorespaces#1% + \unskip\@@italiccorr\th@ams@tagclose}} +\gdef\eqref#1{\textup{\th@ams@tagform@{\ref{#1}}}} \gdef\RestoreTags{% \global\let\maketag@@@=\Old@maketag@@@ \global\let\df@tag=\Old@df@tag} @@ -470,20 +479,22 @@ \global\@eqnswfalse } \renewenvironment{equation}{% - \edef\reset@equation{% - \@nx\setcounter{equation}{\number\c@equation}}% - \refstepcounter{equation}% + \incr@eqnum + \mathdisplay@push \st@rredfalse \global\@eqnswtrue \mathdisplay{equation}% }{% \endmathdisplay{equation}% + \mathdisplay@pop \ignorespacesafterend } \renewenvironment{equation*}{% + \mathdisplay@push \st@rredtrue \global\@eqnswfalse \mathdisplay{equation*}% }{% \endmathdisplay{equation*}% + \mathdisplay@pop \ignorespacesafterend } \fi @@ -574,13 +585,46 @@ \newskip\theorempostskipamount \newskip\theoremframepreskipamount \newskip\theoremframepostskipamount +\newskip\theoreminframepreskipamount +\newskip\theoreminframepostskipamount \global\theorempreskipamount\topsep \global\theorempostskipamount\topsep -\global\theoremframepreskipamount0pt -\global\theoremframepostskipamount0pt +\global\theoremframepreskipamount\topsep +\global\theoremframepostskipamount\topsep +\global\theoreminframepreskipamount\topsep +\global\theoreminframepostskipamount\topsep +\newif\ifuse@newframeskips\global\use@newframeskipsfalse +\newtoks\theorem@preskip +\global\theorem@preskip{\topsep} +\def\theorempreskip#1{% + \theorem@preskip{#1}\global\use@newframeskipstrue} +\newtoks\theorem@postskip +\global\theorem@postskip{\topsep} +\def\theorempostskip#1{% + \theorem@postskip{#1}\global\use@newframeskipstrue} +\newtoks\theorem@framepreskip +\global\theorem@framepreskip{\topsep} +\def\theoremframepreskip#1{% + \theorem@framepreskip{#1}\global\use@newframeskipstrue} +\newtoks\theorem@framepostskip +\global\theorem@framepostskip{\topsep} +\def\theoremframepostskip#1{% + \theorem@framepostskip{#1}\global\use@newframeskipstrue} +\newtoks\theorem@inframepreskip +\global\theorem@inframepreskip{\topsep} +\def\theoreminframepreskip#1{% + \theorem@inframepreskip{#1}\global\use@newframeskipstrue} +\newtoks\theorem@inframepostskip +\global\theorem@inframepostskip{\topsep} +\def\theoreminframepostskip#1{% + \theorem@inframepostskip{#1}\global\use@newframeskipstrue} + \newdimen\theoremindent \global\theoremindent0cm \newdimen\theorem@indent +\newdimen\theoremrightindent +\global\theoremrightindent0cm +\newdimen\theorem@rightindent \newtoks\theoremheaderfont \global\theoremheaderfont{\normalfont\bfseries} \def\theorem@headerfont{\normalfont\bfseries} @@ -601,14 +645,23 @@ \gdef\theoremclass#1{% \csname th@class@#1\endcsname} \gdef\th@class@LaTeX{% - \theoremstyle{plain} - \theoremheaderfont{\normalfont\bfseries} - \theorembodyfont{\itshape} - \theoremseparator{} - \theoremprework{\relax} - \theorempostwork{\relax} + \theoremstyle{plain}% + \theoremheaderfont{\normalfont\bfseries}% + \theorembodyfont{\itshape}% + \theoremseparator{}% + \theoremprework{\relax}% + \theorempostwork{\relax}% + \ifuse@newframeskips + \theorempreskip{0cm}% + \theorempostskip{0cm}% + \theoremframepreskip{0cm}% + \theoremframepostskip{0cm}% + \theoreminframepreskip{0cm}% + \theoreminframepostskip{0cm}% + \fi \theoremindent0cm - \theoremnumbering{arabic} + \theoremrightindent0cm + \theoremnumbering{arabic}% \theoremsymbol{}} \newtoks\qedsymbol \global\qedsymbol{} @@ -630,13 +683,14 @@ \def\@opargbegintheorem##1##2##3{% \item[\hskip\labelsep \theorem@headerfont ##1\ (##3).]}} \gdef\th@definition{% - \th@plain\def\theorem@headerfont{\normalfont\bfseries}\itshape} + \th@plain\def\theorem@headerfont{\normalfont\bfseries}\normalfont} \gdef\th@nonumberdefinition{% - \th@nonumberplain\def\theorem@headerfont{\normalfont\bfseries}\itshape} + \th@nonumberplain\def\theorem@headerfont{\normalfont\bfseries}\normalfont} \gdef\th@remark{% \th@plain\def\theorem@headerfont{\itshape}\normalfont} \gdef\th@nonumberremark{% \th@nonumberplain\def\theorem@headerfont{\itshape}\normalfont} +%%% TODO skips initialisieren \newcounter{proof}% \if@thmmarks \newcounter{currproofctr}% @@ -657,6 +711,7 @@ \@thm{proof}{proof}{#1}}% {\@endtheorem} }% end of option amsthm ********************************************** +\newskip\thm@topsep \newskip\thm@topsepadd \gdef\newtheorem{% \newtheorem@i% @@ -713,8 +768,18 @@ {\the\theoremseparator}% \noexpand \def \noexpand \theorem@prework {\the\theoremprework}% + \noexpand\ifuse@newframeskips + \noexpand \theorempreskipamount \the\theorem@preskip + \noexpand \theoremframepreskipamount \the\theorem@framepreskip + \noexpand \theoreminframepreskipamount \the\theorem@inframepreskip + \noexpand \theorempostskipamount \the\theorem@postskip + \noexpand \theoremframepostskipamount \the\theorem@framepostskip + \noexpand \theoreminframepostskipamount \the\theorem@inframepostskip + \noexpand\fi \noexpand \def \noexpand \theorem@indent {\the\theoremindent}% + \noexpand \def \noexpand \theorem@rightindent + {\the\theoremrightindent}% \the \theorembodyfont \noexpand\csname th@\the \theorem@@style \endcsname}% \expandafter\xdef\csname th@class@#1\endcsname @@ -724,7 +789,16 @@ \noexpand\theoremseparator{\the\theoremseparator}% \noexpand\theoremprework{\the\theoremprework}% \noexpand\theorempostwork{\the\theorempostwork}% + \noexpand\ifuse@newframeskips + \noexpand\theorempreskip {\the\theorem@preskip}% + \noexpand\theoremframepreskip {\the\theorem@framepreskip}% + \noexpand\theoreminframepreskip {\the\theorem@inframepreskip}% + \noexpand\theorempostskip {\the\theorem@postskip}% + \noexpand\theoremframepostskip {\the\theorem@framepostskip}% + \noexpand\theoreminframepostskip {\the\theorem@inframepostskip}% + \noexpand\fi \noexpand\theoremindent\the\theoremindent% + \noexpand\theoremrightindent\the\theoremrightindent% \noexpand\theoremnumbering{\the\theoremnumbering}% \noexpand\theoremsymbol{\the\theoremsymbol}}% }}% @@ -795,12 +869,24 @@ \fi \refstepcounter{#2}% \theorem@prework - \thm@topsepadd \theorempostskipamount % cf. latex.ltx: \@trivlist - \ifvmode \advance\thm@topsepadd\partopsep\fi - \trivlist - \@topsep \theorempreskipamount - \@topsepadd \thm@topsepadd % used by \@endparenv + \trivlist % latex's \trivlist, calling latex's \@trivlist unchanged + \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist + \ifthm@inframe + \thm@topsep\theoreminframepreskipamount + \thm@topsepadd\theoreminframepostskipamount + \else + \thm@topsep\theorempreskipamount + \thm@topsepadd\theorempostskipamount + \fi + \else% oldframeskips + \thm@topsep\theorempreskipamount + \thm@topsepadd \theorempostskipamount + \ifvmode\advance\thm@topsepadd\partopsep\fi + \fi + \@topsep\thm@topsep + \@topsepadd\thm@topsepadd \advance\linewidth -\theorem@indent + \advance\linewidth -\theorem@rightindent \advance\@totalleftmargin \theorem@indent \parshape \@ne \@totalleftmargin \linewidth \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}} @@ -813,7 +899,7 @@ \expandafter\global\expandafter\def\csname#1name\endcsname{#4}% \@opargbegintheorem{#3}{\csname the#2\endcsname}{#4}% \ifx\thm@starredenv\@undefined - \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{#4}}\fi% + \thm@thmcaption{#1}{{#3}{\csname the#2\endcsname}{#4}}\fi \ignorespaces} \gdef\@endtheorem{% \endtrivlist @@ -823,8 +909,20 @@ \newtoks\shadecolor \shadecolor{gray} \let\theoremframecommand\relax +\def\thm@framedprework{% + \ifdim\lastskip <\theoremframepreskipamount + \vskip -\lastskip + \vskip\theoremframepreskipamount + \fi + \ifuse@newframeskips\vspace{-\topsep}\fi + \thm@inframetrue + \framed}% +\def\thm@framedpostwork{% + \endframed + \ifuse@newframeskips\unskip\fi + \vskip\theoremframepostskipamount}% \def\newshadedtheorem#1{% - \expandafter\global\expandafter\xdef\csname#1@shadecolor\endcsname{% + \expandafter\xdef\csname#1@shadecolor\endcsname{% \the\shadecolor}% \ifx\theoremframecommand\relax \expandafter\global\expandafter\xdef\csname#1@framecommand\endcsname{% @@ -835,15 +933,26 @@ \expandafter\global\expandafter\let\csname#1@framecommand\endcsname% \theoremframecommand% \fi + \expandafter\xdef\csname#1@@prework\endcsname{% + \the\theoremprework}% \theoremprework{% + \csname#1@@prework\endcsname \def\FrameCommand{\csname#1@framecommand\endcsname}% - \vskip\theoremframepreskipamount\framed}% - \theorempostwork{\endframed\vskip\theoremframepostskipamount}% + \thm@framedprework}% + \expandafter\xdef\csname#1@@postwork\endcsname{% + \the\theorempostwork}% + \theorempostwork{% + \thm@framedpostwork + \csname#1@@postwork\endcsname}% \newtheorem@i{#1}% } \def\newframedtheorem#1{% - \theoremprework{\vskip\theoremframepreskipamount\framed}% - \theorempostwork{\endframed\vskip\theoremframepostskipamount}% + \expandafter\xdef\csname#1@@prework\endcsname{% + \the\theoremprework}% + \theoremprework{\csname#1@@prework\endcsname\thm@framedprework}% + \expandafter\xdef\csname#1@@postwork\endcsname{% + \the\theorempostwork}% + \theorempostwork{\thm@framedpostwork\csname#1@@postwork\endcsname}% \newtheorem@i{#1}% } }% end of option framed ********************************************** |