[latex3-commits] [git/LaTeX3-latex3-pdfresources] testanonstream: remove version check of luacolor (b856c4d)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Feb 14 20:11:41 CET 2023
Repository : https://github.com/latex3/pdfresources
On branch : testanonstream
Link : https://github.com/latex3/pdfresources/commit/b856c4d0548e635d89e754f9f027f7fda41fea49
>---------------------------------------------------------------
commit b856c4d0548e635d89e754f9f027f7fda41fea49
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Feb 14 20:11:41 2023 +0100
remove version check of luacolor
>---------------------------------------------------------------
b856c4d0548e635d89e754f9f027f7fda41fea49
CHANGELOG.md | 6 ++++
pdfmanagement-firstaid.dtx | 68 ++++++++++++++++++++++------------------------
2 files changed, 39 insertions(+), 35 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6340136..538479b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ 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
+ - l3pdffile: \pdffile_embed_stream:nnN to embed a stream without creating a named
+ object.
+
## [2023-02-07]
### Fixed
diff --git a/pdfmanagement-firstaid.dtx b/pdfmanagement-firstaid.dtx
index 878ce13..3fe96ec 100644
--- a/pdfmanagement-firstaid.dtx
+++ b/pdfmanagement-firstaid.dtx
@@ -201,8 +201,9 @@
% \subsection{luacolor}
%
% The luacolor package doesn't take colors from l3color into account.
-% We add a fix, but only for pdf mode. It is disable if luacolor is updated,
-% assuming that the update will then handle it (or expl3 directly)
+% We add a fix, but only for pdf mode. luacolor can disable the
+% code by clearing the hook if needed.
+%
% \begin{macrocode}
\bool_lazy_all:nT
{
@@ -213,46 +214,43 @@
{
\AddToHook{package/luacolor/after}
{
- \@ifpackagelater{luacolor}{2021-02-18}{}
+ \cs_set_protected:Npn \__color_backend_select:nn #1#2
{
- \cs_set_protected:Npn \__color_backend_select:nn #1#2
- {
- \tl_set:Nn \l__color_backend_fill_tl {#1}
- \tl_set:Nn \l__color_backend_stroke_tl {#2}
- \LuaCol at setattribute\LuaCol at Attribute
- {
- \directlua
- {
- oberdiek.luacolor.get("\luaescapestring{#1~#2}")
- }
- }
- }
- \cs_set_protected:Npn \__color_backend_fill:n #1
+ \tl_set:Nn \l__color_backend_fill_tl {#1}
+ \tl_set:Nn \l__color_backend_stroke_tl {#2}
+ \LuaCol at setattribute\LuaCol at Attribute
{
- \tl_set:Nn \l__color_backend_fill_tl {#1}
- \LuaCol at setattribute\LuaCol at Attribute
- {
- \directlua
- {
- oberdiek.luacolor.get("\luaescapestring{#1}")
- }
- }
+ \directlua
+ {
+ oberdiek.luacolor.get("\luaescapestring{#1~#2}")
+ }
}
- \cs_set_protected:Npn \__color_backend_stroke:n #1
+ }
+ \cs_set_protected:Npn \__color_backend_fill:n #1
+ {
+ \tl_set:Nn \l__color_backend_fill_tl {#1}
+ \LuaCol at setattribute\LuaCol at Attribute
{
- \tl_set:Nn \l__color_backend_stroke_tl {#1}
- \LuaCol at setattribute\LuaCol at Attribute
+ \directlua
{
- \directlua
- {
- oberdiek.luacolor.get("\luaescapestring{#1}")
- }
+ oberdiek.luacolor.get("\luaescapestring{#1}")
}
}
- \cs_set_protected:Npn \__color_backend_reset: {}
- \cs_set_eq:NN \__color_backend_fill_reset: \__color_backend_reset:
- \cs_set_eq:NN \__color_backend_stroke_reset: \__color_backend_reset:
- }
+ }
+ \cs_set_protected:Npn \__color_backend_stroke:n #1
+ {
+ \tl_set:Nn \l__color_backend_stroke_tl {#1}
+ \LuaCol at setattribute\LuaCol at Attribute
+ {
+ \directlua
+ {
+ oberdiek.luacolor.get("\luaescapestring{#1}")
+ }
+ }
+ }
+ \cs_set_protected:Npn \__color_backend_reset: {}
+ \cs_set_eq:NN \__color_backend_fill_reset: \__color_backend_reset:
+ \cs_set_eq:NN \__color_backend_stroke_reset: \__color_backend_reset:
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list.