[latex3-commits] [git/LaTeX3-latex3-latex3] main: Track colorant obj IDs where possible (d17eb6567)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Oct 15 08:35:27 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/d17eb6567d98f1b3c21643b640e13a25efcaa36f
>---------------------------------------------------------------
commit d17eb6567d98f1b3c21643b640e13a25efcaa36f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Oct 15 07:35:27 2021 +0100
Track colorant obj IDs where possible
>---------------------------------------------------------------
d17eb6567d98f1b3c21643b640e13a25efcaa36f
l3backend/l3backend-color.dtx | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 72254382f..029553aac 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -792,8 +792,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\g_@@_backend_colorant_prop}
+% \begin{macrocode}
+\prop_new:N \g_@@_backend_colorant_prop
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\@@_backend_separation_init:nnnnn}
-% \begin{macro}{\@@_backend_separation_init:n}
+% \begin{macro}{\@@_backend_separation_init:nn}
% \begin{macro}{\@@_backend_separation_init_CIELAB:nnn}
% Initialising the PDF structures needs two parts: creating an object
% containing the \enquote{real} name of the Separation, then adding a reference
@@ -810,15 +816,11 @@
/C0 ~ [#4] ~
/C1 ~ [#5] /N ~ 1
}
- \@@_backend_separation_init:n
- {
- /Separation ~
- / \str_convert_pdfname:n {#1} ~ #2 ~
- \pdf_object_ref_last:
- }
+ \exp_args:Nx \@@_backend_separation_init:nn
+ { \str_convert_pdfname:n {#1} } {#2}
\bool_lazy_and:nnT
{ \cs_if_exist_p:N \pdfmanagement_if_active_p: }
- { \pdfmanagement_if_active_p:}
+ { \pdfmanagement_if_active_p: }
{
\use:x
{
@@ -829,9 +831,12 @@
}
}
}
-\cs_new_protected:Npn \@@_backend_separation_init:n #1
+\cs_new_protected:Npn \@@_backend_separation_init:nn #1#2
{
- \pdf_object_unnamed_write:nx { array } {#1}
+ \pdf_object_unnamed_write:nx { array }
+ { /Separation /#1 ~ #2 ~ \pdf_object_ref_last: }
+ \prop_gput:Nnx \g_@@_backend_colorant_prop {#1}
+ { \pdf_object_ref_last: }
}
% \end{macrocode}
% For CIELAB colors, we need one object per document for the illuminant,
@@ -894,7 +899,7 @@
}
{ {#3} }
}
- \@@_backend_separation_init:n
+ \pdf_object_unnamed_write:nx { array }
{
/DeviceN ~
[ ~ #1 ~ ] ~
More information about the latex3-commits
mailing list.