Debian Codegraph @

texmf-dist/tex/latex/lwarp/lwarp-framed.sty

raw
1 %%
2 %% This is file `lwarp-framed.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lwarp.dtx (with options: `framed')
8 %% This is a generated file.
9 %% Copyright 2016-2026 Brian Dunn
10 %%
11 %% This work may be distributed and/or modified under the
12 %% conditions of the LaTeX Project Public License, either version 1.3
13 %% of this license or (at your option) any later version.
14 %% The latest version of this license is in
15 %% http://www.latex-project.org/lppl.txt
16 %% and version 1.3 or later is part of all distributions of LaTeX
17 %% version 2005/12/01 or later.
18
19 \LWR@ProvidesPackagePass{framed}[2011/10/22]
20
21 \AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec
22
23 \renewenvironment{framed}
24 {%
25 \LWR@forcenewpage
26 \BlockClass{framed}%
27 }
28 {\endBlockClass}
29
30 \renewenvironment{oframed}
31 {%
32 \LWR@forcenewpage
33 \BlockClass{framed}%
34 }
35 {\endBlockClass}
36
37 \renewenvironment{shaded}
38 {%
39 \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
40 \LWR@forcenewpage
41 \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
42 }
43 {\endBlockClass}
44
45 \renewenvironment{shaded*}
46 {%
47 \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
48 \LWR@forcenewpage
49 \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
50 }
51 {\endBlockClass}
52
53 \renewenvironment{leftbar}{%
54 \LWR@forcenewpage
55 \BlockClass{framedleftbar}
56 \def\FrameCommand{}%
57 \MakeFramed {}
58 }%
59 {\endMakeFramed\endBlockClass}
60
61 \renewenvironment{snugshade}
62 {%
63 \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
64 \LWR@forcenewpage
65 \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
66 }
67 {\endBlockClass}
68
69 \renewenvironment{snugshade*}
70 {%
71 \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
72 \LWR@forcenewpage
73 \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
74 }
75 {\endBlockClass}
76
77 \let\oframed\framed
78 \let\endoframed\endframed
79
80 \RenewEnviron{titled-frame}[1]{%
81 \CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY}
82 }
83
84 \renewcommand{\CustomFBox}[7]{%
85 \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
86 \LWR@forcenewpage
87 \begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}%
88 \ifthenelse{\isempty{#1}}{}{% not empty
89 \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
90 \textcolor{TFTitleColor}{\textbf{#1}}%
91 \end{BlockClass}%
92 }% not empty
93
94 #7
95
96 \ifthenelse{\isempty{#2}}{}{% not empty
97 \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
98 \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
99 \textcolor{TFTitleColor}{\textbf{#2}}%
100 \end{BlockClass}%
101 }% not empty
102 \end{BlockClass}%
103 }
104
105 \renewcommand\TitleBarFrame[3][]{%
106 \CustomFBox%
107 {#2}{}%
108 \fboxrule\fboxrule\fboxrule\fboxrule%
109 {#3}%
110 }
111
112 \renewcommand{\TF@Title}[1]{#1}
113
114 \let\MakeFramed\relax
115 \let\endMakeFramed\relax
116
117 \NewEnviron{MakeFramed}[1]{%
118 \FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}%
119 }
120
121 \renewcommand*{\fb@put@frame}[2]{%
122 \relax%
123 \@tempboxa%
124 }
125
126
127 \endinput
128 %%
129 %% End of file `lwarp-framed.sty'.