From 97106ae9313f56715ee9a7dd39d708158c1bedb9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 4 Nov 2019 03:00:32 +0000 Subject: CTAN sync 201911040300 --- macros/generic/ifptex/LICENSE | 2 +- macros/generic/ifptex/README-ja.md | 29 +++-- macros/generic/ifptex/README.md | 28 +++-- macros/generic/ifptex/ifptex.sty | 149 ++++++++++++++++--------- macros/generic/ifptex/ifuptex.sty | 38 ++++--- macros/latex/contrib/clrstrip/clrstrip.dtx | 119 ++++++++++---------- macros/latex/contrib/clrstrip/clrstrip.pdf | Bin 389250 -> 181082 bytes macros/latex/contrib/pdfoverlay/README.md | 22 +--- macros/latex/contrib/pdfoverlay/pdfoverlay.dtx | 13 ++- macros/latex/contrib/pdfoverlay/pdfoverlay.ins | 4 +- macros/latex/contrib/pdfoverlay/pdfoverlay.pdf | Bin 544365 -> 543827 bytes macros/latex/contrib/tasks/README | 2 +- macros/latex/contrib/tasks/tasks.sty | 40 +++++-- macros/latex/contrib/tasks/tasks_en.pdf | Bin 448291 -> 448183 bytes macros/latex/contrib/tasks/tasks_en.tex | 3 + 15 files changed, 263 insertions(+), 186 deletions(-) (limited to 'macros') diff --git a/macros/generic/ifptex/LICENSE b/macros/generic/ifptex/LICENSE index 8ada757fbc..534324b756 100644 --- a/macros/generic/ifptex/LICENSE +++ b/macros/generic/ifptex/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2017 Takayuki YATO (aka. "ZR") +Copyright (c) 2019 Takayuki YATO (aka. "ZR") Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macros/generic/ifptex/README-ja.md b/macros/generic/ifptex/README-ja.md index 48690cce58..7578fcbe29 100644 --- a/macros/generic/ifptex/README-ja.md +++ b/macros/generic/ifptex/README-ja.md @@ -9,15 +9,17 @@ ifptex パッケージは ifxetex や ifluatex 等のパッケージの pTeX 版 ### システム要件 - - TeX フォーマット: plain TeX、LaTeX (および他の plain 互換なもの) - - TeX エンジン: 不問 - - DVI ウェア(DVI 出力時): 不問 + * TeX フォーマット: plain TeX、LaTeX、INI モード + * TeX エンジン: 不問 + * DVI ウェア(DVI 出力時): 不問 + * 依存パッケージ: + - iftex ### インストール TDS 1.1 に準拠するシステムの場合、以下のようにファイルを移動する: - - `*.sty` → $TEXMF/tex/latex/ifptex + - `*.sty` → $TEXMF/tex/generic/ifptex この後必要に応じて mktexlsr を実行する。 @@ -38,19 +40,19 @@ LaTeX の場合: 注意:e-TeX拡張の有無は区別されない。 - * `\ifpTeX`(又は `\ifptex`)[if-トークン] + * `\ifptex`(又は `\ifpTeX`)[if-トークン] pTeX(upTeX、pTeX-ng を含む)を使っているか。 - * `\ifstrictpTeX`(又は `\ifstrictptex`)[if-トークン] + * `\ifstrictptex`(又は `\ifstrictpTeX`)[if-トークン] pTeX(upTeX、pTeX-ng ではなく)を使っているか。 - * `\ifupTeX`(又は `\ifuptex`) [if-トークン] + * `\ifuptex`(又は `\ifupTeX`) [if-トークン] upTeX(pTeX-ng を含む)を使っているか。 - * `\ifstrictupTeX`(又は `\ifstrictuptex`) [if-トークン] + * `\ifstrictuptex`(又は `\ifstrictupTeX`) [if-トークン] upTeX(pTeX-ng ではなく)を使っているか。 - * `\ifnativeupTeX` [if-トークン] + * `\ifnativeuptex`(又は `\ifnativeupTeX`) [if-トークン] upTeX を内部文字コードが Unicode の状態で使っているか。 - * `\ifpTeXng`(又は `\ifptexng`)[if-トークン] + * `\ifptexng`(又は `\ifpTeXng`)[if-トークン] pTeX-ng を使っているか。 - ※一応 `\ifstrictpTeXng`(`\ifstrictptexng`)もある。 + ※一応 `\ifstrictptexng`(`\ifstrictpTeXng`)もある。 * `\RequirepTeX` `\ifpTeX` 不成立の場合はエラーを出す。 * `\RequireStirctpTeX` @@ -86,6 +88,11 @@ LaTeX の場合: 更新履歴 -------- + * Version 2.0 〈2019/11/01〉 + - LaTeX チームによる新しい iftex パッケージと動作を整合させる。 + - 特に、iftex を中で読み込むようにする。 + - `\if...tex` について常に小文字のみの名前を用意する。 + - INI モードでの読込に対応。 * Version 1.2c 〈2017/10/04〉 - バグ修正。 * Version 1.2b 〈2017/09/20〉 diff --git a/macros/generic/ifptex/README.md b/macros/generic/ifptex/README.md index c9d37688f9..9b5975b2e9 100644 --- a/macros/generic/ifptex/README.md +++ b/macros/generic/ifptex/README.md @@ -9,15 +9,17 @@ for backward compatibility. ### System Requirements - - TeX format: plain TeX, LaTeX (and any plain-compatible ones). - - TeX engine: Anything. - - DVI driver (in DVI mode): Anything. + * TeX format: plain TeX, LaTeX, and INI mode. + * TeX engine: Anything. + * DVI driver (in DVI mode): Anything. + * Dependent packages: + - iftex ### Installation In a system compliant to TDS 1.1, move the files as follows: - - `*.sty` → $TEXMF/tex/latex/ifptex + - `*.sty` → $TEXMF/tex/generic/ifptex And rehash your TEXMF trees if necessary. @@ -42,17 +44,17 @@ In LaTeX: NB: Here “e-TeX-ness” is not considered. - * `\ifpTeX` (or `\ifptex`) [if-token] + * `\ifptex` (or `\ifpTeX`) [if-token] Whether the engine is pTeX (including upTeX or pTeX-ng). - * `\ifstrictpTeX` (or `\ifstrictptex`) [if-token] + * `\ifstrictptex` (or `\ifstrictpTeX`) [if-token] Whether the engine is pTeX but *not* upTeX or pTeX-ng. - * `\ifupTeX` (or `\ifuptex`) [if-token] + * `\ifuptex` (or `\ifupTeX`) [if-token] Whether the engine is upTeX (including pTeX-ng). - * `\ifstrictupTeX` (or `\ifstrictuptex`) [if-token] + * `\ifstrictuptex` (or `\ifstrictupTeX`) [if-token] Whether the engine is upTeX but *not* pTeX-ng. - * `\ifnativeupTeX` [if-token] + * `\ifnativeuptex` (or `\ifnativeupTeX`) [if-token] Whether the engine is upTeX and its internal encoding is Unicode. - * `\ifpTeXng` (or `\ifptexng`) [if-token] + * `\ifptexng` (or `\ifpTeXng`) [if-token] Whether the engine is pTeX-ng. * `\RequirepTeX` Issues an error if `\ifpTeX` fails. @@ -92,6 +94,12 @@ Just the same as the ifptex package. Revision History ---------------- + * Version 2.0 〈2019/11/01〉 + - Adjust to work better with the new iftex package maintanined + by the LaTeX3 Project. + - Now iftex is loaded inside ifptex. + - Provide always all-lowercase `\if...tex` commands. + - Support for loading in INI mode. * Version 1.2c 〈2017/10/04〉 * Version 1.2b 〈2017/09/20〉 * Version 1.2a 〈2017/09/15〉 diff --git a/macros/generic/ifptex/ifptex.sty b/macros/generic/ifptex/ifptex.sty index 29cec914ef..e16121a381 100644 --- a/macros/generic/ifptex/ifptex.sty +++ b/macros/generic/ifptex/ifptex.sty @@ -1,7 +1,7 @@ %% %% This is file 'ifptex.sty'. %% -%% Copyright (c) 2017 Takayuki YATO (aka. "ZR") +%% Copyright (c) 2019 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% @@ -9,50 +9,78 @@ %% % %% avoid multiple loading -\csname\if11bxipIfptexLoaded\fi\endcsname +\csname\if11bxipIfptexLoaded\fi\endcsname% %% code guards -\edef\x{% +\begingroup\count255\catcode61\global\catcode61\catcode48% +\catcode91=1\catcode93=2\xdef\bxipIfptexLoaded[% +\catcode61=\the\count255% +\catcode13=\the\catcode13% \catcode32=\the\catcode32% -\catcode33=\the\catcode33% \catcode35=\the\catcode35% -\catcode42=\the\catcode42% +\catcode123=\the\catcode123% +\catcode125=\the\catcode125% +\endlinechar=\the\endlinechar]% +\endgroup\catcode32=10\catcode13=5\endlinechar=13\relax% +\catcode35=6 \catcode123=1 \catcode125=2 +\edef\bxipIfptexLoaded{\bxipIfptexLoaded +\catcode33=\the\catcode33% +\catcode34=\the\catcode34% +\catcode39=\the\catcode39% +\catcode45=\the\catcode45% +\catcode46=\the\catcode46% +\catcode47=\the\catcode47% +\catcode58=\the\catcode58% \catcode60=\the\catcode60% \catcode62=\the\catcode62% +\catcode63=\the\catcode63% \catcode64=\the\catcode64% \catcode91=\the\catcode91% \catcode93=\the\catcode93% +\catcode96=\the\catcode96% \relax} -\catcode32=10\relax -\catcode33=11 %<"> -\catcode35=6 %<#> -\catcode42=12 %<*> -\catcode60=12 %<<> -\catcode62=12 %<>> -\catcode64=11 %<@> -\catcode91=12 %<[> -\catcode93=12 %<]> -\edef\bxip@restore@codes{\x +\catcode33=12 % +\catcode34=12 % <"> +\catcode39=12 % <'> +\catcode45=12 % <-> +\catcode46=12 % <.> +\catcode47=12 % +\catcode58=12 % <:> +\catcode60=12 % <<> +\catcode62=12 % <>> +\catcode63=12 % +\catcode64=11 % <@> +\catcode91=12 % <[> +\catcode93=12 % <]> +\catcode96=12 % <`> +\edef\bxip@restore@codes{\bxipIfptexLoaded \noexpand\let\noexpand\bxip@restore@codes\relax} \def\bxipIfptexLoaded{\endinput} %% check for LaTeX \ifx\RequirePackage\@undefined %<*!LaTeX> \let\bxip@latex=f - \long\def\x#1\ProvidesPackage#2[#3]{% + \long\def\bxip@input#1\ProvidesPackage#2[#3]{% + \def\bxip@input\RequirePackage##1[##2]{\input ##1.sty\relax}% \immediate\write-1{Package: #2 #3}} - \expandafter\x + \expandafter\bxip@input \else %<*LaTeX> - \let\bxip@latex=t \let\x\relax + \let\bxip@latex=t + \let\bxip@input\relax \fi % %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ifptex}[2017/10/04 v1.2c pTeX checker] +\ProvidesPackage{ifptex}[2019/11/01 v2.0 pTeX checker] \def\bxip@pkgname{ifptex} -%% enter the big group -\begingroup +%% packages +\ifx\newif\@undefined\else +\bxip@input +\RequirePackage{iftex}[2013/04/04]% v0.2 +\fi +%======================================= +\begingroup % entering a big group %--------------------------------------- helpers %% \bxip@csletcs{}{} @@ -96,18 +124,28 @@ \gdef\bxip@check@version@a#1#2#3#4#5#6\relax#7{% \bxip@err@required{#7 v.>=\number#2#3#4.#5#6}} -%% \bxip@err@required{} -% NB: Now the same style as in ifxetex is used. -\gdef\bxip@err@required#1{% - \begingroup - \errorcontextlines=-1\relax - \newlinechar=10\relax - \errmessage{^^J - ********************************************^^J - * #1 is required to compile this document.^^J - * Sorry!^^J +%% \bxip@Require\ifXXX{}\fi +% (Equivalent to \IFTEX@Require of iftex.) +\gdef\bxip@Require#1#2#3{% + #1\else + \newlinechar64\relax + \errorcontextlines-1\relax + \immediate\write20{@ + ********************************************@ + * #2 is required to compile this document.@ + * Sorry!@ ********************************************}% - \endgroup} + % do a hard stop + \batchmode\read-1to\bxip@tmpa + #3} +\gdef\bxip@err@required#1{\bxip@Require\iftrue{#1}\fi} + +%% \bxip@protected +\let\bxip@protected\protected +\ifx\directlua\@undefined\else + \directlua{tex.enableprimitives('bxip@', {'protected'})} +\fi +\bxip@csletcs{bxip@protected}{bxip@protected} %--------------------------------------- guess version @@ -135,12 +173,13 @@ %--------------------------------------- public stuffs % Note: -% 1) Names '\ifFooTeX' are used in iftex. +% 1) Names '\ifFooTeX' were used in old iftex. % 2) Names '\iffootex' are used in ifxetex/ifluatex/.... -% My preferences are: +% My preferences used to be: % - '\ifwhateverFooTeX' and '\RequireWhateverFooTeX'. -% But I also provide aliases '\iffootex' and '\ifstrictfootex' for -% compatibility with 1) and the old ifuptex. +% But now I adopt the preferences of new iftex: +% - '\ifwhateverfootex' and '\RequireWhateverFooTeX'. +% I also provide aliases '\ifwhateverFooTeX' for compatibility. %%<+> \ifpTeX \global\bxip@false{ifpTeX} @@ -161,6 +200,8 @@ \fi %%<+> \ifuptex == \ifupTeX \global\bxip@csletcs{ifuptex}{ifupTeX} +%%<+> \ifnativeuptex == \ifnativeupTeX +\global\bxip@csletcs{ifnativeuptex}{ifnativeupTeX} %%<+> \ifpTeXng \global\bxip@false{ifpTeXng} @@ -192,29 +233,29 @@ \global\bxip@csletcs{ifstrictptexng}{ifstrictpTeXng} %%<+> \RequirepTeX -\gdef\RequirepTeX{% - \ifpTeX\else \bxip@err@required{(u)pTeX}\fi} +\bxip@protected\gdef\RequirepTeX{% + \bxip@Require\ifpTeX{(u)pTeX}\fi} %%<+> \RequireStrictpTeX -\gdef\RequireStrictpTeX{% - \ifstrictpTeX\else \bxip@err@required{pTeX (not upTeX)}\fi} +\bxip@protected\gdef\RequireStrictpTeX{% + \bxip@Require\ifstrictpTeX{pTeX (not upTeX)}\fi} %%<+> \RequireupTeX -\gdef\RequireupTeX{% - \ifupTeX\else \bxip@err@required{upTeX}\fi} +\bxip@protected\gdef\RequireupTeX{% + \bxip@Require\ifupTeX{upTeX}\fi} %%<+> \RequireStrictupTeX -\gdef\RequireStrictupTeX{% - \ifstrictupTeX\else \bxip@err@required{upTeX (not pTeX-ng)}\fi} +\bxip@protected\gdef\RequireStrictupTeX{% + \bxip@Require\ifstrictupTeX{upTeX (not pTeX-ng)}\fi} %%<+> \RequireNativeupTeX -\gdef\RequireNativeupTeX{% - \ifnativeupTeX\else \bxip@err@required{upTeX in Unicode}\fi} +\bxip@protected\gdef\RequireNativeupTeX{% + \bxip@Require\ifnativeupTeX{upTeX in Unicode}\fi} %%<+> \RequirepTeXng -\gdef\RequirepTeXng{% - \ifpTeXng\else \bxip@err@required{pTeX-ng}\fi} +\bxip@protected\gdef\RequirepTeXng{% + \bxip@Require\ifpTeXng{pTeX-ng}\fi} %%<+> \RequireStrictpTeXng -\gdef\RequireStrictpTeXng{% - \ifstrictpTeXng\else \bxip@err@required{pTeX-ng}\fi} +\bxip@protected\gdef\RequireStrictpTeXng{% + \bxip@Require\ifstrictpTeXng{pTeX-ng}\fi} %--------------------------------------- KanjiKoodo declaration -\ifpTeX +\ifpTeX \ifx t\bxip@latex %% \bxip@def@str\CS{} \def\bxip@def@str#1#2{% @@ -283,7 +324,7 @@ \epTeXinputencoding utf8}% unterminated \fi -\fi +\fi\fi %--------------------------------------- deprecated stuffs %%<+>D \ifNativeupTeX == \ifnativeupTeX @@ -317,6 +358,10 @@ %--------------------------------------- all done \endgroup +% clean up +\let\bxip@latex\@undefined +\let\bxip@input\@undefined +\let\bxip@protected\@undefined \bxip@restore@codes \endinput %% EOF diff --git a/macros/generic/ifptex/ifuptex.sty b/macros/generic/ifptex/ifuptex.sty index cb84bd8cbd..a60dd36d4d 100644 --- a/macros/generic/ifptex/ifuptex.sty +++ b/macros/generic/ifptex/ifuptex.sty @@ -1,7 +1,7 @@ %% %% This is file 'ifuptex.sty'. %% -%% Copyright (c) 2017 Takayuki YATO (aka. "ZR") +%% Copyright (c) 2019 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% @@ -11,42 +11,52 @@ % NOTE: Now ifuptex is merely an alias to ifptex. % %% avoid multiple loading -\csname\if11bxipIfuptexLoaded\fi\endcsname +\csname\if11bxipIfuptexLoaded\fi\endcsname% %% code guards -\edef\x{% +\begingroup\count255\catcode61\global\catcode61\catcode48% +\catcode91=1\catcode93=2\xdef\bxipIfuptexLoaded[% +\catcode61=\the\count255% +\catcode13=\the\catcode13% \catcode32=\the\catcode32% +\catcode35=\the\catcode35% +\catcode123=\the\catcode123% +\catcode125=\the\catcode125% +\endlinechar=\the\endlinechar]% +\endgroup\catcode32=10\catcode13=5\endlinechar=13\relax% +\catcode35=6 \catcode123=1 \catcode125=2 +\edef\bxipIfuptexLoaded{\bxipIfuptexLoaded \catcode45=\the\catcode45% \catcode46=\the\catcode46% \catcode47=\the\catcode47% \catcode58=\the\catcode58% \catcode64=\the\catcode64% \relax} -\catcode32=10\relax \catcode45=12 % <-> \catcode46=12 % <.> \catcode47=12 % \catcode58=12 % <:> \catcode64=11 % <@> -\edef\bxip@up@restore@codes{\x +\edef\bxip@up@restore@codes{\bxipIfuptexLoaded \noexpand\let\noexpand\bxip@up@restore@codes\relax} \def\bxipIfuptexLoaded{\endinput} %% check for LaTeX -\ifx\RequirePackage\@undefined % non-LaTeX - \long\def\x#1\ProvidesPackage#2[#3]{% - \def\x\RequirePackage##1[##2]{\input ##1.sty\relax}% +\ifx\RequirePackage\@undefined %<*!LaTeX> + \long\def\bxip@input#1\ProvidesPackage#2[#3]{% + \def\bxip@input\RequirePackage##1[##2]{\input ##1.sty\relax}% \immediate\write-1{Package: #2 #3}} - \expandafter\x -\else % LaTeX - \let\x\relax -\fi + \expandafter\bxip@input +\else %<*LaTeX> + \let\bxip@input\relax +\fi % %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ifuptex}[2017/10/04 v1.2c upTeX checker] +\ProvidesPackage{ifuptex}[2019/11/01 v2.0 pTeX checker] %% load ifptex -\x\RequirePackage{ifptex}[2017/10/04] +\bxip@input +\RequirePackage{ifptex}[2019/11/01] %% all done \bxip@up@restore@codes diff --git a/macros/latex/contrib/clrstrip/clrstrip.dtx b/macros/latex/contrib/clrstrip/clrstrip.dtx index ee248017d4..23ef7b7ee1 100644 --- a/macros/latex/contrib/clrstrip/clrstrip.dtx +++ b/macros/latex/contrib/clrstrip/clrstrip.dtx @@ -64,6 +64,7 @@ and the derived files clrstrip.pdf and \usepackage{xcolor} \usepackage{clrstrip} \usepackage{duckuments} +\usepackage[oldstyle,notextcomp,nott]{kpfonts} ^^A fix \duckuments@enquote in latest released version \makeatletter \ExplSyntaxOn @@ -85,7 +86,7 @@ and the derived files clrstrip.pdf and \end{document} % %<*pkg> -\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} @@ -135,12 +136,11 @@ and the derived files clrstrip.pdf and % \end{colorstrip} %\end{verbatim} % \end{colorstrip} -% \noindent % with \pkg{xcolor} and \pkg{duckuments} loaded: % \begin{colorstrip}{red!5} % \blindduck % \end{colorstrip} -% \noindent +% % The title of this documentation was typeset with % \begin{colorstrip}{gray!15}[inner bot=0pt, inner top=2ex] %\begin{verbatim} @@ -159,9 +159,7 @@ and the derived files clrstrip.pdf and % \footnotetext{E-mail: jspratte@yahoo.de} %\end{verbatim} % \end{colorstrip} -% -% \noindent -% And the code boxes in this section (except this one) are surrounded by +% 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{verbatim}|\\ @@ -189,10 +187,11 @@ and the derived files clrstrip.pdf and % surrounded by a strip of the specified \meta{color} which reaches across the % full page width. \meta{color model} and \meta{color} are the arguments % passed to \cs{color}. In the second optional argument \meta{key=value} you -% can specify any of the options listed in \autoref{sec:opt}. After this -% environment starts a new paragraph with the document specific -% \cs{parindent}. As always you can suppress this indent with \cs{noindent}. -% The result is not page breakable. +% can specify any of the options listed in \autoref{sec:opt}. If you leave a +% blank line after this environment the next paragraph will be indented, else +% this indentation will be suppressed (this has been changed starting with +% version 2019-11-03, in earlier versions you'd have to use \cs{noindent} to +% suppress the paragraph indentation). The result is not page breakable. % \end{function} % % \subsection{Options}\label{sec:opt} @@ -218,9 +217,10 @@ and the derived files clrstrip.pdf and % \item[outer bot=\meta{skip}] % Specifies the vertical skip below the colour strip. % \item[width=\meta{width}] -% Sets the \cs{hsize} of the \cs{vbox} for the contents, resulting in the -% specified \meta{width}. If \meta{width} is |0pt| (which is the initial -% value) the width is the current \cs{linewidth}. +% Sets the \cs{hsize} (and also \cs{linewidth} inside of the environment) of +% the \cs{vbox} for the contents, resulting in the specified \meta{width}. +% If \meta{width} is |0pt| (which is the initial value) the width is the +% current surrounding \cs{linewidth}. % \item[left=\meta{skip}] % 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 @@ -313,17 +313,11 @@ and the derived files clrstrip.pdf and % \end{macrocode} % \end{variable} % -% \begin{variable}{\clrstrip@oarg} -% Stores the first optional argument to \env{colorstrip} for later use. -% \begin{macrocode} -\newcommand*\clrstrip@oarg{} -% \end{macrocode} -% \end{variable} -% -% \begin{variable}{\clrstrip@marg} -% Stores the mandatory argument to \env{colorstrip} for later use. +% \begin{variable}{\clrstrip@arg} +% Stores the first optional and the mandatory argument to \env{colorstrip} for +% later use. % \begin{macrocode} -\newcommand*\clrstrip@marg{} +\newcommand*\clrstrip@arg{} % \end{macrocode} % \end{variable} % @@ -336,37 +330,6 @@ and the derived files clrstrip.pdf and % \end{macrocode} % \end{macro} % -% \begin{macro}{\clrstrip@strip} -% Draws the colour strip using \cs{vrule}. \cs{clrstrip@strip} should be -% called with the expanded \cs{clrstrip@marg} as its argument. It tests -% whether the first optional argument is empty, sets the colour accordingly -% and draws the \cs{vrule}. The arguments to \cs{color} need to be expanded as -% \pkg{color} doesn't work with the unexpanded ones depending on the chosen -% colour model. -% \begin{macrocode} -\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 - } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\clrstrip@start} % Used to grab the second optional argument to \env{colorstrip}. Sets the % specified keys and starts the grabbing of the contents inside the \cs{vbox}. @@ -379,6 +342,7 @@ and the derived files clrstrip.pdf and \fi \setbox\clrstrip@box\vbox\bgroup \hsize\clrstrip@width + \linewidth\hsize \color@setgroup \clrstrip@preventIndent } @@ -432,29 +396,66 @@ and the derived files clrstrip.pdf and \newenvironment{colorstrip}[2][] {% % \end{macrocode} -% Save the arguments for the usage in |\end{colorstrip}|. +% Save the arguments for the usage in |\end{colorstrip}|. If the first argument +% is empty \cs{color} won't get an optional argument, else store both the +% optional and the mandatory one in \cs{clrstrip@arg}. % \begin{macrocode} - \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 % \end{macrocode} -% Start grabbing the contents +% Start grabbing the contents. % \begin{macrocode} \clrstrip@start } {% +% \end{macrocode} +% End grabbing the contents. +% \begin{macrocode} \color@endgroup \egroup +% \end{macrocode} +% Start a new paragraph (if none was started yet) and add the upper outer +% padding. +% \begin{macrocode} \par \vskip\clrstrip@outerT \noindent - \expandafter\clrstrip@strip\expandafter{\clrstrip@marg}% +% \end{macrocode} +% Draw the colour strip using a coloured \cs{vrule}. +% \begin{macrocode} + \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 +% \end{macrocode} +% Output the contents of the colour strip. +% \begin{macrocode} \ifdim\clrstrip@left=1sp \advance\clrstrip@width-\linewidth \clrstrip@left-.5\clrstrip@width \fi \rlap{\hskip\clrstrip@left\copy\clrstrip@box}% +% \end{macrocode} +% Start a new paragraph and add the lower outer padding. Also use \LaTeX's +% \cs{@endpetrue} mechanism to let the user control whether the text after this +% environment will be indented or not. +% \begin{macrocode} \par \vskip\clrstrip@outerB + \@endpetrue } % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/clrstrip/clrstrip.pdf b/macros/latex/contrib/clrstrip/clrstrip.pdf index be05a13cd5..c63d4ff9fa 100644 Binary files a/macros/latex/contrib/clrstrip/clrstrip.pdf and b/macros/latex/contrib/clrstrip/clrstrip.pdf differ diff --git a/macros/latex/contrib/pdfoverlay/README.md b/macros/latex/contrib/pdfoverlay/README.md index 2f35441d29..3abb0f4ef3 100644 --- a/macros/latex/contrib/pdfoverlay/README.md +++ b/macros/latex/contrib/pdfoverlay/README.md @@ -47,31 +47,17 @@ git clone https://github.com/dcpurton/pdfoverlay.git ``` Change to the `pdfoverlay` directory, and then the style file -(`pdfoverlay.sty`) can be installed by running: +(`pdfoverlay.sty`) and documentation (`pdfoverlay.pdf`) can be installed by +running: ``` -l3build install -``` - -Documentation (`pdfoverlay.pdf`) can be compiled by running: - -``` -l3build doc -``` - -To install the documentation, copy `pdfoverlay.pdf` to -`$TEXMFHOME/doc/latex/pdfoverlay/`. - -You can find `$TEXMFHOME` by running: - -``` -kpsewhich -var-value=TEXMFHOME +l3build install --full ``` ## Licence ``` -Copyright (c) 2018 David Purton +Copyright (c) 2018-2019 David Purton This work may be distributed and/or modified under the conditions of the LaTeX Project2 Public License, either version 1.3c of this license diff --git a/macros/latex/contrib/pdfoverlay/pdfoverlay.dtx b/macros/latex/contrib/pdfoverlay/pdfoverlay.dtx index 15425f7ed5..805ad91d63 100644 --- a/macros/latex/contrib/pdfoverlay/pdfoverlay.dtx +++ b/macros/latex/contrib/pdfoverlay/pdfoverlay.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (c) 2018 David Purton +% Copyright (c) 2018-2019 David Purton % % This work may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.3c of this license @@ -19,10 +19,11 @@ % \fi % % \changes{v1.0}{2018/05/08}{First public release} +% \changes{v1.1}{2019/11/03}{Fix depracated macros} % % \title{The \pkg{pdfoverlay} package} % \author{David Purton\thanks{Email: \url{dcpurton@marshwiggle.net}}} -% \date{2018/05/08 v1.0} +% \date{2019/11/03 v1.1} % % \maketitle % @@ -168,7 +169,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{pdfoverlay}{2018/05/08}{1.0} +\ProvidesExplPackage{pdfoverlay}{2019/11/03}{1.1} {Overlay text on an existing PDF document (DCP)} % \end{macrocode} % @@ -311,7 +312,7 @@ { \bool_not_p:n { \str_if_empty_p:N \g_@@_pdf_file_name_str } } { \int_compare_p:n - { \c_zero <= \g_@@_page_int + { \c_zero_int <= \g_@@_page_int < \g_@@_page_count_int } } } { @@ -375,7 +376,7 @@ { \int_compare:nTF { - \c_one <= #1 <= \g_@@_page_count_int + \c_one_int <= #1 <= \g_@@_page_count_int } { \prg_return_true: @@ -415,7 +416,7 @@ % Initialise variables. % \begin{macrocode} \int_gset_eq:NN \g_@@_page_count_int \AM@pagecount - \int_gset_eq:NN \g_@@_page_int \c_zero + \int_gset_eq:NN \g_@@_page_int \c_zero_int \bool_gset_true:N \g_@@_output_active_bool \bool_gset_false:N \g_@@_action_pending_bool } diff --git a/macros/latex/contrib/pdfoverlay/pdfoverlay.ins b/macros/latex/contrib/pdfoverlay/pdfoverlay.ins index 87c97adb4b..7f2a4200f9 100644 --- a/macros/latex/contrib/pdfoverlay/pdfoverlay.ins +++ b/macros/latex/contrib/pdfoverlay/pdfoverlay.ins @@ -1,6 +1,6 @@ \iffalse meta-comment -Copyright (c) 2018 David Purton +Copyright (c) 2018-2019 David Purton This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license @@ -19,7 +19,7 @@ version 2005/12/01 or later. This is a generated file. -Copyright (c) 2018 David Purton +Copyright (c) 2018-2019 David Purton This work may be distributed and/or modified under the conditions of the LaTeX Project2 Public License, either version 1.3c of this license diff --git a/macros/latex/contrib/pdfoverlay/pdfoverlay.pdf b/macros/latex/contrib/pdfoverlay/pdfoverlay.pdf index bb4d9323f8..d98a995913 100644 Binary files a/macros/latex/contrib/pdfoverlay/pdfoverlay.pdf and b/macros/latex/contrib/pdfoverlay/pdfoverlay.pdf differ diff --git a/macros/latex/contrib/tasks/README b/macros/latex/contrib/tasks/README index f314d7c2e3..c0cd02c7f8 100644 --- a/macros/latex/contrib/tasks/README +++ b/macros/latex/contrib/tasks/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -the TASKS package v1.0c 2019/10/07 +the TASKS package v1.1 2019/11/03 horizontally columned lists diff --git a/macros/latex/contrib/tasks/tasks.sty b/macros/latex/contrib/tasks/tasks.sty index d1634835d5..ed0bc10610 100644 --- a/macros/latex/contrib/tasks/tasks.sty +++ b/macros/latex/contrib/tasks/tasks.sty @@ -28,10 +28,10 @@ \RequirePackage {expl3,xparse,xtemplate} \ExplSyntaxOn -\tl_const:Nn \c_tasks_date_tl {2019/10/07} +\tl_const:Nn \c_tasks_date_tl {2019/11/03} \tl_const:Nn \c_tasks_version_major_number_tl {1} -\tl_const:Nn \c_tasks_version_minor_number_tl {0} -\tl_const:Nn \c_tasks_version_subrelease_tl {c} +\tl_const:Nn \c_tasks_version_minor_number_tl {1} +\tl_const:Nn \c_tasks_version_subrelease_tl {} \tl_const:Nx \c_tasks_version_number_tl { \c_tasks_version_major_number_tl . @@ -62,7 +62,7 @@ % -------------------------------------------------------------------------- \msg_new:nnn {tasks} {width-too-small} { - The~ width~ off~ `#1'~ is~ too~ small~ \msg_line_context: .~ + The~ width~ of~ `#1'~ is~ too~ small~ \msg_line_context: .~ Please~ set~ it~ at~ least~ to~ #2. } @@ -100,6 +100,7 @@ \int_new:N \g__tasks_current_row_num_int \int_new:N \l__tasks_item_columns_int \int_new:N \g__tasks_env_int +\int_new:N \l__tasks_start_int \bool_new:N \l__tasks_resume_bool \bool_new:N \l__tasks_load_tasks_bool @@ -154,6 +155,7 @@ \tl_new:N \l__tasks_tmpa_tl \coffin_new:N \l__tasks_tmpa_coffin \box_new:N \l__tasks_tmpa_box +\bool_new:N \l__tasks_tmpa_bool \cs_new:Npn \__tasks_debug:n #1 { @@ -480,7 +482,7 @@ \__tasks_label_align:V \l__tasks_label_align_tl % need this for enumerate list: \bool_if:NF \l__tasks_resume_bool - { \setcounter {task} {0} } + { \setcounter {task} { \int_eval:n { \l__tasks_start_int -1 } } } \int_set:Nn \l__tasks_columns_int {#2} % set all the items in their own coffins and join with the ground: \int_gzero:N \g__tasks_current_col_num_int @@ -503,9 +505,16 @@ \bool_if:NTF \l__tasks_custom_label_bool { \tl_to_str:V \l__tasks_custom_label_tl } { \tl_to_str:V \l__tasks_label_tl } - } - \tl_replace_once:Nnn \l__tasks_tmpa_tl {*} {{task}} + } + \bool_set_false:N \l__tasks_tmpa_bool + \tl_if_in:NnT \l__tasks_tmpa_tl {*} + { + \tl_replace_once:Nnn \l__tasks_tmpa_tl {*} {{task}} + \bool_set_true:N \l__tasks_tmpa_bool + } \tl_set_rescan:NnV \l__tasks_tmpa_tl {} \l__tasks_tmpa_tl + \bool_if:NT \l__tasks_tmpa_bool + { \tl_set:NV \thetask \l__tasks_tmpa_tl } \dim_compare:nNnT { \l__tasks_item_indent_dim } < @@ -635,7 +644,9 @@ after-item-skip .code:n = \bool_set_true:N \l__tasks_custom_after_item_skip_bool \skip_set:Nn \l__tasks_custom_after_item_skip {#1} , - resume .bool_set:N = \l__tasks_resume_bool + resume .bool_set:N = \l__tasks_resume_bool , + start .int_set:N = \l__tasks_start_int , + start .initial:n = 1 } % -------------------------------------------------------------------------- @@ -729,7 +740,7 @@ \cs_new_protected:Npn \tasks_setup:n #1 { \keys_set:nn {tasks/list} {#1} } -\NewDocumentCommand \settasks { m } +\NewDocumentCommand \settasks { +m } { \tasks_setup:n {#1} } % default: @@ -757,11 +768,12 @@ * the former `label-format' is now `counter-format' * new: `label-format' - changed defaults for `label-width' and `label-offset' - - ensure that the `after-item-skip' is only - inserted in between rows + - ensure that the `after-item-skip' is only inserted in + between rows - new option `after-item-skip' - improvements when label are set with optional argument: - * a provided but empty argument is now correctly recognized + * a provided but empty argument is now correctly + recognized * the counter is _not_ stepped anymore for enumerated lists when the optional argument is provided - new command \startnewitemline that forces the next item to @@ -809,3 +821,7 @@ 2019/10/06 v1.0b - fix bug in `label-format' definition 2019/10/07 v1.0c - fix bug in width warning - fix bug in deprecation of `counter-format' +2019/10/08 v1.0d - make \thetask usable; and correct \label/\ref +2019/11/03 v1.1 - fix typo + - make \settasks' argument long + - new option `start' diff --git a/macros/latex/contrib/tasks/tasks_en.pdf b/macros/latex/contrib/tasks/tasks_en.pdf index d41a540073..d39fa59b12 100644 Binary files a/macros/latex/contrib/tasks/tasks_en.pdf and b/macros/latex/contrib/tasks/tasks_en.pdf differ diff --git a/macros/latex/contrib/tasks/tasks_en.tex b/macros/latex/contrib/tasks/tasks_en.tex index 14d69196da..b9f3a4f350 100644 --- a/macros/latex/contrib/tasks/tasks_en.tex +++ b/macros/latex/contrib/tasks/tasks_en.tex @@ -311,6 +311,9 @@ following ones that can be set using a setup command: The enumeration will resume from a previous \env{tasks} environment. In order to use this option properly you shouldn't mix different \env{tasks} environments that both count their items. + \keyval{start}{integer}\Default{1} + \sinceversion{1.1}Set the starting value with which the list starts + counting. \keybool{debug}\Default{false} \sinceversion{0.10}If set to true \cs*{fboxsep} is set to \code{0pt} inside the \env{tasks} environment and \cs*{fbox} is used to draw a frame -- cgit v1.2.3