[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop, dvips-xform: fix svgnames loading, color model name must be expanded once now (5da4d76)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Jul 20 10:28:33 CEST 2021


Repository : https://github.com/latex3/pdfresources
On branches: develop,dvips-xform
Link       : https://github.com/latex3/pdfresources/commit/5da4d76bb5ac7e4645b517df08827fbd04a35671

>---------------------------------------------------------------

commit 5da4d76bb5ac7e4645b517df08827fbd04a35671
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Jul 20 10:28:33 2021 +0200

    fix svgnames loading, color model name must be expanded once now


>---------------------------------------------------------------

5da4d76bb5ac7e4645b517df08827fbd04a35671
 CHANGELOG.md                        |  7 +++++++
 firstaid/xcolor-patches-tmp-ltx.sty | 18 ++++++++++--------
 testfiles/xcolorpatch-svgnames.lvt  | 19 +++++++++++++++++++
 testfiles/xcolorpatch-svgnames.tlg  | 13 +++++++++++++
 4 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8546251..91956cf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,8 +5,15 @@ first release 0.95a, 2021-02-23 will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 this project uses date-based 'snapshot' version identifiers.
 ## [Unreleased]
+### Added
+ - key `testphase` to \DeclareDocumentMetadata to load testphase packages like
+   tagpdf, ptagging and headings
+ - key `activate` to \DeclareDocumentMetadata to activate e.g. tagging. 
+   
 ### Fixed
  - argument order in \hrefrun was wrong. filename should be the first argument.
+ - xcolor firstaid, svgnames could no longer be loaded due to changes in l3color.
+   
 
 ## [2021-06-29]
 
diff --git a/firstaid/xcolor-patches-tmp-ltx.sty b/firstaid/xcolor-patches-tmp-ltx.sty
index c9f3785..f1b60ca 100644
--- a/firstaid/xcolor-patches-tmp-ltx.sty
+++ b/firstaid/xcolor-patches-tmp-ltx.sty
@@ -8,7 +8,7 @@
 % #2:  model or models
 % #3: value: either numbers or a color name
 % #4 is the type: named or ps
-\cs_gset_protected:Npn \@expl at xcolor@set@@nnnn #1 #2 #3 #4
+\cs_gset_protected:Npn \__pdfmanagement_firstaid_xcolor_set:nnnn #1 #2 #3 #4
     {
       \str_case:nnF {#4}
         {
@@ -40,12 +40,14 @@
            }
         }
     }
- \cs_generate_variant:Nn \color_set:nn {ne}
- \cs_new_protected:Npn \@expl at xcolor@set@@ne #1 #2
-    {
-      \exp_args:Nx \__color_if_defined:nT {#2}
-           { \color_set:ne {#1}{#2} }
-    }
+\cs_generate_variant:Nn \__pdfmanagement_firstaid_xcolor_set:nnnn {nonn}
+\cs_set_eq:NN \@expl at xcolor@set@@nonn \__pdfmanagement_firstaid_xcolor_set:nonn
+\cs_generate_variant:Nn \color_set:nn {ne}
+\cs_new_protected:Npn \@expl at xcolor@set@@ne #1 #2
+   {
+     \exp_args:Nx \__color_if_defined:nT {#2}
+       { \color_set:ne {#1}{#2} }
+   }
 \ExplSyntaxOff
 %\pretocmd{\XC at col@rlet}   {\@expl at color@set@@ne{#2}{#4}}{}{\fail}
 \def\XC at col@rlet[#1]#2[#3]#4%
@@ -76,7 +78,7 @@
 
 %\pretocmd{\XC at definec@lor}{\@expl at color@set@@nnn{#2}{#4}{#5}}{}{\fail}
 \def\XC at definec@lor[#1]#2[#3]#4#5%
- {\@expl at xcolor@set@@nnnn{#2}{#4}{#5}{#1}%
+ {\@expl at xcolor@set@@nonn{#2}{#4}{#5}{#1}%
   \begingroup
   \XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}\edef\colornameprefix{#3}%
   \XC at logdef\@@nam
diff --git a/testfiles/xcolorpatch-svgnames.lvt b/testfiles/xcolorpatch-svgnames.lvt
new file mode 100644
index 0000000..b564f42
--- /dev/null
+++ b/testfiles/xcolorpatch-svgnames.lvt
@@ -0,0 +1,19 @@
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{}
+\RequirePackage{pdfmanagement-regressiontest}
+\documentclass{article}
+
+\usepackage[svgnames]{xcolor}
+
+
+\begin{document}
+abc
+\START
+\ExplSyntaxOn
+\TEST{show~YellowGreen}
+ {
+   \color_show:n{YellowGreen}
+ }
+\ExplSyntaxOff
+
+\end{document} 
\ No newline at end of file
diff --git a/testfiles/xcolorpatch-svgnames.tlg b/testfiles/xcolorpatch-svgnames.tlg
new file mode 100644
index 0000000..117a00a
--- /dev/null
+++ b/testfiles/xcolorpatch-svgnames.tlg
@@ -0,0 +1,13 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+============================================================
+TEST 1: show YellowGreen
+============================================================
+The color YellowGreen has the properties:
+>  model  =>  rgb
+>  rgb  =>  0.604 0.804 0.196.
+<recently read> }
+l. ... }
+============================================================
+[1
+] (xcolorpatch-svgnames.aux)





More information about the latex3-commits mailing list.