summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-14 20:22:24 +0000
committerKarl Berry <karl@freefriends.org>2022-06-14 20:22:24 +0000
commit87fa5c816607d9d5aa175a19007d463957d29714 (patch)
treec0d427f1c1ef75d0ce44ec31291dbd9167a53297 /Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
parentf1079b6a8806f2632d31d2111f10e5eff4207f5e (diff)
pdfmanagement-testphase (14jun22)
git-svn-id: svn://tug.org/texlive/trunk@63594 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.dtx43
1 files changed, 40 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 009f1bf07f2..107c9150ab8 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.95o, released 2022-05-11}
+% \date{Version 0.95p, released 2022-06-14}
%
% \maketitle
% \begin{documentation}
@@ -64,11 +64,11 @@
% |debug={firstaidoff={name1,name2,...},...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{pdfmanagement-firstaid}{2022-05-11}{0.95o}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2022-06-14}{0.95p}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
-\clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer,output,colorspace}
+\clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer,output,colorspace,fontspec}
{
\bool_new:c { g_@@_firstaid_#1_bool }
\bool_gset_true:c { g_@@_firstaid_#1_bool }
@@ -82,6 +82,43 @@
}
\msg_new:nnn { pdfmanagement } { firstaid }
{ loading~pdfmanagement~firstaid~code~for~#1 }
+\msg_new:nnn { pdfmanagement } { firstaid-changed }
+ { package~#1~has~changed.~Check~if~patch~is~still~valid! }
+% \end{macrocode}
+% \subsection{Fontspec}
+% When using luaLaTeX opacity is broken (issue \#30) as
+% fontspec/luaotfload doesn't use the pdfmanagement but write to ExtGState directly
+% To repair this some new lua code is needed. This also
+% improves the color parsing and allows to use cmyk and spot colors as font colors.
+% It is also needed to use a patch version of \texttt{fontspec-luatex.sty} to
+% slightly change the way how the Opacity and Color key are handled.
+% The patch is only executed if luaotfload is new enough.
+% \begin{macrocode}
+\sys_if_engine_luatex:T
+ {
+ \lua_now:n
+ {
+ if~not~luaotfload.set_transparent_colorstack~
+ then~
+ tex.print("\\bool_set_false:N\\g_@@_firstaid_fontspec_bool")~
+ end
+ }
+ \bool_if:NT \g_@@_firstaid_fontspec_bool
+ {
+ \msg_info:nnn{pdfmanagement}{firstaid}{fontspec}
+ \file_if_exist:nT { luaotfload-l3color-tmp.lua }
+ {
+ \lua_load_module:n { luaotfload-l3color-tmp.lua }
+ }
+
+ \declare@file@substitution{fontspec-luatex.sty}{fontspec-luatex-tmp-ltx.sty}
+ \AddToHook{package/fontspec/after}
+ {
+ \str_if_eq:vnF{ver@fontspec.sty}{2022/01/15~v2.8a~Font~selection~for~XeLaTeX~and~LuaLaTeX}
+ {\msg_warn:nnn{pdfmanagement}{firstaid-changed}{fontspec}}
+ }
+ }
+ }
% \end{macrocode}
% \subsection{Output routine}
% This load as few patches for the LaTeX output routine commands. They add