summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty
blob: 5263d8fa47acac46bcb69f95bcaf90586986d131 (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
%%
%% 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 Yukai Chou, muzimuzhi@gmail.com
%% 
%% Copyright (C) 2008-2014 by Ulrich M. Schwarz
%% Copyright (C) 2019      by Frank Mittelbach
%% Copyright (C) 2020-     by Yukai Chou
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, version 1.3c.
%% This version is obtainable at
%% http://www.latex-project.org/lppl/lppl-1-3c.txt
%% 
%% 
\NeedsTeXFormat {LaTeX2e}
\ProvidesPackage {thmdef-shaded}[2020/08/01 v0.72]
  \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}}
\define@key{thmt@shade}{padding}    {\setlength\shadeboxsep{#1}}
\define@key{thmt@shade}{leftmargin} {\setlength\shadeleftshift{#1}}
\define@key{thmt@shade}{rightmargin}{\setlength\shaderightshift{#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'.