summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty34
1 files changed, 31 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index 6ab31aea5eb..306c8e458ac 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -38,6 +38,27 @@
}
\newcommand*{\LWR@tempcolor}{}
\newcommand*{\LWR@tempcolortwo}{}
+\newcommand*{\LWR@findcurrenttextcolor}{%
+\protect\colorlet{LWR@current@color}{.}%
+\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor%
+}
+
+\newcommand*{\LWR@currenttextcolorstyle}{%
+\LWR@findcurrenttextcolor%
+\ifdefstring{\LWR@tempcolor}{000000}%
+{}%
+{color: \#\LWR@tempcolor ; }%
+}
+\newcommand*{\LWR@textcurrentcolor}[1]{%
+\begingroup%
+\LWR@FBcancel%
+\LWR@findcurrenttextcolor%
+\InlineClass[color:\#\LWR@tempcolor]{textcolor}{%
+ \renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}%
+ #1%
+}%
+\endgroup%
+}
\NewDocumentCommand{\LWR@colorstyle}{m m}{%
\begingroup%
\LWR@FBcancel%
@@ -45,6 +66,14 @@
\#\LWR@tempcolor%
\endgroup%
}
+\NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{%
+\begingroup%
+\LWR@FBcancel%
+\InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{%
+#3%
+}%
+\endgroup%
+}
\newcommand*{\LWR@borderpadding}[2]{%
\uselengthunit{PT}%
border:\rndprintlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
@@ -53,7 +82,6 @@ padding:\rndprintlength{\fboxsep}%
\RenewDocumentCommand{\textcolor}{O{named} m m}{%
\begingroup%
\LWR@FBcancel%
-\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
\InlineClass[color:\LWR@colorstyle{#1}{#2}]{textcolor}{%
\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}%
#3%
@@ -63,7 +91,7 @@ padding:\rndprintlength{\fboxsep}%
\renewcommand*{\pagecolor}[2][named]{}
-\let\nopagecolor\relax
+\renewcommand*{\nopagecolor}{}
\RenewDocumentCommand{\colorbox}{O{named} m +m}{%
\begingroup%
@@ -127,7 +155,7 @@ padding:\rndprintlength{\fboxsep}%
{% yes background color
\convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
\begin{BlockClass}[%
- background:\#\LWR@tempcolortwo; %
+ background:\#\LWR@tempcolortwo\ ; %
\LWR@borderpadding{#1}{#2}%
]{fcolorboxBlock}
#5