diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:59 +0000 |
commit | 37692430a0ed6d4bc09b544c26cbc8ba41255965 (patch) | |
tree | fce78f8c376af10afb0d10fd1ffcd90f8b2d39bc /Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx | |
parent | fb8881a67bb8f860de4fed71bbdb2b2b7c39ac89 (diff) |
thmtools 24 (18may10)
git-svn-id: svn://tug.org/texlive/trunk@18359 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx b/Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx new file mode 100644 index 00000000000..0e62613fa6d --- /dev/null +++ b/Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx @@ -0,0 +1,123 @@ +% \iffalse meta-comment +% +% Copyright (C) 2010 by Ulrich M. Schwarz +% See file COPYING for more details. +%\fi +% +%\iffalse (hide this from DocInput) +%<*ntheorem> +%\fi +% \begin{macrocode} + +% actually, ntheorem's so-called style is nothing like a style at all... +\def\thmt@declaretheoremstyle@setup{} +\def\thmt@declaretheoremstyle#1{% + \ifcsname th@#1\endcsname\else + \@xa\let\csname th@#1\endcsname\th@plain + \fi +} + +\def\thmt@notsupported#1#2{% + \PackageWarning{thmtools}{Key `#2' not supported by #1}{}% +} + +\define@key{thmstyle}{spaceabove}{% + \setlength\theorempreskipamount{#1}% +} +\define@key{thmstyle}{spacebelow}{% + \setlength\theorempostskipamount{#1}% +} +\define@key{thmstyle}{headfont}{% + \theoremheaderfont{#1}% +} +\define@key{thmstyle}{bodyfont}{% + \theorembodyfont{#1}% +} +% not supported in ntheorem. +\define@key{thmstyle}{notefont}{% + \thmt@notsupported{ntheorem}{notefont}% +} +\define@key{thmstyle}{headpunct}{% + \theoremseparator{#1}% +} +% not supported in ntheorem. +\define@key{thmstyle}{notebraces}{% + \thmt@notsupported{ntheorem}{notebraces}% +} +\define@key{thmstyle}{break}{% + \theoremstyle{break}% +} +% not supported in ntheorem... +\define@key{thmstyle}{postheadspace}{% + %\def\thmt@style@postheadspace{#1}% + \@xa\g@addto@macro\csname thmt@style \thmt@style @defaultkeys\endcsname{% + postheadhook={\hspace{-\labelsep}\hspace*{#1}},% + }% +} + +% not supported in ntheorem +\define@key{thmstyle}{headindent}{% + \thmt@notsupported{ntheorem}{headindent}% +} +% sorry, only style, not def with ntheorem. +\define@key{thmstyle}{qed}[\qedsymbol]{% + \theoremsymbol{#1}% +} + +\let\@upn=\textup +\define@key{thmstyle}{headformat}[]{% + \def\thmt@tmp{#1}% + \@onelevel@sanitize\thmt@tmp + %\tracingall + \ifcsname thmt@headstyle@\thmt@tmp\endcsname + \newtheoremstyle{\thmt@style}{% + \item[\hskip\labelsep\theorem@headerfont% + \def\NAME{\theorem@headerfont ####1}% + \def\NUMBER{\bgroup\@upn{####2}\egroup}% + \def\NOTE{}% + \csname thmt@headstyle@#1\endcsname + \theorem@separator + ] + }{% + \item[\hskip\labelsep\theorem@headerfont% + \def\NAME{\theorem@headerfont ####1}% + \def\NUMBER{\bgroup\@upn{####2}\egroup}% + \def\NOTE{\if=####3=\else\bgroup\ (####3)\egroup\fi}% + \csname thmt@headstyle@#1\endcsname + \theorem@separator + ] + } + \else + \newtheoremstyle{\thmt@style}{% + \item[\hskip\labelsep\theorem@headerfont% + \def\NAME{\the\thm@headfont ####1}% + \def\NUMBER{\bgroup\@upn{####2}\egroup}% + \def\NOTE{}% + #1% + \theorem@separator + ] + }{% + \item[\hskip\labelsep\theorem@headerfont% + \def\NAME{\the\thm@headfont ####1}% + \def\NUMBER{\bgroup\@upn{####2}\egroup}% + \def\NOTE{\if=####3=\else\bgroup\ (####3)\egroup\fi}% + #1% + \theorem@separator + ] + } + \fi +} + +\def\thmt@headstyle@margin{% + \makebox[0pt][r]{\NUMBER\ }\NAME\NOTE +} +\def\thmt@headstyle@swapnumber{% + \NUMBER\ \NAME\NOTE +} + + + +% \end{macrocode} +%\iffalse (hide this from DocInput) +%</ntheorem> +%\fi |