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 | 78 |
1 files changed, 62 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty index 3d862a1aa58..eabfabe7f1e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty @@ -75,9 +75,8 @@ \endgroup% } \newcommand*{\LWR@borderpadding}[2]{% -\uselengthunit{PT}% -border:\rndprintlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % -padding:\rndprintlength{\fboxsep}% +border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % +padding:\LWR@printlength{\fboxsep}% } \RenewDocumentCommand{\textcolor}{O{named} m m}{% \begingroup% @@ -96,10 +95,9 @@ padding:\rndprintlength{\fboxsep}% \RenewDocumentCommand{\colorbox}{O{named} m +m}{% \begingroup% \LWR@FBcancel% -\uselengthunit{PT}% \InlineClass[% background:\LWR@colorstyle{#1}{#2} ; % -padding:\rndprintlength{\fboxsep}% +padding:\LWR@printlength{\fboxsep}% ]{colorbox}{#3}% \endgroup% } @@ -107,10 +105,9 @@ padding:\rndprintlength{\fboxsep}% \NewDocumentCommand{\colorboxBlock}{O{named} m +m}{% \begingroup% \LWR@FBcancel% -\uselengthunit{PT}% \begin{BlockClass}[% background:\LWR@colorstyle{#1}{#2} ; % -padding:\rndprintlength{\fboxsep}% +padding:\LWR@printlength{\fboxsep}% ]{colorboxBlock} #3 \end{BlockClass}% @@ -121,7 +118,6 @@ padding:\rndprintlength{\fboxsep}% \LWR@traceinfo{HTML fcolorbox #2 #4}% \begingroup% \LWR@FBcancel% -\uselengthunit{PT}% \LWR@forceminwidth{\fboxrule}% \ifthenelse{\equal{#4}{none}}% {% no background color @@ -142,7 +138,6 @@ padding:\rndprintlength{\fboxsep}% \LWR@traceinfo{HTML fcolorboxBlock #2 #4}% \begingroup% \LWR@FBcancel% -\uselengthunit{PT}% \LWR@forceminwidth{\fboxrule}% \ifthenelse{\equal{#4}{none}}% {% no background color @@ -169,8 +164,8 @@ padding:\rndprintlength{\fboxsep}% \begin{BlockClass}[% #3% \LWR@borderpadding{#1}{#2} ; % -\IfValueT{#4}{height:\rndprintlength{\LWR@tempheight} ; }% -width:\rndprintlength{\LWR@tempwidth}% +\IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% +width:\LWR@printlength{\LWR@tempwidth}% ]{fcolorminipage}% } \NewDocumentEnvironment{fcolorminipage}{O{named} m O{named} m O{c} o o m} @@ -178,7 +173,6 @@ width:\rndprintlength{\LWR@tempwidth}% \LWR@FBcancel% \setlength{\LWR@tempwidth}{#8}% \IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% -\uselengthunit{PT}% \LWR@forceminwidth{\fboxrule}% \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% \ifthenelse{\equal{#4}{none}}% @@ -194,16 +188,68 @@ width:\rndprintlength{\LWR@tempwidth}% \setlength{\LWR@tempwidth}{#1}% \setlength{\LWR@tempheight}{#2}% \addtolength{\LWR@tempheight}{#3}% -\uselengthunit{PT}% \LWR@forceminwidth{\fboxrule}% \InlineClass[% display:inline-block ; % -border:\rndprintlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; % -width:\rndprintlength{\LWR@tempwidth} ; % -height:\rndprintlength{\LWR@tempheight}% +border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; % +width:\LWR@printlength{\LWR@tempwidth} ; % +height:\LWR@printlength{\LWR@tempheight}% ]{boxframe}{}% }% } +\newcommand*{\LWR@xcolortempcolor}{} + +\def\rowc@l@rs[#1]#2#3#4% +{ +\global\rownum=1 + \global\@rowcolorstrue + \@ifxempty{#3}% + {\def\@oddrowcolor{\@norowcolor}}% + {% + \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor% + \edef\@oddrowcolor{% + \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}% + }% + }% + \@ifxempty{#4}% + {\def\@evenrowcolor{\@norowcolor}}% + {% + \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor% + \edef\@evenrowcolor{% + \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}% + }% + }% + \if@rowcmd + \def\@rowcolors + {% + \if@rowcolors + \relax\ifnum\rownum<#2\@norowcolor\else + \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi% + \fi% + }% + \else + \def\@rowcolors + {% + \if@rowcolors + \ifnum\rownum<#2% + \@norowcolor + \else + \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi% + \fi + \fi% + }% + \fi + \ignorespaces% +} +\def\@norowcolor{% +\renewcommand{\LWR@xcolorrowHTMLcolor}{}% +} + +\def\@rowc@lors{% + \global\advance\rownum\@ne% + \@rowcolors% +} + \end{warpHTML} \endinput %% |