summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3backend
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-13 20:07:21 +0000
committerKarl Berry <karl@freefriends.org>2021-07-13 20:07:21 +0000
commitcdf5616cb0197dbd6acad760f46c9cc81e34664e (patch)
tree5e1366f64394ce4af2bf9e5558e80d6f6fec6ed2 /Master/texmf-dist/source/latex/l3backend
parentc6abb39c23b0dfdbbcd2dff7970bc57816f65982 (diff)
l3 (13jul21)
git-svn-id: svn://tug.org/texlive/trunk@59922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3backend')
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx23
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx59
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend.ins2
9 files changed, 81 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-basics.dtx
index 446178138e6..ef02b741e08 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
@@ -70,27 +70,27 @@
% \begin{macrocode}
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2021-05-07}{}
+ {l3backend-dvipdfmx.def}{2021-07-12}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2021-05-07}{}
+ {l3backend-dvips.def}{2021-07-12}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2021-05-07}{}
+ {l3backend-dvisvgm.def}{2021-07-12}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-luatex.def}{2021-05-07}{}
+ {l3backend-luatex.def}{2021-07-12}{}
{L3 backend support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-pdftex.def}{2021-05-07}{}
+ {l3backend-pdftex.def}{2021-07-12}{}
{L3 backend support: PDF output (pdfTeX)}
%</pdftex>
%<*xetex>
- {l3backend-xetex.def}{2021-05-07}{}
+ {l3backend-xetex.def}{2021-07-12}{}
{L3 backend support: XeTeX}
%</xetex>
% \end{macrocode}
@@ -156,7 +156,14 @@
% most up-to-date method,
% \begin{macrocode}
\cs_if_exist:NTF \@ifl@t@r
- { \cs_new_eq:NN \__kernel_backend_first_shipout:n \AtBeginDvi }
+ {
+ \@ifl@t@r \fmtversion { 2020-10-01 }
+ {
+ \cs_new_protected:Npn \__kernel_backend_first_shipout:n #1
+ { \hook_gput_code:nnn { shipout / firstpage } { l3backend } {#1} }
+ }
+ { \cs_new_eq:NN \__kernel_backend_first_shipout:n \AtBeginDvi }
+ }
{ \cs_new_eq:NN \__kernel_backend_first_shipout:n \use:n }
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-box.dtx
index e45df7604b2..7724aa7104f 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
index 7979b2d8e6e..ad3075dff53 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-draw.dtx
index 449b7f9c931..5a896469bd6 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-graphics.dtx
index 1448ecddc15..e1bd1e0921a 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-header.dtx
index 1d01b189281..b5ab577892b 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-opacity.dtx
index a600defcc08..6017403ea06 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
@@ -72,7 +72,14 @@
% \end{macrocode}
%
% \begin{macro}{\@@_backend_select:n,\@@_backend_select_aux:n}
-% No stack so set values directly.
+% \begin{macro}{\@@_backend_fill:n, \@@_backend_stroke:n}
+% \begin{macro}{\@@_backend:nnn, \@@_backend:xnn}
+% No stack so set values directly. The need to deal with Distiller and
+% Ghostscript separately means we use a common auxiliary: the two
+% systems require different PostScript for transparency. This is
+% of course not quite as efficient as doing one test for setting all
+% transparency, but it keeps things clearer here. Thanks to Alex Grahn
+% for the detail on testing for GhostScript.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_select:n #1
{
@@ -81,29 +88,47 @@
}
\cs_new_protected:Npn \@@_backend_select_aux:n #1
{
- \__kernel_backend_postscript:n
- { #1 ~ .setfillconstantalpha ~ #1 ~ .setstrokeconstantalpha }
+ \@@_backend:nnn {#1} { fill } { ca }
+ \@@_backend:nnn {#1} { stroke } { CA }
}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_backend_fill:n, \@@_backend_stroke:n}
-% \begin{macro}{\@@_backend:nn, \@@_backend:xn}
-% Similar to the above but with no stack and only adding to one or other of
-% the entries.
-% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_fill:n #1
- { \@@_backend:xn { \fp_eval:n { min(max(0,#1),1) } } { fill } }
+ {
+ \@@_backend:xnn
+ { \fp_eval:n { min(max(0,#1),1) } }
+ { fill }
+ { ca }
+ }
\cs_new_protected:Npn \@@_backend_stroke:n #1
- { \@@_backend:xn { \fp_eval:n { min(max(0,#1),1) } } { stroke } }
-\cs_new_protected:Npn \@@_backend:nn #1#2
{
- \__kernel_backend_postscript:n { #1 ~ .set #2 constantalpha }
+ \@@_backend:xnn
+ { \fp_eval:n { min(max(0,#1),1) } }
+ { stroke }
+ { CA }
}
-\cs_generate_variant:Nn \@@_backend:nn { x }
+\cs_new_protected:Npn \@@_backend:nnn #1#2#3
+ {
+ \__kernel_backend_postscript:n
+ {
+ product ~ (Ghostscript) ~ search
+ {
+ pop ~ pop ~ pop ~
+ #1 ~ .set #2 constantalpha
+ }
+ {
+ pop ~
+ mark ~
+ /#3 ~ #1
+ /SetTransparency ~
+ pdfmark
+ }
+ ifelse
+ }
+ }
+\cs_generate_variant:Nn \@@_backend:nnn { x }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</dvips>
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-pdf.dtx
index 11456302a24..5c7fa3b5654 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 2021-05-07}
+% \date{Released 2021-07-12}
%
% \maketitle
%
@@ -392,8 +392,8 @@
% {
% pdf.linkdp.pad ,
% pdf.linkht.pad ,
-% pdf.llx, pdf.lly ,
-% pdf.ury, pdf.ury ,
+% pdf.llx, pdf.lly ,
+% pdf.ury, pdf.ury ,
% pdf.link.dict ,
% pdf.outerbox ,
% pdf.baselineskip
@@ -403,6 +403,10 @@
% grab the link content as a box which can then unbox: this allows the same
% interface as for \pdfTeX{}.
%
+% Notice that the link setup here uses |/Action| not |/A|. That is because
+% Distiller \emph{requires} this trigger word, rather than a \enquote{raw}
+% PDF dictionary key (Ghostscript can handle either form).
+%
% Taking the idea of |evenboxes| from \pkg{hypdvips}, we implement a minimum
% box height and depth for link placement. This means that \enquote{underlining}
% with a hyperlink will generally give an even appearance. However, to ensure
@@ -417,10 +421,13 @@
% as taken from \pkg{hypdvips}.
%
% Getting the outer dimensions of the text area may be better using a two-pass
-% approach and |\tex_savepos:D|. That plus format mode are still to re-examine.
+% approach and |\tex_savepos:D|. That plus generic mode are still to re-examine.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_link_begin_goto:nnw #1#2
- { \@@_backend_link_begin:nw { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } }
+ {
+ \@@_backend_link_begin:nw
+ { #1 /Subtype /Link /Action << /S /GoTo /D ( #2 ) >> }
+ }
\cs_new_protected:Npn \@@_backend_link_begin_user:nnw #1#2
{ \@@_backend_link_begin:nw {#1#2} }
\cs_new_protected:Npn \@@_backend_link_begin:nw #1
@@ -428,6 +435,11 @@
\bool_if:NF \g_@@_backend_link_bool
{ \@@_backend_link_begin_aux:nw {#1} }
}
+% \end{macrocode}
+% The definition of |pdf.link.dict| here is needed as there is code in the
+% PostScript headers for breaking links, and that can only work with this
+% available.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_link_begin_aux:nw #1
{
\bool_gset_true:N \g_@@_backend_link_bool
@@ -1377,7 +1389,7 @@
width ~ \dim_eval:n {#1} ~
height ~ \dim_eval:n {#2} ~
depth ~ \dim_eval:n {#3} ~
- <</Type/Annot #4 >>
+ << /Type /Annot #4 >>
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend.ins b/Master/texmf-dist/source/latex/l3backend/l3backend.ins
index 5bba632ffbb..8e316be0f04 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend.ins
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend.ins
@@ -35,7 +35,7 @@ license information is placed in the derived files.
\preamble
-Copyright (C) 1990-2021 The LaTeX Project
+Copyright (C) 2019-2021 The LaTeX Project
It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of