[latex3-commits] [latex3/latex3] main: Fix inconsistent behaviors of opacity w/o pdfmanagement (cbfe4e1aa)
github at latex-project.org
github at latex-project.org
Wed Feb 28 07:24:34 CET 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/cbfe4e1aaa256f64d4395c5bf523fbc7d319ac28
>---------------------------------------------------------------
commit cbfe4e1aaa256f64d4395c5bf523fbc7d319ac28
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Wed Feb 28 10:02:50 2024 +0800
Fix inconsistent behaviors of opacity w/o pdfmanagement
Fixes #1473.
Sort of oversight of 996bad17 (Only use \pdfmanagement_add:nnn if active,
2021-08-02).
>---------------------------------------------------------------
cbfe4e1aaa256f64d4395c5bf523fbc7d319ac28
l3backend/CHANGELOG.md | 2 ++
l3backend/l3backend-opacity.dtx | 20 ++++++++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index c22e1126d..8907e821d 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -9,6 +9,8 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- Initiation of opacity data (see \#1472)
- ExtGState setup for stroking opacity (issue \#1472)
+- Inconsistent behavior of opacity functions w/o `pdfmanagement`
+ (issue \#1473)
## [2024-02-20]
diff --git a/l3backend/l3backend-opacity.dtx b/l3backend/l3backend-opacity.dtx
index a46e4c8df..1aedcbd12 100644
--- a/l3backend/l3backend-opacity.dtx
+++ b/l3backend/l3backend-opacity.dtx
@@ -192,12 +192,6 @@
{ /opacity #1 ~ gs }
\group_insert_after:N \@@_backend_reset:
}
-\bool_lazy_and:nnF
- { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
- { \pdfmanagement_if_active_p:}
- {
- \cs_gset_protected:Npn \@@_backend_select_aux:n #1 { }
- }
\cs_new_protected:Npn \@@_backend_reset:
{
%<*dvipdfmx|xetex>
@@ -257,6 +251,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_backend_select_aux:n, \@@_backend_fill_stroke:nn}
+% Redefine them to stubs if pdfmanagement is either not loaded or
+% deactivated.
+% \begin{macrocode}
+\bool_lazy_and:nnF
+ { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
+ { \pdfmanagement_if_active_p: }
+ {
+ \cs_gset_protected:Npn \@@_backend_select_aux:n #1 { }
+ \cs_gset_protected:Npn \@@_backend_fill_stroke:nn #1#2 { }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
More information about the latex3-commits
mailing list.