diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty | 261 |
1 files changed, 261 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty new file mode 100644 index 00000000000..b8bb93dcbbe --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty @@ -0,0 +1,261 @@ +%% +%% This is file `lwarp-mdframed.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `mdframed') +%% This is a generated file. +%% Copyright 2016 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +\LWR@ProvidesPackageDrop{mdframed} + +\LWR@origRequirePackage{amsthm} +\LWR@origRequirePackage[framemethod=none]{mdframed} +\mdfsetup{ +startcode={\LWR@mdframedstart}, +endcode={\LWR@mdframedend}, +startinnercode={\LWR@startpars}, +endinnercode={\LWR@stoppars}, +} +\newcommand*{\LWR@mdfprintcolor}[1]{% +\convertcolorspec{named}{\csuse{mdf@#1}}{HTML}\LWR@tempcolor% +\#\LWR@tempcolor +} + +\newcommand*{\LWR@mdfprintlength}[1]{% +\rndprintlength{\csuse{mdf@#1@length}} +} + +\newcommand*{\LWR@mdframedstart}{% +\LWR@stoppars% +\uselengthunit{PT}% +\LWR@htmltagc{div class="\LWR@mdthisenv" \LWR@orignewline +style=" \LWR@orignewline +background: \LWR@mdfprintcolor{backgroundcolor} ; \LWR@orignewline +border: \LWR@mdfprintlength{linewidth} solid +\LWR@mdfprintcolor{linecolor} ; \LWR@orignewline +border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline +\ifbool{mdf@shadow}{% +box-shadow: +\LWR@mdfprintlength{shadowsize} +\LWR@mdfprintlength{shadowsize} +\LWR@mdfprintlength{shadowsize} +\LWR@mdfprintcolor{shadowcolor} ; +} +{box-shadow: none ;} +\LWR@orignewline +"} +\let\hspace\LWR@orighspace% +\let\rule\LWR@origrule% +} +\newcommand*{\LWR@mdframedend}{ +\LWR@htmldivclassend{\LWR@mdthisenv} +\gdef\LWR@mdthisenv{mdframed} +\LWR@startpars% +} +\let\LWR@origmdfframedtitleenv\mdfframedtitleenv + +\newlength{\LWR@titleroundcorner} + +\renewrobustcmd\mdfframedtitleenv[1]{% +\LWR@origmdfframedtitleenv{% +\uselengthunit{PT}% +\LWR@htmltagc{span class="mdframedtitle" \LWR@orignewline +style=" \LWR@orignewline +background: +\LWR@mdfprintcolor{frametitlebackgroundcolor} +; \LWR@orignewline +\ifbool{mdf@frametitlerule}{% +border-bottom: +\LWR@mdfprintlength{frametitlerulewidth} +solid +\LWR@mdfprintcolor{frametitlerulecolor} +; \LWR@orignewline +}{}% +border-radius: +\setlength{\LWR@titleroundcorner} +{\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}} +\rndprintlength{\LWR@titleroundcorner} +\rndprintlength{\LWR@titleroundcorner} +0pt 0pt +\LWR@orignewline +" \LWR@orignewline +}% span +\begin{LWR@nestspan}% +#1% +\LWR@htmltagc{/span}% +\end{LWR@nestspan}% +} +} +\NewDocumentCommand{\LWR@mdfsubtitlecommon}{m o m} +{% the following empty line is required + +\let\par\LWR@origpar% +\LWR@htmltagc{span class="mdframed#1title" +style=" \LWR@orignewline +background: +\LWR@mdfprintcolor{#1titlebackgroundcolor} +; \LWR@orignewline +\ifbool{mdf@#1titleaboveline}{% +border-top: +\LWR@mdfprintlength{#1titleabovelinewidth} +solid +\LWR@mdfprintcolor{#1titleabovelinecolor} +; \LWR@orignewline +}{}% +\ifbool{mdf@#1titlebelowline}{% +border-bottom: +\LWR@mdfprintlength{#1titlebelowlinewidth} +solid +\LWR@mdfprintcolor{#1titlebelowlinecolor} +; \LWR@orignewline +}{}% +"}% span +\begin{LWR@nestspan}% +\IfNoValueTF{#2} +{\csuse{LWR@origmdf#1title}{#3}}% +{\csuse{LWR@origmdf#1title}[#2]{#3}}% +\LWR@htmltagc{/span}% the following empty line is required +\end{LWR@nestspan}% must follow the /span or an extra <p> appears + +} +\let\LWR@origmdfsubtitle\mdfsubtitle + +\newcommand*{\LWR@mdfsubtitle}{% +\LWR@mdfsubtitlecommon{sub}% +} +\let\mdfsubtitle\LWR@mdfsubtitle +\let\LWR@origmdfsubsubtitle\mdfsubsubtitle + +\newcommand*{\LWR@mdfsubsubtitle}{% +\LWR@mdfsubtitlecommon{subsub}% +} +\let\mdfsubsubtitle\LWR@mdfsubsubtitle +\newcommand*{\LWR@mdthisenv}{mdframed} +\renewrobustcmd*\newmdenv[2][]{% +\newenvironment{#2}% +{% +\mdfsetup{#1}% +\renewcommand*{\LWR@mdthisenv}{md#2}% +\begin{mdframed}% +} +{\end{mdframed}}% +} +\renewrobustcmd*{\surroundwithmdframed}[2][]{% +\BeforeBeginEnvironment{#2}{% +\renewcommand*{\LWR@mdthisenv}{md#2}% +\begin{mdframed}[#1]}% +\AfterEndEnvironment{#2}{\end{mdframed}}% +} +\let\LWR@origmdtheorem\mdtheorem + +\DeclareDocumentCommand{\LWR@mdtheorem}{O{} m o m o}{% +\LWR@origmdtheorem[#1]{#2}[#3]{#4}[#5]% +\BeforeBeginEnvironment{#2}{\renewcommand*{\LWR@mdthisenv}{md#2}}% +} + +\let\mdtheorem\LWR@mdtheorem +\DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{% + \ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }% + {\newtheorem{#2}{#4}}{% + \IfValueTF{#3}{\newtheorem{#2}[#3]{#4}}{}% + \IfValueTF{#5}{\newtheorem{#2}{#4}[#5]}{}% + }% +\BeforeBeginEnvironment{#2}{% +\renewcommand*{\LWR@mdthisenv}{md#2}% +\begin{mdframed}[#1]}% +\AfterEndEnvironment{#2}{% +\end{mdframed}}% +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +\endinput +%% +%% End of file `lwarp-mdframed.sty'. |