summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-25 20:25:27 +0000
committerKarl Berry <karl@freefriends.org>2018-09-25 20:25:27 +0000
commitea8edbcb109a90aa4a837df9f9e61ad88fb3ca0a (patch)
treede35b3e8005aa2ea209854a0df099cdd4c70001c /Master/texmf-dist/source
parent5c06f8155e0c12ba6d3369acbd0c42dc4ebeca8f (diff)
clrstrip (25sep18)
git-svn-id: svn://tug.org/texlive/trunk@48756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx55
1 files changed, 46 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx b/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx
index 587db026741..898e8528e5b 100644
--- a/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx
+++ b/Master/texmf-dist/source/latex/clrstrip/clrstrip.dtx
@@ -56,7 +56,7 @@ and the derived files clrstrip.pdf and
%
%<*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 @@ and the derived files clrstrip.pdf and
%
% \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 @@ and the derived files clrstrip.pdf and
% \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 @@ and the derived files clrstrip.pdf and
% \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 @@ and the derived files clrstrip.pdf and
% \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 @@ and the derived files clrstrip.pdf and
% 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 @@ and the derived files clrstrip.pdf and
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\clrstrip@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@afterheading
+\clrstrip@afterheadingtrue
+% \end{macrocode}
+% \end{variable}
+%
% \subsection{Internal Macros}
%
% \begin{macro}{\clrstrip@key}
@@ -367,7 +386,23 @@ and the derived files clrstrip.pdf and
\fi
\setbox\clrstrip@box\vbox\bgroup
\hsize\clrstrip@width
- \noindent\ignorespaces
+ \clrstrip@preventIndent
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\clrstrip@preventIndent}
+% Used to prevent the indentation of the first line in a \env{colorstrip}.
+% \begin{macrocode}
+\newcommand*\clrstrip@preventIndent
+ {%
+ \ifclrstrip@afterheading
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@afterindentfalse\@afterheading}
+ {\noindent\ignorespaces}%
}
% \end{macrocode}
% \end{macro}
@@ -383,6 +418,8 @@ and the derived files clrstrip.pdf and
\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}
% \end{macrocode}
%
% \subsection{User Level Macros}