texlive[48756] Master/texmf-dist: clrstrip (25sep18)
commits+karl at tug.org
commits+karl at tug.org
Tue Sep 25 22:25:28 CEST 2018
Revision: 48756
http://tug.org/svn/texlive?view=revision&revision=48756
Author: karl
Date: 2018-09-25 22:25:27 +0200 (Tue, 25 Sep 2018)
Log Message:
-----------
clrstrip (25sep18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/clrstrip/clrstrip.pdf
trunk/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx
trunk/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty
Modified: trunk/Master/texmf-dist/doc/latex/clrstrip/clrstrip.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx 2018-09-25 00:23:55 UTC (rev 48755)
+++ trunk/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx 2018-09-25 20:25:27 UTC (rev 48756)
@@ -56,7 +56,7 @@
%
%<*driver>
\ProvidesFile{clrstrip.dtx}
- [2018/07/30 place contents into a full width colour strip]
+ [2018/09/25 place contents into a full width colour strip]
\documentclass{l3doc}
\usepackage{xcolor}
\usepackage{clrstrip}
@@ -107,7 +107,7 @@
%
% \section{Introduction}
%
-% This is package provides the \env{colorstrip} environment, that places its
+% This package provides the \env{colorstrip} environment, that places its
% contents into a full page width colour strip. It requires the macro \cs{color}
% to be defined and working, but doesn't load a package doing so on its own. So
% for everything to work out properly, you'd have to load a package like
@@ -124,7 +124,7 @@
% \section{Examples}
%
% The following is an example showing the results of
-% \begin{colorstrip}{gray!15}[inner=0pt]
+% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex]
%\begin{verbatim}
% \begin{colorstrip}{red!5}
% \blindduck
@@ -138,7 +138,7 @@
% \end{colorstrip}
% \noindent
% The title of this documentation was typeset with
-% \begin{colorstrip}{gray!15}[inner=0pt]
+% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex]
%\begin{verbatim}
% \vspace*{-6cm}%
% \begin{colorstrip}{blue!15}
@@ -159,10 +159,10 @@
% \noindent
% And the code boxes in this section (except this one) are surrounded by
% \begin{colorstrip}{gray!15}[inner=2ex]
-%|\begin{colorstrip}{gray!15}[inner=0pt]|\\
-%|\begin{verbatim} |\\
-%|\end{verbatim} |\\
-%|\end{colorstrip} |
+% |\begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex]|\\
+% |\begin{verbatim} |\\
+% |\end{verbatim} |\\
+% |\end{colorstrip} |
% \end{colorstrip}
%
% \section{Documentation}
@@ -221,6 +221,16 @@
% Specifies a horizontal skip from the left border of the text field for the
% contents. If \meta{skip} is |1sp| (which is the initial value) the
% \cs{vbox} is horizontally centred (not its contents).
+% \item[afterheading]
+% Ignores every value given to it. If used the indentation of the first line
+% in a \env{colorstrip} will be prevented using the \LaTeX\ macros
+% \cs{@afterindentfalse} and \cs{@afterheading}. This is the package default
+% since version 2018/09/25.
+% \item[noindent]
+% Ignores every value given to it. If used the indentation of the first line
+% in a \env{colorstrip} will be prevented using the \TeX\ primitives
+% \cs{noindent} and \cs{ignorespaces}. This was the package default before
+% version 2018/09/25.
% \end{options}
%
% \subsection{Dependencies}
@@ -313,6 +323,15 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\clrstrip at preventIndent}
+% Stores whether \cs{@afterheading} should be used to prevent the indentation
+% of the first line (if true) or \cs{noindent} (if false)
+% \begin{macrocode}
+\newif\ifclrstrip at afterheading
+\clrstrip at afterheadingtrue
+% \end{macrocode}
+% \end{variable}
+%
% \subsection{Internal Macros}
%
% \begin{macro}{\clrstrip at key}
@@ -367,11 +386,27 @@
\fi
\setbox\clrstrip at box\vbox\bgroup
\hsize\clrstrip at width
- \noindent\ignorespaces
+ \clrstrip at preventIndent
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\clrstrip at preventIndent}
+% Used to prevent the indentation of the first line in a \env{colorstrip}.
+% \begin{macrocode}
+\newcommand*\clrstrip at preventIndent
+ {%
+ \ifclrstrip at afterheading
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@afterindentfalse\@afterheading}
+ {\noindent\ignorespaces}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Initializing Keys}
%
% \begin{macrocode}
@@ -383,6 +418,8 @@
\clrstrip at key{outer bot}{\clrstrip at outerB#1\relax}
\clrstrip at key{width}{\clrstrip at width#1\relax}
\clrstrip at key{left}{\clrstrip at left#1\relax}
+\clrstrip at key{afterheading}[]{\clrstrip at afterheadingtrue}
+\clrstrip at key{noindent}[]{\clrstrip at afterheadingfalse}
% \end{macrocode}
%
% \subsection{User Level Macros}
Modified: trunk/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty 2018-09-25 00:23:55 UTC (rev 48755)
+++ trunk/Master/texmf-dist/tex/latex/clrstrip/clrstrip.sty 2018-09-25 20:25:27 UTC (rev 48756)
@@ -46,6 +46,8 @@
\clrstrip at left1sp
\newcommand*\clrstrip at oarg{}
\newcommand*\clrstrip at marg{}
+\newif\ifclrstrip at afterheading
+\clrstrip at afterheadingtrue
\newcommand*\clrstrip at key{\define at key{clrstrip}}
\newcommand*\clrstrip at strip@a[1]
{%
@@ -79,8 +81,18 @@
\fi
\setbox\clrstrip at box\vbox\bgroup
\hsize\clrstrip at width
- \noindent\ignorespaces
+ \clrstrip at preventIndent
}
+\newcommand*\clrstrip at preventIndent
+ {%
+ \ifclrstrip at afterheading
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@afterindentfalse\@afterheading}
+ {\noindent\ignorespaces}%
+ }
\clrstrip at key{inner}{\clrstrip at innerT#1\relax\clrstrip at innerB#1\relax}
\clrstrip at key{outer}{\clrstrip at outerT#1\relax\clrstrip at outerB#1\relax}
\clrstrip at key{inner top}{\clrstrip at innerT#1\relax}
@@ -89,6 +101,8 @@
\clrstrip at key{outer bot}{\clrstrip at outerB#1\relax}
\clrstrip at key{width}{\clrstrip at width#1\relax}
\clrstrip at key{left}{\clrstrip at left#1\relax}
+\clrstrip at key{afterheading}[]{\clrstrip at afterheadingtrue}
+\clrstrip at key{noindent}[]{\clrstrip at afterheadingfalse}
\newcommand*\colorstripSet{\setkeys{clrstrip}}
\newenvironment{colorstrip}[2][]
{%
More information about the tex-live-commits
mailing list