summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thmtools/thmtools.dtx
blob: 80782f0fb761c3bdb06ac897d3ce4560d21f8e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
% \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>
\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}
\DeclareOption{debug}{%
  \def\thmt@debug{\typeout}%
}
% common abbreviations and marker macros.
\let\@xa\expandafter
\let\@nx\noexpand
\def\thmt@debug{\@gobble}
\def\thmt@quark{\thmt@quark}
\newtoks\thmt@toks

\ProcessOptions\relax

% a scratch counter, mostly for fake hyperlinks
\newcounter{thmt@dummyctr}%
\def\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
\def\thethmt@dummyctr{}%


\RequirePackage{thm-patch, thm-kv, 
  thm-autoref, thm-listof, 
  thm-restate}

% Glue code for the big players.  
\@ifpackageloaded{amsthm}{%
  \RequirePackage{thm-amsthm}
}{%
  \AtBeginDocument{%
  \@ifpackageloaded{amsthm}{%
    \PackageWarningNoLine{thmtools}{%
      amsthm loaded after thmtools
    }{}%
  }}%
}
\@ifpackageloaded{ntheorem}{%
  \RequirePackage{thm-ntheorem}
}{%
  \AtBeginDocument{%
  \@ifpackageloaded{ntheorem}{%
    \PackageWarningNoLine{thmtools}{%
      ntheorem loaded after thmtools
    }{}%
  }}%
}
\@ifclassloaded{beamer}{%
  \RequirePackage{thm-beamer}
}{}
%    \end{macrocode}

%\iffalse
%</thmtools>
%\fi