diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-04 22:15:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-04 22:15:52 +0000 |
commit | 0b3e5af7b26102b1ed839f1bb1916af1aa0c8e3a (patch) | |
tree | 8fc3cd81c311d8d03c8aa41754514306d7c55616 /Master/texmf-dist/tex | |
parent | bd547f9a58f95681b9c23afc95c65d520b78b01a (diff) |
clrstrip (4nov19)
git-svn-id: svn://tug.org/texlive/trunk@52636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty b/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty index f3b21c8f5d1..7483077015a 100644 --- a/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty +++ b/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty @@ -29,7 +29,7 @@ %% and the derived files clrstrip.pdf and %% clrstrip.sty. %% -\newcommand*\clrstrip@date{2019-06-03} +\newcommand*\clrstrip@date{2019-11-03} \ProvidesPackage{clrstrip} [\clrstrip@date\space place contents into a full width colour strip] \RequirePackage{keyval} @@ -45,29 +45,8 @@ \newlength\clrstrip@width \newlength\clrstrip@left \clrstrip@left1sp -\newcommand*\clrstrip@oarg{} -\newcommand*\clrstrip@marg{} +\newcommand*\clrstrip@arg{} \newcommand*\clrstrip@key{\define@key{clrstrip}} -\newcommand*\clrstrip@strip[1] - {% - \begingroup - \ifx\clrstrip@oarg\@empty - \color{#1}% - \else - \expandafter\color\expandafter[\clrstrip@oarg]{#1}% - \fi - \advance\clrstrip@innerT\ht\clrstrip@box - \advance\clrstrip@innerB\dp\clrstrip@box - \rlap - {% - \hskip-\paperwidth - \vrule - width 2\paperwidth - height \clrstrip@innerT - depth \clrstrip@innerB - }% - \endgroup - } \newcommand\clrstrip@start[1][] {% \colorstripSet{#1}% @@ -76,6 +55,7 @@ \fi \setbox\clrstrip@box\vbox\bgroup \hsize\clrstrip@width + \linewidth\hsize \color@setgroup \clrstrip@preventIndent } @@ -96,8 +76,12 @@ \newcommand*\colorstripSet{\setkeys{clrstrip}} \newenvironment{colorstrip}[2][] {% - \def\clrstrip@oarg{#1}% - \def\clrstrip@marg{#2}% + \def\clrstrip@arg{#1}% + \ifx\clrstrip@arg\@empty + \def\clrstrip@arg{{#2}}% + \else + \def\clrstrip@arg{[{#1}]{#2}}% + \fi \clrstrip@start } {% @@ -106,7 +90,19 @@ \par \vskip\clrstrip@outerT \noindent - \expandafter\clrstrip@strip\expandafter{\clrstrip@marg}% + \begingroup + \expandafter\color\clrstrip@arg + \advance\clrstrip@innerT\ht\clrstrip@box + \advance\clrstrip@innerB\dp\clrstrip@box + \rlap + {% + \hskip-\paperwidth + \vrule + width 2\paperwidth + height \clrstrip@innerT + depth \clrstrip@innerB + }% + \endgroup \ifdim\clrstrip@left=1sp \advance\clrstrip@width-\linewidth \clrstrip@left-.5\clrstrip@width @@ -114,6 +110,7 @@ \rlap{\hskip\clrstrip@left\copy\clrstrip@box}% \par \vskip\clrstrip@outerB + \@endpetrue } %% %% |