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 | 295 |
1 files changed, 150 insertions, 145 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty index 83dd68dfd44..0cf6d141cdd 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty @@ -19,80 +19,82 @@ \LWR@ProvidesPackagePass{xcolor}[2016/05/11] +\let\color@endgroup\endgroup + \LetLtxMacro\LWR@print@pagecolor\pagecolor \LetLtxMacro\LWR@print@nopagecolor\nopagecolor \appto\LWR@restoreorigformatting{% -\LetLtxMacro\pagecolor\LWR@print@pagecolor% -\LetLtxMacro\nopagecolor\LWR@print@nopagecolor% + \LetLtxMacro\pagecolor\LWR@print@pagecolor% + \LetLtxMacro\nopagecolor\LWR@print@nopagecolor% } \DeclareRobustCommand{\LWR@HTML@normalcolor}{\color{black}}% \LWR@formatted{normalcolor} \renewcommand*{\LWR@findcurrenttextcolor}{% -\LWR@traceinfo{LWR@findcurrenttextcolor}% -\protect\colorlet{LWR@current@color}{.}% -\LWR@traceinfo{LWR@findcurrenttextcolor B}% -\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% -\LWR@traceinfo{LWR@findcurrenttextcolor: done}% + \LWR@traceinfo{LWR@findcurrenttextcolor}% + \protect\colorlet{LWR@current@color}{.}% + \LWR@traceinfo{LWR@findcurrenttextcolor B}% + \protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% + \LWR@traceinfo{LWR@findcurrenttextcolor: done}% } \newcommand*{\LWR@currenttextcolorstyle}{% -\LWR@findcurrenttextcolor% -\ifdefstring{\LWR@tempcolor}{000000}% -{}% -{color: \LWR@origpound\LWR@tempcolor ; }% + \LWR@findcurrenttextcolor% + \ifdefstring{\LWR@tempcolor}{000000}% + {}% + {color: \LWR@origpound\LWR@tempcolor ; }% } \DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{% -\begingroup% -\LWR@hook@processingtags% -\LWR@findcurrenttextcolor% -\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% - \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% - #1% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \LWR@findcurrenttextcolor% + \InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% + \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% + #1% + }% + \endgroup% } \NewDocumentCommand{\LWR@colorstyle}{m m}{% -\begingroup% -\LWR@hook@processingtags% -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\LWR@origpound\LWR@tempcolor% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \LWR@origpound\LWR@tempcolor% + \endgroup% } \NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% -#3% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% + #3% + }% + \endgroup% } \newcommand*{\LWR@borderpadding}[2]{% -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% + border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% } \NewDocumentCommand{\LWR@HTML@color}{o m}{% -\IfValueTF{#1}{% - \LWR@print@color[#1]{#2}% - \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -}{% - \LWR@print@color{#2}% - \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% -}% -\edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% + \IfValueTF{#1}{% + \LWR@print@color[#1]{#2}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + }{% + \LWR@print@color{#2}% + \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% + }% + \edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% } \LWR@formatted{color} \NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{% -\begingroup% -\LWR@hook@processingtags% -\IfValueTF{#1}{% - \color[#1]{#2}% -}{% - \color{#2}% -}% -\InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \IfValueTF{#1}{% + \color[#1]{#2}% + }{% + \color{#2}% + }% + \InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% + \endgroup% }% \LWR@formatted{textcolor} @@ -102,128 +104,131 @@ padding:\LWR@printlength{\fboxsep}% \renewcommand*{\nopagecolor}{} \NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorbox}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorbox}{#3}% + \endgroup% } \NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% -\LWR@stoppars% -\begin{BlockClass}[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorboxBlock} -#3 -\end{BlockClass}% -\endgroup% -\global\booltrue{LWR@minipagethispar}% + \begingroup% + \LWR@hook@processingtags% + \LWR@stoppars% + \begin{BlockClass}[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorboxBlock} + #3 + \end{BlockClass}% + \endgroup% + \global\booltrue{LWR@minipagethispar}% } \NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorbox #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% -\ifthenelse{\equal{#4}{none}}% - {% no background color - \InlineClass[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorbox}{#5}% - }% - {% yes background color - \InlineClass[% - \LWR@borderpadding{#1}{#2} ; % - background:\LWR@colorstyle{#3}{#4}% - ]{fcolorbox}{#5}% - }% -\endgroup% + \LWR@traceinfo{HTML fcolorbox #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \InlineClass[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorbox}{#5}% + }% + {% yes background color + \InlineClass[% + \LWR@borderpadding{#1}{#2} ; % + background:\LWR@colorstyle{#3}{#4}% + ]{fcolorbox}{#5}% + }% + \endgroup% } \NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorboxBlock #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% -\LWR@stoppars% -\ifthenelse{\equal{#4}{none}}% - {% no background color - \begin{BlockClass}[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% - {% yes background color - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \begin{BlockClass}[% - background:\LWR@origpound\LWR@tempcolortwo\ ; % - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% -\endgroup% -\global\booltrue{LWR@minipagethispar}% -\LWR@traceinfo{HTML fcolorboxBlock done}% + \LWR@traceinfo{HTML fcolorboxBlock #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% + \LWR@stoppars% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \begin{BlockClass}[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + {% yes background color + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \begin{BlockClass}[% + background:\LWR@origpound\LWR@tempcolortwo\ ; % + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + \endgroup% + \global\booltrue{LWR@minipagethispar}% + \LWR@traceinfo{HTML fcolorboxBlock done}% } \NewDocumentCommand{\LWR@subfcolorminipage}{m m m m}{% -\LWR@stoppars% -\begin{BlockClass}[% -#3% -\LWR@borderpadding{#1}{#2} ; % -\IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% -width:\LWR@printlength{\LWR@tempwidth}% -]{fcolorminipage}% + \LWR@stoppars% + \begin{BlockClass}[% + #3% + \LWR@borderpadding{#1}{#2} ; % + \IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% + width:\LWR@printlength{\LWR@tempwidth}% + ]{fcolorminipage}% } \NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{#1} m O{c} o o m} {% -\LWR@hook@processingtags% -\setlength{\LWR@tempwidth}{#8}% -\IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% -\LWR@forceminwidth{\fboxrule}% -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\ifthenelse{\equal{#4}{none}}% - {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% - {% - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \LWR@subfcolorminipage{#1}{#2}% - {background:\LWR@origpound\LWR@tempcolortwo\ ; }% - {#6}% - }% + \LWR@hook@processingtags% + \setlength{\LWR@tempwidth}{#8}% + \IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% + \LWR@forceminwidth{\fboxrule}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \ifthenelse{\equal{#4}{none}}% + {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% + {% + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \LWR@subfcolorminipage{#1}{#2}% + {background:\LWR@origpound\LWR@tempcolortwo\ ; }% + {#6}% + }% }% {% \end{BlockClass}% \global\booltrue{LWR@minipagethispar}% } \newcommand*{\LWR@HTML@boxframe}[3]{% -{% -\setlength{\LWR@tempwidth}{#1}% -\setlength{\LWR@tempheight}{#2}% -\addtolength{\LWR@tempheight}{#3}% -\LWR@forceminwidth{\fboxrule}% -\LWR@findcurrenttextcolor% -\InlineClass[% -display:inline-block ; % -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; % -width:\LWR@printlength{\LWR@tempwidth} ; % -height:\LWR@printlength{\LWR@tempheight}% -]{boxframe}{}% -}% + {% + \setlength{\LWR@tempwidth}{#1}% + \setlength{\LWR@tempheight}{#2}% + \addtolength{\LWR@tempheight}{#3}% + \LWR@forceminwidth{\fboxrule}% + \LWR@findcurrenttextcolor% + \InlineClass[% + display:inline-block ; % + border:% + \LWR@printlength{\LWR@atleastonept} % space + solid % space + \LWR@currenttextcolor{} ; % space + width:\LWR@printlength{\LWR@tempwidth} ; % + height:\LWR@printlength{\LWR@tempheight}% + ]{boxframe}{}% + }% } \LWR@formatted{boxframe} \newcommand*{\LWR@xcolortempcolor}{} \def\rowc@l@rs[#1]#2#3#4% -{ -\rownum=1% +{% + \rownum=1% \@rowcolorstrue% \@ifxempty{#3}% {\def\@oddrowcolor{\@norowcolor}}% @@ -264,7 +269,7 @@ height:\LWR@printlength{\LWR@tempheight}% \ignorespaces% } \def\@norowcolor{% -\renewcommand{\LWR@xcolorrowHTMLcolor}{}% + \renewcommand{\LWR@xcolorrowHTMLcolor}{}% } \def\@rowc@lors{% |