diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-10 21:49:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-10 21:49:38 +0000 |
commit | a4410f9e5a2763c12cda6a12dd8241265fd0d169 (patch) | |
tree | 0ac81c2a979e76affdf0bb702cc166c83be06557 /Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def | |
parent | 1a73c52220cf76a3e48179a1f63bc50f760ff759 (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/l3backend-dvipdfmx.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def | 140 |
1 files changed, 116 insertions, 24 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 } } ] |