From ea8edbcb109a90aa4a837df9f9e61ad88fb3ca0a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 25 Sep 2018 20:25:27 +0000 Subject: clrstrip (25sep18) git-svn-id: svn://tug.org/texlive/trunk@48756 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty b/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty index c0e792fdd95..2f32cb36195 100644 --- a/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty +++ b/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty @@ -46,6 +46,8 @@ \clrstrip@left1sp \newcommand*\clrstrip@oarg{} \newcommand*\clrstrip@marg{} +\newif\ifclrstrip@afterheading +\clrstrip@afterheadingtrue \newcommand*\clrstrip@key{\define@key{clrstrip}} \newcommand*\clrstrip@strip@a[1] {% @@ -79,7 +81,17 @@ \fi \setbox\clrstrip@box\vbox\bgroup \hsize\clrstrip@width - \noindent\ignorespaces + \clrstrip@preventIndent + } +\newcommand*\clrstrip@preventIndent + {% + \ifclrstrip@afterheading + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\@afterindentfalse\@afterheading} + {\noindent\ignorespaces}% } \clrstrip@key{inner}{\clrstrip@innerT#1\relax\clrstrip@innerB#1\relax} \clrstrip@key{outer}{\clrstrip@outerT#1\relax\clrstrip@outerB#1\relax} @@ -89,6 +101,8 @@ \clrstrip@key{outer bot}{\clrstrip@outerB#1\relax} \clrstrip@key{width}{\clrstrip@width#1\relax} \clrstrip@key{left}{\clrstrip@left#1\relax} +\clrstrip@key{afterheading}[]{\clrstrip@afterheadingtrue} +\clrstrip@key{noindent}[]{\clrstrip@afterheadingfalse} \newcommand*\colorstripSet{\setkeys{clrstrip}} \newenvironment{colorstrip}[2][] {% -- cgit v1.2.3