summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-07 20:44:26 +0000
committerKarl Berry <karl@freefriends.org>2023-02-07 20:44:26 +0000
commitbc30a1c1247c5287d7332942ba096a2ef1bf5a0f (patch)
tree1cfa08ab0c097a17180f04502777d3061703a2d8 /Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
parentb75ddde3f208a2d08c033c787ab577b22c6529d6 (diff)
pdfmanagement-testphase (7feb23)
git-svn-id: svn://tug.org/texlive/trunk@65748 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx')
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx67
1 files changed, 64 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
index 45174deaae7..2025a4fa18a 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.95t, released 2022-11-03}
+% \date{Version 0.95u, released 2023-02-07}
%
% \maketitle
% \begin{documentation}
@@ -63,11 +63,13 @@
% |debug={firstaidoff={name1,name2,...},...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{pdfmanagement-firstaid}{2022-11-03}{0.95t}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2023-02-07}{0.95u}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
-\clist_map_inline:nn {pgf,transparent,xmp,pdflscape,xcolor,color,beamer,output,colorspace,fontspec}
+\clist_map_inline:nn
+ {pgf,transparent,xmp,pdflscape,xcolor,color,
+ beamer,output,colorspace,fontspec,luacolor}
{
\bool_new:c { g_@@_firstaid_#1_bool }
\bool_gset_true:c { g_@@_firstaid_#1_bool }
@@ -195,6 +197,65 @@
{\RequirePackage{xcolor-patches-tmp-ltx}}
}
% \end{macrocode}
+%
+% \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)
+% \begin{macrocode}
+\bool_lazy_all:nT
+ {
+ {\sys_if_engine_luatex_p:}
+ {\g_@@_firstaid_luacolor_bool}
+ {\sys_if_output_pdf_p:}
+ }
+ {
+ \AddToHook{package/luacolor/after}
+ {
+ \@ifpackagelater{luacolor}{2021-02-18}{}
+ {
+ \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}
+ \LuaCol@setattribute\LuaCol@Attribute
+ {
+ \directlua
+ {
+ 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}}
%
% In \pkg{pgf}, resource management is set up in the file |pgfutil-common.tex|.