[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: fix color names (be7de69)
Ulrike Fischer
fischer at troubleshooting-tex.de
Thu Jan 27 20:09:58 CET 2022
Repository : https://github.com/latex3/pdfresources
On branch : develop
Link : https://github.com/latex3/pdfresources/commit/be7de69e1ccda24753d905f4ebdf624f1f4f76a3
>---------------------------------------------------------------
commit be7de69e1ccda24753d905f4ebdf624f1f4f76a3
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Jan 27 20:09:58 2022 +0100
fix color names
>---------------------------------------------------------------
be7de69e1ccda24753d905f4ebdf624f1f4f76a3
CHANGELOG.md | 4 ++++
firstaid/xcolor-patches-tmp-ltx.sty | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec1686c..7524d3e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Fixed
+
+- xcolor patch failed with color names containing active chars (e.g. from french)
+
## [2022-01-13]
### Changed
- the keys `firstaidoff` and `pdfmanagement` should now be set with the `debug` key.
diff --git a/firstaid/xcolor-patches-tmp-ltx.sty b/firstaid/xcolor-patches-tmp-ltx.sty
index 5ff2ef0..2d1b783 100644
--- a/firstaid/xcolor-patches-tmp-ltx.sty
+++ b/firstaid/xcolor-patches-tmp-ltx.sty
@@ -42,11 +42,14 @@
}
\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_generate_variant:Nn \color_set:ne {ne}
+\tl_new:N\l__pdfmanagement_firstaid_tmpa_tl
+% the color name should be sanitized to avoid problems with e.g. french making ! active
\cs_new_protected:Npn \@expl at xcolor@set@@ne #1 #2
{
- \exp_args:Nx \__color_if_defined:nT {#2}
- { \color_set:ne {#1}{#2} }
+ \XC at edef\l__pdfmanagement_firstaid_tmpa_tl{#2}
+ \exp_args:NV \__color_if_defined:nT \l__pdfmanagement_firstaid_tmpa_tl
+ { \color_set:ne {#1}{\l__pdfmanagement_firstaid_tmpa_tl} }
}
\ExplSyntaxOff
%\pretocmd{\XC at col@rlet} {\@expl at color@set@@ne{#2}{#4}}{}{\fail}
More information about the latex3-commits
mailing list.