summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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/doc/latex/l3backend/l3backend-code.pdfbin896719 -> 906761 bytes
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx184
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx2
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def12
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def6
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def124
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def14
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def14
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def12
17 files changed, 355 insertions, 72 deletions
diff --git a/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3backend/CHANGELOG.md
index e94dbb881d5..e725149f03e 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]
+## [2022-04-14]
+
+### Added
+- Support for SVG graphic inclusion by `dvisvgm`
+
+### Fixed
+- `\color_ensure_current:` backend with DVI-based routes (issue \#1085)
+
## [2022-04-10]
### Added
@@ -230,7 +238,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/2022-04-10...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2022-04-14...HEAD
+[2022-04-14]: https://github.com/latex3/latex3/compare/2022-04-10...2022-04-14
[2022-04-10]: https://github.com/latex3/latex3/compare/2022-02-07...2022-04-10
[2022-02-07]: https://github.com/latex3/latex3/compare/2022-01-12...2022-02-07
[2022-01-12]: https://github.com/latex3/latex3/compare/2021-12-14...2022-01-12
diff --git a/Master/texmf-dist/doc/latex/l3backend/README.md b/Master/texmf-dist/doc/latex/l3backend/README.md
index 470d6914a00..824db1bdd30 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 2022-04-10
+Release 2022-04-14
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/doc/latex/l3backend/l3backend-code.pdf b/Master/texmf-dist/doc/latex/l3backend/l3backend-code.pdf
index 960a45053cb..a5c00203937 100644
--- a/Master/texmf-dist/doc/latex/l3backend/l3backend-code.pdf
+++ b/Master/texmf-dist/doc/latex/l3backend/l3backend-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx
index f4bf61fe70b..adaf33ee445 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
@@ -70,27 +70,27 @@
% \begin{macrocode}
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2022-04-10}{}
+ {l3backend-dvipdfmx.def}{2022-04-14}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2022-04-10}{}
+ {l3backend-dvips.def}{2022-04-14}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2022-04-10}{}
+ {l3backend-dvisvgm.def}{2022-04-14}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-luatex.def}{2022-04-10}{}
+ {l3backend-luatex.def}{2022-04-14}{}
{L3 backend support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-pdftex.def}{2022-04-10}{}
+ {l3backend-pdftex.def}{2022-04-14}{}
{L3 backend support: PDF output (pdfTeX)}
%</pdftex>
%<*xetex>
- {l3backend-xetex.def}{2022-04-10}{}
+ {l3backend-xetex.def}{2022-04-14}{}
{L3 backend support: XeTeX}
%</xetex>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx
index a732d605641..4093f8b3a73 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
index 815b41302a5..7166fb693d9 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
@@ -91,8 +91,8 @@
{
\tl_set:Nx #1
{
+ { named }
{ \exp_after:wN \use:n \current@color }
- { 1 }
}
}
{
@@ -353,18 +353,22 @@
% {
% \@@_backend_select_cmyk:n ,
% \@@_backend_select_gray:n ,
+% \@@_backend_select_named:n ,
% \@@_backend_select_rgb:n ,
% \@@_backend_select:n
% }
% \begin{macro}{\@@_backend_reset:}
% \begin{macro}{color.sc}
% Push the data to the stack. In the case of \texttt{dvips} also saves the
-% drawing color in raw PostScript.
+% drawing color in raw PostScript. The |spot| model is for handling data
+% in classical format.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select_cmyk:n #1
{ \@@_backend_select:n { cmyk ~ #1 } }
\cs_new_protected:Npn \@@_backend_select_gray:n #1
{ \@@_backend_select:n { gray ~ #1 } }
+\cs_new_protected:Npn \@@_backend_select_named:n #1
+ { \@@_backend_select:n { ~ #1 } }
\cs_new_protected:Npn \@@_backend_select_rgb:n #1
{ \@@_backend_select:n { rgb ~ #1 } }
\cs_new_protected:Npn \@@_backend_select:n #1
@@ -427,6 +431,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_backend_select_named:n}
+% For classical named colors, the only value we should get is |Black|.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select_named:n #1
+ {
+ \str_if_eq:nnTF {#1} { Black }
+ { \@@_backend_select_gray:n { 0 } }
+ { \msg_error:nnn { color } { unknown-named-color } {#1} }
+ }
+\msg_new:nnn { color } { unknown-named-color }
+ { Named~color~'#1'~is~not~known. }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</dvipdfmx|luatex|pdftex|xetex>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx
index 0f9fcb60081..4a0d7796822 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx
index 1bd6a7e3362..08df3f16b5d 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
@@ -143,7 +143,7 @@
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
- { .pdf , .eps , .png , .jpg , .jpeg }
+ { .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
% \end{macrocode}
% \end{variable}
@@ -282,9 +282,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_getbb_eps:n}
+% \begin{macro}{\@@_backend_getbb_eps:n, \@@_backend_getbb_ps:n}
% \begin{macro}{\@@_backend_getbb_eps:nm}
-% \begin{macro}{\@@_backend_include_eps:n}
+% \begin{macro}{\@@_backend_include_eps:n, \@@_backend_include_ps:n}
% \begin{variable}
% {\l_@@_backend_dir_str, \l_@@_backend_name_str, \l_@@_backend_ext_str}
% EPS graphics may be included in \LuaTeX{}/pdfTeX{} by conversion to
@@ -314,6 +314,7 @@
}
{#1}
}
+ \cs_new_eq:NN \@@_backend_getbb_ps:n \@@_backend_getbb_eps:n
\cs_new_protected:Npn \@@_backend_getbb_eps:nn #1#2
{
\file_compare_timestamp:nNnT {#2} > {#1}
@@ -338,6 +339,7 @@
}
}
}
+ \cs_new_eq:NN \@@_backend_include_ps:n \@@_backend_include_eps:n
}
% \end{macrocode}
% \end{variable}
@@ -379,7 +381,7 @@
%
% \begin{macro}
% {
-% \@@_backend_getbb_eps:n ,
+% \@@_backend_getbb_eps:n , \@@_backend_getbb_ps:n ,
% \@@_backend_getbb_jpg:n , \@@_backend_getbb_jpeg:n ,
% \@@_backend_getbb_pdf:n , \@@_backend_getbb_png:n ,
% \@@_backend_getbb_bmp:n
@@ -640,7 +642,7 @@
% For PDF graphics, properly supporting the |pagebox| concept in \XeTeX{}
% is best done using the |\tex_XeTeXpdffile:D| primitive. The syntax here
% is the same as for the graphic measurement part, although we know at this
-% stage that there must be some valid setting for \cs{l_graphics_pagebox_tl}.
+% stage that there must be some valid setting for \cs{l_@@_pagebox_tl}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_include_pdf:n #1
{
@@ -683,16 +685,123 @@
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
- { .pdf , .eps , .png , .jpg , .jpeg }
+ { .svg , .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_backend_getbb_eps:n}
+% \begin{macro}{\@@_backend_getbb_svg:n}
+% \begin{macro}{\@@_backend_getbb_svg_auxi:nNn}
+% \begin{macro}{\@@_backend_getbb_svg_auxii:w}
+% \begin{macro}
+% {
+% \@@_backend_getbb_svg_auxiii:Nw ,
+% \@@_backend_getbb_svg_auxiv:Nw ,
+% \@@_backend_getbb_svg_auxv:Nw
+% }
+% \begin{macro}{\@@_backend_getbb_svg_auxvi:Nn}
+% \begin{macro}{\@@_backend_getbb_svg_auxvii:w}
+% This is relatively similar to reading bounding boxes for |.eps| files. Life
+% is though made more tricky as we cannot pick a single line for the data. So
+% we have to loop until we collect up both height and width. To do that, we
+% can use a marker value. We also have to allow for the default units of the
+% lengths: they are big points and may be omitted.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_getbb_svg:n #1
+ {
+ \@@_bb_restore:nF {#1}
+ {
+ \ior_open:Nn \l_@@_internal_ior {#1}
+ \ior_if_eof:NTF \l_@@_internal_ior
+ { \msg_error:nnn { graphics } { graphic-not-found } {#1} }
+ {
+ \dim_zero:N \l_@@_llx_dim
+ \dim_zero:N \l_@@_lly_dim
+ \dim_set:Nn \l_@@_urx_dim { -\c_max_dim }
+ \dim_set:Nn \l_@@_ury_dim { -\c_max_dim }
+ \ior_str_map_inline:Nn \l_@@_internal_ior
+ {
+ \dim_compare:nNnT \l_@@_urx_dim = { -\c_max_dim }
+ {
+ \@@_backend_getbb_svg_auxi:nNn
+ { width } \l_@@_urx_dim {##1}
+ }
+ \dim_compare:nNnT \l_@@_ury_dim = { -\c_max_dim }
+ {
+ \@@_backend_getbb_svg_auxi:nNn
+ { height } \l_@@_ury_dim {##1}
+ }
+ \bool_lazy_and:nnF
+ { \dim_compare_p:nNn \l_@@_urx_dim = { -\c_max_dim } }
+ { \dim_compare_p:nNn \l_@@_ury_dim = { -\c_max_dim } }
+ { \ior_map_break: }
+ }
+ \@@_bb_save:n {#1}
+ }
+ \ior_close:N \l_@@_internal_ior
+ }
+ }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxi:nNn #1#2#3
+ {
+ \use:x
+ {
+ \cs_set_protected:Npn \@@_backend_getbb_svg_auxii:w
+ ####1 \tl_to_str:n {#1} = ####2 \tl_to_str:n {#1} = ####3
+ \s_@@_stop
+ }
+ {
+ \tl_if_blank:nF {##2}
+ {
+ \peek_remove_spaces:n
+ {
+ \peek_meaning:NTF ' % '
+ { \@@_backend_getbb_svg_auxiii:Nw #2 }
+ {
+ \peek_meaning:NTF " % "
+ { \@@_backend_getbb_svg_auxiv:Nw #2 }
+ { \@@_backend_getbb_svg_auxv:Nw #2 }
+ }
+ }
+ ##2 \s_@@_stop
+ }
+ }
+ \use:x
+ {
+ \@@_backend_getbb_svg_auxii:w #3
+ \tl_to_str:n {#1} = \tl_to_str:n {#1} =
+ \s_@@_stop
+ }
+ }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxii:w { }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxiii:Nw #1 ' #2 ' #3 \s_@@_stop
+ { \@@_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxiv:Nw #1 " #2 " #3 \s_@@_stop
+ { \@@_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxv:Nw #1 #2 ~ #3 \s_@@_stop
+ { \@@_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxvi:Nn #1#2
+ {
+ \tex_afterassignment:D \@@_backend_getbb_svg_auxvii:w
+ \l_@@_internal_dim #2 bp \scan_stop:
+ \dim_set_eq:NN #1 \l_@@_internal_dim
+ }
+\cs_new_protected:Npn \@@_backend_getbb_svg_auxvii:w #1 \scan_stop: { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_getbb_eps:n, \@@_backend_getbb_ps:n}
% Simply use the generic function.
% \begin{macrocode}
\@@_backend_loaded:n
- { \cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n }
+ {
+ \cs_new_eq:NN \@@_backend_getbb_eps:n \@@_read_bb:n
+ \cs_new_eq:NN \@@_backend_getbb_ps:n \@@_read_bb:n
+ }
% \end{macrocode}
% \end{macro}
%
@@ -722,13 +831,19 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_include_eps:n, \@@_backend_include_pdf:n}
+% \begin{macro}
+% {
+% \@@_backend_include_eps:n ,
+% \@@_backend_include_ps:n ,
+% \@@_backend_include_pdf:n
+% }
% \begin{macro}{\@@_backend_include:nn}
% The special syntax is relatively clear here: remember we need PostScript
% sizes here. (This is the same as the \texttt{dvips} code.)
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_include_eps:n #1
{ \@@_backend_include:nn { PSfile } {#1} }
+\cs_new_eq:NN \@@_backend_include_ps:n \@@_backend_include_eps:n
\cs_new_protected:Npn \@@_backend_include_pdf:n #1
{ \@@_backend_include:nn { pdffile } {#1} }
\cs_new_protected:Npn \@@_backend_include:nn #1#2
@@ -748,32 +863,43 @@
%
% \begin{macro}
% {
+% \@@_backend_include_svg:n ,
% \@@_backend_include_png:n ,
% \@@_backend_include_jpg:n ,
% \@@_backend_include_jpeg:n
% }
-% \begin{macro}{\@@_backend_include_bitmap_quote:w}
+% \begin{macro}{\@@_backend_include_dequote:w}
% The backend here has built-in support for basic graphic inclusion (see
% \texttt{dvisvgm.def} for a more complex approach, needed if clipping,
-% \emph{etc.}, is covered at the graphic backend level). The only issue is
-% that |#1| must be quote-corrected. The \texttt{dvisvgm:img} operation
-% quotes the file name, but if it is already quoted (contains spaces)
-% then we have an issue: we simply strip off any quotes as a result.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_include_png:n #1
- {
- \__kernel_backend_literal:x
- {
- dvisvgm:img~
- \dim_to_decimal:n { \l_@@_ury_dim } ~
- \dim_to_decimal:n { \l_@@_ury_dim } ~
- \@@_backend_include_bitmap_quote:w #1 " #1 " \s_@@_stop
- }
+% \emph{etc.}, is covered at the graphic backend level). We have to deal
+% with the fact that the image reference point is at the \emph{top}, so
+% there is a need for a veritcal shift to put it in the right place.
+% The other issue is that |#1| must be quote-corrected. The
+% \texttt{dvisvgm:img} operation quotes the file name, but if it is already
+% quoted (contains spaces) then we have an issue: we simply strip off any
+% quotes as a result.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_include_svg:n #1
+ {
+ \box_move_up:nn { \l_@@_ury_dim }
+ {
+ \hbox:n
+ {
+ \__kernel_backend_literal:x
+ {
+ dvisvgm:img~
+ \dim_to_decimal:n { \l_@@_urx_dim } ~
+ \dim_to_decimal:n { \l_@@_ury_dim } ~
+ \@@_backend_include_dequote:w #1 " #1 " \s_@@_stop
+ }
+ }
+ }
}
-\cs_new_eq:NN \@@_backend_include_jpeg:n \@@_backend_include_png:n
-\cs_new_eq:NN \@@_backend_include_jpg:n \@@_backend_include_png:n
-\cs_new:Npn \@@_backend_include_bitmap_quote:w #1 " #2 " #3 \s_@@_stop
- { " #2 " }
+\cs_new_eq:NN \@@_backend_include_png:n \@@_backend_include_svg:n
+\cs_new_eq:NN \@@_backend_include_jpeg:n \@@_backend_include_svg:n
+\cs_new_eq:NN \@@_backend_include_jpg:n \@@_backend_include_svg:n
+\cs_new:Npn \@@_backend_include_dequote:w #1 " #2 " #3 \s_@@_stop
+ {#2}
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx
index 5eacda7b9fe..2298af2a4e3 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx
index 89d60de0df4..9fd8426741d 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx
index 03435b24544..071b8805f5c 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 2022-04-10}
+% \date{Released 2022-04-14}
%
% \maketitle
%
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
index 4d45954567f..e5141ab8ed1 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvipdfmx.def}{2022-04-10}{}
+ {l3backend-dvipdfmx.def}{2022-04-14}{}
{L3 backend support: dvipdfmx}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -75,8 +75,8 @@
{
\tl_set:Nx #1
{
+ { named }
{ \exp_after:wN \use:n \current@color }
- { 1 }
}
}
{
@@ -164,6 +164,14 @@
}
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int }
+\cs_new_protected:Npn \__color_backend_select_named:n #1
+ {
+ \str_if_eq:nnTF {#1} { Black }
+ { \__color_backend_select_gray:n { 0 } }
+ { \msg_error:nnn { color } { unknown-named-color } {#1} }
+ }
+\msg_new:nnn { color } { unknown-named-color }
+ { Named~color~'#1'~is~not~known. }
\prop_new:N \g__color_backend_colorant_prop
\cs_new:Npx \__color_backend_devicen_colorants: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 e63d882e34b..bc3c87d637f 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvips.def}{2022-04-10}{}
+ {l3backend-dvips.def}{2022-04-14}{}
{L3 backend support: dvips}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -92,8 +92,8 @@
{
\tl_set:Nx #1
{
+ { named }
{ \exp_after:wN \use:n \current@color }
- { 1 }
}
}
{
@@ -108,6 +108,8 @@
{ \__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_named:n #1
+ { \__color_backend_select:n { ~ #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
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
index 61c275d697b..6742f2433bc 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvisvgm.def}{2022-04-10}{}
+ {l3backend-dvisvgm.def}{2022-04-14}{}
{L3 backend support: dvisvgm}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -106,8 +106,8 @@
{
\tl_set:Nx #1
{
+ { named }
{ \exp_after:wN \use:n \current@color }
- { 1 }
}
}
{
@@ -122,6 +122,8 @@
{ \__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_named:n #1
+ { \__color_backend_select:n { ~ #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
@@ -507,10 +509,92 @@
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
- { .pdf , .eps , .png , .jpg , .jpeg }
+ { .svg , .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
+\cs_new_protected:Npn \__graphics_backend_getbb_svg:n #1
+ {
+ \__graphics_bb_restore:nF {#1}
+ {
+ \ior_open:Nn \l__graphics_internal_ior {#1}
+ \ior_if_eof:NTF \l__graphics_internal_ior
+ { \msg_error:nnn { graphics } { graphic-not-found } {#1} }
+ {
+ \dim_zero:N \l__graphics_llx_dim
+ \dim_zero:N \l__graphics_lly_dim
+ \dim_set:Nn \l__graphics_urx_dim { -\c_max_dim }
+ \dim_set:Nn \l__graphics_ury_dim { -\c_max_dim }
+ \ior_str_map_inline:Nn \l__graphics_internal_ior
+ {
+ \dim_compare:nNnT \l__graphics_urx_dim = { -\c_max_dim }
+ {
+ \__graphics_backend_getbb_svg_auxi:nNn
+ { width } \l__graphics_urx_dim {##1}
+ }
+ \dim_compare:nNnT \l__graphics_ury_dim = { -\c_max_dim }
+ {
+ \__graphics_backend_getbb_svg_auxi:nNn
+ { height } \l__graphics_ury_dim {##1}
+ }
+ \bool_lazy_and:nnF
+ { \dim_compare_p:nNn \l__graphics_urx_dim = { -\c_max_dim } }
+ { \dim_compare_p:nNn \l__graphics_ury_dim = { -\c_max_dim } }
+ { \ior_map_break: }
+ }
+ \__graphics_bb_save:n {#1}
+ }
+ \ior_close:N \l__graphics_internal_ior
+ }
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxi:nNn #1#2#3
+ {
+ \use:x
+ {
+ \cs_set_protected:Npn \__graphics_backend_getbb_svg_auxii:w
+ ####1 \tl_to_str:n {#1} = ####2 \tl_to_str:n {#1} = ####3
+ \s__graphics_stop
+ }
+ {
+ \tl_if_blank:nF {##2}
+ {
+ \peek_remove_spaces:n
+ {
+ \peek_meaning:NTF ' % '
+ { \__graphics_backend_getbb_svg_auxiii:Nw #2 }
+ {
+ \peek_meaning:NTF " % "
+ { \__graphics_backend_getbb_svg_auxiv:Nw #2 }
+ { \__graphics_backend_getbb_svg_auxv:Nw #2 }
+ }
+ }
+ ##2 \s__graphics_stop
+ }
+ }
+ \use:x
+ {
+ \__graphics_backend_getbb_svg_auxii:w #3
+ \tl_to_str:n {#1} = \tl_to_str:n {#1} =
+ \s__graphics_stop
+ }
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxii:w { }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxiii:Nw #1 ' #2 ' #3 \s__graphics_stop
+ { \__graphics_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxiv:Nw #1 " #2 " #3 \s__graphics_stop
+ { \__graphics_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxv:Nw #1 #2 ~ #3 \s__graphics_stop
+ { \__graphics_backend_getbb_svg_auxvi:Nn #1 {#2} }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxvi:Nn #1#2
+ {
+ \tex_afterassignment:D \__graphics_backend_getbb_svg_auxvii:w
+ \l__graphics_internal_dim #2 bp \scan_stop:
+ \dim_set_eq:NN #1 \l__graphics_internal_dim
+ }
+\cs_new_protected:Npn \__graphics_backend_getbb_svg_auxvii:w #1 \scan_stop: { }
\__graphics_backend_loaded:n
- { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n }
+ {
+ \cs_new_eq:NN \__graphics_backend_getbb_eps:n \__graphics_read_bb:n
+ \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_read_bb:n
+ }
\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
{
\int_zero:N \l__graphics_page_int
@@ -527,6 +611,7 @@
}
\cs_new_protected:Npn \__graphics_backend_include_eps:n #1
{ \__graphics_backend_include:nn { PSfile } {#1} }
+\cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n
\cs_new_protected:Npn \__graphics_backend_include_pdf:n #1
{ \__graphics_backend_include:nn { pdffile } {#1} }
\cs_new_protected:Npn \__graphics_backend_include:nn #1#2
@@ -540,20 +625,27 @@
ury = \dim_to_decimal_in_bp:n \l__graphics_ury_dim
}
}
-\cs_new_protected:Npn \__graphics_backend_include_png:n #1
+\cs_new_protected:Npn \__graphics_backend_include_svg:n #1
{
- \__kernel_backend_literal:x
- {
- dvisvgm:img~
- \dim_to_decimal:n { \l__graphics_ury_dim } ~
- \dim_to_decimal:n { \l__graphics_ury_dim } ~
- \__graphics_backend_include_bitmap_quote:w #1 " #1 " \s__graphics_stop
- }
+ \box_move_up:nn { \l__graphics_ury_dim }
+ {
+ \hbox:n
+ {
+ \__kernel_backend_literal:x
+ {
+ dvisvgm:img~
+ \dim_to_decimal:n { \l__graphics_urx_dim } ~
+ \dim_to_decimal:n { \l__graphics_ury_dim } ~
+ \__graphics_backend_include_dequote:w #1 " #1 " \s__graphics_stop
+ }
+ }
+ }
}
-\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_png:n
-\cs_new_eq:NN \__graphics_backend_include_jpg:n \__graphics_backend_include_png:n
-\cs_new:Npn \__graphics_backend_include_bitmap_quote:w #1 " #2 " #3 \s__graphics_stop
- { " #2 " }
+\cs_new_eq:NN \__graphics_backend_include_png:n \__graphics_backend_include_svg:n
+\cs_new_eq:NN \__graphics_backend_include_jpeg:n \__graphics_backend_include_svg:n
+\cs_new_eq:NN \__graphics_backend_include_jpg:n \__graphics_backend_include_svg:n
+\cs_new:Npn \__graphics_backend_include_dequote:w #1 " #2 " #3 \s__graphics_stop
+ {#2}
\__graphics_backend_loaded:n
{ \cs_new_eq:NN \__graphics_backend_get_pagecount:n \__graphics_get_pagecount:n }
%% File: l3backend-pdf.dtx
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
index c98a097818a..ae3b02531c3 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-luatex.def}{2022-04-10}{}
+ {l3backend-luatex.def}{2022-04-14}{}
{L3 backend support: PDF output (LuaTeX)}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -151,6 +151,14 @@
}
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int }
+\cs_new_protected:Npn \__color_backend_select_named:n #1
+ {
+ \str_if_eq:nnTF {#1} { Black }
+ { \__color_backend_select_gray:n { 0 } }
+ { \msg_error:nnn { color } { unknown-named-color } {#1} }
+ }
+\msg_new:nnn { color } { unknown-named-color }
+ { Named~color~'#1'~is~not~known. }
\prop_new:N \g__color_backend_colorant_prop
\cs_new:Npx \__color_backend_devicen_colorants:n #1
{
@@ -550,7 +558,7 @@
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
- { .pdf , .eps , .png , .jpg , .jpeg }
+ { .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
\tl_new:N \l__graphics_graphics_attr_tl
\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
@@ -650,6 +658,7 @@
}
{#1}
}
+ \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_backend_getbb_eps:n
\cs_new_protected:Npn \__graphics_backend_getbb_eps:nn #1#2
{
\file_compare_timestamp:nNnT {#2} > {#1}
@@ -674,6 +683,7 @@
}
}
}
+ \cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n
}
\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1
{
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
index 17d944aeb09..ddc356a7bee 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-pdftex.def}{2022-04-10}{}
+ {l3backend-pdftex.def}{2022-04-14}{}
{L3 backend support: PDF output (pdfTeX)}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -151,6 +151,14 @@
}
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int }
+\cs_new_protected:Npn \__color_backend_select_named:n #1
+ {
+ \str_if_eq:nnTF {#1} { Black }
+ { \__color_backend_select_gray:n { 0 } }
+ { \msg_error:nnn { color } { unknown-named-color } {#1} }
+ }
+\msg_new:nnn { color } { unknown-named-color }
+ { Named~color~'#1'~is~not~known. }
\prop_new:N \g__color_backend_colorant_prop
\cs_new:Npx \__color_backend_devicen_colorants:n #1
{
@@ -550,7 +558,7 @@
{
\seq_set_from_clist:Nn
\l_graphics_search_ext_seq
- { .pdf , .eps , .png , .jpg , .jpeg }
+ { .pdf , .eps , .ps , .png , .jpg , .jpeg }
}
\tl_new:N \l__graphics_graphics_attr_tl
\cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
@@ -650,6 +658,7 @@
}
{#1}
}
+ \cs_new_eq:NN \__graphics_backend_getbb_ps:n \__graphics_backend_getbb_eps:n
\cs_new_protected:Npn \__graphics_backend_getbb_eps:nn #1#2
{
\file_compare_timestamp:nNnT {#2} > {#1}
@@ -674,6 +683,7 @@
}
}
}
+ \cs_new_eq:NN \__graphics_backend_include_ps:n \__graphics_backend_include_eps:n
}
\cs_new_protected:Npn \__graphics_backend_get_pagecount:n #1
{
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
index dd69cc589db..710543cd4bf 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
@@ -26,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-xetex.def}{2022-04-10}{}
+ {l3backend-xetex.def}{2022-04-14}{}
{L3 backend support: XeTeX}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -75,8 +75,8 @@
{
\tl_set:Nx #1
{
+ { named }
{ \exp_after:wN \use:n \current@color }
- { 1 }
}
}
{
@@ -164,6 +164,14 @@
}
\cs_new_protected:Npn \__color_backend_reset:
{ \__kernel_color_backend_stack_pop:n \l__color_backend_stack_int }
+\cs_new_protected:Npn \__color_backend_select_named:n #1
+ {
+ \str_if_eq:nnTF {#1} { Black }
+ { \__color_backend_select_gray:n { 0 } }
+ { \msg_error:nnn { color } { unknown-named-color } {#1} }
+ }
+\msg_new:nnn { color } { unknown-named-color }
+ { Named~color~'#1'~is~not~known. }
\prop_new:N \g__color_backend_colorant_prop
\cs_new:Npx \__color_backend_devicen_colorants:n #1
{