summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-19 23:24:59 +0000
committerKarl Berry <karl@freefriends.org>2010-05-19 23:24:59 +0000
commit37692430a0ed6d4bc09b544c26cbc8ba41255965 (patch)
treefce78f8c376af10afb0d10fd1ffcd90f8b2d39bc /Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty
parentfb8881a67bb8f860de4fed71bbdb2b2b7c39ac89 (diff)
thmtools 24 (18may10)
git-svn-id: svn://tug.org/texlive/trunk@18359 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty')
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty141
1 files changed, 141 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty b/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty
new file mode 100644
index 00000000000..a96470cc88b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty
@@ -0,0 +1,141 @@
+%%
+%% This is file `thm-amsthm.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-amsthm.dtx (with options: `amsthm')
+%% This is a generated file.
+%%
+%% This file is part of the `thmtools' package.
+%% The `thmtools' package has the LPPL maintenance status: maintained.
+%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
+%%
+%% Copyright (C) 2008-2010 by Ulrich M. Schwarz.
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, version 1.3a.
+%% This version is obtainable at
+%% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%%
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-amsthm}[2010/05/18 v24]
+\define@key{thmstyle}{spaceabove}{%
+ \def\thmt@style@spaceabove{#1}%
+}
+\define@key{thmstyle}{spacebelow}{%
+ \def\thmt@style@spacebelow{#1}%
+}
+\define@key{thmstyle}{headfont}{%
+ \def\thmt@style@headfont{#1}%
+}
+\define@key{thmstyle}{bodyfont}{%
+ \def\thmt@style@bodyfont{#1}%
+}
+\define@key{thmstyle}{notefont}{%
+ \def\thmt@style@notefont{#1}%
+}
+\define@key{thmstyle}{headpunct}{%
+ \def\thmt@style@headpunct{#1}%
+}
+\define@key{thmstyle}{notebraces}{%
+ \def\thmt@style@notebraces{\thmt@embrace#1}%
+}
+\define@key{thmstyle}{break}[]{%
+ \def\thmt@style@postheadspace{\newline}%
+}
+\define@key{thmstyle}{postheadspace}{%
+ \def\thmt@style@postheadspace{#1}%
+}
+\define@key{thmstyle}{headindent}{%
+ \def\thmt@style@headindent{#1}%
+}
+
+\newtoks\thmt@style@headstyle
+\define@key{thmstyle}{headformat}[]{%
+ \thmt@style@headstyle{%
+ \def\NAME{\the\thm@headfont ##1}%
+ \def\NUMBER{\bgroup\@upn{##2}\egroup}%
+ \def\NOTE{\if=##3=\else\bgroup\ \the\thm@notefont(##3)\egroup\fi}%
+ }%
+ \def\thmt@tmp{#1}%
+ \@onelevel@sanitize\thmt@tmp
+ %\tracingall
+ \ifcsname thmt@headstyle@\thmt@tmp\endcsname
+ \thmt@style@headstyle\@xa{%
+ \the\thmt@style@headstyle
+ \csname thmt@headstyle@#1\endcsname
+ }%
+ \else
+ \thmt@style@headstyle\@xa{%
+ \the\thmt@style@headstyle
+ #1
+ }%
+ \fi
+ %\showthe\thmt@style@headstyle
+}
+\def\thmt@headstyle@margin{%
+ \makebox[0pt][r]{\NUMBER\ }\NAME\NOTE
+}
+\def\thmt@headstyle@swapnumber{%
+ \NUMBER\ \NAME\NOTE
+}
+
+\def\thmt@embrace#1#2(#3){#1#3#2}
+
+\def\thmt@declaretheoremstyle@setup{%
+ \let\thmt@style@notebraces\@empty%
+ \thmt@style@headstyle{}%
+ \kvsetkeys{thmstyle}{%
+ spaceabove=3pt,
+ spacebelow=3pt,
+ headfont=\bfseries,
+ bodyfont=\normalfont,
+ headpunct={.},
+ postheadspace={ },
+ headindent={},
+ notefont={\fontseries\mddefault\upshape}
+ }%
+}
+\def\thmt@declaretheoremstyle#1{%
+ %\show\thmt@style@spaceabove
+ \thmt@toks{\newtheoremstyle{#1}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@spaceabove}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@spacebelow}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@bodyfont}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@headindent}}% indent1 FIXME
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@headfont}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@headpunct}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\thmt@style@postheadspace}}%
+ \thmt@toks\@xa\@xa\@xa{\@xa\the\@xa\thmt@toks\@xa{\the\thmt@style@headstyle}}% headspec FIXME
+ \the\thmt@toks
+ %1 Indent amount: empty = no indent, \parindent = normal paragraph indent
+ %2 Space after theorem head: { } = normal interword space; \newline = linebreak
+ %% BUGFIX: amsthm ignores notefont setting altogether:
+ \thmt@toks\@xa\@xa\@xa{\csname th@#1\endcsname}%
+ \thmt@toks
+ \@xa\@xa\@xa\@xa\@xa\@xa\@xa{%
+ \@xa\@xa\@xa\@xa\@xa\@xa\@xa\thm@notefont
+ \@xa\@xa\@xa\@xa\@xa\@xa\@xa{%
+ \@xa\@xa\@xa\thmt@style@notefont
+ \@xa\thmt@style@notebraces
+ \@xa}\the\thmt@toks}%
+ \@xa\def\csname th@#1\@xa\endcsname\@xa{\the\thmt@toks}%
+}
+
+\define@key{thmdef}{qed}[\qedsymbol]{%
+ \thmt@trytwice{}{%
+ \addtotheorempostheadhook[\thmt@envname]{%
+ \pushQED{\qed}%
+ }%
+ \addtotheoremprefoothook[\thmt@envname]{%
+ \protected@edef\qedsymbol{#1}%
+ \popQED
+ }%
+ }%
+}
+
+\endinput
+%%
+%% End of file `thm-amsthm.sty'.