diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty index eabfabe7f1e..b5dafa63d0d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty @@ -28,7 +28,7 @@ \LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox \LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox \LetLtxMacro\LWRorigprint@boxframe\boxframe -\appto{\LWR@restoreorigformatting}{% +\appto\LWR@restoreorigformatting{% \LetLtxMacro\textcolor\LWRprint@textcolor% \LetLtxMacro\pagecolor\LWRprint@pagecolor% \LetLtxMacro\nopagecolor\LWRprint@nopagecolor% @@ -36,9 +36,7 @@ \LetLtxMacro\fcolorbox\LWRprint@fcolorbox% \LetLtxMacro\boxframe\LWRorigprint@boxframe% } -\newcommand*{\LWR@tempcolor}{} -\newcommand*{\LWR@tempcolortwo}{} -\newcommand*{\LWR@findcurrenttextcolor}{% +\renewcommand*{\LWR@findcurrenttextcolor}{% \protect\colorlet{LWR@current@color}{.}% \protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% } @@ -47,14 +45,14 @@ \LWR@findcurrenttextcolor% \ifdefstring{\LWR@tempcolor}{000000}% {}% -{color: \#\LWR@tempcolor ; }% +{color: \LWR@origpound\LWR@tempcolor ; }% } -\newcommand*{\LWR@textcurrentcolor}[1]{% +\DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{% \begingroup% \LWR@FBcancel% \LWR@findcurrenttextcolor% -\InlineClass[color:\#\LWR@tempcolor]{textcolor}{% - \renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}% +\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% + \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% #1% }% \endgroup% @@ -63,7 +61,7 @@ \begingroup% \LWR@FBcancel% \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\#\LWR@tempcolor% +\LWR@origpound\LWR@tempcolor% \endgroup% } \NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{% @@ -78,13 +76,25 @@ border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % padding:\LWR@printlength{\fboxsep}% } -\RenewDocumentCommand{\textcolor}{O{named} m m}{% +\RenewDocumentCommand{\textcolor}{o m m}{% \begingroup% +\IfValueTF{#1}{% + \color[#1]{#2}% +}{% + \color{#2}% +}% \LWR@FBcancel% +\IfValueTF{#1}{% \InlineClass[color:\LWR@colorstyle{#1}{#2}]{textcolor}{% -\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}% +\renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% +#3% +}% +}{% +\InlineClass[color:\LWR@colorstyle{named}{#2}]{textcolor}{% +\renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% #3% }% +}% \endgroup% } @@ -150,7 +160,7 @@ padding:\LWR@printlength{\fboxsep}% {% yes background color \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% \begin{BlockClass}[% - background:\#\LWR@tempcolortwo\ ; % + background:\LWR@origpound\LWR@tempcolortwo\ ; % \LWR@borderpadding{#1}{#2}% ]{fcolorboxBlock} #5 @@ -179,7 +189,7 @@ width:\LWR@printlength{\LWR@tempwidth}% {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% {% \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \LWR@subfcolorminipage{#1}{#2}{background:\#\LWR@tempcolortwo\ ; }{#6}% + \LWR@subfcolorminipage{#1}{#2}{background:\LWR@origpound\LWR@tempcolortwo\ ; }{#6}% }% } {\end{BlockClass}} |