Debian Codegraph @

texmf-dist/source/latex/thmtools/thmtools.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2008-2014 by Ulrich M. Schwarz
4 % Copyright (C) 2019 by Frank Mittelbach
5 % Copyright (C) 2020- by Yukai Chou
6 %
7 % This file may be distributed and/or modified under the conditions of
8 % the LaTeX Project Public License, version 1.3c.
9 % The license can be obtained from
10 % http://www.latex-project.org/lppl/lppl-1.3c.txt
11 %
12 % \fi
13 %
14 %\iffalse (hide this from DocInput)
15 %<*driver>
16 \makeatletter
17 \ifx\documentclass\@twoclasserror\else
18 \expandafter\@firstofone
19 \fi{%
20 \makeatother
21 %% we are either \RequirePackage'd
22 %% (which we won't support) or compiled directly.
23 %% If we are compiled directly, yield the manual.
24 %% Otherwise, this looks like a debugging session
25 %% that directly uses the dtx file instead of the sty.
26 \input{thmtools-manual.tex}
27 \endinput
28 }
29 %</driver>
30 %<*thmtools>
31 %\fi
32 % \begin{macrocode}
33 \DeclareOption{debug}{%
34 \def\thmt@debug{\typeout}%
35 }
36 % common abbreviations and marker macros.
37 \let\@xa\expandafter
38 \let\@nx\noexpand
39 \def\thmt@debug{\@gobble}
40 \def\thmt@quark{\thmt@quark}
41 \newtoks\thmt@toks
42
43 \@for\thmt@opt:=lowercase,uppercase,anycase\do{%
44 \@xa\DeclareOption\@xa{\thmt@opt}{%
45 \@xa\PassOptionsToPackage\@xa{\CurrentOption}{thm-kv}%
46 }%
47 }
48
49 \ProcessOptions\relax
50
51 % a scratch counter, mostly for fake hyperlinks
52 \newcounter{thmt@dummyctr}%
53 \def\theHthmt@dummyctr{dummy.\arabic{thmt@dummyctr}}%
54 \def\thethmt@dummyctr{}%
55
56
57 \RequirePackage{thm-patch, thm-kv,
58 thm-autoref, thm-listof,
59 thm-restate}
60
61 % Glue code for the big players.
62 \@ifpackageloaded{amsthm}{%
63 \RequirePackage{thm-amsthm}
64 }{%
65 \AtBeginDocument{%
66 \@ifpackageloaded{amsthm}{%
67 \PackageWarningNoLine{thmtools}{%
68 amsthm loaded after thmtools
69 }{}%
70 }{}}%
71 }
72 \@ifpackageloaded{ntheorem}{%
73 \RequirePackage{thm-ntheorem}
74 }{%
75 \AtBeginDocument{%
76 \@ifpackageloaded{ntheorem}{%
77 \PackageWarningNoLine{thmtools}{%
78 ntheorem loaded after thmtools
79 }{}%
80 }{}}%
81 }
82 \@ifclassloaded{beamer}{%
83 \RequirePackage{thm-beamer}
84 }{}
85 \@ifclassloaded{llncs}{%
86 \RequirePackage{thm-llncs}
87 }{}
88 % \end{macrocode}
89
90 %\iffalse
91 %</thmtools>
92 %\fi