summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3backend
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-10 21:49:38 +0000
committerKarl Berry <karl@freefriends.org>2021-01-10 21:49:38 +0000
commita4410f9e5a2763c12cda6a12dd8241265fd0d169 (patch)
tree0ac81c2a979e76affdf0bb702cc166c83be06557 /Master/texmf-dist/tex/latex/l3backend
parent1a73c52220cf76a3e48179a1f63bc50f760ff759 (diff)
l3 (9jan21)
git-svn-id: svn://tug.org/texlive/trunk@57375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3backend')
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def140
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def7
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def6
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def36
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def36
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def140
6 files changed, 291 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
index 8643b498c4a..b64b2f1b028 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,dvipdfmx')
%% l3backend-pdf.dtx (with options: `package,dvipdfmx')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvipdfmx.def}{2020-09-24}{}
+ {l3backend-dvipdfmx.def}{2021-01-09}{}
{L3 backend support: dvipdfmx}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -54,20 +54,25 @@
{ \__kernel_backend_literal:n { x:gsave } }
\cs_new_protected:Npn \__kernel_backend_scope_end:
{ \__kernel_backend_literal:n { x:grestore } }
+\group_begin:
+ \cs_set:Npn \__sys_tmp:w #1 Version ~ #2 ~ #3 \q_stop {#2}
+ \sys_get_shell:nnNTF { extractbb~--version }
+ { \char_set_catcode_space:n { `\ } }
+ \l__sys_internal_tl
+ {
+ \int_const:Nn \c__kernel_sys_dvipdfmx_version_int
+ {
+ \exp_after:wN \__sys_tmp:w \l__sys_internal_tl
+ \q_stop
+ }
+ }
+ { \int_const:Nn \c__kernel_sys_dvipdfmx_version_int { 0 } }
+\group_end:
%% 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 }
{
- \cs_set_protected:Npn \__color_backend_pickup:N #1
+ \cs_set_protected:Npn \__color_backend_pickup:N #1
{
\exp_args:NV \tl_if_head_is_space:nTF \current@color
{
@@ -85,13 +90,71 @@
\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_separation:nn #1#2
- { \__color_backend_select:n { @#1 ~ [#2] } }
+\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \int_new:N \g__color_stack_int
+ \cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
+ {
+ \int_gincr:N \g__color_stack_int
+ \int_const:Nn #1 { \g__color_stack_int }
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstackinit ~
+ \int_use:N \g__color_stack_int \c_space_tl
+ \tl_if_blank:nF {#2} { #2 ~ }
+ (#3)
+ }
+ }
+ }
+\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \cs_new_protected:Npn \__kernel_color_stack_push:nn #1#2
+ {
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstack ~
+ \int_eval:n {#1} ~
+ push ~ (#2)
+ }
+ }
+ \cs_new_protected:Npn \__kernel_color_stack_pop:n #1
+ {
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstack ~
+ \int_eval:n {#1} ~
+ pop
+ }
+ }
+ }
+\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
{
- \__kernel_backend_literal:n { pdf: bc ~ #1 }
+ \__kernel_color_stack_push:nn \l__kernel_color_stack_int {#1}
\group_insert_after:N \__color_backend_reset:
}
+\cs_new_protected:Npn \__color_backend_reset:
+ { \__kernel_color_stack_pop:n \l__kernel_color_stack_int }
+\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \cs_gset_protected:Npn \__color_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \__color_backend_reset:
+ }
+ \cs_gset_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n
+ \cs_gset_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n
+ \cs_gset_protected:Npn \__color_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
+ }
+\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_eq:NN \__color_backend_select_devicen:nn \__color_backend_select_separation:nn
\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
{
@@ -109,16 +172,19 @@
/ \str_convert_pdfname:n {#1} ~ #2 ~
\pdf_object_last:
}
+ \use:x
+ {
+ \pdfmanagement_add:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_model_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
{
- \__kernel_backend_literal:x
- {
- pdf:obj ~ @color \int_use:N \g__color_model_int \c_space_tl
- [#1]
- }
+ \pdf_object_now:nx { array } {#1}
}
\cs_new_protected:Npn \__color_backend_separation_init_CIELAB:nnn #1#2#3
{
@@ -178,6 +244,13 @@
#2 ~
\pdf_object_last:
}
+ \use:x
+ {
+ \pdfmanagement_add:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_model_int }
+ { \pdf_object_last: }
+ }
}
\cs_if_exist:NF \pdf_object_now:nn
{ \cs_gset_protected:Npn \__color_backend_devicen_init:nnn #1#2#3 { } }
@@ -621,15 +694,26 @@
}
\cs_new:Npn \__pdf_backend_annotation_last:
{ @pdf.obj \int_use:N \g__pdf_backend_annotation_int }
+\int_new:N \g__pdf_backend_link_int
\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2
{ \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } }
\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2
{ \__pdf_backend_link_begin:n {#1#2} }
-\cs_new_protected:Npn \__pdf_backend_link_begin:n #1
+\cs_new_protected:Npx \__pdf_backend_link_begin:n #1
{
- \__pdf_backend:n
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int
+ }
+ \__pdf_backend:x
{
- bann
+ bann ~
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ @pdf.lnk
+ \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int
+ \c_space_tl
+ }
<<
/Type /Annot
#1
@@ -638,7 +722,14 @@
}
\cs_new_protected:Npn \__pdf_backend_link_end:
{ \__pdf_backend:n { eann } }
-\cs_new:Npn \__pdf_backend_link_last: { }
+\cs_new:Npx \__pdf_backend_link_last:
+ {
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ @pdf.lnk
+ \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int
+ }
+ }
\cs_new_protected:Npn \__pdf_backend_link_margin:n #1
{ \__kernel_backend_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } }
\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2
@@ -657,6 +748,7 @@
{ fitbv } { /FitBV ~ @xpos }
{ fith } { /FitH ~ @ypos }
{ fitv } { /FitV ~ @xpos }
+ { fitr } { /Fit }
}
{ /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
]
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
index 32425e0870a..61f8f584ea8 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,dvips')
%% l3backend-pdf.dtx (with options: `package,dvips')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvips.def}{2020-09-24}{}
+ {l3backend-dvips.def}{2021-01-09}{}
{L3 backend support: dvips}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -77,7 +77,7 @@
\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
+ \cs_set_protected:Npn \__color_backend_pickup:N #1
{
\exp_args:NV \tl_if_head_is_space:nTF \current@color
{
@@ -894,6 +894,7 @@
{ fitbv } { /FitBV ~ pdf.dest.x }
{ fith } { /FitH ~ pdf.dest.y }
{ fitv } { /FitV ~ pdf.dest.x }
+ { fitr } { /Fit }
}
{
/XYZ ~ pdf.dest.point ~ \fp_eval:n { (#2) / 100 }
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
index a85b91ed169..28a6be023e0 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,dvisvgm')
%% l3backend-pdf.dtx (with options: `package,dvisvgm')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvisvgm.def}{2020-09-24}{}
+ {l3backend-dvisvgm.def}{2021-01-09}{}
{L3 backend support: dvisvgm}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -89,7 +89,7 @@
\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
+ \cs_set_protected:Npn \__color_backend_pickup:N #1
{
\exp_args:NV \tl_if_head_is_space:nTF \current@color
{
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
index 80181c90df3..69caa65acef 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,luatex')
%% l3backend-pdf.dtx (with options: `package,luatex')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-luatex.def}{2020-09-24}{}
+ {l3backend-luatex.def}{2021-01-09}{}
{L3 backend support: PDF output (LuaTeX)}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -103,6 +103,25 @@
}
}
}
+\cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
+ {
+ \int_const:Nn #1
+ {
+ \tex_pdffeedback:D colorstackinit ~
+ \tl_if_blank:nF {#2} { #2 ~ }
+ {#3}
+ }
+ }
+\cs_new_protected:Npn \__kernel_color_stack_push:nn #1#2
+ {
+ \tex_pdfextension:D colorstack ~
+ \int_eval:n {#1} ~ push ~ {#2}
+ }
+\cs_new_protected:Npn \__kernel_color_stack_pop:n #1
+ {
+ \tex_pdfextension:D colorstack ~
+ \int_eval:n {#1} ~ pop \scan_stop:
+ }
\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 } }
@@ -112,15 +131,11 @@
{ \__color_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
\cs_new_protected:Npn \__color_backend_select:n #1
{
- \tex_pdfextension:D colorstack
- \l__kernel_color_stack_int push {#1}
+ \__kernel_color_stack_push:nn \l__kernel_color_stack_int {#1}
\group_insert_after:N \__color_backend_reset:
}
\cs_new_protected:Npn \__color_backend_reset:
- {
- \tex_pdfextension:D colorstack
- \l__kernel_color_stack_int pop \scan_stop:
- }
+ { \__kernel_color_stack_pop:n \l__kernel_color_stack_int }
\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_eq:NN \__color_backend_select_devicen:nn \__color_backend_select_separation:nn
@@ -142,7 +157,7 @@
}
\use:x
{
- \pdfcoredict_gput:nnn
+ \pdfmanagement_add:nnn
{ Page / Resources / ColorSpace }
{ color \int_use:N \g__color_model_int }
{ \pdf_object_last: }
@@ -214,7 +229,7 @@
}
\use:x
{
- \pdfcoredict_gput:nnn
+ \pdfmanagement_add:nnn
{ Page / Resources / ColorSpace }
{ color \int_use:N \g__color_model_int }
{ \pdf_object_last: }
@@ -574,6 +589,7 @@
{ fitbv } { fitbv }
{ fith } { fith }
{ fitv } { fitv }
+ { fitr } { fitr }
}
{ xyz ~ zoom \fp_eval:n { #2 * 10 } }
\scan_stop:
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
index fa05b1f7721..ec7b463b0a5 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,pdftex')
%% l3backend-pdf.dtx (with options: `package,pdftex')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-pdftex.def}{2020-09-24}{}
+ {l3backend-pdftex.def}{2021-01-09}{}
{L3 backend support: PDF output (pdfTeX)}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -103,6 +103,25 @@
}
}
}
+\cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
+ {
+ \int_const:Nn #1
+ {
+ \tex_pdfcolorstackinit:D
+ \tl_if_blank:nF {#2} { #2 ~ }
+ {#3}
+ }
+ }
+\cs_new_protected:Npn \__kernel_color_stack_push:nn #1#2
+ {
+ \tex_pdfcolorstack:D
+ \int_eval:n {#1} ~ push ~ {#2}
+ }
+\cs_new_protected:Npn \__kernel_color_stack_pop:n #1
+ {
+ \tex_pdfcolorstack:D
+ \int_eval:n {#1} ~ pop \scan_stop:
+ }
\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 } }
@@ -112,15 +131,11 @@
{ \__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}
+ \__kernel_color_stack_push:nn \l__kernel_color_stack_int {#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:
- }
+ { \__kernel_color_stack_pop:n \l__kernel_color_stack_int }
\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_eq:NN \__color_backend_select_devicen:nn \__color_backend_select_separation:nn
@@ -142,7 +157,7 @@
}
\use:x
{
- \pdfcoredict_gput:nnn
+ \pdfmanagement_add:nnn
{ Page / Resources / ColorSpace }
{ color \int_use:N \g__color_model_int }
{ \pdf_object_last: }
@@ -214,7 +229,7 @@
}
\use:x
{
- \pdfcoredict_gput:nnn
+ \pdfmanagement_add:nnn
{ Page / Resources / ColorSpace }
{ color \int_use:N \g__color_model_int }
{ \pdf_object_last: }
@@ -574,6 +589,7 @@
{ fitbv } { fitbv }
{ fith } { fith }
{ fitv } { fitv }
+ { fitr } { fitr }
}
{ xyz ~ zoom \fp_eval:n { #2 * 10 } }
\scan_stop:
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
index fa755e56742..9c90ca0c6fc 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
@@ -11,7 +11,7 @@
%% l3backend-graphics.dtx (with options: `package,xetex')
%% l3backend-pdf.dtx (with options: `package,xetex')
%%
-%% Copyright (C) 1990-2020 The LaTeX3 Project
+%% Copyright (C) 1990-2021 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
@@ -25,7 +25,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-xetex.def}{2020-09-24}{}
+ {l3backend-xetex.def}{2021-01-09}{}
{L3 backend support: XeTeX}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -54,20 +54,25 @@
{ \__kernel_backend_literal:n { x:gsave } }
\cs_new_protected:Npn \__kernel_backend_scope_end:
{ \__kernel_backend_literal:n { x:grestore } }
+\group_begin:
+ \cs_set:Npn \__sys_tmp:w #1 Version ~ #2 ~ #3 \q_stop {#2}
+ \sys_get_shell:nnNTF { extractbb~--version }
+ { \char_set_catcode_space:n { `\ } }
+ \l__sys_internal_tl
+ {
+ \int_const:Nn \c__kernel_sys_dvipdfmx_version_int
+ {
+ \exp_after:wN \__sys_tmp:w \l__sys_internal_tl
+ \q_stop
+ }
+ }
+ { \int_const:Nn \c__kernel_sys_dvipdfmx_version_int { 0 } }
+\group_end:
%% 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 }
{
- \cs_set_protected:Npn \__color_backend_pickup:N #1
+ \cs_set_protected:Npn \__color_backend_pickup:N #1
{
\exp_args:NV \tl_if_head_is_space:nTF \current@color
{
@@ -85,13 +90,71 @@
\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_separation:nn #1#2
- { \__color_backend_select:n { @#1 ~ [#2] } }
+\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \int_new:N \g__color_stack_int
+ \cs_new_protected:Npn \__kernel_color_stack_init:Nnn #1#2#3
+ {
+ \int_gincr:N \g__color_stack_int
+ \int_const:Nn #1 { \g__color_stack_int }
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstackinit ~
+ \int_use:N \g__color_stack_int \c_space_tl
+ \tl_if_blank:nF {#2} { #2 ~ }
+ (#3)
+ }
+ }
+ }
+\int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \cs_new_protected:Npn \__kernel_color_stack_push:nn #1#2
+ {
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstack ~
+ \int_eval:n {#1} ~
+ push ~ (#2)
+ }
+ }
+ \cs_new_protected:Npn \__kernel_color_stack_pop:n #1
+ {
+ \__kernel_backend_literal:x
+ {
+ pdfcolorstack ~
+ \int_eval:n {#1} ~
+ pop
+ }
+ }
+ }
+\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
{
- \__kernel_backend_literal:n { pdf: bc ~ #1 }
+ \__kernel_color_stack_push:nn \l__kernel_color_stack_int {#1}
\group_insert_after:N \__color_backend_reset:
}
+\cs_new_protected:Npn \__color_backend_reset:
+ { \__kernel_color_stack_pop:n \l__kernel_color_stack_int }
+\int_compare:nNnT \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \cs_gset_protected:Npn \__color_backend_select_cmyk:n #1
+ {
+ \__kernel_backend_literal:n { pdf: bc ~ [#1] }
+ \group_insert_after:N \__color_backend_reset:
+ }
+ \cs_gset_eq:NN \__color_backend_select_gray:n \__color_backend_select_cmyk:n
+ \cs_gset_eq:NN \__color_backend_select_rgb:n \__color_backend_select_cmyk:n
+ \cs_gset_protected:Npn \__color_backend_reset:
+ { \__kernel_backend_literal:n { pdf: ec } }
+ }
+\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_eq:NN \__color_backend_select_devicen:nn \__color_backend_select_separation:nn
\cs_new_protected:Npn \__color_backend_separation_init:nnnnn #1#2#3#4#5
{
@@ -109,16 +172,19 @@
/ \str_convert_pdfname:n {#1} ~ #2 ~
\pdf_object_last:
}
+ \use:x
+ {
+ \pdfmanagement_add:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_model_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
{
- \__kernel_backend_literal:x
- {
- pdf:obj ~ @color \int_use:N \g__color_model_int \c_space_tl
- [#1]
- }
+ \pdf_object_now:nx { array } {#1}
}
\cs_new_protected:Npn \__color_backend_separation_init_CIELAB:nnn #1#2#3
{
@@ -178,6 +244,13 @@
#2 ~
\pdf_object_last:
}
+ \use:x
+ {
+ \pdfmanagement_add:nnn
+ { Page / Resources / ColorSpace }
+ { color \int_use:N \g__color_model_int }
+ { \pdf_object_last: }
+ }
}
\cs_if_exist:NF \pdf_object_now:nn
{ \cs_gset_protected:Npn \__color_backend_devicen_init:nnn #1#2#3 { } }
@@ -667,15 +740,26 @@
}
\cs_new:Npn \__pdf_backend_annotation_last:
{ @pdf.obj \int_use:N \g__pdf_backend_annotation_int }
+\int_new:N \g__pdf_backend_link_int
\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2
{ \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } }
\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2
{ \__pdf_backend_link_begin:n {#1#2} }
-\cs_new_protected:Npn \__pdf_backend_link_begin:n #1
+\cs_new_protected:Npx \__pdf_backend_link_begin:n #1
{
- \__pdf_backend:n
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ \exp_not:N \int_gincr:N \exp_not:N \g__pdf_backend_link_int
+ }
+ \__pdf_backend:x
{
- bann
+ bann ~
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ @pdf.lnk
+ \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int
+ \c_space_tl
+ }
<<
/Type /Annot
#1
@@ -684,7 +768,14 @@
}
\cs_new_protected:Npn \__pdf_backend_link_end:
{ \__pdf_backend:n { eann } }
-\cs_new:Npn \__pdf_backend_link_last: { }
+\cs_new:Npx \__pdf_backend_link_last:
+ {
+ \int_compare:nNnF \c__kernel_sys_dvipdfmx_version_int < { 20201111 }
+ {
+ @pdf.lnk
+ \exp_not:N \int_use:N \exp_not:N \g__pdf_backend_link_int
+ }
+ }
\cs_new_protected:Npn \__pdf_backend_link_margin:n #1
{ \__kernel_backend_literal:x { dvipdfmx:config~g~ \dim_eval:n {#1} } }
\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2
@@ -703,6 +794,7 @@
{ fitbv } { /FitBV ~ @xpos }
{ fith } { /FitH ~ @ypos }
{ fitv } { /FitV ~ @xpos }
+ { fitr } { /Fit }
}
{ /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
]