summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md11
-rw-r--r--Master/texmf-dist/doc/latex/l3backend/README.md2
-rw-r--r--Master/texmf-dist/dvips/l3backend/l3backend-dvips.pro3
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx165
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx325
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx46
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx419
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend.ins40
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def91
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def65
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def22
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def (renamed from Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def)425
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def670
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def (renamed from Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def)109
17 files changed, 1821 insertions, 622 deletions
diff --git a/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md
index 6d9dbaab142..5937d8be02c 100644
--- a/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md
@@ -6,6 +6,14 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-09-01]
+
+### Changed
+- Improved support for Separation colors
+- Updated approach to `dvipdfmx`/XeTeX color support
+- Split `pdfmode` driver into pdfTeX- and LuaTeX-specific files
+- Renamed `xdvipdfmx` backend files to `xetex`
+
## [2020-08-07]
### Changed
@@ -102,7 +110,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-08-07...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-09-01...HEAD
+[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
[2020-06-23]: https://github.com/latex3/latex3/compare/2020-06-18...2020-06-23
diff --git a/Master/texmf-dist/doc/latex/l3backend/README.md b/Master/texmf-dist/doc/latex/l3backend/README.md
index a0ebb980035..86d0912e2cc 100644
--- a/Master/texmf-dist/doc/latex/l3backend/README.md
+++ b/Master/texmf-dist/doc/latex/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2020-08-07
+Release 2020-09-01
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/Master/texmf-dist/dvips/l3backend/l3backend-dvips.pro b/Master/texmf-dist/dvips/l3backend/l3backend-dvips.pro
index dda632be9f5..8d5bc5cbbd1 100644
--- a/Master/texmf-dist/dvips/l3backend/l3backend-dvips.pro
+++ b/Master/texmf-dist/dvips/l3backend/l3backend-dvips.pro
@@ -21,6 +21,9 @@
%% File: l3backend-header.dtx
/color.sc { } def
/color.fc { } def
+TeXDict begin
+/TeXcolorsetspotcolor { setcustomcolor } def
+end
true setglobal
/pdf.globaldict 4 dict def
false setglobal
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx
index 209b2a648fb..a90cd6bb059 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -68,29 +68,59 @@
% All the file identifiers are up-front so that they come out in the right
% place in the files.
% \begin{macrocode}
-%<*package>
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2020-08-07}{}
+ {l3backend-dvipdfmx.def}{2020-09-01}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2020-08-07}{}
+ {l3backend-dvips.def}{2020-09-01}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2020-08-07}{}
+ {l3backend-dvisvgm.def}{2020-09-01}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
-%<*pdfmode>
- {l3backend-pdfmode.def}{2020-08-07}{}
- {L3 backend support: PDF mode}
-%</pdfmode>
-%<*xdvipdfmx>
- {l3backend-xdvipdfmx.def}{2020-08-07}{}
- {L3 backend support: xdvipdfmx}
-%</xdvipdfmx>
-%</package>
+%<*luatex>
+ {l3backend-luatex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (LuaTeX)}
+%</luatex>
+%<*pdftex>
+ {l3backend-pdftex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (pdfTeX)}
+%</pdftex>
+%<*xetex>
+ {l3backend-xetex.def}{2020-09-01}{}
+ {L3 backend support: XeTeX}
+%</xetex>
+% \end{macrocode}
+%
+% Check if the loaded kernel is at least enough to load this file.
+% The kernel date has to be at least equal to \cs{ExplBackendFileDate}
+% or later. If \cs{__kernel_dependency_version_check:Nn} doesn't
+% exist we're loading in an older kernel, so it's an error anyway.
+% With time, this test should vanish and only the dependency check
+% should remain.
+% \begin{macrocode}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+%<dvipdfmx> {l3backend-dvipdfmx.def}
+%<dvips> {l3backend-dvips.def}
+%<dvisvgm> {l3backend-dvisvgm.def}
+%<luatex> {l3backend-luatex.def}
+%<pdftex> {l3backend-pdftex.def}
+%<xetex> {l3backend-xetex.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
% \end{macrocode}
%
% The order of the backend code here is such that we get somewhat logical
@@ -98,10 +128,10 @@
% mix all of the code by concept is almost unmanageable.) The key parts which
% are shared are
% \begin{itemize}
-% \item Color support is either \texttt{dvips}-like or \texttt{pdfmode}-like.
-% \item \texttt{pdfmode} and \texttt{(x)dvipdfmx} share drawing routines.
-% \item \texttt{xdvipdfmx} is largely the same as \texttt{dvipdfmx} so
-% takes most of the same code.
+% \item Color support is either \texttt{dvips}-like or \LuaTeX{}/pdfTeX{}-like.
+% \item \LuaTeX{}/pdfTeX{} and \texttt{dvipdfmx}/\XeTeX{} share drawing routines.
+% \item \XeTeX{} is the same as \texttt{dvipdfmx} other than image size
+% extraction so takes most of the same code.
% \end{itemize}
%
% \begin{macro}
@@ -155,15 +185,13 @@
% This is held until the start of shipout such that a document with no
% actual output does not write anything.
% \begin{macrocode}
-\cs_if_exist:NTF \AtBeginDvi
- { \AtBeginDvi }
- { \use:n }
- {
- \bool_lazy_and:nnT
- { \cs_if_exist_p:N \g__kernel_backend_header_bool }
- { \g__kernel_backend_header_bool }
+\bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
{ \__kernel_backend_literal:n { header = l3backend-dvips.pro } }
- }
+ }
% \end{macrocode}
%
% \begin{macro}
@@ -211,17 +239,16 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
-% The direct PDF backend covers both \pdfTeX{} and \LuaTeX{}. The latter
-% renames and restructures the backend primitives but this can be handled
-% at one level of abstraction. As such, we avoid using two separate backends
-% for this material at the cost of some \texttt{x}-type definitions to get
-% everything expanded up-front.
+% Both \LuaTeX{} and \pdfTeX{} write PDFs directly rather than via an
+% intermediate file. Although there are similarities, the move of \LuaTeX{}
+% to have more code in Lua means we create two independent files using
+% shared DocStrip code.
%
% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x}
% This is equivalent to \verb|\special{pdf:}| but the engine can
@@ -230,12 +257,15 @@
% Note that this is still inside the text (\texttt{BT} \dots \texttt{ET}
% block).
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_literal_pdf:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal }
- { \tex_pdfliteral:D }
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D literal
+%</luatex>
+%<*pdftex>
+ \tex_pdfliteral:D
+%</pdftex>
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x }
% \end{macrocode}
@@ -245,13 +275,15 @@
% Page literals are pretty simple. To avoid an expansion, we write out
% by hand.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_literal_page:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal ~ }
- { \tex_pdfliteral:D }
- page
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D literal ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfliteral:D
+%</pdftex>
+ page { \exp_not:n {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -259,17 +291,23 @@
% \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:}
% Higher-level interfaces for saving and restoring the graphic state.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_scope_begin:
+\cs_new_protected:Npn \__kernel_backend_scope_begin:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D save \scan_stop: }
- { \tex_pdfsave:D }
+%<*luatex>
+ \tex_pdfextension:D save \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfsave:D
+%</pdftex>
}
-\cs_new_protected:Npx \__kernel_backend_scope_end:
+\cs_new_protected:Npn \__kernel_backend_scope_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D restore \scan_stop: }
- { \tex_pdfrestore:D }
+%<*luatex>
+ \tex_pdfextension:D restore \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfrestore:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -279,31 +317,34 @@
% into the PDF. With \pdfTeX{} and \LuaTeX{} in direct PDF output mode there
% is a primitive for this, which only needs the rotation/scaling/skew part.
% \begin{macrocode}
-\cs_new_protected:Npx \__kernel_backend_matrix:n #1
+\cs_new_protected:Npn \__kernel_backend_matrix:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D setmatrix }
- { \tex_pdfsetmatrix:D }
- { \exp_not:N \exp_not:n {#1} }
+%<*luatex>
+ \tex_pdfextension:D setmatrix
+%</luatex>
+%<*pdftex>
+ \tex_pdfsetmatrix:D
+%</pdftex>
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% The \texttt{dvipdfmx} shares code with the PDF mode one (using the common
-% section to this file) but also with \texttt{xdvipdfmx}. The latter is close
+% section to this file) but also with \XeTeX{}. The latter is close
% to identical to \texttt{dvipdfmx} and so all of the code here is extracted
-% for both backends, with some \texttt{clean up} for \texttt{xdvipdfmx} as
+% for both backends, with some \texttt{clean up} for \XeTeX{} as
% required.
%
% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x}
@@ -336,7 +377,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx
index c5ef445658d..78cf2d9ebb1 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -151,10 +151,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_clip:N}
@@ -247,17 +247,17 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_clip:N}
-% The code here is identical to that for \texttt{pdfmode}: unlike rotation and
+% The code here is identical to that for \LuaTeX{}/\pdfTeX{}: unlike rotation and
% scaling, there is no higher-level support in the backend for clipping.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_clip:N #1
@@ -327,7 +327,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
index 6defac4817a..165313c04b8 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -60,18 +60,62 @@
%<@@=color>
% \end{macrocode}
%
-% Color support is split into two parts: a \enquote{general} concept and
-% one directly linked to drawings (or rather the split between filling
-% and stroking). General color is relatively easy to handle: we have a color
-% stack available with all modern drivers, and can use that.
-% Whilst \texttt{(x)dvipdfmx} does have its own approach to color specials,
-% it is easier to use \texttt{dvips}-like ones for all cases except direct
-% PDF output.
+% Color support is split into parts: general color, separations, and color for
+% drawings. We have different approaches in each backend, and have some choices
+% to make about \texttt{dvipdfmx}/\XeTeX{} in particular. Whilst it is in some ways
+% convenient to use the same approach in multiple backends, the fact that
+% \texttt{dvipdfmx}/\XeTeX{} is PDF-based means it (largely) sticks closer to
+% direct PDF output.
+%
+% \subsection{\texttt{dvipmdfx}/\XeTeX{}}
+%
+% \begin{macrocode}
+%<*dvipdfmx|xetex>
+% \end{macrocode}
+%
+% These backends have the most possible approaches: it recognises both
+% \texttt{dvips}-based color specials and it's own format, plus one can
+% include PDF statements directly. The latter are not subject to the stack,
+% so are not suitable for general use. Of the two stack methods, the dedicated
+% one has been extended to cover color spaces, so it is used in preference to
+% the \texttt{dvips} one.
+%
+% The \LaTeXe{} backend code uses \texttt{dvips}-based code with
+% \texttt{dvipmdfx}/\XeTeX{}, and so we leave getting color from \LaTeXe{} to
+% a shared code path below.
+%
+% \begin{macro}
+% {
+% \@@_backend_select_cmyk:n ,
+% \@@_backend_select_gray:n ,
+% \@@_backend_select_rgb:n
+% }
+% \begin{macro}{\@@_backend_reset:}
+% \begin{macro}{color.sc, color.fc}
+% Push the data to the stack.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \@@_backend_reset:
+ }
+\cs_new_eq:NN \@@_backend_select_gray:n \@@_backend_select_cmyk:n
+\cs_new_eq:NN \@@_backend_select_rgb:n \@@_backend_select_cmyk:n
+\cs_new_protected:Npn \@@_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</dvipdfmx|xetex>
+% \end{macrocode}
%
% \subsection{\texttt{dvips}-style}
%
% \begin{macrocode}
-%<*dvisvgm|dvipdfmx|dvips|xdvipdfmx>
+%<*dvisvgm|dvipdfmx|dvips|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_pickup:N}
@@ -106,6 +150,14 @@
% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
+%</dvisvgm|dvipdfmx|dvips|xetex>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvisvgm|dvips>
+% \end{macrocode}
+%
% \begin{macro}
% {
% \@@_backend_select_cmyk:n ,
@@ -140,21 +192,14 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_backend_select_separation:nn}
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
- { \@@_backend_select:n {#1} }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
-%</dvisvgm|dvipdfmx|dvips|xdvipdfmx>
+%</dvisvgm|dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode}}
+% \subsection{\LuaTeX{} and \pdfTeX{}}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend_pickup:N}
@@ -225,44 +270,252 @@
{ \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \@@_backend_select_rgb:n #1
{ \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
-\cs_new_protected:Npx \@@_backend_select:n #1
+\cs_new_protected:Npn \@@_backend_select:n #1
+ {
+%<*luatex>
+ \tex_pdfextension:D colorstack
+%</luatex>
+%<*pdftex>
+ \tex_pdfcolorstack:D
+%</pdftex>
+ \l__kernel_color_stack_int push {#1}
+ \group_insert_after:N \@@_backend_reset:
+ }
+\cs_new_protected:Npn \@@_backend_reset:
+ {
+%<*luatex>
+ \tex_pdfextension:D colorstack
+%</luatex>
+%<*pdftex>
+ \tex_pdfcolorstack:D
+%</pdftex>
+ \l__kernel_color_stack_int pop \scan_stop:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</luatex|pdftex>
+% \end{macrocode}
+%
+% \subsection{Separations}
+%
+% Here, life gets interesting and we need essentially one approach per
+% backend.
+%
+% \begin{macrocode}
+%<*dvips>
+% \end{macrocode}
+%
+% \begin{macro}{\@@_backend_select_separation:nn}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
+ { \@@_backend_select:n { setspotcolor ~ #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}[EXP]{\@@_backend_separation_init:w}
+% \begin{macro}{\@@_backend_separation_init_cielab:nnnnn}
+% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% 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}.
+% \begin{macrocode}
+\cs_new_protected:Npx \@@_backend_separation_init:nnnnn #1#2#3#4#5
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int push {#1}
- \group_insert_after:N \exp_not:N \@@_backend_reset:
+ \bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
+ {
+ \exp_not:N \@@_backend_separation_init:nnn
+ {#1} {#2} {#5}
+ }
+ }
}
-\cs_new_protected:Npx \@@_backend_reset:
+\cs_new_protected:Npn \@@_backend_separation_init:nnn #1#2#3
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int pop \scan_stop:
+ \__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 ~
+ end
+ }
+ }
+\cs_new:Npn \@@_backend_separation_init:n #1
+ {
+ \@@_backend_separation_init:w #1 /Device #1 /Device \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.
+% \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 { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
% \end{macro}
%
+% \begin{macrocode}
+%</dvips>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvisvgm>
+% \end{macrocode}
+%
% \begin{macro}{\@@_backend_select_separation:nn}
+% No support at present.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2 { }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}
+% {\@@_backend_separation_init:nnnnn, \@@_backend_separation_init_cielab:nnnnn}
+% \begin{macro}{\@@_backend_separation_init_cielab:n}
+% 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 { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</dvisvgm>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*dvipdfmx|luatex|pdftex|xetex>
+% \end{macrocode}
+%
+% \begin{macro}{\@@_backend_select_separation:nn}
+% Different syntaxes here as the stacks are accessed very differently.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_separation:nn #1#2
+%<*dvipdfmx|xetex>
+ { \@@_backend_select:n { @#1 ~ [#2] } }
+%</dvipdfmx|xetex>
+%<*luatex|pdftex>
{ \@@_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
+%</luatex|pdftex>
+% \end{macrocode}
+% \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}
+% 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.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \@@_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
+ >>
+ }
+%<*luatex|pdftex>
+ \use:x
+ {
+ \pdfcoredict_gput:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g_@@_separation_int }
+ { \pdf_object_last: }
+ }
+%</luatex|pdftex>
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \@@_backend_separation_init:n #1
+ {
+%<*dvipdfmx|xetex>
+ \__kernel_backend_literal:x
+ {
+ pdf:obj ~ @ color \int_use:N \g_@@_separation_int \c_space_tl
+ [#1]
+ }
+%</dvipdfmx|xetex>
+%<*luatex|pdftex>
+ \pdf_object_now:nx { array } {#1}
+%</luatex|pdftex>
+ }
+% \end{macrocode}
+% 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
+ {
+ \@@_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { @@_illuminant_cielab_ #1 } }
+ { \c_@@_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\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_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}
-%</pdfmode>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsection{Fill and stroke color}
%
-% Here, \texttt{(x)dvipdfmx} follows \texttt{pdfmode}, while for \texttt{dvips}
+% Here, \texttt{dvipdfmx}/\XeTeX{} follows \LuaTeX{} and \pdfTeX{},
+% while for \texttt{dvips}
% we have to manage fill and stroke color ourselves. We also handle
% \texttt{dvisvgm} independently, as there we can create SVG directly.
%
% \begin{macrocode}
-%<*dvipdfmx|pdfmode|xdvipdfmx>
+%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{macro}
@@ -274,8 +527,8 @@
% \@@_backend_stroke_gray:n ,
% \@@_backend_stroke_rgb:n
% }
-% Drawing (fill/stroke) color is handled in \texttt{(x)dvipdfmx} in the
-% same way as \texttt{pdfmode}. We use the same approach as earlier, except the
+% Drawing (fill/stroke) color is handled in \texttt{dvipdfmx}/\XeTeX{} in the
+% same way as \LuaTeX{}/\pdfTeX{}. We use the same approach as earlier, except the
% color stack is not involved so the generic direct PDF operation is used.
% There is no worry about the nature of strokes: everything is handled
% automatically.
@@ -309,7 +562,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|pdfmode|xdvipdfmx>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx
index 7f0f4cfb4ab..00e9144e4a0 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -339,7 +339,7 @@
% In \texttt{dvips}, keeping the transformations in line with the engine
% is unfortunately not possible for scaling and rotations: even if we
% decompose the matrix into those operations, there is still no backend
-% tracking (\emph{cf.}~\texttt{(x)dvipdfmx}). Thus we take the shortest
+% tracking (\emph{cf.}~\texttt{dvipdfmx}/\XeTeX{}). Thus we take the shortest
% path available and simply dump the matrix as given.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
@@ -393,13 +393,13 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} and \texttt{(x)dvipdfmx}}
+% \subsection{\LuaTeX{}, \pdfTeX{}, \texttt{dvipdfmx} and \XeTeX{}}
%
-% Both \texttt{pdfmode} and \texttt{(x)dvipdfmx} directly produce PDF output
+% \LuaTeX{}, \pdfTeX{}, \texttt{dvipdfmx} and \XeTeX{} directly produce PDF output
% and understand a shared set of specials for drawing commands.
%
% \begin{macrocode}
-%<*dvipdfmx|pdfmode|xdvipdfmx>
+%<*dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsubsection{Drawing}
@@ -575,25 +575,25 @@
%
% \begin{macro}{\@@_backend_cm:nnnn}
% \begin{macro}{\@@_backend_cm_aux:nnnn}
-% Another split here between \texttt{pdfmode} and \texttt{(x)dvipdfmx}.
+% Another split here between \LuaTeX{}/pdfTeX{} and \texttt{dvipdfmx}/\XeTeX{}.
% In the former, we have a direct method to maintain alignment: the backend
-% can use a matrix itself. For \texttt{(x)dvipdfmx}, we can to decompose the
+% can use a matrix itself. For \texttt{dvipdfmx}/\XeTeX{}, we can to decompose the
% 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{(x)dvipdfmx}, but as a matched pair so not suitable for the
+% \texttt{dvipdfmx}/\XeTeX{}, but as a matched pair so not suitable for the
% \enquote{stand alone} transformation set up here.)
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
{
-%<*pdfmode>
+%<*luatex|pdftex>
\__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 }
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
+%</luatex|pdftex>
+%<*dvipdfmx|xetex>
\@@_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
\@@_backend_cm_aux:nnnn
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\cs_new_protected:Npn \@@_backend_cm_aux:nnnn #1#2#3#4
{
\__kernel_backend_literal:x
@@ -617,7 +617,7 @@
{ \fp_eval:n { round ( -#4 , 5 ) } }
}
}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -677,7 +677,7 @@
% way of specifying a transformation matrix exchanges where one would
% normally expect $B$ and $C$ to be.
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\cs_new_protected:Npn \@@_backend_cm_decompose:nnnnN #1#2#3#4#5
{
\use:x
@@ -720,7 +720,7 @@
{ #5 {#1} {#2} {#3} {#4} }
{ #5 {#1} {#3} {#2} {#4} }
}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -736,24 +736,24 @@
\cs_new_protected:Npn \@@_backend_box_use:Nnnnn #1#2#3#4#5
{
\__kernel_backend_scope_begin:
-%<*pdfmode>
+%<*luatex|pdftex>
\@@_backend_cm:nnnn {#2} {#3} {#4} {#5}
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
+%</luatex|pdftex>
+%<*dvipdfmx|xetex>
\__kernel_backend_literal:n
{ pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 }
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
\hbox_overlap_right:n { \box_use:N #1 }
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
\__kernel_backend_literal:n { pdf:etrans }
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
\__kernel_backend_scope_end:
}
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|pdfmode|xdvipdfmx>
+%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx
index ba3b2ed5e97..f4eeebbfcbc 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -95,10 +95,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backends}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \begin{variable}{\l_@@_graphics_attr_tl}
@@ -223,7 +223,7 @@
% \begin{macro}{\@@_backend_include_eps:n}
% \begin{variable}
% {\l_@@_backend_dir_str, \l_@@_backend_name_str, \l_@@_backend_ext_str}
-% EPS graphics may be included in \texttt{pdfmode} by conversion to
+% EPS graphics may be included in \LuaTeX{}/pdfTeX{} by conversion to
% PDF: this requires restricted shell escape. Modelled on the \pkg{epstopdf}
% \LaTeXe{} package, but simplified, conversion takes place here if we have
% shell access.
@@ -274,13 +274,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}
@@ -326,7 +326,7 @@
% \begin{macro}{\@@_backend_include_auxii:nnn, \@@_backend_include_auxii:xnn}
% \begin{macro}{\@@_backend_include_auxiii:nnn}
% The special syntax depends on the file type. There is a difference in
-% how PDF graphics are best handled between |dvipdfmx| and |xdvipdfmx|: for
+% how PDF graphics are best handled between |dvipdfmx| and \XeTeX{}: for
% the latter it is better to use the primitive route. The relevant code for
% that is included later in this file.
% \begin{macrocode}
@@ -425,13 +425,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
-% \subsection{\texttt{xdvipdfmx} backend}
+% \subsection{\XeTeX{} backend}
%
% \begin{macrocode}
-%<*xdvipdfmx>
+%<*xetex>
% \end{macrocode}
%
% \subsubsection{Images}
@@ -448,7 +448,7 @@
% \begin{macro}{\@@_backend_getbb_auxiv:nnNnn, \@@_backend_getbb_auxiv:VnNnn}
% \begin{macro}{\@@_backend_getbb_auxv:nNnn, \@@_backend_getbb_auxv:nNnn}
% \begin{macro}[EXP]{\@@_backend_getbb_pagebox:w}
-% For \texttt{xdvipdfmx}, there are two primitives that allow us to obtain
+% For \XeTeX{}, there are two primitives that allow us to obtain
% the bounding box without needing \texttt{extractbb}. The only complexity
% is passing the various minor variations to a common core process. The
% \XeTeX{} primitive omits the text |box| from the page box specification,
@@ -536,7 +536,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</xdvipdfmx>
+%</xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx
index 24e7ee2cfae..c2d0f874522 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -67,6 +67,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{TeXcolorsetspotcolor, setspotcolor}
+% Support for separation/spot colors: this strange naming is so
+% things work with the color stack.
+% \begin{macrocode}
+TeXDict begin
+/TeXcolorsetspotcolor { setcustomcolor } def
+end
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{pdf.globaldict}
% A small global dictionary for backend use.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx
index fb569f2c24c..f0f20e1b9a3 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-08-07}
+% \date{Released 2020-09-01}
%
% \maketitle
%
@@ -744,10 +744,10 @@
%</dvips>
% \end{macrocode}
%
-% \subsection{\texttt{pdfmode} backend}
+% \subsection{\LuaTeX{} and \pdfTeX{} backend}
%
% \begin{macrocode}
-%<*pdfmode>
+%<*luatex|pdftex>
% \end{macrocode}
%
% \subsubsection{Annotations}
@@ -755,28 +755,35 @@
% \begin{macro}{\@@_backend_annotation:nnnn}
% Simply pass the raw data through, just dealing with evaluation of dimensions.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_annotation:nnnn #1#2#3#4
+\cs_new_protected:Npn \@@_backend_annotation:nnnn #1#2#3#4
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D annot ~ }
- { \tex_pdfannot:D }
- width ~ \exp_not:N \dim_eval:n {#1} ~
- height ~ \exp_not:N \dim_eval:n {#2} ~
- depth ~ \exp_not:N \dim_eval:n {#3} ~
+%<*luatex>
+ \tex_pdfextension:D annot ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfannot:D
+%</pdftex>
+ width ~ \dim_eval:n {#1} ~
+ height ~ \dim_eval:n {#2} ~
+ depth ~ \dim_eval:n {#3} ~
{#4}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_annotation_last:}
-% A tiny amount of extra data gets added here.
+% 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.
% \begin{macrocode}
\cs_new:Npx \@@_backend_annotation_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastannot ~ }
- { \exp_not:N \tex_pdflastannot:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastannot
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdfannot:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -792,19 +799,25 @@
{ \@@_backend_link_begin:nnnw {#1} { goto~name } {#2} }
\cs_new_protected:Npn \@@_backend_link_begin_user:nnw #1#2
{ \@@_backend_link_begin:nnnw {#1} { user } {#2} }
-\cs_new_protected:Npx \@@_backend_link_begin:nnnw #1#2#3
+\cs_new_protected:Npn \@@_backend_link_begin:nnnw #1#2#3
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D startlink ~ }
- { \tex_pdfstartlink:D }
- attr {#1}
- #2 {#3}
+%<*luatex>
+ \tex_pdfextension:D startlink ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfstartlink:D
+%</pdftex>
+ attr {#1}
+ #2 {#3}
}
-\cs_new_protected:Npx \@@_backend_link_end:
+\cs_new_protected:Npn \@@_backend_link_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D endlink \scan_stop: }
- { \tex_pdfendlink:D }
+%<*luatex>
+ \tex_pdfextension:D endlink \scan_stop:
+%</luatex>
+%<*pdftex>
+ \tex_pdfendlink:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -817,9 +830,12 @@
\cs_new:Npx \@@_backend_link_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastlink ~ }
- { \exp_not:N \tex_pdflastlink:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastlink
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdflastlink:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -828,12 +844,15 @@
% \begin{macro}{\@@_backend_link_margin:n}
% A simple task: pass the data to the primitive.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_link_margin:n #1
+\cs_new_protected:Npn \@@_backend_link_margin:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- { \exp_not:N \tex_pdfvariable:D linkmargin }
- { \exp_not:N \tex_pdflinkmargin:D }
- \exp_not:N \dim_eval:n {#1} \scan_stop:
+%<*luatex>
+ \tex_pdfvariable:D linkmargin
+%</luatex>
+%<*pdftex>
+ \tex_pdflinkmargin:D
+%</pdftex>
+ \dim_eval:n {#1} \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -844,13 +863,16 @@
% percentage, but we need to pass it as \emph{per mille}. The rectangle
% version is also easy as everything is build in.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_destination:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+%<*luatex>
+ \tex_pdfextension:D dest ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfdest:D
+%</pdftex>
name {#1}
- \exp_not:N \str_case:nnF {#2}
+ \str_case:nnF {#2}
{
{ xyz } { xyz }
{ fit } { fit }
@@ -860,21 +882,24 @@
{ fith } { fith }
{ fitv } { fitv }
}
- { xyz ~ zoom \exp_not:N \fp_eval:n { #2 * 10 } }
+ { xyz ~ zoom \fp_eval:n { #2 * 10 } }
\scan_stop:
}
-\cs_new_protected:Npx \@@_backend_destination_box:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l_@@_internal_box {#2}
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+%<*luatex>
+ \tex_pdfextension:D dest ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfdest:D
+%</pdftex>
name {#1}
fitr ~
- width \exp_not:N \box_wd:N \l_@@_internal_box
- height \exp_not:N \box_ht:N \l_@@_internal_box
- depth \exp_not:N \box_dp:N \l_@@_internal_box
+ width \box_wd:N \l_@@_internal_box
+ height \box_ht:N \l_@@_internal_box
+ depth \box_dp:N \l_@@_internal_box
\box_use:N \l_@@_internal_box
\group_end:
}
@@ -885,19 +910,25 @@
%
% \begin{macro}{\@@_backend_catalog_gput:nn, \@@_backend_info_gput:nn}
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_catalog_gput:nn #1#2
+\cs_new_protected:Npn \@@_backend_catalog_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D catalog }
- { \tex_pdfcatalog:D }
- { / #1 ~ #2 }
+%<*luatex>
+ \tex_pdfextension:D catalog
+%</luatex>
+%<*pdftex>
+ \tex_pdfcatalog:D
+%</pdftex>
+ { / #1 ~ #2 }
}
-\cs_new_protected:Npx \@@_backend_info_gput:nn #1#2
+\cs_new_protected:Npn \@@_backend_info_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D info }
- { \tex_pdfinfo:D }
- { / #1 ~ #2 }
+%<*luatex>
+ \tex_pdfextension:D info
+%</luatex>
+%<*pdftex>
+ \tex_pdfinfo:D
+%</pdftex>
+ { / #1 ~ #2 }
}
% \end{macrocode}
% \end{macro}
@@ -916,26 +947,25 @@
% Declaring objects means reserving at the PDF level plus starting
% tracking.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1#2
- {
- \cs_new_protected:Npx \@@_backend_object_new:nn ##1##2
- {
- #1 reserveobjnum ~
- \int_const:cn
- { c_@@_backend_object_ \exp_not:N \tl_to_str:n {##1} _int }
- {#2}
- \prop_gput:Nnn \exp_not:N \g_@@_backend_object_prop {##1} {##2}
- }
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- {
- \@@_tmp:w
- { \tex_pdfextension:D obj ~ }
- { \exp_not:N \tex_pdffeedback:D lastobj }
- }
- { \@@_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } }
-\group_end:
+\cs_new_protected:Npn \@@_backend_object_new:nn #1#2
+ {
+%<*luatex>
+ \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_pdfobj:D
+%</pdftex>
+ reserveobjnum ~
+ \int_const:cn
+ { c_@@_backend_object_ \tl_to_str:n {#1} _int }
+%<*luatex>
+ { \tex_pdffeedback:D lastobj }
+%</luatex>
+%<*pdftex>
+ { \tex_pdflastobj:D }
+%</pdftex>
+ \prop_gput:Nnn \exp_not:N \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 }
% \end{macrocode}
@@ -947,36 +977,34 @@
% Writing the data needs a little information about the structure of the
% object.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new_protected:Npn \@@_backend_object_write:nn ##1##2
+\cs_new_protected:Npn \@@_backend_object_write:nn #1#2
+ {
+%<*luatex>
+ \tex_immediate:D \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_immediate:D \tex_pdfobj:D
+%</pdftex>
+ useobjnum ~
+ \int_use:c
+ { c_@@_backend_object_ \tl_to_str:n {#1} _int }
+ \str_case_e:nn
+ { \prop_item:Nn \g_@@_backend_object_prop {#1} }
{
- \tex_immediate:D #1 useobjnum ~
- \int_use:c
- { c_@@_backend_object_ \tl_to_str:n {##1} _int }
- \str_case_e:nn
- { \prop_item:Nn \g_@@_backend_object_prop {##1} }
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- file ~ { \@@_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- { \@@_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ file ~ { \@@_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ { \@@_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \@@_tmp:w { \tex_pdfextension:D obj ~ } }
- { \@@_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \@@_backend_object_write:nn { nx }
\cs_new:Npn \@@_exp_not_i:nn #1#2 { \exp_not:n {#1} }
\cs_new:Npn \@@_exp_not_ii:nn #1#2 { \exp_not:n {#2} }
@@ -987,34 +1015,31 @@
% \begin{macro}{\@@_backend_object_now:nn, \@@_backend_object_now:nx}
% Much like writing, but direct creation.
% \begin{macrocode}
-\group_begin:
- \cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new_protected:Npn \@@_backend_object_now:nn ##1##2
+\cs_new_protected:Npn \@@_backend_object_now:nn #1#2
+ {
+%<*luatex>
+ \tex_immediate:D \tex_pdfextension:D obj ~
+%</luatex>
+%<*pdftex>
+ \tex_immediate:D \tex_pdfobj:D
+%</pdftex>
+ \str_case:nn
+ {#1}
{
- \tex_immediate:D #1
- \str_case:nn
- {##1}
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- file ~ { \@@_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~
- { \@@_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ file ~ { \@@_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~
+ { \@@_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \@@_tmp:w { \tex_pdfextension:D obj ~ } }
- { \@@_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \@@_backend_object_now:nn { nx }
% \end{macrocode}
% \end{macro}
@@ -1025,23 +1050,29 @@
\cs_new:Npx \@@_backend_object_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastobj ~ }
- { \exp_not:N \tex_pdflastobj:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D lastobj ~
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdflastobj:D
+%</pdftex>
\c_space_tl 0 ~ R
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n}
-% The usual wrapper situation.
+% The usual wrapper situation; the three spaces here are essential.
% \begin{macrocode}
\cs_new:Npx \@@_backend_pageobject_ref:n #1
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D pageref }
- { \exp_not:N \tex_pdfpageref:D }
+%<*luatex>
+ \exp_not:N \tex_pdffeedback:D pageref
+%</luatex>
+%<*pdftex>
+ \exp_not:N \tex_pdfpageref:D
+%</pdftex>
\c_space_tl #1 \c_space_tl \c_space_tl \c_space_tl 0 ~ R
}
% \end{macrocode}
@@ -1054,13 +1085,16 @@
% \begin{macro}{\@@_backend_objcompresslevel:n}
% Simply pass data to the engine.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_backend_compresslevel:n #1
+\cs_new_protected:Npn \@@_backend_compresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfcompresslevel:D
- { \tex_pdfcompresslevel:D }
- { \tex_pdfvariable:D compresslevel }
- \exp_not:N \int_value:w \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D compresslevel
+%</luatex>
+%<*pdftex>
+ \tex_pdfcompresslevel:D
+%</pdftex>
+ \int_value:w \int_eval:n {#1} \scan_stop:
}
\cs_new_protected:Npn \@@_backend_compress_objects:n #1
{
@@ -1068,13 +1102,16 @@
{ \@@_backend_objcompresslevel:n { 2 } }
{ \@@_backend_objcompresslevel:n { 0 } }
}
-\cs_new_protected:Npx \@@_backend_objcompresslevel:n #1
+\cs_new_protected:Npn \@@_backend_objcompresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfobjcompresslevel:D
- { \tex_pdfobjcompresslevel:D }
- { \tex_pdfvariable:D objcompresslevel }
- #1 \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D objcompresslevel
+%</luatex>
+%<*pdftex>
+ \tex_pdfobjcompresslevel:D
+%</pdftex>
+ #1 \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -1083,61 +1120,65 @@
%
% \begin{macro}
% {\@@_backend_version_major_gset:n, \@@_backend_version_minor_gset:n}
-% At present, we don't have a primitive for the major version in \pdfTeX{},
-% but we anticipate one \ldots
+% The availability of the primitive is not universal, so we have to test
+% at load time.
% \begin{macrocode}
\cs_new_protected:Npx \@@_backend_version_major_gset:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
+%<*luatex>
+ \int_compare:nNnT \tex_luatexversion:D > { 106 }
{
- \int_compare:nNnT \tex_luatexversion:D > { 106 }
- {
- \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
+ \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
+ \exp_not:N \int_eval:n {#1} \scan_stop:
}
+%</luatex>
+%<*pdftex>
+ \cs_if_exist:NT \tex_pdfmajorversion:D
{
- \cs_if_exist:NT \tex_pdfmajorversion:D
- {
- \exp_not:N \tex_global:D \tex_pdfmajorversion:D
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
+ \exp_not:N \tex_global:D \tex_pdfmajorversion:D
+ \exp_not:N \int_eval:n {#1} \scan_stop:
}
+%</pdftex>
}
-\cs_new_protected:Npx \@@_backend_version_minor_gset:n #1
+\cs_new_protected:Npn \@@_backend_version_minor_gset:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
- \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+%<*luatex>
+ \tex_pdfvariable:D minorversion
+%</luatex>
+%<*pdftex>
+ \tex_pdfminorversion:D
+%</pdftex>
+ \int_eval:n {#1} \scan_stop:
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_version_major:, \@@_backend_version_minor:}
-% At present, we don't have a primitive for the major version!
+% As above.
% \begin{macrocode}
\cs_new:Npx \@@_backend_version_major:
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- {
- \int_compare:nNnTF \tex_luatexversion:D > { 106 }
- { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
- { 1 }
- }
- {
- \cs_if_exist:NTF \tex_pdfmajorversion:D
- { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
- { 1 }
- }
+%<*luatex>
+ \int_compare:nNnTF \tex_luatexversion:D > { 106 }
+ { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
+ { 1 }
+%</luatex>
+%<*pdftex>
+ \cs_if_exist:NTF \tex_pdfmajorversion:D
+ { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
+ { 1 }
+%</pdftex>
}
-\cs_new:Npx \@@_backend_version_minor:
+\cs_new:Npn \@@_backend_version_minor:
{
- \exp_not:N \tex_the:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
+ \tex_the:D
+%<*luatex>
+ \tex_pdfvariable:D minorversion
+%</luatex>
+%<*pdftex>
+ \tex_pdfminorversion:D
+%</pdftex>
}
% \end{macrocode}
% \end{macro}
@@ -1158,13 +1199,13 @@
% \end{macro}
%
% \begin{macrocode}
-%</pdfmode>
+%</luatex|pdftex>
% \end{macrocode}
%
% \subsection{\texttt{dvipdfmx} backend}
%
% \begin{macrocode}
-%<*dvipdfmx|xdvipdfmx>
+%<*dvipdfmx|xetex>
% \end{macrocode}
%
% \begin{macro}{\@@_backend:n, \@@_backend:x}
@@ -1290,7 +1331,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n}
-% Page references are easy in \texttt{(x)dvipdfmx}.
+% Page references are easy in \texttt{dvipdfmx}/\XeTeX{}.
% \begin{macrocode}
\cs_new:Npn \@@_backend_pageobject_ref:n #1
{ @page #1 }
@@ -1300,7 +1341,7 @@
% \subsubsection{Annotations}
%
% \begin{variable}{\g_@@_landscape_bool}
-% There is a bug in \texttt{(x)dvipdfmx} which means annotations do
+% There is a bug in \texttt{dvipdfmx}/\XeTeX{} which means annotations do
% not rotate. As such, we need to know if landscape is active.
% \begin{macrocode}
\bool_new:N \g_@@_landscape_bool
@@ -1524,7 +1565,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</dvipdfmx|xdvipdfmx>
+%</dvipdfmx|xetex>
% \end{macrocode}
%
% \subsection{\texttt{dvisvgm} backend}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend.ins b/Master/texmf-dist/source/latex/l3backend/l3backend.ins
index 1c5289b1165..3babb97da13 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend.ins
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend.ins
@@ -96,26 +96,38 @@ and all files in that bundle must be distributed together.
}
\generate
{
- \file{l3backend-pdfmode.def}
+ \file{l3backend-luatex.def}
{
- \from{l3backend-basics.dtx} {package,pdfmode}
- \from{l3backend-color.dtx} {package,pdfmode}
- \from{l3backend-box.dtx} {package,pdfmode}
- \from{l3backend-draw.dtx} {package,pdfmode}
- \from{l3backend-graphics.dtx}{package,pdfmode}
- \from{l3backend-pdf.dtx} {package,pdfmode}
+ \from{l3backend-basics.dtx} {package,luatex}
+ \from{l3backend-color.dtx} {package,luatex}
+ \from{l3backend-box.dtx} {package,luatex}
+ \from{l3backend-draw.dtx} {package,luatex}
+ \from{l3backend-graphics.dtx}{package,luatex}
+ \from{l3backend-pdf.dtx} {package,luatex}
}
}
\generate
{
- \file{l3backend-xdvipdfmx.def}
+ \file{l3backend-pdftex.def}
{
- \from{l3backend-basics.dtx} {package,xdvipdfmx}
- \from{l3backend-color.dtx} {package,xdvipdfmx}
- \from{l3backend-box.dtx} {package,xdvipdfmx}
- \from{l3backend-draw.dtx} {package,xdvipdfmx}
- \from{l3backend-graphics.dtx}{package,xdvipdfmx}
- \from{l3backend-pdf.dtx} {package,xdvipdfmx}
+ \from{l3backend-basics.dtx} {package,pdftex}
+ \from{l3backend-color.dtx} {package,pdftex}
+ \from{l3backend-box.dtx} {package,pdftex}
+ \from{l3backend-draw.dtx} {package,pdftex}
+ \from{l3backend-graphics.dtx}{package,pdftex}
+ \from{l3backend-pdf.dtx} {package,pdftex}
+ }
+ }
+\generate
+ {
+ \file{l3backend-xetex.def}
+ {
+ \from{l3backend-basics.dtx} {package,xetex}
+ \from{l3backend-color.dtx} {package,xetex}
+ \from{l3backend-box.dtx} {package,xetex}
+ \from{l3backend-draw.dtx} {package,xetex}
+ \from{l3backend-graphics.dtx}{package,xetex}
+ \from{l3backend-pdf.dtx} {package,xetex}
}
}
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
index f03b3c7b345..54c4b43301d 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
@@ -25,8 +25,22 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvipdfmx.def}{2020-08-07}{}
+ {l3backend-dvipdfmx.def}{2020-09-01}{}
{L3 backend support: dvipdfmx}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-dvipdfmx.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
{ \__kernel_backend_literal:e { \exp_not:n {#1} } }
@@ -41,6 +55,15 @@
\cs_new_protected:Npn \__kernel_backend_scope_end:
{ \__kernel_backend_literal:n { x:grestore } }
%% File: l3backend-color.dtx
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \__color_backend_reset:
+ }
+\cs_new_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n
+\cs_new_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n
+\cs_new_protected:Npn \__color_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
\cs_new_protected:Npn \__color_backend_pickup:N #1 { }
\cs_if_exist:cT { ver@color.sty }
{
@@ -62,21 +85,59 @@
\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
{ \tl_set:Nn #3 { {#1} {#2} } }
}
-\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
- { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select_gray:n #1
- { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select_rgb:n #1
- { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select:n #1
- {
- \__kernel_backend_literal:n { color~push~ #1 }
- \group_insert_after:N \__color_backend_reset:
- }
-\cs_new_protected:Npn \__color_backend_reset:
- { \__kernel_backend_literal:n { color~pop } }
\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
- { \__color_backend_select:n {#1} }
+ { \__color_backend_select:n { @#1 ~ [#2] } }
+\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \__color_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
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init:n #1
+ {
+ \__kernel_backend_literal:x
+ {
+ pdf:obj ~ @ color \int_use:N \g__color_separation_int \c_space_tl
+ [#1]
+ }
+ }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+ {
+ \__color_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { __color_illuminant_cielab_ #1 } }
+ { \c__color_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1
+ {
+ \pdf_object_new:nn { __color_illuminant_cielab_ #1 } { array }
+ \pdf_object_write:nx { __color_illuminant_cielab_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c__color_model_whitepoint_cielab_ #1 _tl } ]
+ /Range ~ [ \c__color_model_range_lab_tl ]
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_new:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:n #1 { } }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
{ \__kernel_backend_literal_pdf:n { #1 ~ k } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
index 1a638ce9abb..7065ad419dd 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
@@ -25,8 +25,22 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvips.def}{2020-08-07}{}
+ {l3backend-dvips.def}{2020-09-01}{}
{L3 backend support: dvips}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-dvips.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
{ \__kernel_backend_literal:e { \exp_not:n {#1} } }
@@ -37,15 +51,13 @@
\cs_new_protected:Npn \__kernel_backend_postscript:n #1
{ \__kernel_backend_literal:n { ps: SDict ~ begin ~ #1 ~ end } }
\cs_generate_variant:Nn \__kernel_backend_postscript:n { x }
-\cs_if_exist:NTF \AtBeginDvi
- { \AtBeginDvi }
- { \use:n }
- {
- \bool_lazy_and:nnT
- { \cs_if_exist_p:N \g__kernel_backend_header_bool }
- { \g__kernel_backend_header_bool }
+\bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
{ \__kernel_backend_literal:n { header = l3backend-dvips.pro } }
- }
+ }
\cs_new_protected:Npn \__kernel_backend_align_begin:
{
\__kernel_backend_literal:n { ps::[begin] }
@@ -99,7 +111,40 @@
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_backend_literal:n { color~pop } }
\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
- { \__color_backend_select:n {#1} }
+ { \__color_backend_select:n { setspotcolor ~ #1 ~ #2 } }
+\cs_new_protected:Npx \__color_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \bool_if:NT \g__kernel_backend_header_bool
+ {
+ \cs_if_exist:NTF \AtBeginDvi
+ { \AtBeginDvi }
+ { \use:n }
+ {
+ \exp_not:N \__color_backend_separation_init:nnn
+ {#1} {#2} {#5}
+ }
+ }
+ }
+\cs_new_protected:Npn \__color_backend_separation_init:nnn #1#2#3
+ {
+ \__kernel_backend_literal:e
+ {
+ !
+ TeXDict ~ begin ~
+ /color \int_use:N \g__color_separation_int \c_space_tl
+ [#3] ~ aload ~ pop ~ ( \str_convert_pdfname:n {#1} ) ~
+ find \__color_backend_separation_init:n {#2} customcolor ~ def ~
+ end
+ }
+ }
+\cs_new:Npn \__color_backend_separation_init:n #1
+ {
+ \__color_backend_separation_init:w #1 /Device #1 /Device \s__color_stop
+ }
+\cs_new:Npn \__color_backend_separation_init:w #1 /Device #2 /Device #3 \s__color_stop
+ { \str_lowercase:n {#2} }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1 { }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
{ \__kernel_backend_postscript:n { /color.fc { #1 ~ setcmykcolor } def } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
index 007c597b7ab..fed3c0d3721 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
@@ -25,8 +25,22 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvisvgm.def}{2020-08-07}{}
+ {l3backend-dvisvgm.def}{2020-09-01}{}
{L3 backend support: dvisvgm}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-dvisvgm.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
{ \__kernel_backend_literal:e { \exp_not:n {#1} } }
@@ -106,8 +120,10 @@
}
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_backend_literal:n { color~pop } }
-\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
- { \__color_backend_select:n {#1} }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2 { }
+\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1 { }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
{ \__color_backend_cmyk:nw { fill } #1 \s__color_stop }
\cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
index b811d5f7301..309dfca33cf 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
@@ -1,15 +1,15 @@
%%
-%% This is file `l3backend-pdfmode.def',
+%% This is file `l3backend-luatex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
-%% l3backend-basics.dtx (with options: `package,pdfmode')
-%% l3backend-color.dtx (with options: `package,pdfmode')
-%% l3backend-box.dtx (with options: `package,pdfmode')
-%% l3backend-draw.dtx (with options: `package,pdfmode')
-%% l3backend-graphics.dtx (with options: `package,pdfmode')
-%% l3backend-pdf.dtx (with options: `package,pdfmode')
+%% l3backend-basics.dtx (with options: `package,luatex')
+%% l3backend-color.dtx (with options: `package,luatex')
+%% l3backend-box.dtx (with options: `package,luatex')
+%% l3backend-draw.dtx (with options: `package,luatex')
+%% l3backend-graphics.dtx (with options: `package,luatex')
+%% l3backend-pdf.dtx (with options: `package,luatex')
%%
%% Copyright (C) 1990-2020 The LaTeX3 Project
%%
@@ -25,46 +25,49 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-pdfmode.def}{2020-08-07}{}
- {L3 backend support: PDF mode}
+ {l3backend-luatex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (LuaTeX)}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-luatex.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
{ \__kernel_backend_literal:e { \exp_not:n {#1} } }
\cs_generate_variant:Nn \__kernel_backend_literal:n { x }
-\cs_new_protected:Npx \__kernel_backend_literal_pdf:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal }
- { \tex_pdfliteral:D }
- { \exp_not:N \exp_not:n {#1} }
+ \tex_pdfextension:D literal
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x }
-\cs_new_protected:Npx \__kernel_backend_literal_page:n #1
+\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D literal ~ }
- { \tex_pdfliteral:D }
- page
- { \exp_not:N \exp_not:n {#1} }
+ \tex_pdfextension:D literal ~
+ page { \exp_not:n {#1} }
}
-\cs_new_protected:Npx \__kernel_backend_scope_begin:
+\cs_new_protected:Npn \__kernel_backend_scope_begin:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D save \scan_stop: }
- { \tex_pdfsave:D }
+ \tex_pdfextension:D save \scan_stop:
}
-\cs_new_protected:Npx \__kernel_backend_scope_end:
+\cs_new_protected:Npn \__kernel_backend_scope_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D restore \scan_stop: }
- { \tex_pdfrestore:D }
+ \tex_pdfextension:D restore \scan_stop:
}
-\cs_new_protected:Npx \__kernel_backend_matrix:n #1
+\cs_new_protected:Npn \__kernel_backend_matrix:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D setmatrix }
- { \tex_pdfsetmatrix:D }
- { \exp_not:N \exp_not:n {#1} }
+ \tex_pdfextension:D setmatrix
+ { \exp_not:n {#1} }
}
\cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
%% File: l3backend-color.dtx
@@ -107,23 +110,73 @@
{ \__color_backend_select:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \__color_backend_select_rgb:n #1
{ \__color_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
-\cs_new_protected:Npx \__color_backend_select:n #1
+\cs_new_protected:Npn \__color_backend_select:n #1
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int push {#1}
- \group_insert_after:N \exp_not:N \__color_backend_reset:
+ \tex_pdfextension:D colorstack
+ \l__kernel_color_stack_int push {#1}
+ \group_insert_after:N \__color_backend_reset:
}
-\cs_new_protected:Npx \__color_backend_reset:
+\cs_new_protected:Npn \__color_backend_reset:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D colorstack }
- { \tex_pdfcolorstack:D }
- \exp_not:N \l__kernel_color_stack_int pop \scan_stop:
+ \tex_pdfextension:D colorstack
+ \l__kernel_color_stack_int pop \scan_stop:
}
\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
{ \__color_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
+\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \__color_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
+ >>
+ }
+ \use:x
+ {
+ \pdfcoredict_gput:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_separation_int }
+ { \pdf_object_last: }
+ }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init:n #1
+ {
+ \pdf_object_now:nx { array } {#1}
+ }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+ {
+ \__color_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { __color_illuminant_cielab_ #1 } }
+ { \c__color_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1
+ {
+ \pdf_object_new:nn { __color_illuminant_cielab_ #1 } { array }
+ \pdf_object_write:nx { __color_illuminant_cielab_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c__color_model_whitepoint_cielab_ #1 _tl } ]
+ /Range ~ [ \c__color_model_range_lab_tl ]
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_new:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:n #1 { } }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
{ \__kernel_backend_literal_pdf:n { #1 ~ k } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
@@ -415,64 +468,50 @@
}
%% File: l3backend-pdf.dtx
\box_new:N \l__pdf_internal_box
-\cs_new_protected:Npx \__pdf_backend_annotation:nnnn #1#2#3#4
- {
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D annot ~ }
- { \tex_pdfannot:D }
- width ~ \exp_not:N \dim_eval:n {#1} ~
- height ~ \exp_not:N \dim_eval:n {#2} ~
- depth ~ \exp_not:N \dim_eval:n {#3} ~
+\cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4
+ {
+ \tex_pdfextension:D annot ~
+ width ~ \dim_eval:n {#1} ~
+ height ~ \dim_eval:n {#2} ~
+ depth ~ \dim_eval:n {#3} ~
{#4}
}
\cs_new:Npx \__pdf_backend_annotation_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastannot ~ }
- { \exp_not:N \tex_pdflastannot:D }
+ \exp_not:N \tex_pdffeedback:D lastannot
\c_space_tl 0 ~ R
}
\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2
{ \__pdf_backend_link_begin:nnnw {#1} { goto~name } {#2} }
\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2
{ \__pdf_backend_link_begin:nnnw {#1} { user } {#2} }
-\cs_new_protected:Npx \__pdf_backend_link_begin:nnnw #1#2#3
+\cs_new_protected:Npn \__pdf_backend_link_begin:nnnw #1#2#3
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D startlink ~ }
- { \tex_pdfstartlink:D }
- attr {#1}
- #2 {#3}
+ \tex_pdfextension:D startlink ~
+ attr {#1}
+ #2 {#3}
}
-\cs_new_protected:Npx \__pdf_backend_link_end:
+\cs_new_protected:Npn \__pdf_backend_link_end:
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D endlink \scan_stop: }
- { \tex_pdfendlink:D }
+ \tex_pdfextension:D endlink \scan_stop:
}
\cs_new:Npx \__pdf_backend_link_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastlink ~ }
- { \exp_not:N \tex_pdflastlink:D }
+ \exp_not:N \tex_pdffeedback:D lastlink
\c_space_tl 0 ~ R
}
-\cs_new_protected:Npx \__pdf_backend_link_margin:n #1
+\cs_new_protected:Npn \__pdf_backend_link_margin:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- { \exp_not:N \tex_pdfvariable:D linkmargin }
- { \exp_not:N \tex_pdflinkmargin:D }
- \exp_not:N \dim_eval:n {#1} \scan_stop:
+ \tex_pdfvariable:D linkmargin
+ \dim_eval:n {#1} \scan_stop:
}
-\cs_new_protected:Npx \__pdf_backend_destination:nn #1#2
+\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+ \tex_pdfextension:D dest ~
name {#1}
- \exp_not:N \str_case:nnF {#2}
+ \str_case:nnF {#2}
{
{ xyz } { xyz }
{ fit } { fit }
@@ -482,146 +521,108 @@
{ fith } { fith }
{ fitv } { fitv }
}
- { xyz ~ zoom \exp_not:N \fp_eval:n { #2 * 10 } }
+ { xyz ~ zoom \fp_eval:n { #2 * 10 } }
\scan_stop:
}
-\cs_new_protected:Npx \__pdf_backend_destination_box:nn #1#2
+\cs_new_protected:Npn \__pdf_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l__pdf_internal_box {#2}
- \cs_if_exist:NTF \tex_pdfextension:D
- { \exp_not:N \tex_pdfextension:D dest ~ }
- { \exp_not:N \tex_pdfdest:D }
+ \tex_pdfextension:D dest ~
name {#1}
fitr ~
- width \exp_not:N \box_wd:N \l__pdf_internal_box
- height \exp_not:N \box_ht:N \l__pdf_internal_box
- depth \exp_not:N \box_dp:N \l__pdf_internal_box
+ width \box_wd:N \l__pdf_internal_box
+ height \box_ht:N \l__pdf_internal_box
+ depth \box_dp:N \l__pdf_internal_box
\box_use:N \l__pdf_internal_box
\group_end:
}
-\cs_new_protected:Npx \__pdf_backend_catalog_gput:nn #1#2
+\cs_new_protected:Npn \__pdf_backend_catalog_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D catalog }
- { \tex_pdfcatalog:D }
- { / #1 ~ #2 }
+ \tex_pdfextension:D catalog
+ { / #1 ~ #2 }
}
-\cs_new_protected:Npx \__pdf_backend_info_gput:nn #1#2
+\cs_new_protected:Npn \__pdf_backend_info_gput:nn #1#2
{
- \cs_if_exist:NTF \tex_pdfextension:D
- { \tex_pdfextension:D info }
- { \tex_pdfinfo:D }
- { / #1 ~ #2 }
+ \tex_pdfextension:D info
+ { / #1 ~ #2 }
}
\prop_new:N \g__pdf_backend_object_prop
-\group_begin:
- \cs_set_protected:Npn \__pdf_tmp:w #1#2
- {
- \cs_new_protected:Npx \__pdf_backend_object_new:nn ##1##2
- {
- #1 reserveobjnum ~
- \int_const:cn
- { c__pdf_backend_object_ \exp_not:N \tl_to_str:n {##1} _int }
- {#2}
- \prop_gput:Nnn \exp_not:N \g__pdf_backend_object_prop {##1} {##2}
- }
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- {
- \__pdf_tmp:w
- { \tex_pdfextension:D obj ~ }
- { \exp_not:N \tex_pdffeedback:D lastobj }
- }
- { \__pdf_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } }
-\group_end:
+\cs_new_protected:Npn \__pdf_backend_object_new:nn #1#2
+ {
+ \tex_pdfextension:D obj ~
+ reserveobjnum ~
+ \int_const:cn
+ { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
+ { \tex_pdffeedback:D lastobj }
+ \prop_gput:Nnn \exp_not:N \g__pdf_backend_object_prop {#1} {#2}
+ }
\cs_new:Npn \__pdf_backend_object_ref:n #1
{ \int_use:c { c__pdf_backend_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
-\group_begin:
- \cs_set_protected:Npn \__pdf_tmp:w #1
- {
- \cs_new_protected:Npn \__pdf_backend_object_write:nn ##1##2
+\cs_new_protected:Npn \__pdf_backend_object_write:nn #1#2
+ {
+ \tex_immediate:D \tex_pdfextension:D obj ~
+ useobjnum ~
+ \int_use:c
+ { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
+ \str_case_e:nn
+ { \prop_item:Nn \g__pdf_backend_object_prop {#1} }
{
- \tex_immediate:D #1 useobjnum ~
- \int_use:c
- { c__pdf_backend_object_ \tl_to_str:n {##1} _int }
- \str_case_e:nn
- { \prop_item:Nn \g__pdf_backend_object_prop {##1} }
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \__pdf_exp_not_i:nn ##2 } ~
- file ~ { \__pdf_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \__pdf_exp_not_i:nn ##2 } ~
- { \__pdf_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ file ~ { \__pdf_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ { \__pdf_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \__pdf_tmp:w { \tex_pdfextension:D obj ~ } }
- { \__pdf_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \__pdf_backend_object_write:nn { nx }
\cs_new:Npn \__pdf_exp_not_i:nn #1#2 { \exp_not:n {#1} }
\cs_new:Npn \__pdf_exp_not_ii:nn #1#2 { \exp_not:n {#2} }
-\group_begin:
- \cs_set_protected:Npn \__pdf_tmp:w #1
- {
- \cs_new_protected:Npn \__pdf_backend_object_now:nn ##1##2
+\cs_new_protected:Npn \__pdf_backend_object_now:nn #1#2
+ {
+ \tex_immediate:D \tex_pdfextension:D obj ~
+ \str_case:nn
+ {#1}
{
- \tex_immediate:D #1
- \str_case:nn
- {##1}
- {
- { array } { { [ ~ \exp_not:n {##2} ~ ] } }
- { dict } { { << ~ \exp_not:n {##2} ~ >> } }
- { fstream }
- {
- stream ~ attr ~ { \__pdf_exp_not_i:nn ##2 } ~
- file ~ { \__pdf_exp_not_ii:nn ##2 }
- }
- { stream }
- {
- stream ~ attr ~ { \__pdf_exp_not_i:nn ##2 } ~
- { \__pdf_exp_not_ii:nn ##2 }
- }
- }
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ file ~ { \__pdf_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ { \__pdf_exp_not_ii:nn #2 }
+ }
}
- }
- \cs_if_exist:NTF \tex_pdfextension:D
- { \__pdf_tmp:w { \tex_pdfextension:D obj ~ } }
- { \__pdf_tmp:w { \tex_pdfobj:D } }
-\group_end:
+ }
\cs_generate_variant:Nn \__pdf_backend_object_now:nn { nx }
\cs_new:Npx \__pdf_backend_object_last:
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D lastobj ~ }
- { \exp_not:N \tex_pdflastobj:D }
+ \exp_not:N \tex_pdffeedback:D lastobj ~
\c_space_tl 0 ~ R
}
\cs_new:Npx \__pdf_backend_pageobject_ref:n #1
{
\exp_not:N \int_value:w
- \cs_if_exist:NTF \tex_pdffeedback:D
- { \exp_not:N \tex_pdffeedback:D pageref }
- { \exp_not:N \tex_pdfpageref:D }
+ \exp_not:N \tex_pdffeedback:D pageref
\c_space_tl #1 \c_space_tl \c_space_tl \c_space_tl 0 ~ R
}
-\cs_new_protected:Npx \__pdf_backend_compresslevel:n #1
+\cs_new_protected:Npn \__pdf_backend_compresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfcompresslevel:D
- { \tex_pdfcompresslevel:D }
- { \tex_pdfvariable:D compresslevel }
- \exp_not:N \int_value:w \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+ \tex_pdfvariable:D compresslevel
+ \int_value:w \int_eval:n {#1} \scan_stop:
}
\cs_new_protected:Npn \__pdf_backend_compress_objects:n #1
{
@@ -629,60 +630,36 @@
{ \__pdf_backend_objcompresslevel:n { 2 } }
{ \__pdf_backend_objcompresslevel:n { 0 } }
}
-\cs_new_protected:Npx \__pdf_backend_objcompresslevel:n #1
+\cs_new_protected:Npn \__pdf_backend_objcompresslevel:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfobjcompresslevel:D
- { \tex_pdfobjcompresslevel:D }
- { \tex_pdfvariable:D objcompresslevel }
- #1 \scan_stop:
+ \tex_global:D
+ \tex_pdfvariable:D objcompresslevel
+ #1 \scan_stop:
}
\cs_new_protected:Npx \__pdf_backend_version_major_gset:n #1
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- {
- \int_compare:nNnT \tex_luatexversion:D > { 106 }
- {
- \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
- }
+ \int_compare:nNnT \tex_luatexversion:D > { 106 }
{
- \cs_if_exist:NT \tex_pdfmajorversion:D
- {
- \exp_not:N \tex_global:D \tex_pdfmajorversion:D
- \exp_not:N \int_eval:n {#1} \scan_stop:
- }
+ \exp_not:N \tex_global:D \tex_pdfvariable:D majorversion
+ \exp_not:N \int_eval:n {#1} \scan_stop:
}
}
-\cs_new_protected:Npx \__pdf_backend_version_minor_gset:n #1
+\cs_new_protected:Npn \__pdf_backend_version_minor_gset:n #1
{
- \exp_not:N \tex_global:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
- \exp_not:N \int_eval:n {#1} \scan_stop:
+ \tex_global:D
+ \tex_pdfvariable:D minorversion
+ \int_eval:n {#1} \scan_stop:
}
\cs_new:Npx \__pdf_backend_version_major:
{
- \cs_if_exist:NTF \tex_pdfvariable:D
- {
- \int_compare:nNnTF \tex_luatexversion:D > { 106 }
- { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
- { 1 }
- }
- {
- \cs_if_exist:NTF \tex_pdfmajorversion:D
- { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
- { 1 }
- }
+ \int_compare:nNnTF \tex_luatexversion:D > { 106 }
+ { \exp_not:N \tex_the:D \tex_pdfvariable:D majorversion }
+ { 1 }
}
-\cs_new:Npx \__pdf_backend_version_minor:
+\cs_new:Npn \__pdf_backend_version_minor:
{
- \exp_not:N \tex_the:D
- \cs_if_exist:NTF \tex_pdfminorversion:D
- { \exp_not:N \tex_pdfminorversion:D }
- { \tex_pdfvariable:D minorversion }
+ \tex_the:D
+ \tex_pdfvariable:D minorversion
}
\cs_new_protected:Npn \__pdf_backend_bdc:nn #1#2
{ \__kernel_backend_literal_page:n { /#1 ~ #2 ~ BDC } }
@@ -690,4 +667,4 @@
{ \__kernel_backend_literal_page:n { EMC } }
%%
%%
-%% End of file `l3backend-pdfmode.def'.
+%% End of file `l3backend-luatex.def'.
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
new file mode 100644
index 00000000000..1307f33a12c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
@@ -0,0 +1,670 @@
+%%
+%% This is file `l3backend-pdftex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3backend-basics.dtx (with options: `package,pdftex')
+%% l3backend-color.dtx (with options: `package,pdftex')
+%% l3backend-box.dtx (with options: `package,pdftex')
+%% l3backend-draw.dtx (with options: `package,pdftex')
+%% l3backend-graphics.dtx (with options: `package,pdftex')
+%% l3backend-pdf.dtx (with options: `package,pdftex')
+%%
+%% Copyright (C) 1990-2020 The LaTeX3 Project
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% https://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3backend bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: l3backend-basics.dtx
+\ProvidesExplFile
+ {l3backend-pdftex.def}{2020-09-01}{}
+ {L3 backend support: PDF output (pdfTeX)}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-pdftex.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
+\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
+\cs_new_protected:Npn \__kernel_backend_literal:n #1
+ { \__kernel_backend_literal:e { \exp_not:n {#1} } }
+\cs_generate_variant:Nn \__kernel_backend_literal:n { x }
+\cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1
+ {
+ \tex_pdfliteral:D
+ { \exp_not:n {#1} }
+ }
+\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x }
+\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
+ {
+ \tex_pdfliteral:D
+ page { \exp_not:n {#1} }
+ }
+\cs_new_protected:Npn \__kernel_backend_scope_begin:
+ {
+ \tex_pdfsave:D
+ }
+\cs_new_protected:Npn \__kernel_backend_scope_end:
+ {
+ \tex_pdfrestore:D
+ }
+\cs_new_protected:Npn \__kernel_backend_matrix:n #1
+ {
+ \tex_pdfsetmatrix:D
+ { \exp_not:n {#1} }
+ }
+\cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
+%% File: l3backend-color.dtx
+\cs_new_protected:Npn \__color_backend_pickup:N #1 { }
+\cs_if_exist:cT { ver@color.sty }
+ {
+ \cs_set_protected:Npn \__color_backend_pickup:N #1
+ {
+ \exp_last_unbraced:Nx \__color_backend_pickup:w
+ { \current@color } ~ 0 ~ 0 ~ 0 \s__color_stop #1
+ }
+ \cs_new_protected:Npn \__color_backend_pickup:w
+ #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7
+ {
+ \str_if_eq:nnTF {#2} { g }
+ { \tl_set:Nn #7 { { gray } {#1} } }
+ {
+ \str_if_eq:nnTF {#4} { rg }
+ { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
+ {
+ \str_if_eq:nnTF {#5} { k }
+ { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
+ {
+ \str_if_eq:nnTF {#2} { cs }
+ {
+ \tl_set:Nx #7 { { \use:n #1 } { #5 } }
+ }
+ {
+ \tl_set:Nn #7 { { gray } { 0 } }
+ }
+ }
+ }
+ }
+ }
+ }
+\int_new:N \l__kernel_color_stack_int
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
+ { \__color_backend_select:n { #1 ~ k ~ #1 ~ K } }
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
+ { \__color_backend_select:n { #1 ~ g ~ #1 ~ G } }
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
+ { \__color_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
+\cs_new_protected:Npn \__color_backend_select:n #1
+ {
+ \tex_pdfcolorstack:D
+ \l__kernel_color_stack_int push {#1}
+ \group_insert_after:N \__color_backend_reset:
+ }
+\cs_new_protected:Npn \__color_backend_reset:
+ {
+ \tex_pdfcolorstack:D
+ \l__kernel_color_stack_int pop \scan_stop:
+ }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+ { \__color_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
+\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \__color_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
+ >>
+ }
+ \use:x
+ {
+ \pdfcoredict_gput:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_separation_int }
+ { \pdf_object_last: }
+ }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init:n #1
+ {
+ \pdf_object_now:nx { array } {#1}
+ }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+ {
+ \__color_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { __color_illuminant_cielab_ #1 } }
+ { \c__color_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1
+ {
+ \pdf_object_new:nn { __color_illuminant_cielab_ #1 } { array }
+ \pdf_object_write:nx { __color_illuminant_cielab_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c__color_model_whitepoint_cielab_ #1 _tl } ]
+ /Range ~ [ \c__color_model_range_lab_tl ]
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_new:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:n #1 { } }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ k } }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ g } }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ rg } }
+ \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ K } }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ G } }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+ { \__kernel_backend_literal_pdf:n { #1 ~ RG } }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+ { \__kernel_backend_literal_pdf:n { /#1 ~ cs ~ #2 ~ scn } }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+ { \__kernel_backend_literal_pdf:n { /#1 ~ CS ~ #2 ~ SCN } }
+%% File: l3backend-box.dtx
+\cs_new_protected:Npn \__box_backend_clip:N #1
+ {
+ \__kernel_backend_scope_begin:
+ \__kernel_backend_literal_pdf:x
+ {
+ 0~
+ \dim_to_decimal_in_bp:n { -\box_dp:N #1 } ~
+ \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~
+ \dim_to_decimal_in_bp:n { \box_ht:N #1 + \box_dp:N #1 } ~
+ re~W~n
+ }
+ \hbox_overlap_right:n { \box_use:N #1 }
+ \__kernel_backend_scope_end:
+ \skip_horizontal:n { \box_wd:N #1 }
+ }
+\cs_new_protected:Npn \__box_backend_rotate:Nn #1#2
+ { \exp_args:NNf \__box_backend_rotate_aux:Nn #1 { \fp_eval:n {#2} } }
+\cs_new_protected:Npn \__box_backend_rotate_aux:Nn #1#2
+ {
+ \__kernel_backend_scope_begin:
+ \box_set_wd:Nn #1 { 0pt }
+ \fp_set:Nn \l__box_backend_cos_fp { round ( cosd ( #2 ) , 5 ) }
+ \fp_compare:nNnT \l__box_backend_cos_fp = \c_zero_fp
+ { \fp_zero:N \l__box_backend_cos_fp }
+ \fp_set:Nn \l__box_backend_sin_fp { round ( sind ( #2 ) , 5 ) }
+ \__kernel_backend_matrix:x
+ {
+ \fp_use:N \l__box_backend_cos_fp \c_space_tl
+ \fp_compare:nNnTF \l__box_backend_sin_fp = \c_zero_fp
+ { 0~0 }
+ {
+ \fp_use:N \l__box_backend_sin_fp
+ \c_space_tl
+ \fp_eval:n { -\l__box_backend_sin_fp }
+ }
+ \c_space_tl
+ \fp_use:N \l__box_backend_cos_fp
+ }
+ \box_use:N #1
+ \__kernel_backend_scope_end:
+ }
+\fp_new:N \l__box_backend_cos_fp
+\fp_new:N \l__box_backend_sin_fp
+\cs_new_protected:Npn \__box_backend_scale:Nnn #1#2#3
+ {
+ \__kernel_backend_scope_begin:
+ \__kernel_backend_matrix:x
+ {
+ \fp_eval:n { round ( #2 , 5 ) } ~
+ 0~0~
+ \fp_eval:n { round ( #3 , 5 ) }
+ }
+ \hbox_overlap_right:n { \box_use:N #1 }
+ \__kernel_backend_scope_end:
+ }
+%% File: l3backend-draw.dtx
+\cs_new_eq:NN \__draw_backend_literal:n \__kernel_backend_literal_pdf:n
+\cs_generate_variant:Nn \__draw_backend_literal:n { x }
+\cs_new_protected:Npn \__draw_backend_begin:
+ { \__draw_backend_scope_begin: }
+\cs_new_protected:Npn \__draw_backend_end:
+ { \__draw_backend_scope_end: }
+\cs_new_eq:NN \__draw_backend_scope_begin: \__kernel_backend_scope_begin:
+\cs_new_eq:NN \__draw_backend_scope_end: \__kernel_backend_scope_end:
+\cs_new_protected:Npn \__draw_backend_moveto:nn #1#2
+ {
+ \__draw_backend_literal:x
+ { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ m }
+ }
+\cs_new_protected:Npn \__draw_backend_lineto:nn #1#2
+ {
+ \__draw_backend_literal:x
+ { \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ l }
+ }
+\cs_new_protected:Npn \__draw_backend_curveto:nnnnnn #1#2#3#4#5#6
+ {
+ \__draw_backend_literal:x
+ {
+ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
+ \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
+ \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
+ c
+ }
+ }
+\cs_new_protected:Npn \__draw_backend_rectangle:nnnn #1#2#3#4
+ {
+ \__draw_backend_literal:x
+ {
+ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
+ \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
+ re
+ }
+ }
+\cs_new_protected:Npn \__draw_backend_evenodd_rule:
+ { \bool_gset_true:N \g__draw_draw_eor_bool }
+\cs_new_protected:Npn \__draw_backend_nonzero_rule:
+ { \bool_gset_false:N \g__draw_draw_eor_bool }
+\bool_new:N \g__draw_draw_eor_bool
+\cs_new_protected:Npn \__draw_backend_closepath:
+ { \__draw_backend_literal:n { h } }
+\cs_new_protected:Npn \__draw_backend_stroke:
+ { \__draw_backend_literal:n { S } }
+\cs_new_protected:Npn \__draw_backend_closestroke:
+ { \__draw_backend_literal:n { s } }
+\cs_new_protected:Npn \__draw_backend_fill:
+ {
+ \__draw_backend_literal:x
+ { f \bool_if:NT \g__draw_draw_eor_bool * }
+ }
+\cs_new_protected:Npn \__draw_backend_fillstroke:
+ {
+ \__draw_backend_literal:x
+ { B \bool_if:NT \g__draw_draw_eor_bool * }
+ }
+\cs_new_protected:Npn \__draw_backend_clip:
+ {
+ \__draw_backend_literal:x
+ { W \bool_if:NT \g__draw_draw_eor_bool * }
+ }
+\cs_new_protected:Npn \__draw_backend_discardpath:
+ { \__draw_backend_literal:n { n } }
+\cs_new_protected:Npn \__draw_backend_dash_pattern:nn #1#2
+ {
+ \__draw_backend_literal:x
+ {
+ [
+ \exp_args:Nf \use:n
+ { \clist_map_function:nN {#1} \__draw_backend_dash:n }
+ ] ~
+ \dim_to_decimal_in_bp:n {#2} ~ d
+ }
+ }
+\cs_new:Npn \__draw_backend_dash:n #1
+ { ~ \dim_to_decimal_in_bp:n {#1} }
+\cs_new_protected:Npn \__draw_backend_linewidth:n #1
+ {
+ \__draw_backend_literal:x
+ { \dim_to_decimal_in_bp:n {#1} ~ w }
+ }
+\cs_new_protected:Npn \__draw_backend_miterlimit:n #1
+ { \__draw_backend_literal:x { #1 ~ M } }
+\cs_new_protected:Npn \__draw_backend_cap_butt:
+ { \__draw_backend_literal:n { 0 ~ J } }
+\cs_new_protected:Npn \__draw_backend_cap_round:
+ { \__draw_backend_literal:n { 1 ~ J } }
+\cs_new_protected:Npn \__draw_backend_cap_rectangle:
+ { \__draw_backend_literal:n { 2 ~ J } }
+\cs_new_protected:Npn \__draw_backend_join_miter:
+ { \__draw_backend_literal:n { 0 ~ j } }
+\cs_new_protected:Npn \__draw_backend_join_round:
+ { \__draw_backend_literal:n { 1 ~ j } }
+\cs_new_protected:Npn \__draw_backend_join_bevel:
+ { \__draw_backend_literal:n { 2 ~ j } }
+\cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
+ {
+ \__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 }
+ }
+\cs_new_protected:Npn \__draw_backend_box_use:Nnnnn #1#2#3#4#5
+ {
+ \__kernel_backend_scope_begin:
+ \__draw_backend_cm:nnnn {#2} {#3} {#4} {#5}
+ \hbox_overlap_right:n { \box_use:N #1 }
+ \__kernel_backend_scope_end:
+ }
+%% File: l3backend-graphics.dtx
+\tl_new:N \l__graphics_graphics_attr_tl
+\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
+ {
+ \int_zero:N \l_graphics_page_int
+ \tl_clear:N \l_graphics_pagebox_tl
+ \tl_set:Nx \l__graphics_graphics_attr_tl
+ {
+ \tl_if_empty:NF \l_graphics_decodearray_tl
+ { :D \l_graphics_decodearray_tl }
+ \bool_if:NT \l_graphics_interpolate_bool
+ { :I }
+ }
+ \tl_clear:N \l__graphics_graphics_attr_tl
+ \__graphics_backend_getbb_auxi:n {#1}
+ }
+\cs_new_eq:NN \__graphics_backend_getbb_png:n \__graphics_backend_getbb_jpg:n
+\cs_new_protected:Npn \__graphics_backend_getbb_pdf:n #1
+ {
+ \tl_clear:N \l_graphics_decodearray_tl
+ \bool_set_false:N \l_graphics_interpolate_bool
+ \tl_set:Nx \l__graphics_graphics_attr_tl
+ {
+ : \l_graphics_pagebox_tl
+ \int_compare:nNnT \l_graphics_page_int > 1
+ { :P \int_use:N \l_graphics_page_int }
+ }
+ \__graphics_backend_getbb_auxi:n {#1}
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_auxi:n #1
+ {
+ \graphics_bb_restore:xF { #1 \l__graphics_graphics_attr_tl }
+ { \__graphics_backend_getbb_auxii:n {#1} }
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_auxii:n #1
+ {
+ \tex_immediate:D \tex_pdfximage:D
+ \bool_lazy_or:nnT
+ { \l_graphics_interpolate_bool }
+ { ! \tl_if_empty_p:N \l_graphics_decodearray_tl }
+ {
+ attr ~
+ {
+ \tl_if_empty:NF \l_graphics_decodearray_tl
+ { /Decode~[ \l_graphics_decodearray_tl ] }
+ \bool_if:NT \l_graphics_interpolate_bool
+ { /Interpolate~true }
+ }
+ }
+ \int_compare:nNnT \l_graphics_page_int > 0
+ { page ~ \int_use:N \l_graphics_page_int }
+ \tl_if_empty:NF \l_graphics_pagebox_tl
+ { \l_graphics_pagebox_tl }
+ {#1}
+ \hbox_set:Nn \l__graphics_internal_box
+ { \tex_pdfrefximage:D \tex_pdflastximage:D }
+ \dim_set:Nn \l_graphics_urx_dim { \box_wd:N \l__graphics_internal_box }
+ \dim_set:Nn \l_graphics_ury_dim { \box_ht:N \l__graphics_internal_box }
+ \int_const:cn { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int }
+ { \tex_the:D \tex_pdflastximage:D }
+ \graphics_bb_save:x { #1 \l__graphics_graphics_attr_tl }
+ }
+\cs_new_protected:Npn \__graphics_backend_include_jpg:n #1
+ {
+ \tex_pdfrefximage:D
+ \int_use:c { c__graphics_graphics_ #1 \l__graphics_graphics_attr_tl _int }
+ }
+\cs_new_eq:NN \__graphics_backend_include_pdf:n \__graphics_backend_include_jpg:n
+\cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_jpg:n
+\sys_if_shell:T
+ {
+ \str_new:N \l__graphics_backend_dir_str
+ \str_new:N \l__graphics_backend_name_str
+ \str_new:N \l__graphics_backend_ext_str
+ \cs_new_protected:Npn \__graphics_backend_getbb_eps:n #1
+ {
+ \file_parse_full_name:nNNN {#1}
+ \l__graphics_backend_dir_str
+ \l__graphics_backend_name_str
+ \l__graphics_backend_ext_str
+ \exp_args:Nx \__graphics_backend_getbb_eps:nn
+ {
+ \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str
+ -converted-to.pdf
+ }
+ {#1}
+ }
+ \cs_new_protected:Npn \__graphics_backend_getbb_eps:nn #1#2
+ {
+ \file_compare_timestamp:nNnT {#2} > {#1}
+ {
+ \sys_shell_now:n
+ { repstopdf ~ #2 ~ #1 }
+ }
+ \tl_set:Nn \l_graphics_name_tl {#1}
+ \__graphics_backend_getbb_pdf:n {#1}
+ }
+ \cs_new_protected:Npn \__graphics_backend_include_eps:n #1
+ {
+ \file_parse_full_name:nNNN {#1}
+ \l__graphics_backend_dir_str \l__graphics_backend_name_str \l__graphics_backend_ext_str
+ \exp_args:Nx \__graphics_backend_include_pdf:n
+ {
+ \l__graphics_backend_name_str - \str_tail:N \l__graphics_backend_ext_str
+ -converted-to.pdf
+ }
+ }
+ }
+%% File: l3backend-pdf.dtx
+\box_new:N \l__pdf_internal_box
+\cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4
+ {
+ \tex_pdfannot:D
+ width ~ \dim_eval:n {#1} ~
+ height ~ \dim_eval:n {#2} ~
+ depth ~ \dim_eval:n {#3} ~
+ {#4}
+ }
+\cs_new:Npx \__pdf_backend_annotation_last:
+ {
+ \exp_not:N \int_value:w
+ \exp_not:N \tex_pdfannot:D
+ \c_space_tl 0 ~ R
+ }
+\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2
+ { \__pdf_backend_link_begin:nnnw {#1} { goto~name } {#2} }
+\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2
+ { \__pdf_backend_link_begin:nnnw {#1} { user } {#2} }
+\cs_new_protected:Npn \__pdf_backend_link_begin:nnnw #1#2#3
+ {
+ \tex_pdfstartlink:D
+ attr {#1}
+ #2 {#3}
+ }
+\cs_new_protected:Npn \__pdf_backend_link_end:
+ {
+ \tex_pdfendlink:D
+ }
+\cs_new:Npx \__pdf_backend_link_last:
+ {
+ \exp_not:N \int_value:w
+ \exp_not:N \tex_pdflastlink:D
+ \c_space_tl 0 ~ R
+ }
+\cs_new_protected:Npn \__pdf_backend_link_margin:n #1
+ {
+ \tex_pdflinkmargin:D
+ \dim_eval:n {#1} \scan_stop:
+ }
+\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2
+ {
+ \tex_pdfdest:D
+ name {#1}
+ \str_case:nnF {#2}
+ {
+ { xyz } { xyz }
+ { fit } { fit }
+ { fitb } { fitb }
+ { fitbh } { fitbh }
+ { fitbv } { fitbv }
+ { fith } { fith }
+ { fitv } { fitv }
+ }
+ { xyz ~ zoom \fp_eval:n { #2 * 10 } }
+ \scan_stop:
+ }
+\cs_new_protected:Npn \__pdf_backend_destination_box:nn #1#2
+ {
+ \group_begin:
+ \hbox_set:Nn \l__pdf_internal_box {#2}
+ \tex_pdfdest:D
+ name {#1}
+ fitr ~
+ width \box_wd:N \l__pdf_internal_box
+ height \box_ht:N \l__pdf_internal_box
+ depth \box_dp:N \l__pdf_internal_box
+ \box_use:N \l__pdf_internal_box
+ \group_end:
+ }
+\cs_new_protected:Npn \__pdf_backend_catalog_gput:nn #1#2
+ {
+ \tex_pdfcatalog:D
+ { / #1 ~ #2 }
+ }
+\cs_new_protected:Npn \__pdf_backend_info_gput:nn #1#2
+ {
+ \tex_pdfinfo:D
+ { / #1 ~ #2 }
+ }
+\prop_new:N \g__pdf_backend_object_prop
+\cs_new_protected:Npn \__pdf_backend_object_new:nn #1#2
+ {
+ \tex_pdfobj:D
+ reserveobjnum ~
+ \int_const:cn
+ { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
+ { \tex_pdflastobj:D }
+ \prop_gput:Nnn \exp_not:N \g__pdf_backend_object_prop {#1} {#2}
+ }
+\cs_new:Npn \__pdf_backend_object_ref:n #1
+ { \int_use:c { c__pdf_backend_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
+\cs_new_protected:Npn \__pdf_backend_object_write:nn #1#2
+ {
+ \tex_immediate:D \tex_pdfobj:D
+ useobjnum ~
+ \int_use:c
+ { c__pdf_backend_object_ \tl_to_str:n {#1} _int }
+ \str_case_e:nn
+ { \prop_item:Nn \g__pdf_backend_object_prop {#1} }
+ {
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ file ~ { \__pdf_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ { \__pdf_exp_not_ii:nn #2 }
+ }
+ }
+ }
+\cs_generate_variant:Nn \__pdf_backend_object_write:nn { nx }
+\cs_new:Npn \__pdf_exp_not_i:nn #1#2 { \exp_not:n {#1} }
+\cs_new:Npn \__pdf_exp_not_ii:nn #1#2 { \exp_not:n {#2} }
+\cs_new_protected:Npn \__pdf_backend_object_now:nn #1#2
+ {
+ \tex_immediate:D \tex_pdfobj:D
+ \str_case:nn
+ {#1}
+ {
+ { array } { { [ ~ \exp_not:n {#2} ~ ] } }
+ { dict } { { << ~ \exp_not:n {#2} ~ >> } }
+ { fstream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ file ~ { \__pdf_exp_not_ii:nn #2 }
+ }
+ { stream }
+ {
+ stream ~ attr ~ { \__pdf_exp_not_i:nn #2 } ~
+ { \__pdf_exp_not_ii:nn #2 }
+ }
+ }
+ }
+\cs_generate_variant:Nn \__pdf_backend_object_now:nn { nx }
+\cs_new:Npx \__pdf_backend_object_last:
+ {
+ \exp_not:N \int_value:w
+ \exp_not:N \tex_pdflastobj:D
+ \c_space_tl 0 ~ R
+ }
+\cs_new:Npx \__pdf_backend_pageobject_ref:n #1
+ {
+ \exp_not:N \int_value:w
+ \exp_not:N \tex_pdfpageref:D
+ \c_space_tl #1 \c_space_tl \c_space_tl \c_space_tl 0 ~ R
+ }
+\cs_new_protected:Npn \__pdf_backend_compresslevel:n #1
+ {
+ \tex_global:D
+ \tex_pdfcompresslevel:D
+ \int_value:w \int_eval:n {#1} \scan_stop:
+ }
+\cs_new_protected:Npn \__pdf_backend_compress_objects:n #1
+ {
+ \bool_if:nTF {#1}
+ { \__pdf_backend_objcompresslevel:n { 2 } }
+ { \__pdf_backend_objcompresslevel:n { 0 } }
+ }
+\cs_new_protected:Npn \__pdf_backend_objcompresslevel:n #1
+ {
+ \tex_global:D
+ \tex_pdfobjcompresslevel:D
+ #1 \scan_stop:
+ }
+\cs_new_protected:Npx \__pdf_backend_version_major_gset:n #1
+ {
+ \cs_if_exist:NT \tex_pdfmajorversion:D
+ {
+ \exp_not:N \tex_global:D \tex_pdfmajorversion:D
+ \exp_not:N \int_eval:n {#1} \scan_stop:
+ }
+ }
+\cs_new_protected:Npn \__pdf_backend_version_minor_gset:n #1
+ {
+ \tex_global:D
+ \tex_pdfminorversion:D
+ \int_eval:n {#1} \scan_stop:
+ }
+\cs_new:Npx \__pdf_backend_version_major:
+ {
+ \cs_if_exist:NTF \tex_pdfmajorversion:D
+ { \exp_not:N \tex_the:D \tex_pdfmajorversion:D }
+ { 1 }
+ }
+\cs_new:Npn \__pdf_backend_version_minor:
+ {
+ \tex_the:D
+ \tex_pdfminorversion:D
+ }
+\cs_new_protected:Npn \__pdf_backend_bdc:nn #1#2
+ { \__kernel_backend_literal_page:n { /#1 ~ #2 ~ BDC } }
+\cs_new_protected:Npn \__pdf_backend_emc:
+ { \__kernel_backend_literal_page:n { EMC } }
+%%
+%%
+%% End of file `l3backend-pdftex.def'.
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
index 983dc39b90c..1250c1577f0 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
@@ -1,15 +1,15 @@
%%
-%% This is file `l3backend-xdvipdfmx.def',
+%% This is file `l3backend-xetex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
-%% l3backend-basics.dtx (with options: `package,xdvipdfmx')
-%% l3backend-color.dtx (with options: `package,xdvipdfmx')
-%% l3backend-box.dtx (with options: `package,xdvipdfmx')
-%% l3backend-draw.dtx (with options: `package,xdvipdfmx')
-%% l3backend-graphics.dtx (with options: `package,xdvipdfmx')
-%% l3backend-pdf.dtx (with options: `package,xdvipdfmx')
+%% l3backend-basics.dtx (with options: `package,xetex')
+%% l3backend-color.dtx (with options: `package,xetex')
+%% l3backend-box.dtx (with options: `package,xetex')
+%% l3backend-draw.dtx (with options: `package,xetex')
+%% l3backend-graphics.dtx (with options: `package,xetex')
+%% l3backend-pdf.dtx (with options: `package,xetex')
%%
%% Copyright (C) 1990-2020 The LaTeX3 Project
%%
@@ -25,8 +25,22 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-xdvipdfmx.def}{2020-08-07}{}
- {L3 backend support: xdvipdfmx}
+ {l3backend-xetex.def}{2020-09-01}{}
+ {L3 backend support: XeTeX}
+\cs_if_exist:NTF \__kernel_dependency_version_check:nn
+ {
+ \__kernel_dependency_version_check:nn {2020-09-01}
+ {l3backend-xetex.def}
+ }
+ {
+ \cs_if_exist_use:cF { @latex@error } { \errmessage }
+ {
+ Mismatched~LaTeX~support~files~detected. \MessageBreak
+ Loading~aborted!
+ }
+ { \use:c { @ehd } }
+ \tex_endinput:D
+ }
\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
\cs_new_protected:Npn \__kernel_backend_literal:n #1
{ \__kernel_backend_literal:e { \exp_not:n {#1} } }
@@ -41,6 +55,15 @@
\cs_new_protected:Npn \__kernel_backend_scope_end:
{ \__kernel_backend_literal:n { x:grestore } }
%% File: l3backend-color.dtx
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \__color_backend_reset:
+ }
+\cs_new_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n
+\cs_new_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n
+\cs_new_protected:Npn \__color_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
\cs_new_protected:Npn \__color_backend_pickup:N #1 { }
\cs_if_exist:cT { ver@color.sty }
{
@@ -62,21 +85,59 @@
\cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
{ \tl_set:Nn #3 { {#1} {#2} } }
}
-\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
- { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select_gray:n #1
- { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select_rgb:n #1
- { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_select:n #1
- {
- \__kernel_backend_literal:n { color~push~ #1 }
- \group_insert_after:N \__color_backend_reset:
- }
-\cs_new_protected:Npn \__color_backend_reset:
- { \__kernel_backend_literal:n { color~pop } }
\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
- { \__color_backend_select:n {#1} }
+ { \__color_backend_select:n { @#1 ~ [#2] } }
+\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
+ {
+ \__color_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
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init:n #1
+ {
+ \__kernel_backend_literal:x
+ {
+ pdf:obj ~ @ color \int_use:N \g__color_separation_int \c_space_tl
+ [#1]
+ }
+ }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5
+ {
+ \__color_backend_separation_init:nnnnn
+ {#2}
+ { \pdf_object_ref:n { __color_illuminant_cielab_ #1 } }
+ { \c__color_model_range_lab_tl }
+ { 100 ~ 0 ~ 0 }
+ { #3 ~ #4 ~ #5 }
+ }
+\cs_if_exist:NF \pdf_object_now:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:nnnnn #1#2#3#4#5 { } }
+\cs_new_protected:Npn \__color_backend_separation_init_cielab:n #1
+ {
+ \pdf_object_new:nn { __color_illuminant_cielab_ #1 } { array }
+ \pdf_object_write:nx { __color_illuminant_cielab_ #1 }
+ {
+ /Lab ~
+ <<
+ /WhitePoint ~
+ [ \tl_use:c { c__color_model_whitepoint_cielab_ #1 _tl } ]
+ /Range ~ [ \c__color_model_range_lab_tl ]
+ >>
+ }
+ }
+\cs_if_exist:NF \pdf_object_new:nn
+ { \cs_gset_protected:Npn \__color_backend_separation_init_cielab:n #1 { } }
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
{ \__kernel_backend_literal_pdf:n { #1 ~ k } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
@@ -651,4 +712,4 @@
{ \__kernel_backend_literal_page:n { EMC } }
%%
%%
-%% End of file `l3backend-xdvipdfmx.def'.
+%% End of file `l3backend-xetex.def'.