From 024d47cb1c4e5ba541f3865b69168bef20f2bfce Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 16 Feb 2023 03:01:36 +0000 Subject: CTAN sync 202302160301 --- .../pdfmanagement-firstaid.dtx | 80 +++++++++++----------- 1 file changed, 39 insertions(+), 41 deletions(-) (limited to 'macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx') diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 2025a4fa18..3e9810a925 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -2,7 +2,7 @@ % %% File: pdfmanagement-firstaid.dtx % -% Copyright (C) 2018-2022 The LaTeX Project +% Copyright (C) 2018-2023 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.95u, released 2023-02-07} +% \date{Version 0.95v, released 2023-02-14} % % \maketitle % \begin{documentation} @@ -63,7 +63,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2023-02-07}{0.95u} +\ProvidesExplPackage{pdfmanagement-firstaid}{2023-02-14}{0.95v} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> @@ -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,47 +214,44 @@ { \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@setattribute\LuaCol@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@setattribute\LuaCol@Attribute { - \tl_set:Nn \l__color_backend_fill_tl {#1} - \LuaCol@setattribute\LuaCol@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@setattribute\LuaCol@Attribute { - \tl_set:Nn \l__color_backend_stroke_tl {#1} - \LuaCol@setattribute\LuaCol@Attribute + \directlua { - \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: - } - } + oberdiek.luacolor.get("\luaescapestring{#1}") + } + } + } + \cs_set_protected:Npn \__color_backend_stroke:n #1 + { + \tl_set:Nn \l__color_backend_stroke_tl {#1} + \LuaCol@setattribute\LuaCol@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} % \subsection{\pkg{pgf}} -- cgit v1.2.3