summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3backend
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-12 03:03:44 +0000
committerNorbert Preining <norbert@preining.info>2020-09-12 03:03:44 +0000
commit206f46fee13b7233673f40672f21b29a61c70cd9 (patch)
tree61e874e278eec407b2a151098c3822f788dcc1ed /macros/latex/contrib/l3backend
parent026bcd88f082ea4bb3f2ddbac395339309f00a63 (diff)
CTAN sync 202009120303
Diffstat (limited to 'macros/latex/contrib/l3backend')
-rw-r--r--macros/latex/contrib/l3backend/CHANGELOG.md13
-rw-r--r--macros/latex/contrib/l3backend/README.md2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-basics.dtx18
-rw-r--r--macros/latex/contrib/l3backend/l3backend-box.dtx6
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx291
-rw-r--r--macros/latex/contrib/l3backend/l3backend-draw.dtx6
-rw-r--r--macros/latex/contrib/l3backend/l3backend-graphics.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-header.dtx6
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx14
9 files changed, 277 insertions, 81 deletions
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md
index 5937d8be02..959212901a 100644
--- a/macros/latex/contrib/l3backend/CHANGELOG.md
+++ b/macros/latex/contrib/l3backend/CHANGELOG.md
@@ -6,6 +6,16 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-11]
+
+### Added
+- Support for CIELAB separations with `dvips`
+
+### Fixed
+- Some PDF object functions
+- Separation color selection for `dvipdfmx`/XeTeX
+- Logic for some aspects of CIELAB Separation color
+
## [2020-09-01]
### Changed
@@ -110,7 +120,8 @@ this project uses date-based 'snapshot' version identifiers.
- Include `l3backend` in file names
- Moved backend code to internal for each 'parent' module
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-01...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-11...HEAD
+[2020-09-11]: https://github.com/latex3/latex3/compare/2020-09-01...2020-09-11
[2020-09-01]: https://github.com/latex3/latex3/compare/2020-08-07...2020-09-01
[2020-08-07]: https://github.com/latex3/latex3/compare/2020-06-29...2020-08-07
[2020-06-29]: https://github.com/latex3/latex3/compare/2020-06-23...2020-06-29
diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md
index 86d0912e2c..20a0301cf2 100644
--- a/macros/latex/contrib/l3backend/README.md
+++ b/macros/latex/contrib/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2020-09-01
+Release 2020-09-11
This package forms parts of `expl3`, and contains the code used to interface
with backends (drivers) across the `expl3` codebase. The functions here are
diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx
index a90cd6bb05..abd972dca0 100644
--- a/macros/latex/contrib/l3backend/l3backend-basics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -70,27 +70,27 @@
% \begin{macrocode}
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2020-09-01}{}
+ {l3backend-dvipdfmx.def}{2020-09-11}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2020-09-01}{}
+ {l3backend-dvips.def}{2020-09-11}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2020-09-01}{}
+ {l3backend-dvisvgm.def}{2020-09-11}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-luatex.def}{2020-09-01}{}
+ {l3backend-luatex.def}{2020-09-11}{}
{L3 backend support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-pdftex.def}{2020-09-01}{}
+ {l3backend-pdftex.def}{2020-09-11}{}
{L3 backend support: PDF output (pdfTeX)}
%</pdftex>
%<*xetex>
- {l3backend-xetex.def}{2020-09-01}{}
+ {l3backend-xetex.def}{2020-09-11}{}
{L3 backend support: XeTeX}
%</xetex>
% \end{macrocode}
@@ -367,7 +367,9 @@
% \end{macro}
%
% \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:}
-% Scoping is done using the backend-specific specials.
+% Scoping is done using the backend-specific specials. We use the versions
+% originally from \texttt{xdvidfpmx} (\texttt{x:}) as these are well-tested
+% \enquote{in the wild}.
% \begin{macrocode}
\cs_new_protected:Npn \__kernel_backend_scope_begin:
{ \__kernel_backend_literal:n { x:gsave } }
diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx
index 78cf2d9ebb..039fa38c85 100644
--- a/macros/latex/contrib/l3backend/l3backend-box.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -250,7 +250,7 @@
%</luatex|pdftex>
% \end{macrocode}
%
-% \subsection{\texttt{dvipdfmx} backend}
+% \subsection{\texttt{dvipdfmx}/\XeTeX{} backend}
%
% \begin{macrocode}
%<*dvipdfmx|xetex>
@@ -280,7 +280,7 @@
%
% \begin{macro}{\@@_backend_rotate:Nn}
% \begin{macro}{\@@_backend_rotate_aux:Nn}
-% Rotating in \texttt{(x)}dvipdmfx can be implemented using either PDF or
+% Rotating in \texttt{dvipdmfx}/\XeTeX{} can be implemented using either PDF or
% backend-specific code. The former approach however is not \enquote{aware}
% of the content of boxes: this means that any embedded links would not be
% adjusted by the rotation. As such, the backend-native approach is preferred:
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index 165313c04b..a9a86daebb 100644
--- a/macros/latex/contrib/l3backend/l3backend-color.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -311,57 +311,223 @@
% \begin{macro}{\@@_backend_select_separation:nn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
- { \@@_backend_select:n { setspotcolor ~ #1 ~ #2 } }
+ { \@@_backend_select:n { separation ~ #1 ~ #2 } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_separation_init:nnnnn}
-% \begin{macro}{\@@_backend_separation_init:nnn}
-% \begin{macro}[EXP]{\@@_backend_separation_init:n}
+% \begin{macro}
+% {
+% \@@_backend_separation_init:nnnnn,
+% \@@_backend_separation_init:nxxnn,
+% \@@_backend_separation_init_aux:nnnnn
+% }
+% \begin{macro}[EXP]
+% {
+% \@@_backend_separation_init_/DeviceCMYK:nnn ,
+% \@@_backend_separation_init_/DeviceGray:nnn ,
+% \@@_backend_separation_init_/DeviceRGB:nnn
+% }
+% \begin{macro}[EXP]{\@@_backend_separation_init_Device:Nn}
+% \begin{macro}[EXP]{\@@_backend_separation_init:nnn}
+% \begin{macro}[EXP]{\@@_backend_separation_init_count:n}
+% \begin{macro}[EXP]{\@@_backend_separation_init_count:w}
+% \begin{macro}[EXP]{\@@_backend_separation_init:nnnn}
% \begin{macro}[EXP]{\@@_backend_separation_init:w}
-% \begin{macro}{\@@_backend_separation_init_cielab:nnnnn}
-% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% \begin{macro}[EXP]{\@@_backend_separation_init:n}
+% \begin{macro}[EXP]{\@@_backend_separation_init:nw}
+% \begin{macro}{\@@_backend_separation_init_CIELAB:nnn}
% Initialising here means creating a small header set up plus massaging
% some data. This comes about as we have to deal with PDF-focussed data,
% which makes most sense \enquote{higher-up}. The approach is based on
-% ideas from \url{https://tex.stackexchange.com/q/560093}.
+% ideas from \url{https://tex.stackexchange.com/q/560093} plus using
+% the PostScript manual for other aspects.
% \begin{macrocode}
\cs_new_protected:Npx \@@_backend_separation_init:nnnnn #1#2#3#4#5
{
\bool_if:NT \g__kernel_backend_header_bool
{
\cs_if_exist:NTF \AtBeginDvi
- { \AtBeginDvi }
+ { \exp_not:N \AtBeginDvi }
{ \use:n }
{
- \exp_not:N \@@_backend_separation_init:nnn
- {#1} {#2} {#5}
+ \exp_not:N \@@_backend_separation_init_aux:nnnnn
+ {#1} {#2} {#3} {#4} {#5}
}
}
}
-\cs_new_protected:Npn \@@_backend_separation_init:nnn #1#2#3
+\cs_generate_variant:Nn \@@_backend_separation_init:nnnnn { nxx }
+\cs_new_protected:Npn \@@_backend_separation_init_aux:nnnnn #1#2#3#4#5
{
\__kernel_backend_literal:e
{
!
TeXDict ~ begin ~
- /color \int_use:N \g_@@_separation_int \c_space_tl
- [#3] ~ aload ~ pop ~ ( \str_convert_pdfname:n {#1} ) ~
- find \@@_backend_separation_init:n {#2} customcolor ~ def ~
+ /color \int_use:N \g_@@_separation_int
+ {
+ [ ~
+ /Separation ~ ( \str_convert_pdfname:n {#1} ) ~
+ [ ~ #2 ~ ] ~
+ {
+ \cs_if_exist_use:cF { @@_backend_separation_init_ #2 :nnn }
+ { \@@_backend_separation_init:nnn }
+ {#3} {#4} {#5}
+ }
+ ] ~ setcolorspace
+ } ~ def ~
end
}
}
+\cs_new:cpn { @@_backend_separation_init_ /DeviceCMYK :nnn } #1#2#3
+ { \@@_backend_separation_init_Device:Nn 4 {#3} }
+\cs_new:cpn { @@_backend_separation_init_ /DeviceGray :nnn } #1#2#3
+ { \@@_backend_separation_init_Device:Nn 1 {#3} }
+\cs_new:cpn { @@_backend_separation_init_ /DeviceRGB :nnn } #1#2#3
+ { \@@_backend_separation_init_Device:Nn 2 {#3} }
+\cs_new:Npn \@@_backend_separation_init_Device:Nn #1#2
+ {
+ #2 ~
+ \prg_replicate:nn {#1}
+ { #1 ~ index ~ mul ~ #1 ~ 1 ~ roll ~ }
+ \int_eval:n { #1 + 1 } ~ -1 ~ roll ~ pop
+ }
+% \end{macrocode}
+% For the generic case, we cannot use |/FunctionType 2| unfortunately, so
+% we have to code that idea up in PostScript. Here, we will therefore assume
+% that a range is \emph{always} given. First, we count values in each argument:
+% at the backend level, we can assume there are always well-behaved with
+% spaces present.
+% \begin{macrocode}
+\cs_new:Npn \@@_backend_separation_init:nnn #1#2#3
+ {
+ \exp_args:Ne \@@_backend_separation_init:nnnn
+ { \@@_backend_separation_init_count:n {#2} }
+ {#1} {#2} {#3}
+ }
+\cs_new:Npn \@@_backend_separation_init_count:n #1
+ { \int_eval:n { 0 \@@_backend_separation_init_count:w #1 ~ \s_@@_stop } }
+\cs_new:Npn \@@_backend_separation_init_count:w #1 ~ #2 \s_@@_stop
+ {
+ +1
+ \tl_if_blank:nF {#2}
+ { \@@_backend_separation_init_count:w #2 \s_@@_stop }
+ }
+% \end{macrocode}
+% Now we implement the algorithm. In the terms in the PostScript manual,
+% we have $\mathbf{N} = 1$ and $\mathbf{Domain} = [0~1]$, with
+% $\mathbf{Range}$ as |#2|, $\mathbf{C0}$ as |#3| and $\mathbf{C1}$
+% as |#4|, with the number of output components in |#1|. So all we have
+% to do is implement $y_{i} = \mathbf{C0}_{i} + x(\mathbf{C1}_{i} -
+% \mathbf{C0}_{i})$ with lots of stack manipulation, then check the
+% ranges. That's done by adding everything to the stack first, then using
+% the fact we know all of the offsets. As manipulating the stack is tricky,
+% we start by re-formatting the $\mathbf{C0}$ and $\mathbf{C1}$ arrays to
+% be interleaved, and add a \texttt{0} to each pair: this is used
+% to keep the stack of constant length while we are doing the first pass of
+% mathematics. We then working through that list, calculating from the
+% last to the first value before tidying up by removing all of the input
+% values. We do that by first copying all of the final $y$ values to the
+% end of the stack, then rolling everything so we can pop the now-unneeded
+% material.
+% \begin{macrocode}
+\cs_new:Npn \@@_backend_separation_init:nnnn #1#2#3#4
+ {
+ \@@_backend_separation_init:w #3 ~ \s_@@_stop #4 ~ \s_@@_stop
+ \prg_replicate:nn {#1}
+ {
+ pop ~ 1 ~ index ~ neg ~ 1 ~ index ~ add ~
+ \int_eval:n { 3 * #1 } ~ index ~ mul ~
+ 2 ~ index ~ add ~
+ \int_eval:n { 3 * #1 } ~ #1 ~ roll ~
+ }
+ \int_step_function:nnnN {#1} { -1 } { 1 }
+ \@@_backend_separation_init:n
+ \int_eval:n { 4 * #1 + 1 } ~ #1 ~ roll ~
+ \prg_replicate:nn { 3 * #1 + 1 } { pop ~ }
+ \tl_if_blank:nF {#2}
+ { \@@_backend_separation_init:nw {#1} #2 ~ \s_@@_stop }
+ }
+\cs_new:Npn \@@_backend_separation_init:w
+ #1 ~ #2 \s_@@_stop #3 ~ #4 \s_@@_stop
+ {
+ #1 ~ #3 ~ 0 ~
+ \tl_if_blank:nF {#2}
+ { \@@_backend_separation_init:w #2 \s_@@_stop #4 \s_@@_stop }
+ }
\cs_new:Npn \@@_backend_separation_init:n #1
+ { \int_eval:n { #1 * 2 } ~ index ~ }
+% \end{macrocode}
+% Finally, we deal with the range limit if required. This is handled
+% by splitting the range into pairs. It's then just a question of doing
+% the comparisons, this time dropping everything except the desired
+% result.
+% \begin{macrocode}
+\cs_new:Npn \@@_backend_separation_init:nw #1#2 ~ #3 ~ #4 \s_@@_stop
{
- \@@_backend_separation_init:w #1 /Device #1 /Device \s_@@_stop
+ #2 ~ #3 ~
+ 2 ~ index ~ 2 ~ index ~ lt ~
+ { ~ pop ~ exch ~ pop ~ } ~
+ { ~
+ 2 ~ index ~ 1 ~ index ~ gt ~
+ { ~ exch ~ pop ~ exch ~ pop ~ } ~
+ { ~ pop ~ pop ~ } ~
+ ifelse ~
+ }
+ ifelse ~
+ #1 ~ 1 ~ roll ~
+ \tl_if_blank:nF {#4}
+ { \@@_backend_separation_init:nw {#1} #4 \s_@@_stop }
}
-\cs_new:Npn \@@_backend_separation_init:w #1 /Device #2 /Device #3 \s_@@_stop
- { \str_lowercase:n {#2} }
% \end{macrocode}
-% Currently no CIELAB support.
+% CIELAB support uses the detail from the PostScript reference, page 227;
+% other than that block of PostScript, this is the same as for PDF-based
+% routes.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1 { }
+\cs_new_protected:Npn \@@_backend_separation_init_CIELAB:nnn #1#2#3
+ {
+ \@@_backend_separation_init:nxxnn
+ {#2}
+ {
+ /CIEBasedABC ~
+ << ~
+ /RangeABC ~ [ ~ \c_@@_model_range_CIELAB_tl \c_space_tl ] ~
+ /DecodeABC ~
+ [ ~
+ { ~ 16 ~ add ~ 116 ~ div ~ } ~ bind ~
+ { ~ 500 ~ div ~ } ~ bind ~
+ { ~ 200 ~ div ~ } ~ bind ~
+ ] ~
+ /MatrixABC ~ [ ~ 1 ~ 1 ~ 1 ~ 1 ~ 0 ~ 0 ~ 0 ~ 0 ~ -1 ~ ] ~
+ /DecodeLMN ~
+ [ ~
+ { ~
+ dup ~ 6 ~ 29 ~ div ~ ge ~
+ { ~ dup ~ dup ~ mul ~ mul ~ ~ } ~
+ { ~ 4 ~ 29 ~ div ~ sub ~ 108 ~ 841 ~ div ~ mul ~ } ~
+ ifelse ~
+ 0.9505 ~ mul ~
+ } ~ bind ~
+ { ~
+ dup ~ 6 ~ 29 ~ div ~ ge ~
+ { ~ dup ~ dup ~ mul ~ mul ~ } ~
+ { ~ 4 ~ 29 ~ div ~ sub ~ 108 ~ 841 ~ div ~ mul ~ } ~
+ ifelse ~
+ } ~ bind ~
+ { ~
+ dup ~ 6 ~ 29 ~ div ~ ge ~
+ { ~ dup ~ dup ~ mul ~ mul ~ } ~
+ { ~ 4 ~ 29 ~ div ~ sub ~ 108 ~ 841 ~ div ~ mul ~ } ~
+ ifelse ~
+ 1.0890 ~ mul ~
+ } ~ bind
+ ] ~
+ /WhitePoint ~
+ [ ~ \tl_use:c { c_@@_model_whitepoint_CIELAB_ #1 _tl } ~ ] ~
+ >>
+ }
+ { \c_@@_model_range_CIELAB_tl }
+ { 100 ~ 0 ~ 0 }
+ {#3}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -369,6 +535,11 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</dvips>
@@ -386,16 +557,13 @@
% \end{macro}
%
% \begin{macro}
-% {\@@_backend_separation_init:nnnnn, \@@_backend_separation_init_cielab:nnnnn}
-% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% {\@@_backend_separation_init:nnnnn, \@@_backend_separation_init_CIELAB:nnn}
% No support at present.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5 { }
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1 { }
+\cs_new_protected:Npn \@@_backend_separation_init_CIELAB:nnnnnn #1#2#3 { }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
%</dvisvgm>
@@ -406,6 +574,7 @@
% \end{macrocode}
%
% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macro}{\@@_backend_select:n}
% Different syntaxes here as the stacks are accessed very differently.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
@@ -415,32 +584,42 @@
%<*luatex|pdftex>
{ \@@_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
%</luatex|pdftex>
+%<*dvipdfmx|xetex>
+\cs_new_protected:Npn \@@_backend_select:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ #1 }
+ \group_insert_after:N \@@_backend_reset:
+ }
+%</dvipdfmx|xetex>
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_backend_separation_init:nnnnn}
% \begin{macro}{\@@_backend_separation_init:n}
-% \begin{macro}{\@@_backend_separation_init_cielab:nnnnn}
-% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% \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
% to that to each page. The latter uses the internal name of the \texttt{cs}.
% For \texttt{dvipdfmx}/\XeTeX{}, the backend does most of the work so we need a
-% simplified version.
+% simplified version. We use a separate object for the tint transformation
+% following the model in the PDF reference.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5
{
+ \pdf_object_now:nx { dict }
+ {
+ /FunctionType ~ 2
+ /Domain ~ [0 ~ 1]
+ \tl_if_blank:nF {#3} { /Range ~ [#3] }
+ /C0 ~ [#4] ~
+ /C1 ~ [#5] /N ~ 1
+ }
\@@_backend_separation_init:n
{
/Separation
/ \str_convert_pdfname:n {#1} ~ #2 ~
- <<
- /FunctionType ~ 2
- /Domain ~ [0 ~ 1]
- \tl_if_blank:nF {#3} { /Range ~ [#3] }
- /C0 ~ [#4] ~
- /C1 ~ [#5] /N ~ 1
- >>
+ \pdf_object_last:
}
%<*luatex|pdftex>
\use:x
@@ -459,7 +638,7 @@
%<*dvipdfmx|xetex>
\__kernel_backend_literal:x
{
- pdf:obj ~ @ color \int_use:N \g_@@_separation_int \c_space_tl
+ pdf:obj ~ @color \int_use:N \g_@@_separation_int \c_space_tl
[#1]
}
%</dvipdfmx|xetex>
@@ -471,37 +650,37 @@
% For CIELAB colors, we need one object per document for the illuminant,
% plus initialisation of the color space referencing that object.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+\cs_new_protected:Npn \@@_backend_separation_init_CIELAB:nnn #1#2#3
{
+ \pdf_object_if_exist:nF { @@_illuminant_CIELAB_ #1 }
+ {
+ \pdf_object_new:nn { @@_illuminant_CIELAB_ #1 } { array }
+ \pdf_object_write:nx { @@_illuminant_CIELAB_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c_@@_model_whitepoint_CIELAB_ #1 _tl } ]
+ /Range ~ [ \c_@@_model_range_CIELAB_tl ]
+ >>
+ }
+ }
\@@_backend_separation_init:nnnnn
{#2}
- { \pdf_object_ref:n { @@_illuminant_cielab_ #1 } }
- { \c_@@_model_range_lab_tl }
+ { \pdf_object_ref:n { @@_illuminant_CIELAB_ #1 } }
+ { \c_@@_model_range_CIELAB_tl }
{ 100 ~ 0 ~ 0 }
- { #3 ~ #4 ~ #5 }
+ {#3}
}
\cs_if_exist:NF \pdf_object_now:nn
- { \cs_gset_protected:Npn \@@_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
-\cs_new_protected:Npn \@@_backend_separation_init_cielab:n #1
{
- \pdf_object_new:nn { @@_illuminant_cielab_ #1 } { array }
- \pdf_object_write:nx { @@_illuminant_cielab_ #1 }
- {
- /Lab ~
- <<
- /WhitePoint ~
- [ \tl_use:c { c_@@_model_whitepoint_cielab_ #1 _tl } ]
- /Range ~ [ \c_@@_model_range_lab_tl ]
- >>
- }
+ \cs_gset_protected:Npn \@@_backend_separation_init_CIELAB:nnn #1#2#3
+ { }
}
-\cs_if_exist:NF \pdf_object_new:nn
- { \cs_gset_protected:Npn \@@_backend_separation_init_cielab:n #1 { } }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx
index 00e9144e4a..f28bfd13bf 100644
--- a/macros/latex/contrib/l3backend/l3backend-draw.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -581,7 +581,9 @@
% matrix into rotations and a scaling, then use those operations as they
% are handled by the backend. (There is backend support for matrix operations in
% \texttt{dvipdfmx}/\XeTeX{}, but as a matched pair so not suitable for the
-% \enquote{stand alone} transformation set up here.)
+% \enquote{stand alone} transformation set up here.) The specials used here
+% are from \texttt{xdvipdfmx} originally: they are well-tested, but probably
+% equivalent to the \texttt{pdf:} versions!
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
{
diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index f4eeebbfcb..bac80fa884 100644
--- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx
index c2d0f87452..73cf1bc5ad 100644
--- a/macros/latex/contrib/l3backend/l3backend-header.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-header.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -67,12 +67,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{TeXcolorsetspotcolor, setspotcolor}
+% \begin{macro}{TeXcolorseparation, separation}
% Support for separation/spot colors: this strange naming is so
% things work with the color stack.
% \begin{macrocode}
TeXDict begin
-/TeXcolorsetspotcolor { setcustomcolor } def
+/TeXcolorseparation { setcolor } def
end
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index f0f20e1b9a..0763c411eb 100644
--- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-09-01}
+% \date{Released 2020-09-11}
%
% \maketitle
%
@@ -773,16 +773,18 @@
%
% \begin{macro}[EXP]{\@@_backend_annotation_last:}
% A tiny amount of extra data gets added here; we use \texttt{x}-type
-% expansion to get the space in the right place and form.
+% expansion to get the space in the right place and form. The \enquote{extra}
+% space in the \LuaTeX{} version is \emph{required} as it is consumed in
+% finding the end of the keyword.
% \begin{macrocode}
\cs_new:Npx \@@_backend_annotation_last:
{
\exp_not:N \int_value:w
%<*luatex>
- \exp_not:N \tex_pdffeedback:D lastannot
+ \exp_not:N \tex_pdffeedback:D lastannot ~
%</luatex>
%<*pdftex>
- \exp_not:N \tex_pdfannot:D
+ \exp_not:N \tex_pdflastannot:D
%</pdftex>
\c_space_tl 0 ~ R
}
@@ -831,7 +833,7 @@
{
\exp_not:N \int_value:w
%<*luatex>
- \exp_not:N \tex_pdffeedback:D lastlink
+ \exp_not:N \tex_pdffeedback:D lastlink ~
%</luatex>
%<*pdftex>
\exp_not:N \tex_pdflastlink:D
@@ -964,7 +966,7 @@
%<*pdftex>
{ \tex_pdflastobj:D }
%</pdftex>
- \prop_gput:Nnn \exp_not:N \g_@@_backend_object_prop {#1} {#2}
+ \prop_gput:Nnn \g_@@_backend_object_prop {#1} {#2}
}
\cs_new:Npn \@@_backend_object_ref:n #1
{ \int_use:c { c_@@_backend_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }