summaryrefslogtreecommitdiff
path: root/Master
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
parentfb8881a67bb8f860de4fed71bbdb2b2b7c39ac89 (diff)
thmtools 24 (18may10)
git-svn-id: svn://tug.org/texlive/trunk@18359 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/TODO24
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/VERSION.tex1
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/thmtools-manual.tex761
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/thmtools.pdfbin98208 -> 254482 bytes
-rw-r--r--Master/texmf-dist/source/latex/thmtools/aliasctr.dtx34
-rw-r--r--Master/texmf-dist/source/latex/thmtools/parseargs.dtx69
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-amsthm.dtx140
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx127
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-beamer.dtx42
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-kv.dtx410
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-listof.dtx151
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-ntheorem.dtx123
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-patch.dtx159
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-restate.dtx83
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thmdef-shaded.dtx62
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thmdef-thmbox.dtx26
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thmtools.dtx133
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thmtools.ins14
-rw-r--r--Master/texmf-dist/source/latex/thmtools/unique.dtx45
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/aliasctr.sty7
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/parseargs.sty7
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-amsthm.sty141
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty67
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty54
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-kv.sty217
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-listof.sty96
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty127
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-patch.sty100
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-restate.sty26
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty63
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty38
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thmtools.sty56
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/unique.sty24
33 files changed, 2484 insertions, 943 deletions
diff --git a/Master/texmf-dist/doc/latex/thmtools/TODO b/Master/texmf-dist/doc/latex/thmtools/TODO
index 52e6a7de939..e35b77530a4 100644
--- a/Master/texmf-dist/doc/latex/thmtools/TODO
+++ b/Master/texmf-dist/doc/latex/thmtools/TODO
@@ -1,27 +1,3 @@
-- maybe store more counters in thm-restate? currently, you cannot re-use
- equation numbers, for example. Those all need to be carried around via
- \label or equivalent.
- FIXED in beta13
-
-- when using framed, restated version has different vertical spacing.
- Oh dear oh dear, might be some addvspace artifact?
-
- ref close-by/far-away
- complex refs
(these two are very similar)
-
-- re pre/posthooks: nesting nightmare: addposthook should _pre_pend and
- addprehook should _ap_pend. Still, check what we know about the order in which
- kv executes the options. FIXED by implementing and using \g@prependto@macro
- kv stuff might not matter: a key such as "shaded" that wants to add an
- environment should immediately do both, and user should specify keys in
- right order (i.e. "prehook, posthook, shaded" or "shaded, prehook, posthook"
- but *not* "prehook, shaded, posthook").
-
-
-- starred theorems and number in list-of-theorems
- FIXED by empty \thefoo macro for starred theorems.
-- getting envname via currenvir is unsafe for theorems (think restatable)
- FIXED by manually changing \@currenvir in restatable.
- FIXED by new hooks that def\thmt@thmname et al. in the theorem itself.
-
diff --git a/Master/texmf-dist/doc/latex/thmtools/VERSION.tex b/Master/texmf-dist/doc/latex/thmtools/VERSION.tex
new file mode 100644
index 00000000000..559945aba32
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/VERSION.tex
@@ -0,0 +1 @@
+\def\x #1-#2-#3 #4 v#5\@{\def\VERSION{#1/#2/#3 v#5}}\x 2010-05-18 20:57:54 +0200 v24\@ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/thmtools/thmtools-manual.tex b/Master/texmf-dist/doc/latex/thmtools/thmtools-manual.tex
new file mode 100644
index 00000000000..2825da9ee14
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/thmtools-manual.tex
@@ -0,0 +1,761 @@
+%&pdflatex
+\documentclass[paper=a4, pagesize, DIV=20,
+ english,
+ headings=small,11pt,
+ titlepage=false,
+ numbers=noendperiod
+]{scrreprt}
+\addtokomafont{sectioning}{\rmfamily}
+
+\usepackage[T1]{fontenc}
+\usepackage[charter]{mathdesign}
+\usepackage{luximono}
+\usepackage[scaled]{helvet}
+
+\usepackage[dvipsnames]{xcolor}
+
+\usepackage{doc,shortvrb,xspace}
+\makeatletter
+\let\PrintDescribeMacro\@gobble
+\let \PrintDescribeEnv\@gobble
+\let \PrintMacroName\@gobble
+\let \PrintEnvName\@gobble
+\makeatother
+
+\usepackage{listings}
+
+\usepackage{amsmath, amsthm}
+\usepackage{tikz}
+
+\usepackage{nameref}
+\usepackage{hyperref}
+\usepackage{cleveref}[2010/05/01]
+
+\usepackage{thmtools, thm-restate}
+\usepackage[unq]{unique}
+
+\providecommand\pkg[1]{\textsf{#1}}
+\providecommand\Thmtools{\pkg{Thmtools}\xspace}
+\providecommand\thmtools{\pkg{thmtools}\xspace}
+\providecommand\oarg[1]{\texttt{[}\textit{#1}\texttt{]}}
+\providecommand\marg[1]{\texttt{\{}\textit{#1}\texttt{\}}}
+
+
+\providecommand\clap{\makebox[0pt][c]}
+
+\lstloadlanguages{[LaTeX]TeX}
+\lstset{language=[LaTeX]TeX,basicstyle=\small\ttfamily,keywordstyle=\mdseries,aboveskip=0pt}
+
+\lstnewenvironment{preamble}[1][]{%
+ \lstset{backgroundcolor=\color{Purple!15},#1}%
+}{%
+}
+\lstnewenvironment{body}[1][]{%
+ \lstset{backgroundcolor=\color{Yellow!30},#1}%
+}{%
+}
+
+\newenvironment{source}{%
+ \par\noindent\strut\minipage[t]{0.61\linewidth}
+}{%
+ \endminipage
+}
+\newenvironment{result}{%
+ \hfill\minipage[t]{0.37\linewidth}
+}{%
+ \endminipage\strut\par
+}
+\MakeShortVerb{\|}
+
+
+\declaretheorem{theorem}
+\declaretheorem[numberwithin=section]{theoremS}
+\declaretheorem[name=\"Ubung]{exercise}
+\declaretheorem[sibling=theorem]{lemma}
+\declaretheorem[numbered=no,
+ name=Euclid's Prime Theorem]{euclid}
+\declaretheorem[numbered=unless unique]{singleton}
+\declaretheorem[numbered=unless unique]{couple}
+\declaretheorem[style=remark]{remark}
+\declaretheorem{Theorem}
+
+\declaretheorem[shaded={bgcolor=Lavender,
+ textwidth=12em}]{BoxI}
+
+\declaretheorem[shaded={rulecolor=Lavender,
+ rulewidth=2pt, bgcolor={rgb}{1,1,1}}]{BoxII}
+
+ \declaretheorem[thmbox=L]{boxtheorem L}
+ \declaretheorem[thmbox=M]{boxtheorem M}
+ \declaretheorem[thmbox=S]{boxtheorem S}
+
+\declaretheoremstyle[
+ spaceabove=6pt, spacebelow=6pt,
+ headfont=\normalfont\bfseries,
+ notefont=\mdseries, notebraces={(}{)},
+ postheadspace=1em,
+ qed=\qedsymbol
+ ]{mystyle}
+\declaretheorem[style=mystyle
+ ]{styledtheorem}
+
+\declaretheorem[name=Theorem, refname={theorem,theorems},
+ Refname={Theorem,Theorems}]{callmeal}
+
+
+\input{VERSION.tex}
+
+\title{\Thmtools Users' Guide}
+\author{Ulrich M. Schwarz -- ulmi@absatzen.de\thanks{
+ who would like to thank the users for testing, encouragement, feature requests, and
+ bug reports. In particular, Denis Bitouz\'e prompted further improvement
+ when \thmtools got stuck in a ``good enough for me'' slump.
+}}
+\date{\VERSION}
+
+\begin{document}
+ \maketitle
+ \section*{\abstractname}
+
+ The \thmtools bundle is a collection of packages that is designed to
+ provide an easier interface to theorems, and to facilitate some more
+ advanced tasks.
+
+ If you are a first-time user and you don't think your requirements are out
+ of the ordinary, browse the examples in \autoref{cha:impatient}. If you're
+ here because the other packages you've tried so far just can't do what you
+ want, take inspiration from \autoref{cha:extravagant}. If you're a repeat
+ customer, you're most likely to be interested in the refence section in
+ \autoref{cha:reference}.
+
+ \begin{multicols}{2}[\section*{\contentsname}]
+ \makeatletter\let\chapter\@gobbletwo
+ \tableofcontents
+ \end{multicols}
+ \clearpage
+
+ \chapter{\Thmtools for the impatient}\label{cha:impatient}
+
+ \section*{How to use this document}
+
+ This guide consists mostly of examples and their output, sometimes with a
+ few additional remarks. Since theorems are defined in the preamble and
+ used in the document, the snippets are two-fold:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ % Preamble code looks like this.
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem{theorem}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ % Document code looks like this.
+ \begin{theorem}[Euclid]
+ \label{thm:euclid}%
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, the list of primes,
+ \begin{equation}\label{eq:1}
+ 2,3,5,7,\dots
+ \end{equation}
+ is infinite.
+ \end{theorem}
+ \end{body}
+ \end{source}
+ \begin{result}
+ The result looks like this:
+% \begin{theorem}[Euclid]
+% For every prime $p$, there is a prime $p'>p$.
+% In particular, there are infinitely many primes.
+% \end{theorem}
+ \begin{restatable}[Euclid]{theorem}{firsteuclid}
+ \label{thm:euclid}%
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, the list of primes,
+ \begin{equation}\label{eq:1}
+ 2,3,5,7,\dots
+ \end{equation}
+ is infinite.
+ \end{restatable}
+ \end{result}
+
+ Note that in all cases, you will need a \emph{backend} to provide the
+ command \lstinline|\newtheorem| with the usual behaviour. The \LaTeX\
+ kernel has a built-in backend which cannot do very much; the most common
+ backends these days are the amsthm and ntheorem packages. Throughout this
+ document, we'll use amsthm.
+
+ \section{Elementary definitions}
+
+ As you have seen above, the new command to define theorems is
+ \lstinline|\declaretheorem|, which in its most basic form just takes the
+ name of the environment. All other options can be set through a key-val
+ interface:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[numberwithin=section]{theoremS}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{theoremS}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{theoremS}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{restatable}[Euclid]{theoremS}{euclidii}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{restatable}
+ \end{result}
+
+ Instead of ``numberwithin='', you can also use ``parent='' and
+ ``within=''. They're all the same, use the one you find easiest to
+ remember.
+
+ Note the example above looks somewhat bad: sometimes, the name of the environment,
+ with the first
+ letter uppercased, is not a good choice for the theorem's title.
+
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[name=\"Ubung]{exercise}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{exercise}
+ Prove Euclid's Theorem.
+ \end{exercise}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{exercise}
+ Prove Euclid's Theorem.
+ \end{exercise}
+ \end{result}
+
+ To save you from having to look up the name of the key every time, you can
+ also use ``title='' and ``heading='' instead of ``name=''; they do exactly
+ the same and hopefully one of these will be easy to remember for you.
+
+ Of course, you do not have to follow the abominal practice of numbering
+ theorems, lemmas, etc., separately:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[sibling=theorem]{lemma}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{lemma}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{lemma}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{lemma}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{lemma}
+ \end{result}
+
+ Again, instead of ``sibling='', you can also use ``numberlike='' and
+ ``sharecounter=''.
+
+ Some theorems have a fixed name and are not supposed to get a number.
+ To this end, amsthm provides \lstinline|\newtheorem*|, which is
+ accessible through thmtools:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[numbered=no,
+ name=Euclid's Prime Theorem]{euclid}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{euclid}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{euclid}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{euclid}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{euclid}
+ \end{result}
+
+ As a somewhat odd frill, you can turn off the number if there's only one
+ instance of the kind in the document. This might happen when you split and
+ join your papers into short conference versions and longer journal papers
+ and tech reports. Note that this doesn't combine well with the sibling
+ key: how do you count like somebody who suddenly doesn't count anymore?
+ Also, it takes an extra \LaTeX\ run to settle.
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \usepackage[unq]{unique}
+ \declaretheorem[numbered=unless unique]{singleton}
+ \declaretheorem[numbered=unless unique]{couple}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{couple}
+ Marc \& Anne
+ \end{couple}
+ \begin{singleton}
+ Me.
+ \end{singleton}
+ \begin{couple}
+ Buck \& Britta
+ \end{couple}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{couple}
+ Marc \& Anne
+ \end{couple}
+ \begin{singleton}
+ Me.
+ \end{singleton}
+ \begin{couple}
+ Buck \& Britta
+ \end{couple}
+ \end{result}
+
+ \section{Frilly references}
+
+ In case you didn't know, you should: \pkg{hyperref}, \pkg{nameref} and
+ \pkg{cleveref} offer ways of ``automagically'' knowing that
+ \lstinline|\label{foo}| was inside a theorem, so that a reference adds the
+ string ``Theorem''. This is all done for you, but there's one catch: you
+ have to tell \thmtools\ what the name to add is. (In singular and plural
+ form for \pkg{cleveref}.
+ \begin{source}
+ \begin{preamble}[gobble=6]
+ \usepackage{amsthm, thmtools}
+ \usepackage{
+ nameref,%\nameref
+ hyperref%\autoref;
+ % n.b. \Autoref is defined by thmtools
+ cleveref,% \cref
+ % nb cleveref after! hyperref
+ }
+ \declaretheorem[name=Theorem,
+ refname={theorem,theorems},
+ Refname={Theorem,Theorems}]{callmeal}
+ \end{preamble}
+ \begin{body}[gobble=6]
+ \begin{callmeal}[Simon]\label{simon}
+ One
+ \end{callmeal}
+ \begin{callmeal}\label{garfunkel}
+ and another, and together,
+ \autoref{simon}, ``\nameref{simon}'',
+ and \cref{garfunkel} are referred
+ to as \cref{simon,garfunkel}.
+ \Cref{simon,garfunkel}, if you are at
+ the beginning of a sentence.
+ \end{callmeal}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{callmeal}[Simon]\label{simon}
+ One
+ \end{callmeal}
+ \begin{callmeal}\label{garfunkel}
+ and another, and together, \autoref{simon}, ``\nameref{simon}'',
+ and \cref{garfunkel} are referred to as \cref{simon,garfunkel}.
+ \Cref{simon,garfunkel}, if you are at the beginning of a sentence.
+ \end{callmeal}
+ \end{result}
+
+ \section{Styling theorems}
+
+ The major backends provide a command \lstinline|\theoremstyle| to switch
+ between looks of theorems. This is handled as follows:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[style=remark]{remark}
+ \declaretheorem{Theorem}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{Theorem}
+ This is a theorem.
+ \end{Theorem}
+ \begin{remark}
+ Note how it still retains the default style, `plain'.
+ \end{remark}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{Theorem}
+ This is a theorem.
+ \end{Theorem}
+ \begin{remark}
+ Note how it still retains the default style, `plain'.
+ \end{remark}
+ \end{result}
+
+ Thmtools also supports the shadethm and thmbox packages:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \usepackage[dvipsnames]{xcolor}
+ \declaretheorem[shaded={bgcolor=Lavender,
+ textwidth=12em}]{BoxI}
+ \declaretheorem[shaded={rulecolor=Lavender,
+ rulewidth=2pt, bgcolor={rgb}{1,1,1}}]{BoxII}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{BoxI}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{BoxI}
+ \begin{BoxII}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{BoxII}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{BoxI}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{BoxI}
+ \begin{BoxII}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{BoxII}
+ \end{result}
+
+ As you can see, the color parameters can take two forms: it's either the
+ name of a color that is already defined, without curly braces, or it can
+ start with a curly brace, in which case it is assumed that
+ \lstinline|\definecolor{colorname}|$\langle$\textsl{what you said}$\rangle$ will be
+ valid \LaTeX\ code. In our case, we use the rbg model to manually specify
+ white. (Shadethm's default value is some sort of gray.)
+
+ For the thmbox package, use the thmbox key:
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \usepackage{amsthm}
+ \usepackage{thmtools}
+ \declaretheorem[thmbox=L]{boxtheorem L}
+ \declaretheorem[thmbox=M]{boxtheorem M}
+ \declaretheorem[thmbox=S]{boxtheorem S}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{boxtheorem L}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem L}
+ \begin{boxtheorem M}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem M}
+ \begin{boxtheorem S}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem S}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{boxtheorem L}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem L}
+ \begin{boxtheorem M}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem M}
+ \begin{boxtheorem S}[Euclid]
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, there are infinitely many primes.
+ \end{boxtheorem S}
+ \end{result}
+
+ Note that for both thmbox and shaded keys, it's quite possible they will not
+ cooperate with a style key you give at the same time.
+
+ \subsection{Declaring new theoremstyles}
+
+ \Thmtools\ also offers a new command to define new theoremstyles. It is
+ partly a frontend to the \lstinline|\newtheoremstyle| command of amsthm or
+ ntheorem, but it offers (more or less successfully) the settings of both to
+ either. So we are talking about the same things, consider the sketch in
+ \autoref{fig:params}. To get a result like that, you would use something
+ like
+ \begin{source}
+ \begin{preamble}[gobble=4]
+ \declaretheoremstyle[
+ spaceabove=6pt, spacebelow=6pt,
+ headfont=\normalfont\bfseries,
+ notefont=\mdseries, notebraces={(}{)},
+ postheadspace=1em,
+ qed=\qedsymbol
+ ]{mystyle}
+ \declaretheorem[style=mystyle]{styledtheorem}
+ \end{preamble}
+ \begin{body}[gobble=4]
+ \begin{styledtheorem}[Euclid]
+ For every prime $p$\dots
+ \end{styledtheorem}
+ \end{body}
+ \end{source}
+ \begin{result}
+ \begin{styledtheorem}[Euclid]
+ For every prime $p$\dots
+ \end{styledtheorem}
+ \end{result}
+ Again, the defaults are reasonable and you don't
+ have to give values for everything.
+
+ There is one important thing you cannot see in this example: there are
+ more keys you can pass to \lstinline|\declaretheoremstyle|: if \thmtools\ cannot
+ figure out at all what to do with it, it will pass it on to the
+ \lstinline|\declaretheorem| commands that use that style. For example, you may use
+ the boxed and shaded keys here.
+
+ To change the order in which title, number and note appear, there is a key
+ headstyle. Currently, the values ``margin'' and ``swapnumber'' are
+ supported. The daring may also try to give a macro here that uses the
+ commands \lstinline|\NUMBER|, \lstinline|\NAME| and \lstinline|\NOTE|.
+ You cannot circumvent the fact
+ that headpunct comes at the end, though, nor the fonts and braces you
+ select with the other keys.
+
+ \begin{figure}\centering
+ % please don't make me touch this picture ever again.
+ \fbox{
+ \begin{minipage}{0.618\textwidth}\Large
+ \tikzset{font=\normalfont\small\sffamily\itshape,y=12pt,>=latex}
+ \noindent which resulted in the following insight:
+ \par
+ \tikz{\draw[|<->|] (0,-1)--(0,1);
+ \draw[anchor=west] (0,0) node {spaceabove};}
+ \par
+ \tikz{\draw[|<->|] (-1,0)--(1,0);
+ \draw[anchor=south] (0,0) node {headindent};}
+ \textbf{Theo%
+ \smash{\clap{\tikz{\draw (0,0)--(0,1.2) node [anchor=south]{headfont};}}}%
+ rem 1.2
+ (\smash{\rlap{\tikz{\draw (0,0)--(0,2.5) node [anchor=base west]{notebraces};}}}%
+ Euc%
+\smash{\clap{\tikz{\draw (0,0)--(0,1.2) node [anchor=south]{notefont};}}}%
+ lid)%
+ .\smash{\rlap{\tikz{\draw (0,0)--(0,1.2) node [anchor=south west]{headpunct};}}}}%
+ \tikz{\draw[|<->|] (-1,0)--(1,0);
+ \draw[anchor=south] (0,0) node {postheadspace};}
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, the list of primes,
+ $2,3,5,7,\dots$,
+ is infinite.
+ \hfill{\tikz{\draw[anchor=north east] (0,0) node{qed}; }}$\Box$
+ \par
+ \tikz{\draw[|<->|] (0,-1)--(0,1);
+ \draw[anchor=west] (0,0) node {spacebelow};}
+ \par
+
+ As a consequence, lorem ipsum dolor sit amet frob-%nicate foo
+% paret.
+ \end{minipage}
+ }
+ \caption{Settable parameters of a theorem style.}
+ \label{fig:params}
+ \end{figure}
+
+ \section{Repeating theorems}
+
+ Sometimes, you want to repeat a theorem you have given in full earlier,
+ for example you either want to state your strong result in the
+ introduction and then again in the full text, or you want to re-state a
+ lemma in the appendix where you prove it. For example, I lied about
+ \autoref{thm:euclid} on p.\,\pageref{thm:euclid}: the true code used was
+ \begin{source}
+ \begin{preamble}[gobble=6]
+ \usepackage{thmtools, thm-restate}
+ \declaretheorem{theorem}
+ \end{preamble}
+ \begin{body}[gobble=6]
+ \begin{restatable}[Euclid]{theorem}{firsteuclid}
+ \label{thm:euclid}%
+ For every prime $p$, there is a prime $p'>p$.
+ In particular, the list of primes,
+ \begin{equation}\label{eq:1}
+ 2,3,45,7,\dots
+ \end{equation}
+ is infinite.
+ \end{restatable}
+ \end{body}
+ and to the right, I just use
+ \begin{body}[gobble=6]
+ \firsteuclid*
+ \vdots
+ \firsteuclid*
+ \end{body}
+ \end{source}
+ \begin{result}
+ \firsteuclid*
+ \vdots
+ \firsteuclid*
+ \end{result}
+
+ Note that in spite of being a theorem-environment, it gets number one all
+ over again. Also, we get equation number~\eqref{eq:1} again. The star in
+ \lstinline|\firsteuclid*| tells thmtools that it should redirect the label
+ mechanism, so that this reference: \autoref{thm:euclid} points to
+ p.\,\pageref{thm:euclid}, where the unstarred environment is used. (You can
+ also use a starred environment and an unstarred command, in which case the
+ behaviour is reversed.) Also, if you use hyperref, the links will lead you
+ to the unstarred occurence.
+
+ Just to demonstrate that we also handle more involved cases, I repeat
+ another theorem here, but this one was numbered within its section: note
+ we retain the section number which does not fit the current section:
+ \begin{source}
+ \begin{body}
+ \euclidii*
+ \end{body}
+ \end{source}
+ \begin{result}
+ \euclidii*
+ \end{result}
+
+
+ \section{Lists of theorems}
+
+ To get a list of theorems with default formatting, just use
+ \lstinline|\listoftheorems|:
+ \begin{source}
+ \begin{body}[gobble=6]
+ \listoftheorems
+ \end{body}
+ \end{source}
+ \begin{result}
+ \let\chapter\section
+ \let\clearpage\relax
+ \listoftheorems
+ \end{result}
+
+ Not everything might be of the same importance, so you can filter out
+ things by environment name:
+ \begin{source}
+ \begin{body}[gobble=6]
+ \listoftheorems[ignoreall,
+ show={theorem,Theorem,euclid}]
+ \end{body}
+ \end{source}
+ \begin{result}
+ \let\chapter\section
+ \let\clearpage\relax
+ \listoftheorems[ignoreall, show={theorem,Theorem,euclid}]
+ \end{result}
+
+ And you can also restrict to those environments that have an optional
+ argument given. Note that two theorems disappear compared to the previous
+ example. You could also say just ``onlynamed'', in which case it will
+ apply to \emph{all} theorem environments you have defined.
+ \begin{source}
+ \begin{body}[gobble=6]
+ \listoftheorems[ignoreall,
+ onlynamed={theorem,Theorem,euclid}]
+ \end{body}
+ \end{source}
+ \begin{result}
+ \let\chapter\section
+ \let\clearpage\relax
+ \listoftheorems[ignoreall, onlynamed={theorem,Theorem,euclid}]
+ \end{result}
+
+ As might be expected, the heading given is defined in \lstinline|\listoftheoremname|.
+
+ \chapter{\Thmtools for the extravagant}\label{cha:extravagant}
+
+ This chapter will go into detail on the slightly more technical offerings
+ of this bundle. In particular, it will demonstrate how to use the general
+ hooks provided to extend theorems in the way you want them to behave.
+ Again, this is done mostly by some examples.
+
+ \section{Understanding \thmtools' extension mechanism}
+
+ TBD.
+
+ \section{Case in point: the thmbox key}
+
+ \DocInput{thmdef-thmbox.dtx}
+
+
+ \section{Case in point: the shaded key}
+
+ \DocInput{thmdef-shaded.dtx}
+
+
+ \chapter{\Thmtools for the completionist}\label{cha:reference}
+
+ This will eventually contain a reference to all known keys, commands, etc.
+
+
+ \appendix
+
+
+ \chapter{\Thmtools for the morbidly curious}\label{cha:sourcecode}
+
+ This chapter consists of the implementation of Thmtools, in case you
+ wonder how this or that feature was implemented. Read on if you want a
+ look under the bonnet, but you enter at your own risk, and bring an oily
+ rag with you.
+
+ \section{Core functionality}
+
+ \subsection{The main package}
+ \DocInput{thmtools.dtx}
+
+ \subsection{Adding hooks to the relevant commands}
+ \DocInput{thm-patch.dtx}
+
+ \subsection{The key-value interfaces}
+ \DocInput{thm-kv.dtx}
+
+ \subsection{Lists of theorems}
+ \DocInput{thm-listof.dtx}
+
+ \subsection{Re-using environments}
+ \DocInput{thm-restate.dtx}
+
+ \subsection{Fixing autoref and friends}
+ \DocInput{thm-autoref.dtx}
+
+ \section{Glue code for different backends}
+
+ \subsection{amsthm}
+ \DocInput{thm-amsthm.dtx}
+
+ \subsection{beamer}
+ \DocInput{thm-beamer.dtx}
+
+ \subsection{ntheorem}
+ \DocInput{thm-ntheorem.dtx}
+
+ \section{Generic tools}
+
+ \subsection{A generalized argument parser}
+ \DocInput{parseargs.dtx}
+
+ \subsection{Different counters sharing the same register}
+ \DocInput{aliasctr.dtx}
+
+ \subsection{Tracking occurences: none, one or many}
+ \DocInput{unique.dtx}
+
+
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf b/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf
index d7885b402c1..4fc2eac9246 100644
--- a/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf
+++ b/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx b/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx
index bd3f1667fda..1dd8d3aff17 100644
--- a/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx
@@ -6,46 +6,14 @@
% the LaTeX Project Public License, version 1.3a. The full license text
% is available from http://www.latex-project.org/
%
-% \fi
-%
-%\iffalse
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage{aliasctr}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.87]{luximono, helvet}
-\newcommand\pkg{\textsf}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\GetFileInfo{aliasctr.sty}
-\author{Ulrich M. Schwarz\thanks{ulmi at absatzen dot de}}
-\title{The \pkg{aliasctr} package\thanks{%
- This documents \pkg{aliasctr}~\fileversion, dated~\filedate.
- Newer versions might be found at http://absatzen.de
-}}
-\begin{document}
- \maketitle
- \DocInput{aliasctr.dtx}
-\end{document}
-%</driver>
%<*code>
-%\fi
-% \iffalse $Id: aliasctr.dtx,v 1.3 2008/03/09 18:59:17 ulmi Exp $\fi
-% \section{Usage}
+% \fi
% |\@counteralias{#1}{#2}| makes |#1| a counter that uses |#2|'s count register.
% This is useful for things like \pkg{hyperref}'s |\autoref|, which otherwise
% can't distinguish theorems and definitions if they share a counter.
%
% For detailed information, see Die TeXnische Kom\"odie 3/2006.
% \StopEventually{}
-% \section{Implementation}
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{aliasctr}[2006/01/22 v0.1 counter aliasing (ulmi)]
-% \end{macrocode}
% \begin{macro}{\@addtoreset}
% add |\@elt{#1}| to |\cl@#2|.
% This differs from the kernel implementation insofar as we trail the
diff --git a/Master/texmf-dist/source/latex/thmtools/parseargs.dtx b/Master/texmf-dist/source/latex/thmtools/parseargs.dtx
index bf89eaefde1..8f4aa421710 100644
--- a/Master/texmf-dist/source/latex/thmtools/parseargs.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/parseargs.dtx
@@ -10,75 +10,9 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{parseargs}
-\newtheorem{lemma}{Lemma}
-\providecommand\pkg{\textsf}
-\GetFileInfo{parseargs.sty}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
- \newcommand\ParseArgs{\textsf{ParseArgs}}
- \title{The \ParseArgs\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: parseargs.dtx,v 1.3 2008/08/03 13:10:16 ulmi Exp ulmi ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
- \begin{abstract}
- A command like |\newtheorem| with its gazillion different argument
- possibilities is difficult to parse manually. And then, you add beamer
- support and you have to wade through a maze of twisty call indirections,
- all alike.
-
- This package provides a generic argument parser similar to the one that
- will be in \LaTeX3.
- \end{abstract}
-
- \DocInput{thm-autoref.dtx}
-\end{document}
-%</driver>
%<*parseargs>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
-%
% The main command provided by the package is |\parse|\marg{spec}.
% \emph{spec} consists of groups of commands. Each group should set up the
% command |\@parsecmd| which is then run. The important point is that
@@ -91,10 +25,7 @@
% optional, and flag.
%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{parseargs}[2008/05/12 v0.1alpha1 generic argument parser (ulmi)]
\newtoks\@parsespec
\def\parse@endquark{\parse@endquark}
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-amsthm.dtx b/Master/texmf-dist/source/latex/thmtools/thm-amsthm.dtx
new file mode 100644
index 00000000000..cd61adfbe21
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-amsthm.dtx
@@ -0,0 +1,140 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by Ulrich M. Schwarz
+% See file COPYING for more details.
+%\fi
+%
+%\iffalse (hide this from DocInput)
+%<*amsthm>
+%\fi
+% \begin{macrocode}
+\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
+}
+% examples:
+\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}%
+% \@xa\def\csname th@#1\@xa\@xa\@xa\@xa\@xa\@xa\@xa\endcsname
+% \@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\@xa\@xa\thmt@style@notebraces
+% \@xa\@xa\@xa}\csname th@#1\endcsname
+% }
+}
+
+\define@key{thmdef}{qed}[\qedsymbol]{%
+ \thmt@trytwice{}{%
+ \addtotheorempostheadhook[\thmt@envname]{%
+ \pushQED{\qed}%
+ }%
+ \addtotheoremprefoothook[\thmt@envname]{%
+ \protected@edef\qedsymbol{#1}%
+ \popQED
+ }%
+ }%
+}
+
+% \end{macrocode}
+%\iffalse (hide this from DocInput)
+%</amsthm>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx b/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx
index d8c6ea8b4f7..0d8a23dc010 100644
--- a/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx
@@ -10,81 +10,18 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-autoref}
-\newtheorem{lemma}{Lemma}
-\providecommand\pkg{\textsf}
-\GetFileInfo{thm-autoref.sty}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
- \newcommand\thmrestate{\textsf{thm-patch}}
- \title{The \thmrestate\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: thm-autoref.dtx,v 1.4 2008/03/09 18:59:17 ulmi Exp ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
- \begin{abstract}
- Fixes interaction of theorems with hyperref's |\autoref| command.
- \end{abstract}
-
- \DocInput{thm-autoref.dtx}
-\end{document}
-%</driver>
%<*autoref>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
-%
% \pkg{hyperref}'s |\autoref| command does not work well with theorems that
% share a counter: it'll always think it's a Lemma even if it's a Remark
% that shares the Lemma counter. Load this package to fix it. No further
% intervention needed.
%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thm-autoref}[2008/03/09 v0.1beta2 thm-autoref (ulmi)]
-\RequirePackage{thm-patch, aliasctr}
+\RequirePackage{thm-patch, aliasctr, parseargs, keyval}
\let\@xa=\expandafter
\let\@nx=\noexpand
@@ -103,6 +40,68 @@
}
\g@addto@macro\thmt@newtheorem@predefinition{\thmt@autorefsetup}%
\g@addto@macro\thmt@newtheorem@postdefinition{\csname thmt@autoreffix\endcsname}%
+
+\def\thmt@refnamewithcomma #1#2#3,#4,#5\@nil{%
+ \@xa\def\csname\thmt@envname #1utorefname\endcsname{#3}%
+ \ifcsname #2refname\endcsname
+ \csname #2refname\endcsname{\thmt@envname}{#3}{#4}%
+ \fi
+}
+\define@key{thmdef}{refname}{\thmt@trytwice{}{%
+ \thmt@refnamewithcomma{a}{c}#1,\textbf{?? (pl. #1)},\@nil
+}}
+\define@key{thmdef}{Refname}{\thmt@trytwice{}{%
+ \thmt@refnamewithcomma{A}{C}#1,\textbf{?? (pl. #1)},\@nil
+}}
+
+
+\ifcsname Autoref\endcsname\else
+\let\thmt@HyRef@testreftype\HyRef@testreftype
+\def\HyRef@Testreftype#1.#2\\{%
+ \ltx@IfUndefined{#1Autorefname}{%
+ \thmt@HyRef@testreftype#1.#2\\%
+ }{%
+ \edef\HyRef@currentHtag{%
+ \expandafter\noexpand\csname#1Autorefname\endcsname
+ \noexpand~%
+ }%
+ }%
+}
+
+
+\let\thmt@HyPsd@@autorefname\HyPsd@@autorefname
+\def\HyPsd@@Autorefname#1.#2\@nil{%
+ \tracingall
+ \ltx@IfUndefined{#1Autorefname}{%
+ \thmt@HyPsd@@autorefname#1.#2\@nil
+ }{%
+ \csname#1Autorefname\endcsname\space
+ }%
+}%
+\def\Autoref{%
+ \parse{%
+ {\parseFlag*{\def\thmt@autorefstar{*}}{\let\thmt@autorefstar\@empty}}%
+ {\parseMand{%
+ \bgroup
+ \let\HyRef@testreftype\HyRef@Testreftype
+ \let\HyPsd@@autorefname\HyPsd@@Autorefname
+ \@xa\autoref\thmt@autorefstar{##1}%
+ \egroup
+ \let\@parsecmd\@empty
+ }}%
+ }%
+}
+\fi % ifcsname Autoref
+
+% not entirely appropriate here, but close enough:
+\AtBeginDocument{%
+ \@ifpackageloaded{nameref}{%
+ \addtotheorempostheadhook{%
+ \expandafter\NR@gettitle\expandafter{\thmt@optarg}%
+ }}{}
+}
+
+
% \end{macrocode}
%\iffalse
%</autoref>
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-beamer.dtx b/Master/texmf-dist/source/latex/thmtools/thm-beamer.dtx
new file mode 100644
index 00000000000..8ac7adba100
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-beamer.dtx
@@ -0,0 +1,42 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by Ulrich M. Schwarz
+% See file COPYING for more details.
+%\fi
+%
+%\iffalse (hide this from DocInput)
+%<*beamer>
+%\fi
+% \begin{macrocode}
+\newif\ifthmt@hasoverlay
+\def\thmt@parsetheoremargs#1{%
+ \parse{%
+ {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
+ {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
+ {\ifthmt@hasoverlay\expandafter\@gobble\else\expandafter\@firstofone\fi
+ {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
+ }%
+ {%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+ \thmt@local@preheadhook
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \protected@edef\tmp@args{%
+ \ifthmt@hasoverlay <\thmt@overlay>\fi
+ \ifx\@empty\thmt@optarg\else [{\thmt@optarg}]\fi
+ }%
+ \csname thmt@original@#1\@xa\endcsname\tmp@args
+ \thmt@local@postheadhook
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ \let\@parsecmd\@empty
+ }%
+ }
+}%
+% \end{macrocode}
+%\iffalse (hide this from DocInput)
+%</beamer>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx b/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx
index d731d62f1ea..a1aa79fbc29 100644
--- a/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx
@@ -10,196 +10,114 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage[scaled]{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-kv, thm-patch}
-\newtheorem{lemma}{Lemma}
-\declaretheorem[sibling=lemma, shaded, name={Rule of Thumb}]{ruleofthumb}
-\usepackage{color}
-\declaretheorem[shaded={bgcolor={rgb}{1,0,0},rulecolor={rgb}{0,1,0},rulewidth=2em,
- margin=1em, textwidth=5cm}]{eyesore}
-
-
-\GetFileInfo{thm-kv.sty}
-\providecommand\pkg{\textsf}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
-
- \newcommand\thmrestate{\textsf{thm-kv}}
- \title{The \thmrestate\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: thm-kv.dtx,v 1.8 2008/06/22 12:09:41 ulmi Exp ulmi ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
-\begin{abstract}
-\end{abstract}
- \DocInput{thm-kv.dtx}
-\end{document}
-%</driver>
%<*kv>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
-%
-% \DescribeMacro{\declaretheorem}
-%The macro
-%|\declaretheorem|\oarg{key=val-opts}\marg{name} can be used to define a
-%new theorem instead of |\newtheorem|. It is hoped that |\declaretheorem| is
-%easier to use than |\newtheorem|'s tangle of mutually-exclusive optional
-%arguments. The following is the list of keywords understood:
-%\begin{description}
-% \item[parent, numberwithin, within]
-% These keys govern when the theorem counter is reset. For example, giving
-% parent=chapter gives you theorems numbered per chapter, so it's
-% equivalent to the second optional argument to |\newtheorem|. There are
-% three names so you'll remember at least one of them.
-% \item[sibling, numberlike, sharenumber]
-% These keys make the theorem share a common numbering with the given
-% theorem. This is just like giving the first optional argument.
-% \item[unnumbered, starred]
-% If your theorem package supports it, this will call |\newtheorem*|,
-% i.e. you'll get a theorem that is never numbered. Currently, only
-% amsmath offers this possibility.
-% \item[name, title, heading] |\newtheorem| takes \emph{two} options, the
-% name of the environment (like |lem|) and its title (|Lemma|).
-% |\declaretheorem| only requires the environment name, and the title
-% defaults to the environment name with the first letter uppercased. If
-% you name your environments |lemma|, |theorem|, etc., you don't need to
-% do anything else. Otherwise, you can always manually specify the title.
-% \item[(pre/post)(head/foot)hook] You can specify extra code that will be
-% executed whenever you use the environment. \textbf{Warning:} this needs
-% the \pkg{thm-patch} package, and you're responsible for loading it
-% yourself if you want these keys to work. This functionality might be
-% shifted over to \pkg{thm-patch} in future releases.
-% \item[style]
-% This will issue a |\theoremstyle{foo}| for you if you give |style=foo|.
-% Note that currently, no care is taken to prevent this from becoming the
-% default style for subsequent theorems.
-%\end{description}
-%
-% \subsection{Examples}
-% In many cases, you'll just get by with
-% \begin{verbatim}
-% \declaretheorem{lemma}
-% \end{verbatim}
-% which creates the environment `lemma', which will be labeled `Lemma' and
-% numbered consecutively throughout:
-%\begin{lemma}
-% This is what it looks like.
-%\end{lemma}
-% If you have more environments, you
-% might want
-% \begin{verbatim}
-% \declaretheorem[sibling=lemma]{theorem}
-% \end{verbatim}
-% which will make the theorems share the numbering with the lemmas. If you
-% had wanted per-chapter numbering for everything, you would have said
-%\begin{verbatim}
-% \declaretheorem[parent=chapter]{lemma}
-%\end{verbatim}
-% without need to change subsequent declarations. A very fancy declaration
-% using the shadethm and thm-patch package would look like this:
-%\begin{verbatim}
-% \declaretheorem[sibling=theorem, shaded, name={Rule of Thumb}]{ruleofthumb}
-%\end{verbatim}
-%
-%\begin{ruleofthumb}
-% If all else fails, read the manual. Usually all else fails because you
-% didn't.
-% \end{ruleofthumb}
-%
-% You can customize the colors and border like this:
-%\begin{verbatim}
-%\declaretheorem[shaded={bgcolor={rgb}{1,0,0},rulecolor={rgb}{0,1,0},rulewidth=2em,
-% margin=1em, textwidth=5cm}]{eyesore}
-%\end{verbatim}
-%\begin{eyesore}
-% But doing that is strongly discouraged.
-%\end{eyesore}
-%
-% There is also an interface to the thmbox package: you can use |thmbox=X|,
-% where X is one of the styles L, M, S as defined by that package.
-% (Actually, the parameter you give here is just passed on as optional
-% argument to |\newboxtheorem|, so the other parameters like headstyle are valid as well.)
-% The
-% redefinition of proof and example is suppressed unless you load the thmbox
-% package manually before you load thmtools.
-%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thm-kv}[2009/07/30 v0.1beta11 thm-kv interface (ulmi)]
+
\let\@xa\expandafter
\let\@nx\noexpand
-\RequirePackage{keyval}
+\RequirePackage{keyval,kvsetkeys,thm-patch}
-\define@key{thmt}{parent}{\thmt@setparent{#1}}
-\define@key{thmt}{numberwithin}{\thmt@setparent{#1}}
-\define@key{thmt}{within}{\thmt@setparent{#1}}
+\newif\if@thmt@firstkeyset
-\define@key{thmt}{sibling}{\thmt@setsibling{#1}}
-\define@key{thmt}{numberlike}{\thmt@setsibling{#1}}
-\define@key{thmt}{sharenumber}{\thmt@setsibling{#1}}
+% many keys are evaluated twice, because we don't know
+% if they make sense before or after, or both.
+\def\thmt@trytwice{%
+ \if@thmt@firstkeyset
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
-\define@key{thmt}{title}{\thmt@setthmname{#1}}
-\define@key{thmt}{name}{\thmt@setthmname{#1}}
-\define@key{thmt}{heading}{\thmt@setthmname{#1}}
+\@for\keyname:=parent,numberwithin,within\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setparent{#1}}{}}%
+}
-\define@key{thmt}{unnumbered}[]{\thmt@isnumberedfalse}
-\define@key{thmt}{starred}[]{\thmt@isnumberedfalse}
+\@for\keyname:=sibling,numberlike,sharenumber\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setsibling{#1}}{}}%
+}
-\define@key{thmt}{preheadhook}{\addtotheorempreheadhook[\thmt@envname]{#1}}
-\define@key{thmt}{postheadhook}{\addtotheorempostheadhook[\thmt@envname]{#1}}
-\define@key{thmt}{prefoothook}{\addtotheoremprefoothook[\thmt@envname]{#1}}
-\define@key{thmt}{postfoothook}{\addtotheorempostfoothook[\thmt@envname]{#1}}
+\@for\keyname:=title,name,heading\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setthmname{#1}}{}}%
+}
-\define@key{thmt}{style}{\thmt@setstyle{#1}}
+\@for\keyname:=unnumbered,starred\do{%
+\define@key{thmdef}{\keyname}[]{\thmt@trytwice{\thmt@isnumberedfalse}{}}%
+}
-\providecommand\theoremstyle[1]{%
+\def\thmt@YES{yes}
+\def\thmt@NO{no}
+\def\thmt@UNIQUE{unless unique}
+\define@key{thmdef}{numbered}[\thmt@YES]{
+ \def\thmt@tmp{#1}%
+ \thmt@trytwice{%
+ \ifx\thmt@tmp\thmt@YES
+ \thmt@isnumberedtrue
+ \else\ifx\thmt@tmp\thmt@NO
+ \thmt@isnumberedfalse
+ \else\ifx\thmt@tmp\thmt@UNIQUE
+ \RequirePackage[unq]{unique}
+ \ifuniq{\thmt@envname}{%
+ \thmt@isnumberedfalse
+ }{%
+ \thmt@isnumberedtrue
+ }%
+ \else
+ \PackageError{thmtools}{Unknown value `#1' to key numbered}{}%
+ \fi\fi\fi
+ }{% trytwice: after definition
+ \ifx\thmt@tmp\thmt@UNIQUE
+ \addtotheorempreheadhook[\thmt@envname]{\setuniqmark{\thmt@envname}}%
+ \addtotheorempreheadhook[\thmt@envname]{\def\thmt@dummyctrautorefname{\thmt@thmname\@gobble}}
+ \fi
+ }%
+}
+
+
+\define@key{thmdef}{preheadhook}{\thmt@trytwice{}{\addtotheorempreheadhook[\thmt@envname]{#1}}}
+\define@key{thmdef}{postheadhook}{\thmt@trytwice{}{\addtotheorempostheadhook[\thmt@envname]{#1}}}
+\define@key{thmdef}{prefoothook}{\thmt@trytwice{}{\addtotheoremprefoothook[\thmt@envname]{#1}}}
+\define@key{thmdef}{postfoothook}{\thmt@trytwice{}{\addtotheorempostfoothook[\thmt@envname]{#1}}}
+
+\define@key{thmdef}{style}{\thmt@trytwice{\thmt@setstyle{#1}}{}}
+
+% ugly hack: style needs to be evaluated first so its keys
+% are not overridden by explicit other settings
+\define@key{thmdef0}{style}{%
+ \ifcsname thmt@style #1@defaultkeys\endcsname
+ \thmt@toks{\kvsetkeys{thmdef}}%
+ \@xa\@xa\@xa\the\@xa\@xa\@xa\thmt@toks\@xa\@xa\@xa{%
+ \csname thmt@style #1@defaultkeys\endcsname}%
+ \fi
+}
+\kv@set@family@handler{thmdef0}{}% ignore everything else.
+
+% fallback definition.
+% actually, only the kernel does not provide \theoremstyle.
+% is this one worth having glue code for the theorem package?
+\def\thmt@setstyle#1{%
\PackageWarning{thm-kv}{%
- Your backend doesn't have a `\string\theoremstyle' command.\MessageBreak
- Your style request `#1' was ignored
+ Your backend doesn't have a `\string\theoremstyle' command.
}%
}
-\let\thmt@setstyle\theoremstyle
+
+\ifcsname theoremstyle\endcsname
+ \let\thmt@originalthmstyle\theoremstyle
+ \def\thmt@outerstyle{plain}
+ \renewcommand\theoremstyle[1]{%
+ \def\thmt@outerstyle{#1}%
+ \thmt@originalthmstyle{#1}%
+ }
+ \def\thmt@setstyle#1{%
+ \thmt@originalthmstyle{#1}%
+ }
+ \g@addto@macro\thmt@newtheorem@postdefinition{%
+ \thmt@originalthmstyle{\thmt@outerstyle}%
+ }
+\fi
\newif\ifthmt@isnumbered
\newcommand\thmt@setparent[1]{%
@@ -212,6 +130,7 @@
\def\thmt@thmname
}
+\thmt@mkextendingkeyhandler{thmdef}{thmdef}{\string\declaretheorem\space key}
\newcommand\declaretheorem[2][]{%
\let\thmt@theoremdefiner\thmt@original@newtheorem
@@ -220,7 +139,9 @@
\thmt@setparent{}%
\thmt@setsibling{}%
\thmt@isnumberedtrue%
- \setkeys{thmt}{#1}%
+ \@thmt@firstkeysettrue%
+ \kvsetkeys{thmdef0}{#1}%
+ \kvsetkeys{thmdef}{#1}%
\protected@edef\thmt@tmp{%
\@nx\newtheorem
\ifthmt@isnumbered\else *\fi
@@ -232,61 +153,104 @@
\thmt@tmp
% uniquely ugly kludge: some keys make only sense
% afterwards.
- \setkeys{thmt}{#1}%
+ % and it gets kludgier: again, the default-inherited
+ % keys need to have a go at it.
+ \@thmt@firstkeysetfalse%
+ \kvsetkeys{thmdef0}{#1}%
+ \kvsetkeys{thmdef}{#1}%
+}
+
+\providecommand\thmt@quark{\thmt@quark}
+
+% in-document keyval, i.e. \begin{theorem}[key=val,key=val]
+
+\thmt@mkextendingkeyhandler{thmuse}{thmuse}{\thmt@envname\space optarg key}
+
+\addtotheorempreheadhook{%
+ \ifx\thmt@optarg\@empty\else
+ \@xa\thmt@garbleoptarg\@xa{\thmt@optarg}\fi
+}%
+\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'}%
+ \fi
+% % optarg present, check if it's newstyle
+% % a newstyle kv args starts with =.
+% %\tracingall
+% \if\expandafter\noexpand\@car #1\@nil=
+% \let\thmt@newoptarg\@empty
+% \@xa\def\@xa\thmt@optarg\@xa{\@cdr #1\@nil}%
+% \def\thmt@tempa{\setkeys{thmt-optarg}}%
+% \@xa\thmt@tempa\@xa{\thmt@optarg}% expansion!
+% \let\thmt@optarg\thmt@newoptarg
+% \else
+% \typeout{(dbg: old-style arg `#1')}%
+% \fi
+}
+\def\thmt@splitopt#1=#2\thmt@quark{%
+ \def\thmt@tmpkey{#1}%
+ \ifx\thmt@tmpkey\@empty
+ \def\thmt@tmpkey{\thmt@quark}%
+ \fi
+ \@onelevel@sanitize\thmt@tmpkey
+}
+
+\define@key{thmuse}{label}{%
+ %\typeout{setting label: #1}%
+ \addtotheorempostheadhook[local]{\label{#1}}%
}
+\define@key{thmuse}{name}{%
+ %\typeout{optarg: #1}%
+ \def\thmt@newoptarg{#1}%
+}
+
% \end{macrocode}
-% \subsection{Package-specific extensions}
-% This is code that requires additional packages. These might be mutually
-% incompatible.
%
-% \subsubsection{shadethm}
-% \begin{macrocode}
- \define@key{thmt}{shaded}[{}]{%
- \RequirePackage{shadethm}%
- \RequirePackage{thm-patch}%
- \addtotheorempreheadhook[\thmt@envname]{%
- \setlength\shadedtextwidth{\linewidth}%
- \setkeys{thmt@shade}{#1}\begin{shadebox}}%
- \addtotheorempostfoothook[\thmt@envname]{\end{shadebox}}%
- }
-% There are some parameters you could set the default for (try them as is,
-% first).
-% (i) shadethmcolor The shading color of the background. See the
-% documentation for the color package, but with a `gray' model, I find .97
-% looks good out of my printer, while a darker shade like .92 is needed
-% to make it copy well. (Black is 0, white is 1.)
-% (i*) shaderulecolor The shading color of the border of the shaded box.
-% See (i). If \shadeboxrule is set to 0pt then this won't print anyway.
-% (i**) shadeboxrule The width of the border around the shading. Set it to
-% 0pt (not just 0) to make it disappear.
-% (i***) shadeboxsep The length by which the shade box surrounds the text.
-\define@key{thmt@shade}{textwidth}{\setlength\shadedtextwidth{#1}}
-\define@key{thmt@shade}{bgcolor}{\definecolor{shadethmcolor}#1}
-\define@key{thmt@shade}{rulecolor}{\definecolor{shaderulecolor}#1}
-\define@key{thmt@shade}{rulewidth}{\setlength\shadeboxrule{#1}}
-\define@key{thmt@shade}{margin}{\setlength\shadeboxsep{#1}}
-% \end{macrocode}
-% \subsubsection{thmbox}
-% Emmanuel Beffara's thmbox package lets you draw certain sorts of borders
-% around the theorems. Note that I don't think it honours \string\theoremstyle.
+% Defining new theorem styles; keys are in opt-arg
+% even though not having any doesn't make much sense.
+% It doesn't do anything exciting here, it's up to
+% the glue layer to provide keys.
+%
% \begin{macrocode}
- \define@key{thmt}{thmbox}[L]{%
- \let\oldproof=\proof
- \let\oldendproof=\endproof
- \let\oldexample=\example
- \let\oldendexample=\endexample
- \RequirePackage[nothm]{thmbox}
- \let\proof=\oldproof
- \let\endproof=\oldendproof
- \let\example=\oldexample
- \let\endexample=\oldendexample
- \def\thmt@theoremdefiner{\newboxtheorem[#1]}%
+\def\thmt@declaretheoremstyle@setup{}
+\def\thmt@declaretheoremstyle#1{%
+ \PackageWarning{thmtools}{Your backend doesn't allow styling theorems}{}
+}
+\newcommand\declaretheoremstyle[2][]{%
+ \def\thmt@style{#2}%
+ \@xa\def\csname thmt@style \thmt@style @defaultkeys\endcsname{}%
+ \thmt@declaretheoremstyle@setup
+ \kvsetkeys{thmstyle}{#1}%
+ \thmt@declaretheoremstyle{#2}%
+}
+
+\kv@set@family@handler{thmstyle}{%
+ \PackageInfo{thmtools}{%
+ Key `#1' (with value `#2')\MessageBreak
+ is not a known style key.\MessageBreak
+ Will pass this to every \string\declaretheorem\MessageBreak
+ that uses `style=\thmt@style'%
}%
+ \ifx\kv@value\relax% no value given, don't pass on {}!
+ \@xa\g@addto@macro\csname thmt@style \thmt@style @defaultkeys\endcsname{%
+ #1,%
+ }%
+ \else
+ \@xa\g@addto@macro\csname thmt@style \thmt@style @defaultkeys\endcsname{%
+ #1={#2},%
+ }%
+ \fi
+}
% \end{macrocode}
-% \subsubsection{beamer}
-% Nothing yet.
-% \begin{macrocode}
-% \end{macrocode}
+%
%\iffalse
%</kv>
%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-listof.dtx b/Master/texmf-dist/source/latex/thmtools/thm-listof.dtx
index 5b025bc4039..85790f4eac6 100644
--- a/Master/texmf-dist/source/latex/thmtools/thm-listof.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thm-listof.dtx
@@ -10,68 +10,9 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-patch}
-\newtheorem{lemma}{Lemma}
-\GetFileInfo{thm-listof.sty}
-\providecommand\pkg{\textsf}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
-
- \newcommand\thmlistof{\textsf{thm-listof}}
- \title{The \thmlistof\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: thm-listof.dtx,v 1.11 2009/03/22 18:05:57 ulmi Exp ulmi ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
-\begin{abstract}
-\end{abstract}
-
- \DocInput{thm-listof.dtx}
-\end{document}
-%</driver>
%<*listof>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
% This package provides two main commands:
% \DescribeMacro{\listoftheorems}
% |\listoftheorems| will generate, well, a list of all theorems, lemmas,
@@ -111,25 +52,22 @@
% daring, the code for the theorem type ``lemma'' is in |\l@lemma| and so on.
%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thm-listof}[2010/04/05 v0.1beta13 thm-listof (ulmi)]
\let\@xa=\expandafter
\let\@nx=\noexpand
-\RequirePackage{thm-patch}
+\RequirePackage{thm-patch,keyval,kvsetkeys}
\def\thmtlo@oldchapter{0}%
\newcommand\thmtlo@chaptervspacehack{}
-\@ifundefined{chapter}{}{%
+\ifcsname chapter\endcsname
\def\thmtlo@chaptervspacehack{%
- \ifnum \arabic{chapter}>\thmtlo@oldchapter\relax
+ \ifnum \value{chapter}>\thmtlo@oldchapter\relax
% new chapter, add vspace to loe.
\addtocontents{loe}{\protect\addvspace{10\p@}}%
- \edef\thmtlo@oldchapter{\arabic{chapter}}%
+ \xdef\thmtlo@oldchapter{\arabic{chapter}}%
\fi
}%
-}
+\fi
\providecommand\listtheoremname{List of Theorems}
\newcommand\listoftheorems[1][]{%
@@ -138,6 +76,9 @@
\bgroup
\setlisttheoremstyle{#1}%
\let\listfigurename\listtheoremname
+ \def\contentsline##1{%
+ \csname thmt@contentsline@##1\endcsname{##1}%
+ }%
\let\thref@starttoc\@starttoc
\def\@starttoc##1{\thref@starttoc{loe}}%
% new hack: to allow multiple calls, we defer the opening of the
@@ -158,7 +99,7 @@
}
\newcommand\setlisttheoremstyle[1]{%
- \setkeys{thmt-listof}{#1}%
+ \kvsetkeys{thmt-listof}{#1}%
}
\define@key{thmt-listof}{numwidth}{\def\thmt@listnumwidth{#1}}
\define@key{thmt-listof}{ignore}[\thmt@allenvs]{\ignoretheorems{#1}}
@@ -175,10 +116,21 @@
\@xa\protected@edef\csname l@\thmt@envname\endcsname{% CHECK: why p@edef?
\@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}%
}%
- \@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
+ \ifthmt@isstarred
+ \@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
+ }%
+ \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
+ }%
+ \fi
+ \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{%
+ \thmt@contentslineShow% default:show
}%
}
\def\thmt@allenvs{\@gobble}
@@ -196,37 +148,60 @@
\csname ll@\thmt@envname\endcsname
}%
}
+
+\newcommand\showtheorems[1]{%
+ \@for\thm:=#1\do{%
+ \typeout{showing \thm}%
+ \@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineShow
+ }%
+}
+
\newcommand\ignoretheorems[1]{%
\@for\thm:=#1\do{%
- \@xa\let\csname l@\thm\endcsname=\@gobbletwo
+ \@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineIgnore
}%
}
\newcommand\onlynamedtheorems[1]{%
\@for\thm:=#1\do{%
- \@xa\let\csname l@\thm\endcsname=\thmt@showifnamedtheorem
+ \global\@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineIfNamed
}%
}
-\def\thmt@showifnamedtheorem#1#2{%
- % check for \thmtformatoptarg on top level of first argument.
- \thmt@sh@wifnamedtheorem#1\thmtformatoptarg\@nil{%
- \@dottedtocline{1}{1.5em}{\thmt@listnumwidth}{#1}{#2}%
- }{}%
+
+\AtBeginDocument{%
+\@ifpackageloaded{hyperref}{%
+ \let\thmt@hygobble\@gobble
+}{%
+ \let\thmt@hygobble\@empty
+}
+\let\thmt@contentsline\contentsline
+}
+
+\def\thmt@contentslineIgnore#1#2#3{%
+ \thmt@hygobble
+}
+\def\thmt@contentslineShow{%
+ \thmt@contentsline
}
-\def\thmt@sh@wifnamedtheorem#1\thmtformatoptarg#2\@nil{%
+
+\def\thmt@contentslineIfNamed#1#2#3{%
+ \thmt@ifhasoptname #2\thmtformatoptarg\@nil{%
+ \thmt@contentslineShow{#1}{#2}{#3}%
+ }{%
+ \thmt@contentslineIgnore{#1}{#2}{#3}%
+ %\thmt@contentsline{#1}{#2}{#3}%
+ }
+}
+
+\def\thmt@ifhasoptname #1\thmtformatoptarg#2\@nil{%
\ifx\@nil#2\@nil
\@xa\@secondoftwo
\else
\@xa\@firstoftwo
\fi
}
-
-\newcommand\showtheorems[1]{%
- \@for\thm:=#1\do{%
- \@xa\protected@edef\csname l@\thm\endcsname{% CHECK: why p@edef?
- \@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}%
- }%
- }%
-}
% \end{macrocode}
%\iffalse
%</listof>
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
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx b/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx
index ccd9ba16397..9b0c03d1ef7 100644
--- a/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx
@@ -10,69 +10,9 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-patch}
-\newtheorem{lemma}{Lemma}
-\providecommand\pkg{\textsf}
-\GetFileInfo{thm-patch.sty}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
-
- \newcommand\thmpatch{\textsf{thm-patch}}
- \title{The \thmpatch\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: thm-patch.dtx,v 1.15 2008/09/02 19:33:09 ulmi Exp ulmi ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
-\begin{abstract}
-\end{abstract}
-
- \DocInput{thm-patch.dtx}
-\end{document}
-%</driver>
%<*patch>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
-%
% This package is maybe not very suitable for the end user. It redefines
% |\newtheorem| in a way that lets other packages (or the user) add code
% to the newly-defined theorems, in a reasonably cross-compatible (with
@@ -104,65 +44,35 @@
% the extra optional title, if any.
%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thm-patch}[2008/09/02 v0.1beta6b thm-patch (ulmi)]
-\let\@xa=\expandafter
-\let\@nx=\noexpand
\RequirePackage{parseargs}
-\@ifundefined{c@thmt@dummyctr}{%
- \newcounter{thmt@dummyctr}%
-}{}%
-\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
-\gdef\thethmt@dummyctr{}%
-
\newif\ifthmt@isstarred
\newif\ifthmt@hassibling
\newif\ifthmt@hasparent
-\@ifundefined{beamer@version}{%
- \def\thmt@parsetheoremargs#1{%
- \parse{%
- {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
- {%
- \csname thmt@#1@preheadhook\endcsname
- \thmt@generic@preheadhook
- \protected@edef\tmp@args{%
- \ifx\@empty\thmt@optarg\else [\thmt@optarg]\fi
- }%
- \csname thmt@original@#1\@xa\endcsname\tmp@args
- \csname thmt@#1@postheadhook\endcsname
- \thmt@generic@postheadhook
- \let\@parsecmd\@empty
+\def\thmt@parsetheoremargs#1{%
+ \parse{%
+ {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
+ {%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+ \thmt@local@preheadhook
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \protected@edef\tmp@args{%
+ \ifx\@empty\thmt@optarg\else [{\thmt@optarg}]\fi
}%
+ \csname thmt@original@#1\@xa\endcsname\tmp@args
+ \thmt@local@postheadhook
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ \let\@parsecmd\@empty
}%
}%
-}{%
- \newif\ifthmt@hasoverlay
- \def\thmt@parsetheoremargs#1{%
- \parse{%
- {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
- {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
- {\ifthmt@hasoverlay\expandafter\@gobble\else\expandafter\@firstofone\fi
- {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
- }%
- {%
- \csname thmt@#1@preheadhook\endcsname
- \thmt@generic@preheadhook
- \protected@edef\tmp@args{%
- \ifthmt@hasoverlay <\thmt@overlay>\fi
- \ifx\@empty\thmt@optarg\else [\thmt@optarg]\fi
- }%
- \csname thmt@original@#1\@xa\endcsname\tmp@args
- \csname thmt@#1@postheadhook\endcsname
- \thmt@generic@postheadhook
- \let\@parsecmd\@empty
- }%
- }
- }%
-}
+}%
\let\thmt@original@newtheorem\newtheorem
\let\thmt@theoremdefiner\thmt@original@newtheorem
@@ -183,7 +93,7 @@
\newcommand\thmt@newtheoremiv{%
\thmt@newtheorem@predefinition
- % whee, now reassemble the whole shit.
+ % whee, now reassemble the whole shebang.
\protected@edef\thmt@args{%
\@nx\thmt@theoremdefiner%
\ifthmt@isstarred *\fi
@@ -199,6 +109,9 @@
\newcommand\thmt@newtheorem@predefinition{}
\newcommand\thmt@newtheorem@postdefinition{}
+\g@addto@macro\thmt@newtheorem@predefinition{%
+ \@xa\thmt@providetheoremhooks\@xa{\thmt@envname}%
+}
\g@addto@macro\thmt@newtheorem@postdefinition{%
\@xa\thmt@addtheoremhook\@xa{\thmt@envname}%
\ifthmt@isstarred\@namedef{the\thmt@envname}{}\fi
@@ -210,6 +123,16 @@
\thmt@tmp
}%
}
+\newcommand\thmt@providetheoremhooks[1]{%
+ \@namedef{thmt@#1@preheadhook}{}%
+ \@namedef{thmt@#1@postheadhook}{}%
+ \@namedef{thmt@#1@prefoothook}{}%
+ \@namedef{thmt@#1@postfoothook}{}%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+}
\newcommand\thmt@addtheoremhook[1]{%
% this adds two command calls to the newly-defined theorem.
\@xa\let\csname thmt@original@#1\@xa\endcsname
@@ -221,18 +144,24 @@
\@xa\def\csname end#1\endcsname{%
% these need to be in opposite order of headhooks.
\csname thmtgeneric@prefoothook\endcsname
- \csname thmt@#1@prefoothook\endcsname
+ \csname thmt@#1@prefoothook\endcsname
+ \csname thmt@local@prefoothook\endcsname
\csname thmt@original@end#1\endcsname
\csname thmt@generic@postfoothook\endcsname
\csname thmt@#1@postfoothook\endcsname
+ \csname thmt@local@postfoothook\endcsname
}%
- \@namedef{thmt@#1@preheadhook}{}%
- \@namedef{thmt@#1@postheadhook}{}%
- \@namedef{thmt@#1@prefoothook}{}%
- \@namedef{thmt@#1@postfoothook}{}%
}
\newcommand\thmt@generic@preheadhook{\refstepcounter{thmt@dummyctr}}
\newcommand\thmt@generic@postheadhook{}
+\newcommand\thmt@generic@prefoothook{}
+\newcommand\thmt@generic@postfoothook{}
+
+\def\thmt@local@preheadhook{}
+\def\thmt@local@postheadhook{}
+\def\thmt@local@prefoothook{}
+\def\thmt@local@postfoothook{}
+
\providecommand\g@prependto@macro[2]{%
\begingroup
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx b/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx
index 2f7a4ec1e6b..1abbee30f6c 100644
--- a/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx
@@ -10,70 +10,9 @@
% \fi
%
%\iffalse (hide this from DocInput)
-%<*driver>
-\documentclass{ltxdoc}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.8]{helvet}
-\usepackage{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-restate}
-\newtheorem{lemma}{Lemma}
-\providecommand\pkg{\textsf}
-\GetFileInfo{thm-restate.sty}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\begin{document}
-
- \newcommand\thmrestate{\textsf{thm-restate}}
- \title{The \thmrestate\ package\thanks{%
- This file documents version~\fileversion\ of~\filedate,
- RCS ${}$Id: thm-restate.dtx,v 1.16 2010/04/05 18:02:27 ulmi Exp ulmi ${}$.
- }}
- \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
-
- \maketitle
-
-\begin{abstract}
- This package provides one single environment, restatable, which lets you
- repeat whole theorems without retyping them.
-\end{abstract}
-
- \DocInput{thm-restate.dtx}
-\end{document}
-%</driver>
%<*restate>
%\fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-% \CheckSum{160}
-%
-% \DoNotIndex{\@for,\addtocounter,\arabic,\csname,\endcsname,\cup,\CurrentOption}
-% \DoNotIndex{\{,\},\do,\define@key,\def,\DeclareOption,\else,\ensuremath,\expandafter}
-% \DoNotIndex{\hspace,\fi,\rule,\ifcase,\ifx,\in,\InputIfFileExists,\leq,\let,\mathpalette}
-% \DoNotIndex{\NeedsTeXFormat,\ldots,\ldotp,\newcommand,\newcounter,\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\parm,\ProcessOptions,\protected@edef}
-% \DoNotIndex{\providecommand,\ProvidesPackage,\relax,\renewcommand,\RequirePackage}
-% \DoNotIndex{\setcounter,\setkeys,\rlap,\setminus,\widthof,\mathrm}
-%
-%\section{Usage}
%\DescribeEnv{restatable}
%Only one environment is provided: \verb|restatable|, which takes one
%optional and two mandatory arguments. The first mandatory argument is the
@@ -146,10 +85,7 @@
%
%
%\StopEventually{}
-%\section{Implementation}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thm-restate}[2010/04/05 v0.1beta13 thm-restate (ulmi)]
\let\@xa\expandafter
\let\@nx\noexpand
@@ -158,7 +94,6 @@
}{}
\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
\gdef\thethmt@dummyctr{}%
-\newtoks\thmt@toks
\long\def\thmt@collect@body#1#2\end#3{%
\@xa\thmt@toks\@xa{\the\thmt@toks #2}%
\def\thmttmpa{#3}%\def\thmttmpb{restatable}%
@@ -174,8 +109,10 @@
}%
}
-\def\thmt@trivialref#1{%
- \@xa\@xa\@xa\thmt@trivi@lr@f\csname r@#1\endcsname\@nil
+\def\thmt@trivialref#1#2{%
+ \ifcsname r@#1\endcsname
+ \@xa\@xa\@xa\thmt@trivi@lr@f\csname r@#1\endcsname\relax\@nil
+ \else #2\fi
}
\def\thmt@trivi@lr@f#1#2\@nil{#1}
@@ -205,6 +142,8 @@
\newif\ifthmt@thisistheone
\newenvironment{thmt@restatable}[3][]{%
+ \thmt@toks{}%
+ \stepcounter{thmt@dummyctr}%
\long\def\thmrst@store##1{%
\@xa\gdef\csname #3\endcsname{%
\@ifstar{%
@@ -227,7 +166,8 @@
\@currentlabel
\protect\def\@xa\protect\csname the\ctr\endcsname{\csname the\ctr\endcsname}%
\ifcsname theH\ctr\endcsname
- \protect\def\@xa\protect\csname theH\ctr\endcsname{\csname theH\ctr\endcsname}%
+ \protect\def\@xa\protect\csname theH\ctr\endcsname{%
+ (restate \protect\theHthmt@dummyctr)\csname theH\ctr\endcsname}%
\fi
\protect\setcounter{\ctr}{\number\csname c@\ctr\endcsname}%
}%
@@ -236,7 +176,10 @@
\egroup
\else
\@xa\protected@edef\csname the#2\endcsname{%
- \thmt@trivialref{thmt@@#3}}%
+ \thmt@trivialref{thmt@@#3}{??}}%
+ \ifcsname r@thmt@@#3\endcsname\else
+ \G@refundefinedtrue
+ \fi
\@xa\let\csname c@#2\endcsname=\c@thmt@dummyctr
\@xa\let\csname theH#2\endcsname=\theHthmt@dummyctr
\let\label=\@gobble
@@ -248,7 +191,7 @@
\protect\setcounter{equation}{\arabic{equation}}%
}%
}
- \thmt@trivialref{thmt@@#3@data}%
+ \thmt@trivialref{thmt@@#3@data}{}%
\fi
%\def\@currenvir{#2}%
\csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thmdef-shaded.dtx b/Master/texmf-dist/source/latex/thmtools/thmdef-shaded.dtx
new file mode 100644
index 00000000000..55559b3a1f8
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thmdef-shaded.dtx
@@ -0,0 +1,62 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by Ulrich M. Schwarz
+% See file COPYING for more details.
+%\fi
+%
+%\iffalse (hide this from DocInput)
+%<*shaded>
+%\fi
+% \begin{macrocode}
+ \define@key{thmdef}{shaded}[{}]{%
+ \thmt@trytwice{}{%
+ \RequirePackage{shadethm}%
+ \RequirePackage{thm-patch}%
+ \addtotheorempreheadhook[\thmt@envname]{%
+ \setlength\shadedtextwidth{\linewidth}%
+ \kvsetkeys{thmt@shade}{#1}\begin{shadebox}}%
+ \addtotheorempostfoothook[\thmt@envname]{\end{shadebox}}%
+ }%
+ }
+% There are some parameters you could set the default for (try them as is,
+% first).
+% (i) shadethmcolor The shading color of the background. See the
+% documentation for the color package, but with a `gray' model, I find .97
+% looks good out of my printer, while a darker shade like .92 is needed
+% to make it copy well. (Black is 0, white is 1.)
+% (i*) shaderulecolor The shading color of the border of the shaded box.
+% See (i). If \shadeboxrule is set to 0pt then this won't print anyway.
+% (i**) shadeboxrule The width of the border around the shading. Set it to
+% 0pt (not just 0) to make it disappear.
+% (i***) shadeboxsep The length by which the shade box surrounds the text.
+\define@key{thmt@shade}{textwidth}{\setlength\shadedtextwidth{#1}}
+\define@key{thmt@shade}{bgcolor}{\thmt@definecolor{shadethmcolor}{#1}}
+\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
+ \csname\string\color@#2\endcsname
+ % this is dubious at best, we don't know what a backend does.
+}
+\AtBeginDocument{%
+ \ifcsname colorlet\endcsname
+ \let\thmt@colorlet\colorlet
+ \fi
+}
+
+\def\thmt@drop@relax#1\relax{}
+\def\thmt@definecolor#1#2{%
+ \thmt@def@color{#1}#2\thmt@drop@relax
+ {gray}{0.5}%
+ \thmt@colorlet{#1}{#2}%
+ \relax
+}
+\def\thmt@def@color#1#2#{%
+ \definecolor{#1}}
+% \end{macrocode}
+%\iffalse (hide this from DocInput)
+%</shaded>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thmdef-thmbox.dtx b/Master/texmf-dist/source/latex/thmtools/thmdef-thmbox.dtx
new file mode 100644
index 00000000000..8da999bfdaa
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thmdef-thmbox.dtx
@@ -0,0 +1,26 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by Ulrich M. Schwarz
+% See file COPYING for more details.
+%\fi
+%
+%\iffalse (hide this from DocInput)
+%<*thmbox>
+%\fi
+% \begin{macrocode}
+\define@key{thmdef}{thmbox}[L]{%
+ \let\oldproof=\proof
+ \let\oldendproof=\endproof
+ \let\oldexample=\example
+ \let\oldendexample=\endexample
+ \RequirePackage[nothm]{thmbox}
+ \let\proof=\oldproof
+ \let\endproof=\oldendproof
+ \let\example=\oldexample
+ \let\endexample=\oldendexample
+ \def\thmt@theoremdefiner{\newboxtheorem[#1]}%
+}%
+% \end{macrocode}
+%\iffalse (hide this from DocInput)
+%</thmbox>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thmtools.dtx b/Master/texmf-dist/source/latex/thmtools/thmtools.dtx
index 67106b76f21..0cb1696e9ff 100644
--- a/Master/texmf-dist/source/latex/thmtools/thmtools.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/thmtools.dtx
@@ -11,78 +11,79 @@
%
%\iffalse (hide this from DocInput)
%<*driver>
-\documentclass{ltxdoc}
-
-\let\pkg\textsf
-\def\thmtools{\pkg{thmtools}}
-\def\thmversion{2010/04/05 v0.1beta13}
-
-\usepackage[T1]{fontenc}
-\usepackage[widespace]{fourier}
-\usepackage[scaled=0.88]{helvet}
-\usepackage[scaled]{luximono}
-
-\usepackage{amsmath, amsthm}
-\usepackage{thm-patch, thm-kv, thm-autoref, thm-listof, thm-restate}
-\declaretheorem{remark}
-\declaretheorem{lemma}
-\declaretheorem[sibling=lemma, shaded, name={Rule of Thumb}]{ruleofthumb}
-\usepackage{color}
-\declaretheorem[shaded={bgcolor={rgb}{1,0,0},rulecolor={rgb}{0,1,0},rulewidth=2em,
- margin=1em, textwidth=5cm}]{eyesore}
-
+\makeatletter
+\ifx\documentclass\@twoclasserror\else
+ \expandafter\@firstofone
+\fi{%
+ \makeatother
+ %% we are either \RequirePackage'd
+ %% (which we won't support) or compiled directly.
+ %% If we are compiled directly, yield the manual.
+ %% Otherwise, this looks like a debugging session
+ %% that directly uses the dtx file instead of the sty.
+ \input{thmtools-manual.tex}
+ \endinput
+}
+%</driver>
+%<*thmtools>
+%\fi
+% \begin{macrocode}
+% common abbreviations and marker macros.
+\let\@xa\expandafter
+\let\@nx\noexpand
+\def\thmt@quark{\thmt@quark}
+\newtoks\thmt@toks
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\OnlyDescription
-\title{The \thmtools\ bundle\thanks{%
- This documents \thmtools\ version \thmversion.
- Newer releases might be available at http://absatzen.de/.
-}}
-\author{Ulrich M. Schwarz, \texttt{ulmi@absatzen.de}}
-\begin{document}
- \maketitle
- \begin{abstract}
- \thmtools\ is a collection of tools and enhancements for theorem
- environments.
- \end{abstract}
- \begin{remark}
- Each of the packages has its own documentation in a file named after the
- package itself. The only difference is that those documentations include
- the reasonably-well documented source code.
- \end{remark}
- \section*{\pkg{thm-kv}}
- \DocInput{thm-kv.dtx}
-
- \section*{\pkg{thm-restate}}
- \DocInput{thm-restate.dtx}
-
- \section*{\pkg{thm-autoref}}
- \DocInput{thm-autoref.dtx}
+% a scratch counter, mostly for fake hyperlinks
+\newcounter{thmt@dummyctr}%
+\def\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
+\def\thethmt@dummyctr{}%
- \section*{\pkg{thm-listof}}
- \DocInput{thm-listof.dtx}
-
- \section*{\pkg{thm-patch}}
- \DocInput{thm-patch.dtx}
+\newcommand\thmt@mkextendingkeyhandler[3]{%
+% #1: family
+% #2: prefix for file
+% #3: key hint for error
+ \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.
+ }%
+ }%
+ }
+}
- \section*{\pkg{aliasctr}}
- \DocInput{aliasctr.dtx}
+\RequirePackage{thm-patch, thm-kv,
+ thm-autoref, thm-listof,
+ thm-restate}
- \section*{\pkg{parseargs}}
- \DocInput{parseargs.dtx}
+% Glue code for the big players.
+\@ifpackageloaded{amsthm}{%
+ \RequirePackage{thm-amsthm}
+}{}
+\@ifpackageloaded{ntheorem}{%
+ \RequirePackage{thm-ntheorem}
+}{}
+\@ifclassloaded{beamer}{%
+ \RequirePackage{thm-beamer}
+}{}
+% \end{macrocode}
- \section*{\pkg{unique}}
- \DocInput{unique.dtx}
-\end{document}
-%</driver>
-%<*thmtools>
-%\fi
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thmtools}[2008/07/05 v0.1beta7 Tools for theorem typesetting (ulmi)]
-\RequirePackage{thm-kv, thm-autoref, thm-listof}
%\iffalse
%</thmtools>
%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thmtools.ins b/Master/texmf-dist/source/latex/thmtools/thmtools.ins
index 388e0fbb186..852d3e3358f 100644
--- a/Master/texmf-dist/source/latex/thmtools/thmtools.ins
+++ b/Master/texmf-dist/source/latex/thmtools/thmtools.ins
@@ -1,8 +1,12 @@
%%
%% This is a bog-standard .ins file: thmtools.ins
%%
+\input VERSION.tex
+%\show\VERSION
+\def\dropext #1.#2\relax{#1}
\input docstrip.tex
-\keepsilent
+%\keepsilent
+\askonceonly
\preamble
This is a generated file.
@@ -10,13 +14,14 @@ 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 by Ulrich M. Schwarz.
+Copyright (C) 2008-\the\year 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
+^^J\noexpand\noexpand\noexpand\NeedsTeXFormat{LaTeX2e}^^J\noexpand\noexpand\noexpand\ProvidesPackage{\noexpand\expandafter\noexpand\dropext\outFileName\relax}[\VERSION]
\endpreamble
\generate{%
@@ -29,6 +34,11 @@ http://www.latex-project.org/lppl/lppl-1-3a.txt
\file{parseargs.sty}{\from{parseargs.dtx}{parseargs}}
\file{aliasctr.sty}{\from{aliasctr.dtx}{code}}
\file{unique.sty}{\from{unique.dtx}{code}}
+ \file{thm-amsthm.sty}{\from{thm-amsthm.dtx}{amsthm}}
+ \file{thm-ntheorem.sty}{\from{thm-ntheorem.dtx}{ntheorem}}
+ \file{thm-beamer.sty}{\from{thm-beamer.dtx}{beamer}}
+ \file{thmdef-shaded.sty}{\from{thmdef-shaded.dtx}{shaded}}
+ \file{thmdef-thmbox.sty}{\from{thmdef-thmbox.dtx}{thmbox}}
}
\Msg{*********************************************************}
\Msg{*}
diff --git a/Master/texmf-dist/source/latex/thmtools/unique.dtx b/Master/texmf-dist/source/latex/thmtools/unique.dtx
index cd60a7e8900..9afbd2cffa2 100644
--- a/Master/texmf-dist/source/latex/thmtools/unique.dtx
+++ b/Master/texmf-dist/source/latex/thmtools/unique.dtx
@@ -10,31 +10,8 @@
% \fi
%
%\iffalse
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage{unique}
-
-\usepackage[T1]{fontenc}
-\usepackage{fourier}
-\usepackage[scaled=0.87]{luximono, helvet}
-\newcommand\pkg{\textsf}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\GetFileInfo{unique.sty}
-\author{Ulrich M. Schwarz\thanks{ulmi at absatzen dot de}}
-\title{The \pkg{unique} package\thanks{%
- This documents \pkg{unique}~\fileversion, dated~\filedate.
- Newer versions might be found at http://absatzen.de
-}}
-\begin{document}
- \maketitle
- \DocInput{unique.dtx}
-\end{document}
-%</driver>
%<*code>
%\fi
-% \section{Usage}
% Two macros are provided: |\setuniqmark| takes a single parameter,
% the name, which should be a string of letters. |\ifuniqmark| takes
% three parameters: a name, a true-part and a false-part. The true
@@ -49,15 +26,25 @@
% fall back to numbering when you add another one.
%
% \StopEventually{}
-% \section{Implementation}
%
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{unique}[2007/07/29 v0.1 test for uniqueness (ulmi)]
+
+\DeclareOption{unq}{%
+ \newwrite\uniq@channel
+ \InputIfFileExists{\jobname.unq}{}{}%
+ \immediate\openout\uniq@channel=\jobname.unq
+ \AtEndDocument{%
+ \immediate\closeout\uniq@channel%
+ }
+}
+\DeclareOption{aux}{%
+ \let\uniq@channel\@auxout
+}
+
% \end{macrocode}
%
%
-% \iffalse $Id: unique.dtx,v 1.3 2008/03/09 18:59:17 ulmi Exp $\fi
+% \iffalse $Id: unique.dtx,v 1.4 2010/04/25 19:37:46 ulmi Exp $\fi
% \begin{macro}{\setuniqmark}
% Call this with a name to set the corresponding uniqmark. The name must
% be suitable for |\csname|-constructs, i.e. fully expansible to a
@@ -72,7 +59,7 @@
\global\@namedef{uniq@now@#1}{\uniq@ONE}%
\else
\expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
- \immediate\write\@auxout{%
+ \immediate\write\uniq@channel{%
\string\uniq@setmany{#1}%
}%
\ifuniq{#1}{%
@@ -178,6 +165,8 @@
\AtEndDocument{%
\immediate\write\@auxout{\string\uniq@maybesuggestrerun}%
}
+\ExecuteOptions{aux}
+\ProcessOptions\relax
% \end{macrocode}
%\iffalse
%</code>
diff --git a/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
index e8e4f1aec61..76b8d150a11 100644
--- a/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
@@ -11,15 +11,16 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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{aliasctr}[2006/01/22 v0.1 counter aliasing (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {aliasctr}[2010/05/18 v24]
\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 b08ac01f3ed..1216cebb1ad 100644
--- a/Master/texmf-dist/tex/latex/thmtools/parseargs.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/parseargs.sty
@@ -11,15 +11,16 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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{parseargs}[2008/05/12 v0.1alpha1 generic argument parser (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {parseargs}[2010/05/18 v24]
\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
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'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty
index 663fd9001b9..73a682d4e39 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty
@@ -11,17 +11,18 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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-autoref}[2008/03/09 v0.1beta2 thm-autoref (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-autoref}[2010/05/18 v24]
-\RequirePackage{thm-patch, aliasctr}
+\RequirePackage{thm-patch, aliasctr, parseargs, keyval}
\let\@xa=\expandafter
\let\@nx=\noexpand
@@ -40,6 +41,64 @@
}
\g@addto@macro\thmt@newtheorem@predefinition{\thmt@autorefsetup}%
\g@addto@macro\thmt@newtheorem@postdefinition{\csname thmt@autoreffix\endcsname}%
+
+\def\thmt@refnamewithcomma #1#2#3,#4,#5\@nil{%
+ \@xa\def\csname\thmt@envname #1utorefname\endcsname{#3}%
+ \ifcsname #2refname\endcsname
+ \csname #2refname\endcsname{\thmt@envname}{#3}{#4}%
+ \fi
+}
+\define@key{thmdef}{refname}{\thmt@trytwice{}{%
+ \thmt@refnamewithcomma{a}{c}#1,\textbf{?? (pl. #1)},\@nil
+}}
+\define@key{thmdef}{Refname}{\thmt@trytwice{}{%
+ \thmt@refnamewithcomma{A}{C}#1,\textbf{?? (pl. #1)},\@nil
+}}
+
+\ifcsname Autoref\endcsname\else
+\let\thmt@HyRef@testreftype\HyRef@testreftype
+\def\HyRef@Testreftype#1.#2\\{%
+ \ltx@IfUndefined{#1Autorefname}{%
+ \thmt@HyRef@testreftype#1.#2\\%
+ }{%
+ \edef\HyRef@currentHtag{%
+ \expandafter\noexpand\csname#1Autorefname\endcsname
+ \noexpand~%
+ }%
+ }%
+}
+
+\let\thmt@HyPsd@@autorefname\HyPsd@@autorefname
+\def\HyPsd@@Autorefname#1.#2\@nil{%
+ \tracingall
+ \ltx@IfUndefined{#1Autorefname}{%
+ \thmt@HyPsd@@autorefname#1.#2\@nil
+ }{%
+ \csname#1Autorefname\endcsname\space
+ }%
+}%
+\def\Autoref{%
+ \parse{%
+ {\parseFlag*{\def\thmt@autorefstar{*}}{\let\thmt@autorefstar\@empty}}%
+ {\parseMand{%
+ \bgroup
+ \let\HyRef@testreftype\HyRef@Testreftype
+ \let\HyPsd@@autorefname\HyPsd@@Autorefname
+ \@xa\autoref\thmt@autorefstar{##1}%
+ \egroup
+ \let\@parsecmd\@empty
+ }}%
+ }%
+}
+\fi % ifcsname Autoref
+
+\AtBeginDocument{%
+ \@ifpackageloaded{nameref}{%
+ \addtotheorempostheadhook{%
+ \expandafter\NR@gettitle\expandafter{\thmt@optarg}%
+ }}{}
+}
+
\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
new file mode 100644
index 00000000000..c690a3c6027
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-beamer.sty
@@ -0,0 +1,54 @@
+%%
+%% This is file `thm-beamer.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-beamer.dtx (with options: `beamer')
+%% 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-beamer}[2010/05/18 v24]
+\newif\ifthmt@hasoverlay
+\def\thmt@parsetheoremargs#1{%
+ \parse{%
+ {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
+ {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
+ {\ifthmt@hasoverlay\expandafter\@gobble\else\expandafter\@firstofone\fi
+ {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
+ }%
+ {%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+ \thmt@local@preheadhook
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \protected@edef\tmp@args{%
+ \ifthmt@hasoverlay <\thmt@overlay>\fi
+ \ifx\@empty\thmt@optarg\else [{\thmt@optarg}]\fi
+ }%
+ \csname thmt@original@#1\@xa\endcsname\tmp@args
+ \thmt@local@postheadhook
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ \let\@parsecmd\@empty
+ }%
+ }
+}%
+\endinput
+%%
+%% End of file `thm-beamer.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty
index fec5a0051ba..d984ebdee4c 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty
@@ -11,48 +11,111 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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-kv}[2009/07/30 v0.1beta11 thm-kv interface (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-kv}[2010/05/18 v24]
+
\let\@xa\expandafter
\let\@nx\noexpand
-\RequirePackage{keyval}
+\RequirePackage{keyval,kvsetkeys,thm-patch}
+
+\newif\if@thmt@firstkeyset
+
+\def\thmt@trytwice{%
+ \if@thmt@firstkeyset
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\@for\keyname:=parent,numberwithin,within\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setparent{#1}}{}}%
+}
+
+\@for\keyname:=sibling,numberlike,sharenumber\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setsibling{#1}}{}}%
+}
-\define@key{thmt}{parent}{\thmt@setparent{#1}}
-\define@key{thmt}{numberwithin}{\thmt@setparent{#1}}
-\define@key{thmt}{within}{\thmt@setparent{#1}}
+\@for\keyname:=title,name,heading\do{%
+\define@key{thmdef}{\keyname}{\thmt@trytwice{\thmt@setthmname{#1}}{}}%
+}
-\define@key{thmt}{sibling}{\thmt@setsibling{#1}}
-\define@key{thmt}{numberlike}{\thmt@setsibling{#1}}
-\define@key{thmt}{sharenumber}{\thmt@setsibling{#1}}
+\@for\keyname:=unnumbered,starred\do{%
+\define@key{thmdef}{\keyname}[]{\thmt@trytwice{\thmt@isnumberedfalse}{}}%
+}
-\define@key{thmt}{title}{\thmt@setthmname{#1}}
-\define@key{thmt}{name}{\thmt@setthmname{#1}}
-\define@key{thmt}{heading}{\thmt@setthmname{#1}}
+\def\thmt@YES{yes}
+\def\thmt@NO{no}
+\def\thmt@UNIQUE{unless unique}
+\define@key{thmdef}{numbered}[\thmt@YES]{
+ \def\thmt@tmp{#1}%
+ \thmt@trytwice{%
+ \ifx\thmt@tmp\thmt@YES
+ \thmt@isnumberedtrue
+ \else\ifx\thmt@tmp\thmt@NO
+ \thmt@isnumberedfalse
+ \else\ifx\thmt@tmp\thmt@UNIQUE
+ \RequirePackage[unq]{unique}
+ \ifuniq{\thmt@envname}{%
+ \thmt@isnumberedfalse
+ }{%
+ \thmt@isnumberedtrue
+ }%
+ \else
+ \PackageError{thmtools}{Unknown value `#1' to key numbered}{}%
+ \fi\fi\fi
+ }{% trytwice: after definition
+ \ifx\thmt@tmp\thmt@UNIQUE
+ \addtotheorempreheadhook[\thmt@envname]{\setuniqmark{\thmt@envname}}%
+ \addtotheorempreheadhook[\thmt@envname]{\def\thmt@dummyctrautorefname{\thmt@thmname\@gobble}}
+ \fi
+ }%
+}
-\define@key{thmt}{unnumbered}[]{\thmt@isnumberedfalse}
-\define@key{thmt}{starred}[]{\thmt@isnumberedfalse}
+\define@key{thmdef}{preheadhook}{\thmt@trytwice{}{\addtotheorempreheadhook[\thmt@envname]{#1}}}
+\define@key{thmdef}{postheadhook}{\thmt@trytwice{}{\addtotheorempostheadhook[\thmt@envname]{#1}}}
+\define@key{thmdef}{prefoothook}{\thmt@trytwice{}{\addtotheoremprefoothook[\thmt@envname]{#1}}}
+\define@key{thmdef}{postfoothook}{\thmt@trytwice{}{\addtotheorempostfoothook[\thmt@envname]{#1}}}
-\define@key{thmt}{preheadhook}{\addtotheorempreheadhook[\thmt@envname]{#1}}
-\define@key{thmt}{postheadhook}{\addtotheorempostheadhook[\thmt@envname]{#1}}
-\define@key{thmt}{prefoothook}{\addtotheoremprefoothook[\thmt@envname]{#1}}
-\define@key{thmt}{postfoothook}{\addtotheorempostfoothook[\thmt@envname]{#1}}
+\define@key{thmdef}{style}{\thmt@trytwice{\thmt@setstyle{#1}}{}}
-\define@key{thmt}{style}{\thmt@setstyle{#1}}
+\define@key{thmdef0}{style}{%
+ \ifcsname thmt@style #1@defaultkeys\endcsname
+ \thmt@toks{\kvsetkeys{thmdef}}%
+ \@xa\@xa\@xa\the\@xa\@xa\@xa\thmt@toks\@xa\@xa\@xa{%
+ \csname thmt@style #1@defaultkeys\endcsname}%
+ \fi
+}
+\kv@set@family@handler{thmdef0}{}% ignore everything else.
-\providecommand\theoremstyle[1]{%
+\def\thmt@setstyle#1{%
\PackageWarning{thm-kv}{%
- Your backend doesn't have a `\string\theoremstyle' command.\MessageBreak
- Your style request `#1' was ignored
+ Your backend doesn't have a `\string\theoremstyle' command.
}%
}
-\let\thmt@setstyle\theoremstyle
+
+\ifcsname theoremstyle\endcsname
+ \let\thmt@originalthmstyle\theoremstyle
+ \def\thmt@outerstyle{plain}
+ \renewcommand\theoremstyle[1]{%
+ \def\thmt@outerstyle{#1}%
+ \thmt@originalthmstyle{#1}%
+ }
+ \def\thmt@setstyle#1{%
+ \thmt@originalthmstyle{#1}%
+ }
+ \g@addto@macro\thmt@newtheorem@postdefinition{%
+ \thmt@originalthmstyle{\thmt@outerstyle}%
+ }
+\fi
\newif\ifthmt@isnumbered
\newcommand\thmt@setparent[1]{%
@@ -65,6 +128,8 @@
\def\thmt@thmname
}
+\thmt@mkextendingkeyhandler{thmdef}{thmdef}{\string\declaretheorem\space key}
+
\newcommand\declaretheorem[2][]{%
\let\thmt@theoremdefiner\thmt@original@newtheorem
\def\thmt@envname{#2}%
@@ -72,7 +137,9 @@
\thmt@setparent{}%
\thmt@setsibling{}%
\thmt@isnumberedtrue%
- \setkeys{thmt}{#1}%
+ \@thmt@firstkeysettrue%
+ \kvsetkeys{thmdef0}{#1}%
+ \kvsetkeys{thmdef}{#1}%
\protected@edef\thmt@tmp{%
\@nx\newtheorem
\ifthmt@isnumbered\else *\fi
@@ -84,33 +151,81 @@
\thmt@tmp
% uniquely ugly kludge: some keys make only sense
% afterwards.
- \setkeys{thmt}{#1}%
-}
- \define@key{thmt}{shaded}[{}]{%
- \RequirePackage{shadethm}%
- \RequirePackage{thm-patch}%
- \addtotheorempreheadhook[\thmt@envname]{%
- \setlength\shadedtextwidth{\linewidth}%
- \setkeys{thmt@shade}{#1}\begin{shadebox}}%
- \addtotheorempostfoothook[\thmt@envname]{\end{shadebox}}%
- }
-\define@key{thmt@shade}{textwidth}{\setlength\shadedtextwidth{#1}}
-\define@key{thmt@shade}{bgcolor}{\definecolor{shadethmcolor}#1}
-\define@key{thmt@shade}{rulecolor}{\definecolor{shaderulecolor}#1}
-\define@key{thmt@shade}{rulewidth}{\setlength\shadeboxrule{#1}}
-\define@key{thmt@shade}{margin}{\setlength\shadeboxsep{#1}}
- \define@key{thmt}{thmbox}[L]{%
- \let\oldproof=\proof
- \let\oldendproof=\endproof
- \let\oldexample=\example
- \let\oldendexample=\endexample
- \RequirePackage[nothm]{thmbox}
- \let\proof=\oldproof
- \let\endproof=\oldendproof
- \let\example=\oldexample
- \let\endexample=\oldendexample
- \def\thmt@theoremdefiner{\newboxtheorem[#1]}%
+ % and it gets kludgier: again, the default-inherited
+ % keys need to have a go at it.
+ \@thmt@firstkeysetfalse%
+ \kvsetkeys{thmdef0}{#1}%
+ \kvsetkeys{thmdef}{#1}%
+}
+
+\providecommand\thmt@quark{\thmt@quark}
+
+
+\thmt@mkextendingkeyhandler{thmuse}{thmuse}{\thmt@envname\space optarg key}
+
+\addtotheorempreheadhook{%
+ \ifx\thmt@optarg\@empty\else
+ \@xa\thmt@garbleoptarg\@xa{\thmt@optarg}\fi
+}%
+\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'}%
+ \fi
+}
+\def\thmt@splitopt#1=#2\thmt@quark{%
+ \def\thmt@tmpkey{#1}%
+ \ifx\thmt@tmpkey\@empty
+ \def\thmt@tmpkey{\thmt@quark}%
+ \fi
+ \@onelevel@sanitize\thmt@tmpkey
+}
+
+\define@key{thmuse}{label}{%
+ %\typeout{setting label: #1}%
+ \addtotheorempostheadhook[local]{\label{#1}}%
+}
+\define@key{thmuse}{name}{%
+ %\typeout{optarg: #1}%
+ \def\thmt@newoptarg{#1}%
+}
+
+\def\thmt@declaretheoremstyle@setup{}
+\def\thmt@declaretheoremstyle#1{%
+ \PackageWarning{thmtools}{Your backend doesn't allow styling theorems}{}
+}
+\newcommand\declaretheoremstyle[2][]{%
+ \def\thmt@style{#2}%
+ \@xa\def\csname thmt@style \thmt@style @defaultkeys\endcsname{}%
+ \thmt@declaretheoremstyle@setup
+ \kvsetkeys{thmstyle}{#1}%
+ \thmt@declaretheoremstyle{#2}%
+}
+
+\kv@set@family@handler{thmstyle}{%
+ \PackageInfo{thmtools}{%
+ Key `#1' (with value `#2')\MessageBreak
+ is not a known style key.\MessageBreak
+ Will pass this to every \string\declaretheorem\MessageBreak
+ that uses `style=\thmt@style'%
}%
+ \ifx\kv@value\relax% no value given, don't pass on {}!
+ \@xa\g@addto@macro\csname thmt@style \thmt@style @defaultkeys\endcsname{%
+ #1,%
+ }%
+ \else
+ \@xa\g@addto@macro\csname thmt@style \thmt@style @defaultkeys\endcsname{%
+ #1={#2},%
+ }%
+ \fi
+}
\endinput
%%
%% End of file `thm-kv.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty b/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty
index b97353af4da..e5e62bfb163 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty
@@ -11,30 +11,31 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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-listof}[2010/04/05 v0.1beta13 thm-listof (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-listof}[2010/05/18 v24]
\let\@xa=\expandafter
\let\@nx=\noexpand
-\RequirePackage{thm-patch}
+\RequirePackage{thm-patch,keyval,kvsetkeys}
\def\thmtlo@oldchapter{0}%
\newcommand\thmtlo@chaptervspacehack{}
-\@ifundefined{chapter}{}{%
+\ifcsname chapter\endcsname
\def\thmtlo@chaptervspacehack{%
- \ifnum \arabic{chapter}>\thmtlo@oldchapter\relax
+ \ifnum \value{chapter}>\thmtlo@oldchapter\relax
% new chapter, add vspace to loe.
\addtocontents{loe}{\protect\addvspace{10\p@}}%
- \edef\thmtlo@oldchapter{\arabic{chapter}}%
+ \xdef\thmtlo@oldchapter{\arabic{chapter}}%
\fi
}%
-}
+\fi
\providecommand\listtheoremname{List of Theorems}
\newcommand\listoftheorems[1][]{%
@@ -43,6 +44,9 @@
\bgroup
\setlisttheoremstyle{#1}%
\let\listfigurename\listtheoremname
+ \def\contentsline##1{%
+ \csname thmt@contentsline@##1\endcsname{##1}%
+ }%
\let\thref@starttoc\@starttoc
\def\@starttoc##1{\thref@starttoc{loe}}%
% new hack: to allow multiple calls, we defer the opening of the
@@ -63,7 +67,7 @@
}
\newcommand\setlisttheoremstyle[1]{%
- \setkeys{thmt-listof}{#1}%
+ \kvsetkeys{thmt-listof}{#1}%
}
\define@key{thmt-listof}{numwidth}{\def\thmt@listnumwidth{#1}}
\define@key{thmt-listof}{ignore}[\thmt@allenvs]{\ignoretheorems{#1}}
@@ -80,10 +84,21 @@
\@xa\protected@edef\csname l@\thmt@envname\endcsname{% CHECK: why p@edef?
\@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}%
}%
- \@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
+ \ifthmt@isstarred
+ \@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
+ }%
+ \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
+ }%
+ \fi
+ \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{%
+ \thmt@contentslineShow% default:show
}%
}
\def\thmt@allenvs{\@gobble}
@@ -101,37 +116,60 @@
\csname ll@\thmt@envname\endcsname
}%
}
+
+\newcommand\showtheorems[1]{%
+ \@for\thm:=#1\do{%
+ \typeout{showing \thm}%
+ \@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineShow
+ }%
+}
+
\newcommand\ignoretheorems[1]{%
\@for\thm:=#1\do{%
- \@xa\let\csname l@\thm\endcsname=\@gobbletwo
+ \@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineIgnore
}%
}
\newcommand\onlynamedtheorems[1]{%
\@for\thm:=#1\do{%
- \@xa\let\csname l@\thm\endcsname=\thmt@showifnamedtheorem
+ \global\@xa\let\csname thmt@contentsline@\thm\endcsname
+ =\thmt@contentslineIfNamed
}%
}
-\def\thmt@showifnamedtheorem#1#2{%
- % check for \thmtformatoptarg on top level of first argument.
- \thmt@sh@wifnamedtheorem#1\thmtformatoptarg\@nil{%
- \@dottedtocline{1}{1.5em}{\thmt@listnumwidth}{#1}{#2}%
- }{}%
+
+\AtBeginDocument{%
+\@ifpackageloaded{hyperref}{%
+ \let\thmt@hygobble\@gobble
+}{%
+ \let\thmt@hygobble\@empty
}
-\def\thmt@sh@wifnamedtheorem#1\thmtformatoptarg#2\@nil{%
+\let\thmt@contentsline\contentsline
+}
+
+\def\thmt@contentslineIgnore#1#2#3{%
+ \thmt@hygobble
+}
+\def\thmt@contentslineShow{%
+ \thmt@contentsline
+}
+
+\def\thmt@contentslineIfNamed#1#2#3{%
+ \thmt@ifhasoptname #2\thmtformatoptarg\@nil{%
+ \thmt@contentslineShow{#1}{#2}{#3}%
+ }{%
+ \thmt@contentslineIgnore{#1}{#2}{#3}%
+ %\thmt@contentsline{#1}{#2}{#3}%
+ }
+}
+
+\def\thmt@ifhasoptname #1\thmtformatoptarg#2\@nil{%
\ifx\@nil#2\@nil
\@xa\@secondoftwo
\else
\@xa\@firstoftwo
\fi
}
-
-\newcommand\showtheorems[1]{%
- \@for\thm:=#1\do{%
- \@xa\protected@edef\csname l@\thm\endcsname{% CHECK: why p@edef?
- \@nx\@dottedtocline{1}{1.5em}{\@nx\thmt@listnumwidth}%
- }%
- }%
-}
\endinput
%%
%% End of file `thm-listof.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty b/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty
new file mode 100644
index 00000000000..8c5e6e80607
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-ntheorem.sty
@@ -0,0 +1,127 @@
+%%
+%% This is file `thm-ntheorem.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-ntheorem.dtx (with options: `ntheorem')
+%% 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-ntheorem}[2010/05/18 v24]
+
+\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}%
+}
+\define@key{thmstyle}{notefont}{%
+ \thmt@notsupported{ntheorem}{notefont}%
+}
+\define@key{thmstyle}{headpunct}{%
+ \theoremseparator{#1}%
+}
+\define@key{thmstyle}{notebraces}{%
+ \thmt@notsupported{ntheorem}{notebraces}%
+}
+\define@key{thmstyle}{break}{%
+ \theoremstyle{break}%
+}
+\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}},%
+ }%
+}
+
+\define@key{thmstyle}{headindent}{%
+ \thmt@notsupported{ntheorem}{headindent}%
+}
+\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
+}
+
+\endinput
+%%
+%% End of file `thm-ntheorem.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty
index d46a47a97d0..4d883956bb4 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty
@@ -11,70 +11,44 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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-patch}[2008/09/02 v0.1beta6b thm-patch (ulmi)]
-\let\@xa=\expandafter
-\let\@nx=\noexpand
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-patch}[2010/05/18 v24]
\RequirePackage{parseargs}
-\@ifundefined{c@thmt@dummyctr}{%
- \newcounter{thmt@dummyctr}%
-}{}%
-\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
-\gdef\thethmt@dummyctr{}%
-
\newif\ifthmt@isstarred
\newif\ifthmt@hassibling
\newif\ifthmt@hasparent
-\@ifundefined{beamer@version}{%
- \def\thmt@parsetheoremargs#1{%
- \parse{%
- {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
- {%
- \csname thmt@#1@preheadhook\endcsname
- \thmt@generic@preheadhook
- \protected@edef\tmp@args{%
- \ifx\@empty\thmt@optarg\else [\thmt@optarg]\fi
- }%
- \csname thmt@original@#1\@xa\endcsname\tmp@args
- \csname thmt@#1@postheadhook\endcsname
- \thmt@generic@postheadhook
- \let\@parsecmd\@empty
+\def\thmt@parsetheoremargs#1{%
+ \parse{%
+ {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
+ {%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+ \thmt@local@preheadhook
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \protected@edef\tmp@args{%
+ \ifx\@empty\thmt@optarg\else [{\thmt@optarg}]\fi
}%
+ \csname thmt@original@#1\@xa\endcsname\tmp@args
+ \thmt@local@postheadhook
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ \let\@parsecmd\@empty
}%
}%
-}{%
- \newif\ifthmt@hasoverlay
- \def\thmt@parsetheoremargs#1{%
- \parse{%
- {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
- {\parseOpt[]{\def\thmt@optarg{##1}}{\let\thmt@optarg\@empty}}%
- {\ifthmt@hasoverlay\expandafter\@gobble\else\expandafter\@firstofone\fi
- {\parseOpt<>{\thmt@hasoverlaytrue\def\thmt@overlay{##1}}{}}%
- }%
- {%
- \csname thmt@#1@preheadhook\endcsname
- \thmt@generic@preheadhook
- \protected@edef\tmp@args{%
- \ifthmt@hasoverlay <\thmt@overlay>\fi
- \ifx\@empty\thmt@optarg\else [\thmt@optarg]\fi
- }%
- \csname thmt@original@#1\@xa\endcsname\tmp@args
- \csname thmt@#1@postheadhook\endcsname
- \thmt@generic@postheadhook
- \let\@parsecmd\@empty
- }%
- }
- }%
-}
+}%
\let\thmt@original@newtheorem\newtheorem
\let\thmt@theoremdefiner\thmt@original@newtheorem
@@ -95,7 +69,7 @@
\newcommand\thmt@newtheoremiv{%
\thmt@newtheorem@predefinition
- % whee, now reassemble the whole shit.
+ % whee, now reassemble the whole shebang.
\protected@edef\thmt@args{%
\@nx\thmt@theoremdefiner%
\ifthmt@isstarred *\fi
@@ -111,6 +85,9 @@
\newcommand\thmt@newtheorem@predefinition{}
\newcommand\thmt@newtheorem@postdefinition{}
+\g@addto@macro\thmt@newtheorem@predefinition{%
+ \@xa\thmt@providetheoremhooks\@xa{\thmt@envname}%
+}
\g@addto@macro\thmt@newtheorem@postdefinition{%
\@xa\thmt@addtheoremhook\@xa{\thmt@envname}%
\ifthmt@isstarred\@namedef{the\thmt@envname}{}\fi
@@ -122,6 +99,16 @@
\thmt@tmp
}%
}
+\newcommand\thmt@providetheoremhooks[1]{%
+ \@namedef{thmt@#1@preheadhook}{}%
+ \@namedef{thmt@#1@postheadhook}{}%
+ \@namedef{thmt@#1@prefoothook}{}%
+ \@namedef{thmt@#1@postfoothook}{}%
+ \def\thmt@local@preheadhook{}%
+ \def\thmt@local@postheadhook{}%
+ \def\thmt@local@prefoothook{}%
+ \def\thmt@local@postfoothook{}%
+}
\newcommand\thmt@addtheoremhook[1]{%
% this adds two command calls to the newly-defined theorem.
\@xa\let\csname thmt@original@#1\@xa\endcsname
@@ -134,17 +121,22 @@
% these need to be in opposite order of headhooks.
\csname thmtgeneric@prefoothook\endcsname
\csname thmt@#1@prefoothook\endcsname
+ \csname thmt@local@prefoothook\endcsname
\csname thmt@original@end#1\endcsname
\csname thmt@generic@postfoothook\endcsname
\csname thmt@#1@postfoothook\endcsname
+ \csname thmt@local@postfoothook\endcsname
}%
- \@namedef{thmt@#1@preheadhook}{}%
- \@namedef{thmt@#1@postheadhook}{}%
- \@namedef{thmt@#1@prefoothook}{}%
- \@namedef{thmt@#1@postfoothook}{}%
}
\newcommand\thmt@generic@preheadhook{\refstepcounter{thmt@dummyctr}}
\newcommand\thmt@generic@postheadhook{}
+\newcommand\thmt@generic@prefoothook{}
+\newcommand\thmt@generic@postfoothook{}
+
+\def\thmt@local@preheadhook{}
+\def\thmt@local@postheadhook{}
+\def\thmt@local@prefoothook{}
+\def\thmt@local@postfoothook{}
\providecommand\g@prependto@macro[2]{%
\begingroup
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty
index a66e063ee1e..bac42e29184 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty
@@ -11,15 +11,16 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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-restate}[2010/04/05 v0.1beta13 thm-restate (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thm-restate}[2010/05/18 v24]
\let\@xa\expandafter
\let\@nx\noexpand
@@ -28,7 +29,6 @@
}{}
\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
\gdef\thethmt@dummyctr{}%
-\newtoks\thmt@toks
\long\def\thmt@collect@body#1#2\end#3{%
\@xa\thmt@toks\@xa{\the\thmt@toks #2}%
\def\thmttmpa{#3}%\def\thmttmpb{restatable}%
@@ -44,8 +44,10 @@
}%
}
-\def\thmt@trivialref#1{%
- \@xa\@xa\@xa\thmt@trivi@lr@f\csname r@#1\endcsname\@nil
+\def\thmt@trivialref#1#2{%
+ \ifcsname r@#1\endcsname
+ \@xa\@xa\@xa\thmt@trivi@lr@f\csname r@#1\endcsname\relax\@nil
+ \else #2\fi
}
\def\thmt@trivi@lr@f#1#2\@nil{#1}
@@ -75,6 +77,8 @@
\newif\ifthmt@thisistheone
\newenvironment{thmt@restatable}[3][]{%
+ \thmt@toks{}%
+ \stepcounter{thmt@dummyctr}%
\long\def\thmrst@store##1{%
\@xa\gdef\csname #3\endcsname{%
\@ifstar{%
@@ -97,7 +101,8 @@
\@currentlabel
\protect\def\@xa\protect\csname the\ctr\endcsname{\csname the\ctr\endcsname}%
\ifcsname theH\ctr\endcsname
- \protect\def\@xa\protect\csname theH\ctr\endcsname{\csname theH\ctr\endcsname}%
+ \protect\def\@xa\protect\csname theH\ctr\endcsname{%
+ (restate \protect\theHthmt@dummyctr)\csname theH\ctr\endcsname}%
\fi
\protect\setcounter{\ctr}{\number\csname c@\ctr\endcsname}%
}%
@@ -106,7 +111,10 @@
\egroup
\else
\@xa\protected@edef\csname the#2\endcsname{%
- \thmt@trivialref{thmt@@#3}}%
+ \thmt@trivialref{thmt@@#3}{??}}%
+ \ifcsname r@thmt@@#3\endcsname\else
+ \G@refundefinedtrue
+ \fi
\@xa\let\csname c@#2\endcsname=\c@thmt@dummyctr
\@xa\let\csname theH#2\endcsname=\theHthmt@dummyctr
\let\label=\@gobble
@@ -118,7 +126,7 @@
\protect\setcounter{equation}{\arabic{equation}}%
}%
}
- \thmt@trivialref{thmt@@#3@data}%
+ \thmt@trivialref{thmt@@#3@data}{}%
\fi
%\def\@currenvir{#2}%
\csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
diff --git a/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty b/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty
new file mode 100644
index 00000000000..c20579eac50
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty
@@ -0,0 +1,63 @@
+%%
+%% This is file `thmdef-shaded.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thmdef-shaded.dtx (with options: `shaded')
+%% 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 {thmdef-shaded}[2010/05/18 v24]
+ \define@key{thmdef}{shaded}[{}]{%
+ \thmt@trytwice{}{%
+ \RequirePackage{shadethm}%
+ \RequirePackage{thm-patch}%
+ \addtotheorempreheadhook[\thmt@envname]{%
+ \setlength\shadedtextwidth{\linewidth}%
+ \kvsetkeys{thmt@shade}{#1}\begin{shadebox}}%
+ \addtotheorempostfoothook[\thmt@envname]{\end{shadebox}}%
+ }%
+ }
+\define@key{thmt@shade}{textwidth}{\setlength\shadedtextwidth{#1}}
+\define@key{thmt@shade}{bgcolor}{\thmt@definecolor{shadethmcolor}{#1}}
+\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
+ \csname\string\color@#2\endcsname
+ % this is dubious at best, we don't know what a backend does.
+}
+\AtBeginDocument{%
+ \ifcsname colorlet\endcsname
+ \let\thmt@colorlet\colorlet
+ \fi
+}
+
+\def\thmt@drop@relax#1\relax{}
+\def\thmt@definecolor#1#2{%
+ \thmt@def@color{#1}#2\thmt@drop@relax
+ {gray}{0.5}%
+ \thmt@colorlet{#1}{#2}%
+ \relax
+}
+\def\thmt@def@color#1#2#{%
+ \definecolor{#1}}
+\endinput
+%%
+%% End of file `thmdef-shaded.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty b/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty
new file mode 100644
index 00000000000..cc2e82cd1af
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thmdef-thmbox.sty
@@ -0,0 +1,38 @@
+%%
+%% This is file `thmdef-thmbox.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thmdef-thmbox.dtx (with options: `thmbox')
+%% 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 {thmdef-thmbox}[2010/05/18 v24]
+\define@key{thmdef}{thmbox}[L]{%
+ \let\oldproof=\proof
+ \let\oldendproof=\endproof
+ \let\oldexample=\example
+ \let\oldendexample=\endexample
+ \RequirePackage[nothm]{thmbox}
+ \let\proof=\oldproof
+ \let\endproof=\oldendproof
+ \let\example=\oldexample
+ \let\endexample=\oldendexample
+ \def\thmt@theoremdefiner{\newboxtheorem[#1]}%
+}%
+\endinput
+%%
+%% End of file `thmdef-thmbox.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thmtools.sty b/Master/texmf-dist/tex/latex/thmtools/thmtools.sty
index d62d9ad86dc..e0c56a950bf 100644
--- a/Master/texmf-dist/tex/latex/thmtools/thmtools.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/thmtools.sty
@@ -11,16 +11,64 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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{thmtools}[2008/07/05 v0.1beta7 Tools for theorem typesetting (ulmi)]
-\RequirePackage{thm-kv, thm-autoref, thm-listof}
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {thmtools}[2010/05/18 v24]
+\let\@xa\expandafter
+\let\@nx\noexpand
+\def\thmt@quark{\thmt@quark}
+\newtoks\thmt@toks
+
+\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}
+}{}
+\@ifpackageloaded{ntheorem}{%
+ \RequirePackage{thm-ntheorem}
+}{}
+\@ifclassloaded{beamer}{%
+ \RequirePackage{thm-beamer}
+}{}
+
\endinput
%%
%% End of file `thmtools.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/unique.sty b/Master/texmf-dist/tex/latex/thmtools/unique.sty
index 2c607807cc3..fa804ce6602 100644
--- a/Master/texmf-dist/tex/latex/thmtools/unique.sty
+++ b/Master/texmf-dist/tex/latex/thmtools/unique.sty
@@ -11,21 +11,35 @@
%% The `thmtools' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%%
-%% Copyright (C) 2008 by Ulrich M. Schwarz.
+%% 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{unique}[2007/07/29 v0.1 test for uniqueness (ulmi)]
+%%
+\NeedsTeXFormat {LaTeX2e}
+\ProvidesPackage {unique}[2010/05/18 v24]
+
+\DeclareOption{unq}{%
+ \newwrite\uniq@channel
+ \InputIfFileExists{\jobname.unq}{}{}%
+ \immediate\openout\uniq@channel=\jobname.unq
+ \AtEndDocument{%
+ \immediate\closeout\uniq@channel%
+ }
+}
+\DeclareOption{aux}{%
+ \let\uniq@channel\@auxout
+}
+
\newcommand\setuniqmark[1]{%
\expandafter\ifx\csname uniq@now@#1\endcsname\relax
\global\@namedef{uniq@now@#1}{\uniq@ONE}%
\else
\expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
- \immediate\write\@auxout{%
+ \immediate\write\uniq@channel{%
\string\uniq@setmany{#1}%
}%
\ifuniq{#1}{%
@@ -78,6 +92,8 @@
\AtEndDocument{%
\immediate\write\@auxout{\string\uniq@maybesuggestrerun}%
}
+\ExecuteOptions{aux}
+\ProcessOptions\relax
\endinput
%%
%% End of file `unique.sty'.