summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-04 23:10:56 +0000
committerKarl Berry <karl@freefriends.org>2018-12-04 23:10:56 +0000
commit9fa6bc6b0478d325973d23f44e070f49c771ab0c (patch)
treee4f5af806208727d8d86bcd4ab2dedb57a21b5fe /Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
parentd92cee8eff42fa304294a3e5f674062c8c745632 (diff)
lwarp (4dec18)
git-svn-id: svn://tug.org/texlive/trunk@49318 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty46
1 files changed, 19 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
index 9c35143c98c..6f56f47f368 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
@@ -20,7 +20,6 @@
\RequirePackage{xcolor}% for \convertcolorspec
\LWR@ProvidesPackageDrop{mdframed}
-\LWR@origRequirePackage{amsthm}
\LWR@origRequirePackage[framemethod=none]{mdframed}
\AtBeginDocument{
\def\mdf@trivlist#1{%
@@ -47,12 +46,16 @@ endinnercode={\LWR@stoppars},
}
\newcommand*{\LWR@mdfprintlength}[1]{%
-\LWR@printlength{\@nameuse{mdf@#1@length}}
+\LWR@forceminwidth{\@nameuse{mdf@#1@length}}%
+\LWR@printlength{\LWR@atleastonept}%
}
\newcommand*{\LWR@mdframedstart}{%
\LWR@traceinfo{LWR@mdframedstart start}%
\LWR@stoppars%
-\LWR@htmltagc{div class="\LWR@mdthisenv" \LWR@orignewline
+\LWR@htmltagc{div class="%
+mdframed%
+\ifdefstring{\LWR@mdthisenv}{mdframed}{}{ \LWR@mdthisenv}%
+" \LWR@orignewline
style=" \LWR@orignewline
background: \LWR@mdfprintcolor{backgroundcolor} ; \LWR@orignewline
border: \LWR@mdfprintlength{linewidth} solid
@@ -116,14 +119,11 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
\renewrobustcmd*\mdf@footnoteoutput{%
\LWR@printpendingmpfootnotes%
}
-\LetLtxMacro\LWR@origmdfframedtitleenv\mdfframedtitleenv
-
\newlength{\LWR@titleroundcorner}
\renewrobustcmd\mdfframedtitleenv[1]{%
\LWR@traceinfo{LWR@mdframedtitleenv start}%
-\LWR@htmltagc{span class="mdframedtitle" \LWR@orignewline
-style=" \LWR@orignewline
+\begin{BlockClass}[%
background:
\LWR@mdfprintcolor{frametitlebackgroundcolor}
; \LWR@orignewline
@@ -134,21 +134,16 @@ background:
\LWR@mdfprintcolor{frametitlerulecolor}
; \LWR@orignewline
}{}%
-" \LWR@orignewline
-}% span
-\begin{LWR@nestspan}%
-#1%
-\LWR@htmltagc{/span}%
-\end{LWR@nestspan}%
+]{mdframedtitle}%
+\mdf@frametitlefont{\LWR@textcurrentfont{#1}}%
+\end{BlockClass}%
\LWR@traceinfo{LWR@mdframedtitleenv end}%
}
\NewDocumentCommand{\LWR@mdfsubtitlecommon}{m o m}
{% the following empty line is required
\LWR@traceinfo{LWR@mdframedsubtitlecommon start}%
-\let\par\LWR@origpar%
-\LWR@htmltagc{span class="mdframed#1title"
-style=" \LWR@orignewline
+\begin{BlockClass}[%
background:
\LWR@mdfprintcolor{#1titlebackgroundcolor}
; \LWR@orignewline
@@ -166,14 +161,11 @@ background:
\LWR@mdfprintcolor{#1titlebelowlinecolor}
; \LWR@orignewline
}{}%
-"}% span
-\begin{LWR@nestspan}%
+]{mdframed#1title}%
\IfNoValueTF{#2}
-{\@nameuse{LWR@origmdf#1title}{#3}}%
-{\@nameuse{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
-
+{\@nameuse{LWR@origmdf#1title}{\csuse{mdf@#1titlefont}{\LWR@textcurrentfont{#3}}}}%
+{\@nameuse{LWR@origmdf#1title}[#2]{\csuse{mdf@#1titlefont}{\LWR@textcurrentfont{#3}}}}%
+\end{BlockClass}%
\LWR@traceinfo{LWR@mdframedsubtitlecommon end}%
}
\newcommand*{\LWR@mdfsubtitle}{%
@@ -218,7 +210,7 @@ background:
\def\@temptitle{\mdf@theoremseparator%
\mdf@theoremspace%
\mdf@theoremtitlefont%
- ##1}%
+ \LWR@textcurrentfont{##1}}% lwarp
\mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}%
}%
\begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname%
@@ -243,7 +235,7 @@ background:
\def\@temptitle{\mdf@theoremseparator%
\mdf@theoremspace%
\mdf@theoremtitlefont%
- ##1}%
+ \LWR@textcurrentfont{##1}}% lwarp
\mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}%
}
\begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname%
@@ -256,7 +248,7 @@ background:
\def\@temptitle{\mdf@theoremseparator%
\mdf@theoremspace%
\mdf@theoremtitlefont%
- ##1}%
+ \LWR@textcurrentfont{##1}}% lwarp
\mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}%
}%
\begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}%
@@ -273,7 +265,7 @@ background:
\def\@temptitle{\mdf@theoremseparator%
\mdf@theoremspace%
\mdf@theoremtitlefont%
- ##1}%
+ \LWR@textcurrentfont{##1}}% lwarp
\mdf@thm@caption{#2}{{#4}{\csname the#2\endcsname}{##1}}%
}
\begin{mdframed}[#1,frametitle={\strut#4\ \csname the#2\endcsname%