From 0bf9e271702e67bfacd1e36ec5f37ba5602fc142 Mon Sep 17 00:00:00 2001 From: Jonathan Spratte Date: Thu, 23 Jan 2020 21:31:02 +0100 Subject: [PATCH] switched to expkv --- README.md | 2 +- clrstrip.dtx | 58 +++++++++++++++++++++++++++++++-------------------- clrstrip.pdf | Bin 181082 -> 196215 bytes 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 673753b..733ad8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ clrstrip: place contents into a full width colour strip -Copyright (C) 2018-2019 by Jonathan P. Spratte +Copyright (C) 2018-2020 by Jonathan P. Spratte This package may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this license or (at diff --git a/clrstrip.dtx b/clrstrip.dtx index 23ef7b7..a968ddf 100644 --- a/clrstrip.dtx +++ b/clrstrip.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: clrstrip.dtx Copyright (C) 2018-2019 Jonathan P. Spratte +% File: clrstrip.dtx Copyright (C) 2018-2020 Jonathan P. Spratte % % It may be distributed and/or modified under the conditions of the LaTeX % Project Public License (LPPL), either version 1.3c of this license or (at your @@ -26,7 +26,7 @@ Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt -------------------------------------------------------------- -Copyright (C) 2018-2019 Jonathan P. Spratte +Copyright (C) 2018-2020 Jonathan P. Spratte This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this license or @@ -65,6 +65,8 @@ and the derived files clrstrip.pdf and \usepackage{clrstrip} \usepackage{duckuments} \usepackage[oldstyle,notextcomp,nott]{kpfonts} +\input{glyphtounicode} +\pdfgentounicode=1 ^^A fix \duckuments@enquote in latest released version \makeatletter \ExplSyntaxOn @@ -86,10 +88,10 @@ and the derived files clrstrip.pdf and \end{document} % %<*pkg> -\newcommand*\clrstrip@date{2019-11-03} +\newcommand*\clrstrip@date{2020-01-23} \ProvidesPackage{clrstrip} [\clrstrip@date\space place contents into a full width colour strip] -\RequirePackage{keyval} +\RequirePackage{expkv} % % \fi % @@ -129,7 +131,7 @@ and the derived files clrstrip.pdf and % \section{Examples} % % The following is an example showing the results of -% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex] +% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex, outer bot=2pt] %\begin{verbatim} % \begin{colorstrip}{red!5} % \blindduck @@ -142,7 +144,7 @@ and the derived files clrstrip.pdf and % \end{colorstrip} % % The title of this documentation was typeset with -% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex] +% \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex, outer bot=2pt] %\begin{verbatim} % \vspace*{-6cm}% % \begin{colorstrip}{blue!15} @@ -161,7 +163,7 @@ and the derived files clrstrip.pdf and % \end{colorstrip} % and the code boxes in this section (except this one) are surrounded by % \begin{colorstrip}{gray!15}[inner=2ex] -% |\begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex]|\\ +% |\begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex, outer bot=2pt]|\\ % |\begin{verbatim}|\\ % |\end{verbatim} |\\ % |\end{colorstrip}| @@ -226,22 +228,31 @@ and the derived files clrstrip.pdf and % 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 +% Doesn't accept any value. 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. +% since version 2018-09-25. There was another change to this key in version +% 2020-01-23, since which the key will throw an error if you provide a +% value. % \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 +% Doesn't accept any value. 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. +% version 2018-09-25. There was another change to this key in version +% 2020-01-23, since which the key will throw an error if you provide a +% value. % \end{options} % % \subsection{Dependencies} % -% \pkg{clrstrip} depends on the \pkg{keyval} package. In addition it needs a -% package defining \cs{color} such as \pkg{color} or \pkg{xcolor} but doesn't -% load one on its own. +% \pkg{clrstrip} depends on the \pkg{expkv} package. This has changed since +% version 2020-01-23, before that version \pkg{clrstrip} had been using +% \pkg{keyval}. Though \pkg{keyval} is faster than \pkg{expkv}, \pkg{expkv} is +% \emph{a lot} faster than \pkg{xkevyal} which replaces \pkg{keyval} and its +% performance as soon as any other package is loaded. +% +% In addition \pkg{clrstrip} needs a package defining \cs{color} such as +% \pkg{color} or \pkg{xcolor} but doesn't load one on its own. % % \end{documentation} % @@ -323,10 +334,11 @@ and the derived files clrstrip.pdf and % % \subsection{Internal Macros} % -% \begin{macro}{\clrstrip@key} -% Shortcut to define new keys with \pkg{keyval}. +% \begin{macro}{\clrstrip@key,\clrstrip@keyNV} +% Shortcut to define new keys with \pkg{expkv}. % \begin{macrocode} -\newcommand*\clrstrip@key{\define@key{clrstrip}} +\newcommand*\clrstrip@key{\protected\ekvdef{clrstrip}} +\newcommand*\clrstrip@keyNV{\protected\ekvdefNoVal{clrstrip}} % \end{macrocode} % \end{macro} % @@ -378,16 +390,16 @@ 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}[]{\let\clrstrip@preventIndent\clrstrip@afterheading} -\clrstrip@key{noindent}[]{\let\clrstrip@preventIndent\clrstrip@noindent} +\clrstrip@keyNV{afterheading}{\let\clrstrip@preventIndent\clrstrip@afterheading} +\clrstrip@keyNV{noindent}{\let\clrstrip@preventIndent\clrstrip@noindent} % \end{macrocode} % % \subsection{User Level Macros} % % \begin{macro}{\colorstripSet} -% Shortcut for \pkg{keyval}'s \cs{setkeys}. +% Shortcut for \pkg{expkv}'s \cs{ekvset}. % \begin{macrocode} -\newcommand*\colorstripSet{\setkeys{clrstrip}} +\protected\def\colorstripSet{\ekvset{clrstrip}} % \end{macrocode} % \end{macro} % diff --git a/clrstrip.pdf b/clrstrip.pdf index c63d4ff9fa6cbd0ea21a439600e1469aa13d2b87..775626fdd53f8b502042c3f130c126e60b551e8f 100644 GIT binary patch delta 85116 zcmV)9K*hh>h70%n3y>xOG?Ne-DSuf_bK5o$z3W%-7P1qe_y&<)I&IQSl6Kl8ZZAm= zGznX*DN&)Q*zT|I0w5_+q9Z$Ln@qf=zB62?@YR;qZ z_0`ka`xyZ#3@>voFcLhCB-V%$8Rg5F>meH21&OG{2$M8wOmsGTc`(lpCx5eVeSnybaEC^nj#g+R3ausbW%ib;**6*-km(RqB<014DpnMCMT6wO(#Y1NFkU&X)pB_ z6EUfbaKu&Gi#6rCml|6KQdIX+>ny*>&J!YH6G#)Jg`ie?E)`-a#EA-|G4q3-Csf4s zDoa${F0xeuog)4Xl;9Zomw(smCK0g{Xr1CN-~fex01&L3B1(~#(ix^T(l8T8jQeT6 zaRd8EADTumLxfw~IHIzP^ea=DY-5T(kRlwyHB#viNQx<*bec+pK=th{VaF|bT<6=R z$IvaEqoKK-L7sEFVSn>}+}!hUY#&f~Cn~~Rfp!EAJU~K|5jgugfWN68a@;Rj-qahP zC9+lFAD*ld!r~8QQ?HgGhkM7PH*-O?O)diCukDZP8!g*k%wgad!-x?w2Co;MWYxcg z8aMKR%Yr>X&Ic(W+Y#*DoSrulLm*xOq$$!K>lp&P-2$cINdb$?y zTh!XVCVfUh;Gb0x_*Is-KK}C*_7Oyk&h{sZ(jK`0-0;4~H#GH!vM^nD+uu{sG^7+s1J>nr zRX3Y0WC8lG#5U zpKYtk8UqVVF=X$PMwxRxc+7~5FUumap87ZN#^O?M`>Qv`!mx`xM^x|Co}xAzh&zrSBn(@~7*ul~ zxXfym+CpI)M+CDCMeRz771`9j2~c(a4rkj@U#=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