summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/README16
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/TODO11
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/demo.tex71
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/thmtools.pdfbin0 -> 84987 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thmtools/thmtools.tex99
-rw-r--r--Master/texmf-dist/source/latex/thmtools/aliasctr.dtx145
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx100
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-kv.dtx128
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-listof.dtx117
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-patch.dtx174
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thm-restate.dtx178
-rw-r--r--Master/texmf-dist/source/latex/thmtools/thmtools.ins46
-rw-r--r--Master/texmf-dist/source/latex/thmtools/unique.dtx190
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/aliasctr.sty72
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty45
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-kv.sty71
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-listof.sty62
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-patch.sty119
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/thm-restate.sty72
-rw-r--r--Master/texmf-dist/tex/latex/thmtools/unique.sty83
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/thmtools.tlpsrc2
23 files changed, 1803 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/thmtools/README b/Master/texmf-dist/doc/latex/thmtools/README
new file mode 100644
index 00000000000..7fe0ec979f3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/README
@@ -0,0 +1,16 @@
+ The \thmtools\ bundle provides several packages for commonly-needed
+ features for theorems. As designed, the bundle should work with kernel
+ theorems, the theorem package and the amsthm package.
+
+ WARNING: Currently, things might still be a bit rough. You
+ might want to consider not relying on \thmtools\ for your Ph.D. thesis
+ masterpiece.
+
+Provided features:
+a keyval interface to \newtheorem
+a \listoftheorem command
+hyperref/autoref compatibility
+a way of restating entire theorems with a single macro call
+
+License: LPPL 1.3a; maintained by ulmi@absatzen.de
+$Id: README,v 1.1 2008/02/17 21:13:58 ulmi Exp ulmi $
diff --git a/Master/texmf-dist/doc/latex/thmtools/TODO b/Master/texmf-dist/doc/latex/thmtools/TODO
new file mode 100644
index 00000000000..f41779340f3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/TODO
@@ -0,0 +1,11 @@
+- ref close-by/far-away
+- complex refs
+ (these two are very similar)
+
+
+- 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/demo.tex b/Master/texmf-dist/doc/latex/thmtools/demo.tex
new file mode 100644
index 00000000000..31e0adc524d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/demo.tex
@@ -0,0 +1,71 @@
+\documentclass{article}
+
+\usepackage{amsmath, amsthm}
+
+
+\usepackage{
+ thm-listof,
+ thm-restate,
+ thm-autoref,
+ thm-kv,
+ }
+
+\usepackage{hyperref}
+
+\declaretheorem[unnumbered,
+ title={Zorn's Lemma}]{zl}
+%\newtheorem*{zl}{Zorn's Lemma}
+\declaretheorem[numberwithin=section]{theorem}
+%\newtheorem{theorem}{Theorem}[section]
+\declaretheorem[sibling=theorem]{lemma}
+%\newtheorem{lemma}[theorem]{Lemma}
+\declaretheorem[numberlike=lemma]{axiom}
+%\newtheorem{axiom}[lemma]{Axiom}
+
+
+\begin{document}
+ \section{Introduction}
+
+ In this dummy document, we will show important things. One very important
+ insight is
+ \begin{lemma}[Zorn]
+ If every chain in $X$ is bounded, $X$ has a maximal element.
+
+ (Here, $X$ is a set system.)
+ \end{lemma}
+
+ This lemma is so important that it's a fixed name:
+ \begin{restatable}{zl}{zornslemma}
+ If every chain in $X$ is bounded, $X$ has a maximal element.
+
+ (Here, $X$ is a set system.)
+ \end{restatable}
+
+ We will conclude in important theorem from this:
+ \begin{restatable}[Well-ordering]{theorem}{wohlordnung}\label{thm:order}
+ Every set is well-ordered.
+ \end{restatable}
+
+ %\show\wohlordnung
+
+ \section{Main}
+
+ Here, we will prove \wohlordnung which first appeared
+ as~\autoref{thm:order} on page~\pageref{thm:order} and is
+ actually equivalent to
+ \zornslemma
+
+ Another equivalent formulation is
+ \begin{axiom}[Axiom of Choice]
+ If you have a non-empty set, you can take an element out of it.
+ \end{axiom}
+
+ \section{Conclusion}
+
+ To remind you, these are the theorems that occur in this document,
+ ignoring Lemmas:
+
+ \ignoretheorems{lemma}
+ \listoftheorems
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf b/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf
new file mode 100644
index 00000000000..08a7eb8bcbb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/thmtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thmtools/thmtools.tex b/Master/texmf-dist/doc/latex/thmtools/thmtools.tex
new file mode 100644
index 00000000000..6b8bef7ce29
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/thmtools/thmtools.tex
@@ -0,0 +1,99 @@
+%$Id: thmtools.tex,v 1.3 2008/02/17 21:08:04 ulmi Exp ulmi $
+\documentclass[a4paper, abstracton]{scrartcl}
+
+\usepackage[T1]{fontenc}
+\usepackage{fourier}
+\usepackage[scaled]{helvet}
+
+\addtokomafont{sectioning}{\fontseries{bc}\selectfont}
+
+\newcommand\thmtools{\textsf{thmtools}}
+
+\title{The \thmtools\ bundle\thanks{%
+ This is a beta version. If you want to slightly ahead of your time,
+ new development versions are availably from http://www.absatzen.de/thmtools.html
+}}
+\author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
+
+\begin{document}
+ \maketitle
+
+ \begin{abstract}
+ The \thmtools\ bundle provides several packages for commonly-needed
+ features for theorems. As designed, the bundle should work with kernel
+ theorems, the theorem package and the amsthm package.
+
+ \textbf{Warning:} Currently, things might still be a bit rough. You
+ might want to consider not relying on \thmtools\ for your Ph.D. thesis
+ masterpiece.
+ \end{abstract}
+
+
+ \section{thm-autoref}
+
+ Fixes cooperation with hyperref's \verb|\autoref|. No further intervention
+ on part of the user needed. (Loads aliasctr, thm-patch.)
+
+ \section{thm-listof}
+
+ Provides a \verb|\listoftheorems| command that works like
+ \verb|\listoffigures|. Also provided: a \verb|\ignoretheorems| command that
+ lets you exempt certain kinds:
+ \begin{verbatim}
+ \ignoretheorems{example,exercise,remark}
+ \end{verbatim}
+ There's currently no user interface to customize the appearance of the
+ LoTheorems. (Loads thm-patch.)
+
+ \section{thm-kv}
+
+ Provides a key-value alternative to \verb|\newtheorem|, because I keep
+ forgetting which optional argument goes where. Example:
+ \begin{verbatim}
+ \declaretheorem[unnumbered, title={Zorn's Lemma}]{zl}
+ %\newtheorem*{zl}{Zorn's Lemma}
+ \declaretheorem[numberwithin=section]{theorem}
+ %\newtheorem{theorem}{Theorem}[section]
+ \declaretheorem[sibling=theorem]{lemma}
+ %\newtheorem{lemma}[theorem]{Lemma}
+ \declaretheorem[numberlike=lemma]{axiom}
+ %\newtheorem{axiom}[lemma]{Axiom}
+ \end{verbatim}
+ Supported keywords (several for the same functionality, because if you
+ need to remember the keyword, you can just as well remember the order):
+ parent, numberwithin, within; sibling, numberlike, sharenumber;
+ unnumbered, starred\footnote{works only with amsthm}; title, name,
+ heading.
+
+ Note: it's actually optional to give a title, in that case, the default is
+ the name of the environment, with first letter uppercased.
+
+ \section{thm-restate}
+
+ Provides an environment \verb|restatable| that essentially puts the entire
+ theorem into a single macro command for later re-statement:
+ \begin{verbatim}
+ \begin{restatable}[Well-ordering]{theorem}{wohlordnung}\label{thm:order}
+ Every set is well-ordered.
+ \end{restatable}
+ And again: \wohlordnung
+ \end{verbatim}
+ Note that the label will be handled correctly (i.e. not re-defined).
+ Limitation: verbatim-like things will not work. There's no handling for
+ other counters, so it's not advisable to put floats inside a restatable.
+
+ \section{aliasctr}
+
+ Helper package, see separate doc.
+
+ \section{unique}
+
+ Helper package, see separate doc. Not used yet.
+
+ \section{thm-patch}
+ Helper package: redefines \verb|\newtheorem| so the defined theorems have
+ hooks we can use. Note that the redefinition will always allow
+ \verb|\newtheorem*| and giving contradicting optional arguments, but the
+ backend original \verb|\newtheorem| will complain.
+
+\end{document}
diff --git a/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx b/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx
new file mode 100644
index 00000000000..9807e4ff2ab
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/aliasctr.dtx
@@ -0,0 +1,145 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2005-7 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% 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.2 2007/07/29 09:29:23 ulmi Exp $\fi
+% \section{Usage}
+% |\@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.
+%
+% \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
+% cl lists until we find one that is empty or starts with |\@elt|.
+% \begin{macrocode}
+\def\aliasctr@f@llow#1#2\@nil#3{%
+ \ifx#1\@elt
+ \noexpand #3%
+ \else
+ \expandafter\aliasctr@f@llow#1\@elt\@nil{#1}%
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\aliasctr@follow[1]{%
+ \expandafter\aliasctr@f@llow
+% \end{macrocode}
+% Don't be confused: the third parameter is ignored here, we always
+% have recursion here since the \emph{token} |\cl@#1| is (hopefully) not |\@elt|.
+% \begin{macrocode}
+ \csname cl@#1\endcsname\@elt\@nil{\csname cl@#1\endcsname}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*\@addtoreset[2]{\bgroup
+ \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
+ \let\@elt\relax
+ \expandafter\@cons\aliasctr@@truelist{{#1}}%
+\egroup}
+% \end{macrocode}
+%
+% This code has been adapted from David Carlisle's \pkg{remreset}. We
+% load that here only to prevent it from being loaded again.
+% \begin{macrocode}
+\RequirePackage{remreset}
+\renewcommand*\@removefromreset[2]{\bgroup
+ \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
+ \expandafter\let\csname c@#1\endcsname\@removefromreset
+ \def\@elt##1{%
+ \expandafter\ifx\csname c@##1\endcsname\@removefromreset
+ \else
+ \noexpand\@elt{##1}%
+ \fi}%
+ \expandafter\xdef\aliasctr@@truelist{%
+ \aliasctr@@truelist}
+\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@counteralias}
+% make |#1| a counter that uses counter |#2|'s count register.
+% \begin{macrocode}
+\newcommand\@counteralias[2]{{%
+ \def\@@gletover##1##2{%
+ \expandafter\global
+ \expandafter\let\csname ##1\expandafter\endcsname
+ \csname ##2\endcsname
+ }%
+ \@ifundefined{c@#2}{\@nocounterr{#2}}{%
+ \@ifdefinable{c@#1}{%
+% \end{macrocode}
+% Four values make a counter foo:
+% \begin{itemize}
+% \item the count register accessed through |\c@foo|,
+% \item the output macro |\thefoo|,
+% \item the prefix macro |\p@foo|,
+% \item the reset list |\cl@foo|.
+% \end{itemize}
+% \pkg{hyperref} adds |\theHfoo| in particular.
+% \begin{macrocode}
+ \@@gletover{c@#1}{c@#2}%
+ \@@gletover{the#1}{the#2}%
+% \end{macrocode}
+% I don't see \@counteralias being called hundreds of times,
+% let's just unconditionally create |\theHctr|-macros for hyperref.
+% \begin{macrocode}
+ \@@gletover{theH#1}{theH#2}%
+ \@@gletover{p@#1}{p@#2}%
+ \expandafter\global
+ \expandafter\def\csname cl@#1\expandafter\endcsname
+ \expandafter{\csname cl@#2\endcsname}%
+% \end{macrocode}
+% It is not necessary to save the value again: since we share a
+% count register, we will pick up the restored value of the
+% original counter.
+% \begin{macrocode}
+ %\@addtoreset{#1}{@ckpt}%
+ }%
+ }%
+}}
+% \end{macrocode}
+% \end{macro}
+%\iffalse
+%</code>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx b/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx
new file mode 100644
index 00000000000..d76d743db4d
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-autoref.dtx
@@ -0,0 +1,100 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2008 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3a.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%
+% \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}
+\GetFileInfo{thm-autoref.sty}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \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}
+%
+% \newcommand\thmrestate{\textsf{thm-patch}}
+% \title{The \thmrestate\ package\thanks{%
+% This file documents version~\fileversion\ of~\filedate,
+% RCS ${}$Id: thm-autoref.dtx,v 1.3 2008/02/17 21:08:04 ulmi Exp ulmi ${}$.
+% }}
+% \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
+%
+% \maketitle
+%
+%\begin{abstract}
+%\end{abstract}
+%\section{Usage}
+%
+%\section{Implementation}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thm-autoref}[2008/02/17 BETA thm-autoref (ulmi)]
+
+\RequirePackage{thm-patch, aliasctr}
+
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+
+\newcommand\thmt@autorefsetup{%
+ \@xa\def\csname\thmt@envname autorefname\@xa\endcsname\@xa{\thmt@thmname}%
+ \ifthmt@hassibling
+ \@counteralias{\thmt@envname}{\thmt@sibling}%
+ \@xa\def\@xa\thmt@autoreffix\@xa{%
+ \@xa\let\csname the\thmt@envname\@xa\endcsname
+ \csname the\thmt@sibling\endcsname
+ \def\thmt@autoreffix{}%
+ }%
+ \protected@edef\thmt@sibling{\thmt@envname}%
+ \fi
+}
+\g@addto@macro\thmt@newtheorem@predefinition{\thmt@autorefsetup}%
+\g@addto@macro\thmt@newtheorem@postdefinition{\csname thmt@autoreffix\endcsname}%
+% \end{macrocode}
+%\iffalse
+%</autoref>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx b/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx
new file mode 100644
index 00000000000..720ca24fabb
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-kv.dtx
@@ -0,0 +1,128 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2008 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3a.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%
+% \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-patch.sty}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{thm-patch.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}
+%
+% \newcommand\thmrestate{\textsf{thm-kv}}
+% \title{The \thmrestate\ package\thanks{%
+% This file documents version~\fileversion\ of~\filedate,
+% RCS ${}$Id: thm-kv.dtx,v 1.4 2008/02/17 21:08:04 ulmi Exp ulmi ${}$.
+% }}
+% \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
+%
+% \maketitle
+%
+%\begin{abstract}
+%\end{abstract}
+%\section{Usage}
+%
+%
+%\section{Implementation}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thm-kv}[2008/02/17 BETA thm-kv interface (ulmi)]
+\let\@xa\expandafter
+\let\@nx\noexpand
+\usepackage{keyval}
+
+\define@key{thmt}{parent}{\thmt@setparent{#1}}
+\define@key{thmt}{numberwithin}{\thmt@setparent{#1}}
+\define@key{thmt}{within}{\thmt@setparent{#1}}
+
+\define@key{thmt}{sibling}{\thmt@setsibling{#1}}
+\define@key{thmt}{numberlike}{\thmt@setsibling{#1}}
+\define@key{thmt}{sharenumber}{\thmt@setsibling{#1}}
+
+\define@key{thmt}{title}{\thmt@setthmname{#1}}
+\define@key{thmt}{name}{\thmt@setthmname{#1}}
+\define@key{thmt}{heading}{\thmt@setthmname{#1}}
+
+\define@key{thmt}{unnumbered}[]{\thmt@isnumberedfalse}
+\define@key{thmt}{starred}[]{\thmt@isnumberedfalse}
+
+\newif\ifthmt@isnumbered
+\newcommand\thmt@setparent[1]{%
+ \def\thmt@parent{#1}%
+}
+\newcommand\thmt@setsibling{%
+ \def\thmt@sibling
+}
+\newcommand\thmt@setthmname{%
+ \def\thmt@thmname
+}
+
+
+\newcommand\declaretheorem[2][]{%
+ \thmt@setthmname{\MakeUppercase #2}%
+ \thmt@setparent{}%
+ \thmt@setsibling{}%
+ \thmt@isnumberedtrue%
+ \setkeys{thmt}{#1}%
+ \protected@edef\thmt@tmp{%
+ \@nx\newtheorem
+ \ifthmt@isnumbered\else *\fi
+ {#2}%
+ \ifx\thmt@sibling\@empty\else [\thmt@sibling]\fi
+ {\thmt@thmname}%
+ \ifx\thmt@parent\@empty\else [\thmt@parent]\fi
+ }%\show\thmt@tmp
+ \thmt@tmp
+}
+% \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
new file mode 100644
index 00000000000..ef15b1854b0
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-listof.dtx
@@ -0,0 +1,117 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2008 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3a.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%
+% \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-patch.sty}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{thm-patch.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}
+%
+% \newcommand\thmrestate{\textsf{thm-patch}}
+% \title{The \thmrestate\ package\thanks{%
+% This file documents version~\fileversion\ of~\filedate,
+% RCS ${}$Id: thm-listof.dtx,v 1.4 2008/02/17 21:08:04 ulmi Exp ulmi ${}$.
+% }}
+% \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
+%
+% \maketitle
+%
+%\begin{abstract}
+%\end{abstract}
+%\section{Usage}
+%
+%\section{Implementation}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thm-listof}[2008/02/17 BETA thm-listof (ulmi)]
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+\RequirePackage{thm-patch}
+
+\providecommand\listtheoremname{List of Theorems}
+\newcommand\listoftheorems{%
+ %% much hacking here to pick up the definition from the class
+ %% without oodles of conditionals.
+ \bgroup
+ \let\listfigurename\listtheoremname
+ \let\thref@starttoc\@starttoc
+ \def\@starttoc##1{\thref@starttoc{loe}}%
+ \expandafter\listoffigures
+ \egroup
+}
+
+\newcommand\thmt@mklistcmd{%
+ \@xa\protected@edef\csname l@\thmt@envname\endcsname{%
+ \@nx\@dottedtocline{1}{1.5em}{2.3em}%
+ }%
+}
+\g@addto@macro\thmt@newtheorem@predefinition{%
+ \thmt@mklistcmd
+}
+
+\addtotheoremposthook{%
+ \addcontentsline{loe}{\thmt@envname}{%
+ \numberline{\csname the\thmt@envname\endcsname}%
+ \thmt@thmname
+ \ifx\@empty\thmt@optarg\else\protect\space(\thmt@optarg)\fi
+ }%
+}
+\newcommand\ignoretheorems[1]{%
+ \@for\thm:=#1\do{%
+ \@xa\let\csname l@\thm\endcsname=\@gobbletwo
+ }%
+}
+% \end{macrocode}
+%\iffalse
+%</listof>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx b/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx
new file mode 100644
index 00000000000..a391ad45565
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-patch.dtx
@@ -0,0 +1,174 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2008 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3a.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%
+% \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-patch.sty}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \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}
+%
+% \newcommand\thmrestate{\textsf{thm-patch}}
+% \title{The \thmrestate\ package\thanks{%
+% This file documents version~\fileversion\ of~\filedate,
+% RCS ${}$Id: thm-patch.dtx,v 1.6 2008/02/17 21:08:04 ulmi Exp ulmi ${}$.
+% }}
+% \author{Ulrich M. Schwarz\thanks{ulmi@absatzen.de}}
+%
+% \maketitle
+%
+%\begin{abstract}
+%\end{abstract}
+%\section{Usage}
+%
+%\section{Implementation}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thm-patch}[2008/02/17 BETA thm-patch (ulmi)]
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+
+\@ifundefined{c@thmt@dummyctr}{%
+ \newcounter{thmt@dummyctr}%
+}{}%
+\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
+
+\newif\ifthmt@isstarred
+\newif\ifthmt@hassibling
+\newif\ifthmt@hasparent
+
+\let\thmt@original@newtheorem\newtheorem
+\def\newtheorem{%
+ \thmt@isstarredfalse
+ \let\thmt@sibling=\relax \thmt@hassiblingfalse
+ \let\thmt@parent=\relax \thmt@hasparentfalse
+ \@ifstar
+ {\thmt@isstarredtrue\thmt@newtheoremii}%
+ {\thmt@newtheoremii}%
+}
+\newcommand\thmt@newtheoremii[1]{%
+ \def\thmt@envname{#1}%
+ \thmt@newtheoremiii
+}
+\newcommand\thmt@newtheoremiii[2][]{%
+ \def\thmt@thmname{#2}%
+ \ifx&#1&\else
+ \thmt@hassiblingtrue
+ \def\thmt@sibling{#1}%
+ \fi
+ \@ifnextchar[{%
+ \thmt@hasparenttrue
+ \def\tmp@a[####1]{\def\thmt@parent{####1}\thmt@newtheoremiv}%
+ \tmp@a
+ }{%
+ \thmt@newtheoremiv
+ }%
+}
+\newcommand\thmt@newtheoremiv{%
+ \thmt@newtheorem@predefinition
+ % whee, now reassemble the whole shit.
+ \protected@edef\thmt@args{%
+ \@nx\thmt@original@newtheorem%
+ \ifthmt@isstarred *\fi
+ {\thmt@envname}%
+ \ifthmt@hassibling [\thmt@sibling]\fi
+ {\thmt@thmname}%
+ \ifthmt@hasparent [\thmt@parent]\fi
+ }
+ \thmt@args
+ \thmt@newtheorem@postdefinition
+}
+
+\newcommand\thmt@newtheorem@predefinition{}
+\newcommand\thmt@newtheorem@postdefinition{}
+
+\g@addto@macro\thmt@newtheorem@postdefinition{%
+ \@xa\thmt@addtheoremhook\@xa{\thmt@envname}%
+ \ifthmt@isstarred\@namedef{the\thmt@envname}{}\fi
+ \protected@edef\thmt@tmp{%
+ \def\@nx\thmt@envname{\thmt@envname}%
+ \def\@nx\thmt@thmname{\thmt@thmname}%
+ }
+ \@xa\addtotheoremprehook\@xa[\@xa\thmt@envname\@xa]\@xa{%
+ \thmt@tmp
+ }%
+}
+\newcommand\thmt@addtheoremhook[1]{%
+ % this adds two command calls to the newly-defined theorem.
+ \@xa\let\csname thmt@original@#1\@xa\endcsname
+ \csname#1\endcsname
+ \@xa\renewcommand\csname \thmt@envname\endcsname[1][]{%
+ \def\thmt@optarg{##1}%
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \csname thmt@original@#1\@xa\endcsname
+ \ifx\@empty\thmt@optarg\else [##1]\fi
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ }%
+ \@namedef{thmt@#1@preheadhook}{}%
+ \@namedef{thmt@#1@postheadhook}{}%
+}
+\newcommand\thmt@generic@preheadhook{\refstepcounter{thmt@dummyctr}}
+\newcommand\thmt@generic@postheadhook{}
+
+\newcommand\addtotheoremprehook[1][generic]{%
+ \expandafter\g@addto@macro\csname thmt@#1@preheadhook\endcsname%
+}
+\newcommand\addtotheoremposthook[1][generic]{%
+ \expandafter\g@addto@macro\csname thmt@#1@postheadhook\endcsname%
+}
+
+% \end{macrocode}
+%\iffalse
+%</patch>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx b/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx
new file mode 100644
index 00000000000..54e8ecc7325
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thm-restate.dtx
@@ -0,0 +1,178 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2008 by Ulrich M. Schwarz
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3a.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3a.txt
+%
+% \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}
+\GetFileInfo{thm-restate.sty}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \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}
+%
+% \newcommand\thmrestate{\textsf{thm-restate}}
+% \title{The \thmrestate\ package\thanks{%
+% This file documents version~\fileversion\ of~\filedate,
+% RCS ${}$Id: thm-restate.dtx,v 1.8 2008/02/17 21:08:04 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}
+%\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
+%type of the theorem, i.e. if you want \verb|\begin{lemma}| to be called on
+%the inside, give \verb|lemma|. The second argument is the name of the macro
+%that the text should be stored in, for example \verb|mylemma|. Be careful
+%not to specify existing command names! The optional argument will become the
+%optional argument to your theorem command. Consider the following example:
+%\begin{verbatim}
+% \documentclass{article}
+% \usepackage{amsmath, amsthm, thm-restate}
+% \newtheorem{lemma}{Lemma}
+% \begin{document}
+% \begin{restatable}[Zorn]{lemma}{zornlemma}\label{thm:zorn}
+% If every chain in $X$ is upper-bounded,
+% $X$ has a maximal element.
+%
+% It's true, you know!
+% \end{restatable}
+% \begin{lemma}
+% This is some other lemma of no import.
+% \end{lemma}
+% And now, here's Mr. Zorn again: \zornlemma
+% \end{document}
+%\end{verbatim}
+%which yields
+% \begin{restatable}[Zorn]{lemma}{zornlemma}\label{thm:zorn}
+% If every chain in $X$ is upper-bounded, $X$ has a maximal element.
+%
+% It's true, you know!
+% \end{restatable}
+% \begin{lemma}
+% This is some other lemma of no import.
+% \end{lemma}
+% Actually, we have set a label in the environment, so we know that
+% it's Lemma~\ref{thm:zorn} on page~\ref{thm:zorn}.
+% And now, here's Mr. Zorn again: \zornlemma
+% Since we prevent the label from being set again, we find that
+% it's still Lemma~\ref{thm:zorn} on page~\ref{thm:zorn}, even though
+% it occurs later also. Maybe at some point, there'll be a way to control
+% which instance gets its labels executed.
+%
+% \subsection{Restrictions}
+% The only counter that is saved is the one for the theorem number. So,
+% putting floats inside a restatable is not advised. You cannot nest
+% restatables either. The first occurrence is the priviledged one that
+% determines the number and the label/page info, you cannot change that
+% at the moment. hyperref will get confused, too, so currently, links
+% won't work.
+%
+%\section{Implementation}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thm-restate}[2008/02/17 BETA thm-restate (ulmi)]
+
+\let\@xa\expandafter
+\let\@nx\noexpand
+\@ifundefined{c@thmt@dummyctr}{%
+ \newcounter{thmt@dummyctr}%
+ }{}
+\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@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}%
+ \ifx\thmttmpa\thmttmpb
+ \@xa\@firstoftwo% this is the end of the environment.
+ \else
+ \@xa\@secondoftwo% go on collecting
+ \fi{%
+ \@xa#1\@xa{\the\thmt@toks}%
+ }{%
+ \@xa\thmt@toks\@xa{\the\thmt@toks\end{#3}}%
+ \thmt@collect@body{#1}%
+ }%
+}
+
+\newenvironment{restatable}[3][]{%
+ \def\thmrst@type{#2}%
+ \long\def\thmrst@store##1{%
+ \protected@edef\thmrst@nmbr{\csname the#2\endcsname}%
+ \@xa\long\@xa\gdef\csname #3\@xa\endcsname\@xa{%
+ \@xa\begingroup
+ \@xa\def\csname the#2\@xa\endcsname\@xa{\thmrst@nmbr}%
+ \@xa\let\csname c@#2\endcsname\c@thmt@dummyctr
+ \@xa\let\csname theH#2\endcsname\theHthmt@dummyctr
+ \let\label=\@gobble
+ %\def\@currenvir{#2}%
+ \csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
+ ##1
+ \csname end#2\endcsname
+ \endgroup
+ }##1\end{restatable}}%
+ %\def\@currenvir{#2}%
+ \csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
+ \thmt@collect@body\thmrst@store
+}{%
+ \csname end\thmrst@type\endcsname
+ %\def\@currenvir{restatable}%
+}
+% \end{macrocode}
+%\iffalse
+%</restate>
+%\fi
diff --git a/Master/texmf-dist/source/latex/thmtools/thmtools.ins b/Master/texmf-dist/source/latex/thmtools/thmtools.ins
new file mode 100644
index 00000000000..2a974e839e4
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/thmtools.ins
@@ -0,0 +1,46 @@
+%%
+%% This is a bog-standard .ins file: thmtools.ins
+%%
+\input docstrip.tex
+\keepsilent
+\preamble
+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 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
+
+\endpreamble
+
+\generate{%
+ \file{thm-restate.sty}{\from{thm-restate.dtx}{restate}}
+ \file{thm-patch.sty}{\from{thm-patch.dtx}{patch}}
+ \file{thm-autoref.sty}{\from{thm-autoref.dtx}{autoref}}
+ \file{thm-listof.sty}{\from{thm-listof.dtx}{listof}}
+ \file{thm-kv.sty}{\from{thm-kv.dtx}{kv}}
+ \file{aliasctr.sty}{\from{aliasctr.dtx}{code}}
+ \file{unique.sty}{\from{unique.dtx}{code}}
+ }
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space thm-restate.sty}
+\Msg{* \space\space thm-patch.sty}
+\Msg{* \space\space thm-autoref.sty}
+\Msg{* \space\space thm-listof.sty}
+\Msg{* \space\space thm-kv.sty}
+\Msg{* \space\space aliasctr.sty}
+\Msg{* \space\space unique.sty}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/thmtools/unique.dtx b/Master/texmf-dist/source/latex/thmtools/unique.dtx
new file mode 100644
index 00000000000..ee045b08e40
--- /dev/null
+++ b/Master/texmf-dist/source/latex/thmtools/unique.dtx
@@ -0,0 +1,190 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2005-7 by Ulrich M. Schwarz
+%
+%Redistribution and use in source and binary forms, with or without
+%modification, are permitted provided that the following conditions
+%are met:
+%1. Redistributions of source code must retain the above copyright
+% notice, this list of conditions and the following disclaimer.
+%2. Redistributions in binary form must reproduce the above copyright
+% notice, this list of conditions and the following disclaimer in the
+% documentation and/or other materials provided with the distribution.
+%3. All advertising materials mentioning features or use of this software
+% must display the following acknowledgement:
+% This product includes software developed by Ulrich M. Schwarz
+%4. Neither the name of the author nor the names of his contributors
+% may be used to endorse or promote products derived from this software
+% without specific prior written permission.
+%
+%THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+%INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+%FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+%AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+%OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+%SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+%INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+%CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+%ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+%POSSIBILITY OF SUCH DAMAGE.
+%
+%
+% \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
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{unique}[2007/07/29 v0.1 test for uniqueness (ulmi)]
+% \end{macrocode}
+%
+% \section{Implementation and Usage}
+%
+% \iffalse $Id: unique.dtx,v 1.2 2008/02/10 10:23:32 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
+% string of characters. If you use some counter values to generate this,
+% it might be a good idea to try and use hyperref's |\theH...| macros,
+% which have similar restrictions. You can check whether a particular
+% |\setuniqmark| was called more than once during \emph{the last run}
+% with |\ifuniq|.
+% \begin{macrocode}
+\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{%
+ \string\uniq@setmany{#1}%
+ }%
+ \ifuniq{#1}{%
+ \uniq@warnnotunique{#1}%
+ }{}%
+ \fi
+ \global\@namedef{uniq@now@#1}{\uniq@MANY}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifuniq}
+% Companion to |\setuniqmark|: if the uniqmark given in the first
+% argument was called more than once, execute the second argument,
+% otherwise execute the first argument. Note than no call to
+% |\setuniqmark| for a particular uniqmark at all means that this
+% uniqmark is unique.
+%
+% This is a lazy version: we could always say false if we already had two calls
+% to setuniqmark this run, but we have to rerun for any ifuniq prior
+% to the first setuniqmark anyway, so why bother?
+% \begin{macrocode}
+\newcommand\ifuniq[1]{%
+ \expandafter\ifx\csname uniq@last@#1\endcsname\uniq@MANY
+ \expandafter \@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Two quarks to signal if we have seen an uniqmark more than once.
+% \begin{macrocode}
+\def\uniq@ONE{\uniq@ONE}
+\def\uniq@MANY{\uniq@MANY}
+% \end{macrocode}
+% Flag: suggest a rerun?
+% \begin{macrocode}
+\newif\if@uniq@rerun
+% \end{macrocode}
+%
+% Helper macro: a call to this is written to the .aux file when we see
+% an uniqmark for the second time. This sets the right information for
+% the next run. It also checks on subsequent runs if the number of
+% uniqmarks drops to less than two, so that we'll need a rerun.
+% \begin{macrocode}
+\def\uniq@setmany#1{%
+ \global\@namedef{uniq@last@#1}{\uniq@MANY}%
+ \AtEndDocument{%
+ \uniq@warnifunique{#1}%
+ }%
+}
+% \end{macrocode}
+%
+% Warning if something is unique now. This always warns if the
+% setting for this run is not ``many'', because it was generated
+% by a setmany from the last run.
+% \begin{macrocode}
+\def\uniq@warnifunique#1{%
+ \expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
+ \PackageWarningNoLine{uniq}{%
+ `#1' is unique now.\MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \@uniq@reruntrue
+ \fi
+}
+% \end{macrocode}
+%
+% Warning if we have a second uniqmark this run around. Since this is
+% checked immediately, we could give the line of the second
+% occurence, but we do not do so for symmetry.
+% \begin{macrocode}
+\def\uniq@warnnotunique#1{%
+ \PackageWarningNoLine{uniq}{%
+ `#1' is not unique anymore.\MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \@uniq@reruntrue
+}
+% \end{macrocode}
+%
+% Maybe advise a rerun (duh!). This is executed at the end of the
+% second reading of the aux-file. If you manage to set uniqmarks
+% after that (though I cannot imagine why), you might need reruns
+% without being warned, so don't to that.
+% \begin{macrocode}
+\def\uniq@maybesuggestrerun{%
+ \if@uniq@rerun
+ \PackageWarningNoLine{uniq}{%
+ Uniquenesses have changed. \MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \fi
+}
+% \end{macrocode}
+%
+% Make sure the check for rerun is pretty late in processing, so it
+% can catch all of the uniqmarks (hopefully).
+% \begin{macrocode}
+\AtEndDocument{%
+ \immediate\write\@auxout{\string\uniq@maybesuggestrerun}%
+}
+% \end{macrocode}
+%\iffalse
+%</code>
+%\fi
diff --git a/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
new file mode 100644
index 00000000000..e8e4f1aec61
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/aliasctr.sty
@@ -0,0 +1,72 @@
+%%
+%% This is file `aliasctr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% aliasctr.dtx (with options: `code')
+%% 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 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)]
+\def\aliasctr@f@llow#1#2\@nil#3{%
+ \ifx#1\@elt
+ \noexpand #3%
+ \else
+ \expandafter\aliasctr@f@llow#1\@elt\@nil{#1}%
+ \fi
+}
+\newcommand\aliasctr@follow[1]{%
+ \expandafter\aliasctr@f@llow
+ \csname cl@#1\endcsname\@elt\@nil{\csname cl@#1\endcsname}%
+}
+\renewcommand*\@addtoreset[2]{\bgroup
+ \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
+ \let\@elt\relax
+ \expandafter\@cons\aliasctr@@truelist{{#1}}%
+\egroup}
+\RequirePackage{remreset}
+\renewcommand*\@removefromreset[2]{\bgroup
+ \edef\aliasctr@@truelist{\aliasctr@follow{#2}}%
+ \expandafter\let\csname c@#1\endcsname\@removefromreset
+ \def\@elt##1{%
+ \expandafter\ifx\csname c@##1\endcsname\@removefromreset
+ \else
+ \noexpand\@elt{##1}%
+ \fi}%
+ \expandafter\xdef\aliasctr@@truelist{%
+ \aliasctr@@truelist}
+\egroup}
+\newcommand\@counteralias[2]{{%
+ \def\@@gletover##1##2{%
+ \expandafter\global
+ \expandafter\let\csname ##1\expandafter\endcsname
+ \csname ##2\endcsname
+ }%
+ \@ifundefined{c@#2}{\@nocounterr{#2}}{%
+ \@ifdefinable{c@#1}{%
+ \@@gletover{c@#1}{c@#2}%
+ \@@gletover{the#1}{the#2}%
+ \@@gletover{theH#1}{theH#2}%
+ \@@gletover{p@#1}{p@#2}%
+ \expandafter\global
+ \expandafter\def\csname cl@#1\expandafter\endcsname
+ \expandafter{\csname cl@#2\endcsname}%
+ %\@addtoreset{#1}{@ckpt}%
+ }%
+ }%
+}}
+\endinput
+%%
+%% End of file `aliasctr.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty
new file mode 100644
index 00000000000..51cdd97d018
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-autoref.sty
@@ -0,0 +1,45 @@
+%%
+%% This is file `thm-autoref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-autoref.dtx (with options: `autoref')
+%% 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 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/02/17 BETA thm-autoref (ulmi)]
+
+\RequirePackage{thm-patch, aliasctr}
+
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+
+\newcommand\thmt@autorefsetup{%
+ \@xa\def\csname\thmt@envname autorefname\@xa\endcsname\@xa{\thmt@thmname}%
+ \ifthmt@hassibling
+ \@counteralias{\thmt@envname}{\thmt@sibling}%
+ \@xa\def\@xa\thmt@autoreffix\@xa{%
+ \@xa\let\csname the\thmt@envname\@xa\endcsname
+ \csname the\thmt@sibling\endcsname
+ \def\thmt@autoreffix{}%
+ }%
+ \protected@edef\thmt@sibling{\thmt@envname}%
+ \fi
+}
+\g@addto@macro\thmt@newtheorem@predefinition{\thmt@autorefsetup}%
+\g@addto@macro\thmt@newtheorem@postdefinition{\csname thmt@autoreffix\endcsname}%
+\endinput
+%%
+%% End of file `thm-autoref.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty
new file mode 100644
index 00000000000..7a5c5899f26
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-kv.sty
@@ -0,0 +1,71 @@
+%%
+%% This is file `thm-kv.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-kv.dtx (with options: `kv')
+%% 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 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}[2008/02/17 BETA thm-kv interface (ulmi)]
+\let\@xa\expandafter
+\let\@nx\noexpand
+\usepackage{keyval}
+
+\define@key{thmt}{parent}{\thmt@setparent{#1}}
+\define@key{thmt}{numberwithin}{\thmt@setparent{#1}}
+\define@key{thmt}{within}{\thmt@setparent{#1}}
+
+\define@key{thmt}{sibling}{\thmt@setsibling{#1}}
+\define@key{thmt}{numberlike}{\thmt@setsibling{#1}}
+\define@key{thmt}{sharenumber}{\thmt@setsibling{#1}}
+
+\define@key{thmt}{title}{\thmt@setthmname{#1}}
+\define@key{thmt}{name}{\thmt@setthmname{#1}}
+\define@key{thmt}{heading}{\thmt@setthmname{#1}}
+
+\define@key{thmt}{unnumbered}[]{\thmt@isnumberedfalse}
+\define@key{thmt}{starred}[]{\thmt@isnumberedfalse}
+
+\newif\ifthmt@isnumbered
+\newcommand\thmt@setparent[1]{%
+ \def\thmt@parent{#1}%
+}
+\newcommand\thmt@setsibling{%
+ \def\thmt@sibling
+}
+\newcommand\thmt@setthmname{%
+ \def\thmt@thmname
+}
+
+\newcommand\declaretheorem[2][]{%
+ \thmt@setthmname{\MakeUppercase #2}%
+ \thmt@setparent{}%
+ \thmt@setsibling{}%
+ \thmt@isnumberedtrue%
+ \setkeys{thmt}{#1}%
+ \protected@edef\thmt@tmp{%
+ \@nx\newtheorem
+ \ifthmt@isnumbered\else *\fi
+ {#2}%
+ \ifx\thmt@sibling\@empty\else [\thmt@sibling]\fi
+ {\thmt@thmname}%
+ \ifx\thmt@parent\@empty\else [\thmt@parent]\fi
+ }%\show\thmt@tmp
+ \thmt@tmp
+}
+\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
new file mode 100644
index 00000000000..d120829c6ef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-listof.sty
@@ -0,0 +1,62 @@
+%%
+%% This is file `thm-listof.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-listof.dtx (with options: `listof')
+%% 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 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}[2008/02/17 BETA thm-listof (ulmi)]
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+\RequirePackage{thm-patch}
+
+\providecommand\listtheoremname{List of Theorems}
+\newcommand\listoftheorems{%
+ %% much hacking here to pick up the definition from the class
+ %% without oodles of conditionals.
+ \bgroup
+ \let\listfigurename\listtheoremname
+ \let\thref@starttoc\@starttoc
+ \def\@starttoc##1{\thref@starttoc{loe}}%
+ \expandafter\listoffigures
+ \egroup
+}
+
+\newcommand\thmt@mklistcmd{%
+ \@xa\protected@edef\csname l@\thmt@envname\endcsname{%
+ \@nx\@dottedtocline{1}{1.5em}{2.3em}%
+ }%
+}
+\g@addto@macro\thmt@newtheorem@predefinition{%
+ \thmt@mklistcmd
+}
+
+\addtotheoremposthook{%
+ \addcontentsline{loe}{\thmt@envname}{%
+ \numberline{\csname the\thmt@envname\endcsname}%
+ \thmt@thmname
+ \ifx\@empty\thmt@optarg\else\protect\space(\thmt@optarg)\fi
+ }%
+}
+\newcommand\ignoretheorems[1]{%
+ \@for\thm:=#1\do{%
+ \@xa\let\csname l@\thm\endcsname=\@gobbletwo
+ }%
+}
+\endinput
+%%
+%% End of file `thm-listof.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty
new file mode 100644
index 00000000000..7b5315388e9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-patch.sty
@@ -0,0 +1,119 @@
+%%
+%% This is file `thm-patch.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-patch.dtx (with options: `patch')
+%% 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 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/02/17 BETA thm-patch (ulmi)]
+\let\@xa=\expandafter
+\let\@nx=\noexpand
+
+\@ifundefined{c@thmt@dummyctr}{%
+ \newcounter{thmt@dummyctr}%
+}{}%
+\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
+
+\newif\ifthmt@isstarred
+\newif\ifthmt@hassibling
+\newif\ifthmt@hasparent
+
+\let\thmt@original@newtheorem\newtheorem
+\def\newtheorem{%
+ \thmt@isstarredfalse
+ \let\thmt@sibling=\relax \thmt@hassiblingfalse
+ \let\thmt@parent=\relax \thmt@hasparentfalse
+ \@ifstar
+ {\thmt@isstarredtrue\thmt@newtheoremii}%
+ {\thmt@newtheoremii}%
+}
+\newcommand\thmt@newtheoremii[1]{%
+ \def\thmt@envname{#1}%
+ \thmt@newtheoremiii
+}
+\newcommand\thmt@newtheoremiii[2][]{%
+ \def\thmt@thmname{#2}%
+ \ifx&#1&\else
+ \thmt@hassiblingtrue
+ \def\thmt@sibling{#1}%
+ \fi
+ \@ifnextchar[{%
+ \thmt@hasparenttrue
+ \def\tmp@a[####1]{\def\thmt@parent{####1}\thmt@newtheoremiv}%
+ \tmp@a
+ }{%
+ \thmt@newtheoremiv
+ }%
+}
+\newcommand\thmt@newtheoremiv{%
+ \thmt@newtheorem@predefinition
+ % whee, now reassemble the whole shit.
+ \protected@edef\thmt@args{%
+ \@nx\thmt@original@newtheorem%
+ \ifthmt@isstarred *\fi
+ {\thmt@envname}%
+ \ifthmt@hassibling [\thmt@sibling]\fi
+ {\thmt@thmname}%
+ \ifthmt@hasparent [\thmt@parent]\fi
+ }
+ \thmt@args
+ \thmt@newtheorem@postdefinition
+}
+
+\newcommand\thmt@newtheorem@predefinition{}
+\newcommand\thmt@newtheorem@postdefinition{}
+
+\g@addto@macro\thmt@newtheorem@postdefinition{%
+ \@xa\thmt@addtheoremhook\@xa{\thmt@envname}%
+ \ifthmt@isstarred\@namedef{the\thmt@envname}{}\fi
+ \protected@edef\thmt@tmp{%
+ \def\@nx\thmt@envname{\thmt@envname}%
+ \def\@nx\thmt@thmname{\thmt@thmname}%
+ }
+ \@xa\addtotheoremprehook\@xa[\@xa\thmt@envname\@xa]\@xa{%
+ \thmt@tmp
+ }%
+}
+\newcommand\thmt@addtheoremhook[1]{%
+ % this adds two command calls to the newly-defined theorem.
+ \@xa\let\csname thmt@original@#1\@xa\endcsname
+ \csname#1\endcsname
+ \@xa\renewcommand\csname \thmt@envname\endcsname[1][]{%
+ \def\thmt@optarg{##1}%
+ \csname thmt@#1@preheadhook\endcsname
+ \thmt@generic@preheadhook
+ \csname thmt@original@#1\@xa\endcsname
+ \ifx\@empty\thmt@optarg\else [##1]\fi
+ \csname thmt@#1@postheadhook\endcsname
+ \thmt@generic@postheadhook
+ }%
+ \@namedef{thmt@#1@preheadhook}{}%
+ \@namedef{thmt@#1@postheadhook}{}%
+}
+\newcommand\thmt@generic@preheadhook{\refstepcounter{thmt@dummyctr}}
+\newcommand\thmt@generic@postheadhook{}
+
+\newcommand\addtotheoremprehook[1][generic]{%
+ \expandafter\g@addto@macro\csname thmt@#1@preheadhook\endcsname%
+}
+\newcommand\addtotheoremposthook[1][generic]{%
+ \expandafter\g@addto@macro\csname thmt@#1@postheadhook\endcsname%
+}
+
+\endinput
+%%
+%% End of file `thm-patch.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty
new file mode 100644
index 00000000000..38ee8540b4a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/thm-restate.sty
@@ -0,0 +1,72 @@
+%%
+%% This is file `thm-restate.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% thm-restate.dtx (with options: `restate')
+%% 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 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}[2008/02/17 BETA thm-restate (ulmi)]
+
+\let\@xa\expandafter
+\let\@nx\noexpand
+\@ifundefined{c@thmt@dummyctr}{%
+ \newcounter{thmt@dummyctr}%
+ }{}
+\gdef\theHthmt@dummyctr{dummy.\arabic{thmt@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}%
+ \ifx\thmttmpa\thmttmpb
+ \@xa\@firstoftwo% this is the end of the environment.
+ \else
+ \@xa\@secondoftwo% go on collecting
+ \fi{%
+ \@xa#1\@xa{\the\thmt@toks}%
+ }{%
+ \@xa\thmt@toks\@xa{\the\thmt@toks\end{#3}}%
+ \thmt@collect@body{#1}%
+ }%
+}
+
+\newenvironment{restatable}[3][]{%
+ \def\thmrst@type{#2}%
+ \long\def\thmrst@store##1{%
+ \protected@edef\thmrst@nmbr{\csname the#2\endcsname}%
+ \@xa\long\@xa\gdef\csname #3\@xa\endcsname\@xa{%
+ \@xa\begingroup
+ \@xa\def\csname the#2\@xa\endcsname\@xa{\thmrst@nmbr}%
+ \@xa\let\csname c@#2\endcsname\c@thmt@dummyctr
+ \@xa\let\csname theH#2\endcsname\theHthmt@dummyctr
+ \let\label=\@gobble
+ %\def\@currenvir{#2}%
+ \csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
+ ##1
+ \csname end#2\endcsname
+ \endgroup
+ }##1\end{restatable}}%
+ %\def\@currenvir{#2}%
+ \csname #2\@xa\endcsname\ifx\@nx#1\@nx\else[#1]\fi
+ \thmt@collect@body\thmrst@store
+}{%
+ \csname end\thmrst@type\endcsname
+ %\def\@currenvir{restatable}%
+}
+\endinput
+%%
+%% End of file `thm-restate.sty'.
diff --git a/Master/texmf-dist/tex/latex/thmtools/unique.sty b/Master/texmf-dist/tex/latex/thmtools/unique.sty
new file mode 100644
index 00000000000..2c607807cc3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thmtools/unique.sty
@@ -0,0 +1,83 @@
+%%
+%% This is file `unique.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% unique.dtx (with options: `code')
+%% 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 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)]
+\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{%
+ \string\uniq@setmany{#1}%
+ }%
+ \ifuniq{#1}{%
+ \uniq@warnnotunique{#1}%
+ }{}%
+ \fi
+ \global\@namedef{uniq@now@#1}{\uniq@MANY}%
+ \fi
+}
+\newcommand\ifuniq[1]{%
+ \expandafter\ifx\csname uniq@last@#1\endcsname\uniq@MANY
+ \expandafter \@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+\def\uniq@ONE{\uniq@ONE}
+\def\uniq@MANY{\uniq@MANY}
+\newif\if@uniq@rerun
+\def\uniq@setmany#1{%
+ \global\@namedef{uniq@last@#1}{\uniq@MANY}%
+ \AtEndDocument{%
+ \uniq@warnifunique{#1}%
+ }%
+}
+\def\uniq@warnifunique#1{%
+ \expandafter\ifx\csname uniq@now@#1\endcsname\uniq@MANY\else
+ \PackageWarningNoLine{uniq}{%
+ `#1' is unique now.\MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \@uniq@reruntrue
+ \fi
+}
+\def\uniq@warnnotunique#1{%
+ \PackageWarningNoLine{uniq}{%
+ `#1' is not unique anymore.\MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \@uniq@reruntrue
+}
+\def\uniq@maybesuggestrerun{%
+ \if@uniq@rerun
+ \PackageWarningNoLine{uniq}{%
+ Uniquenesses have changed. \MessageBreak
+ Rerun LaTeX to pick up the change%
+ }%
+ \fi
+}
+\AtEndDocument{%
+ \immediate\write\@auxout{\string\uniq@maybesuggestrerun}%
+}
+\endinput
+%%
+%% End of file `unique.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index e2db51c239a..3be00f5a690 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -166,7 +166,7 @@ my @WorkingTLP = qw(
tensor teubner tex-gyre texilikecover texmate
texpower texshade
textcase textfit textopo textpath textpos thesis-titlepage-fhac
- thinsp thumb thumbpdf thuthesis ticket titlefoot titlesec
+ thinsp thmtools thumb thumbpdf thuthesis ticket titlefoot titlesec
titling tocbibind
tocloft todo tokenizer toolbox tools toptesi totpages tracking
trajan tree-dvips trfsigns trivfloat
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index ef38ca58572..0315b076d4f 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -499,6 +499,7 @@ depend textfit
depend textmerg
depend textpos
depend thinsp
+depend thmtools
depend thumb
depend ticket
depend timesht
diff --git a/Master/tlpkg/tlpsrc/thmtools.tlpsrc b/Master/tlpkg/tlpsrc/thmtools.tlpsrc
new file mode 100644
index 00000000000..80fd0693f02
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/thmtools.tlpsrc
@@ -0,0 +1,2 @@
+name thmtools
+category Package