summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thmtools/thmdef-shaded.sty
blob: c815eeffac505e95cbff8d5818311c3df7929109 (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
%%
%% 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: unmaintained.
%% 
%% Copyright (C) 2008-2014 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}[2019/07/31 v67]
  \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'.