diff options
author | Karl Berry <karl@freefriends.org> | 2020-08-07 21:37:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-08-07 21:37:39 +0000 |
commit | d6a7e0e5536b4924edec286797ed38021b94509d (patch) | |
tree | 04407161e6a03a0698d3029183d3959a762a0bb2 /Master/texmf-dist/tex/latex/l3backend | |
parent | 5a14bab00bc59f46bdb92dcfc08ca2d331e3c3ec (diff) |
l3 (7aug20)
git-svn-id: svn://tug.org/texlive/trunk@56067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3backend')
5 files changed, 295 insertions, 327 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def index dcffe9a1511..f03b3c7b345 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def @@ -25,7 +25,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvipdfmx.def}{2020-06-29}{} + {l3backend-dvipdfmx.def}{2020-08-07}{} {L3 backend support: dvipdfmx} \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 @@ -42,37 +42,32 @@ { \__kernel_backend_literal:n { x:grestore } } %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } -\AtBeginDocument +\cs_if_exist:cT { ver@color.sty } { - \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 { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nx #1 - { - { spot } - { \exp_after:wN \use:n \current@color \c_space_tl 1 } - } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } + \tl_set:Nx #1 + { + { \exp_after:wN \use:n \current@color } + { 1 } + } + } + { + \exp_last_unbraced:Nx \__color_backend_pickup:w + { \current@color } \s__color_stop #1 } - \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_pickup:w #1 ~ #2 \s__color_stop #3 + { \tl_set:Nn #3 { {#1} {#2} } } } -\cs_new_protected:Npn \__color_backend_cmyk:n #1 +\cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } -\cs_new_protected:Npn \__color_backend_gray:n #1 +\cs_new_protected:Npn \__color_backend_select_gray:n #1 { \__color_backend_select:n { gray ~ #1 } } -\cs_new_protected:Npn \__color_backend_rgb:n #1 +\cs_new_protected:Npn \__color_backend_select_rgb:n #1 { \__color_backend_select:n { rgb ~ #1 } } -\cs_new_protected:Npn \__color_backend_spot:n #1 - { \__color_backend_select:n {#1} } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { color~push~ #1 } @@ -80,6 +75,24 @@ } \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_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 { @@ -221,20 +234,6 @@ { \__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_color_fill_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ k } } -\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ K } } -\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ g } } -\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ G } } -\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ rg } } -\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ RG } } -\cs_new_eq:NN \__draw_backend_color_select:n \__kernel_backend_literal_pdf:n -\cs_generate_variant:Nn \__draw_backend_color_select:n { x } \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 { \__draw_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4} @@ -315,8 +314,7 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\AtBeginDocument - { \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_protected:Npn \__graphics_backend_getbb_jpg:n #1 { \int_zero:N \l_graphics_page_int @@ -472,15 +470,12 @@ \cs_new:Npn \__pdf_backend_pageobject_ref:n #1 { @page #1 } \bool_new:N \g__pdf_landscape_bool -\AtBeginDocument +\cs_if_exist:NT \landscape { - \cs_if_exist:NT \landscape - { - \tl_put_right:Nn \landscape - { \bool_gset_true:N \g__pdf_landscape_bool } - \tl_put_left:Nn \endlandscape - { \bool_gset_false:N \g__pdf_landscape_bool } - } + \tl_put_right:Nn \landscape + { \bool_gset_true:N \g__pdf_landscape_bool } + \tl_put_left:Nn \endlandscape + { \bool_gset_false:N \g__pdf_landscape_bool } } \int_new:N \g__pdf_backend_annotation_int \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4 diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def index 5a9a50aa57e..1a638ce9abb 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def @@ -25,7 +25,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvips.def}{2020-06-29}{} + {l3backend-dvips.def}{2020-08-07}{} {L3 backend support: dvips} \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 @@ -63,45 +63,59 @@ { \__kernel_backend_literal:n { ps:grestore } } %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } -\AtBeginDocument +\cs_if_exist:cT { ver@color.sty } { - \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 { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nx #1 - { - { spot } - { \exp_after:wN \use:n \current@color \c_space_tl 1 } - } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } + \tl_set:Nx #1 + { + { \exp_after:wN \use:n \current@color } + { 1 } + } + } + { + \exp_last_unbraced:Nx \__color_backend_pickup:w + { \current@color } \s__color_stop #1 } - \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_pickup:w #1 ~ #2 \s__color_stop #3 + { \tl_set:Nn #3 { {#1} {#2} } } } -\cs_new_protected:Npn \__color_backend_cmyk:n #1 +\cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } -\cs_new_protected:Npn \__color_backend_gray:n #1 +\cs_new_protected:Npn \__color_backend_select_gray:n #1 { \__color_backend_select:n { gray ~ #1 } } -\cs_new_protected:Npn \__color_backend_rgb:n #1 +\cs_new_protected:Npn \__color_backend_select_rgb:n #1 { \__color_backend_select:n { rgb ~ #1 } } -\cs_new_protected:Npn \__color_backend_spot:n #1 - { \__color_backend_select:n {#1} } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { color~push~ #1 } - \__kernel_backend_postscript:n { /color.fc~{ }~def } + \__kernel_backend_postscript:n { /color.sc~ { ~ } ~def } + \__kernel_backend_postscript:n { /color.fc~ { ~ } ~def } \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} } +\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 + { \__kernel_backend_postscript:n { /color.fc { #1 ~ setgray } def } } +\cs_new_protected:Npn \__color_backend_fill_rgb:n #1 + { \__kernel_backend_postscript:n { /color.fc { #1 ~ setrgbcolor } def } } + \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1 + { \__kernel_backend_postscript:n { /color.sc { #1 ~ setcmykcolor } def } } +\cs_new_protected:Npn \__color_backend_stroke_gray:n #1 + { \__kernel_backend_postscript:n { /color.sc { #1 ~ setgray } def } } +\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1 + { \__kernel_backend_postscript:n { /color.sc { #1 ~ setrgbcolor } def } } +\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2 + { \__kernel_backend_postscript:n { /color.fc { #1 } def } } +\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2 + { \__kernel_backend_postscript:n { /color.sc { #1 } def } } %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { @@ -163,7 +177,6 @@ { \__kernel_backend_literal:n { ps::[begin] } \__draw_backend_literal:n { @beginspecial } - \__draw_backend_literal:n { SDict ~ begin ~ /color.fc ~ { } ~ def ~ end } } \cs_new_protected:Npn \__draw_backend_end: { @@ -218,7 +231,10 @@ { \__draw_backend_literal:n { closepath } } \cs_new_protected:Npn \__draw_backend_stroke: { + \__draw_backend_literal:n { gsave } + \__draw_backend_literal:n { color.sc } \__draw_backend_literal:n { stroke } + \__draw_backend_literal:n { grestore } \bool_if:NT \g__draw_draw_clip_bool { \__draw_backend_literal:x @@ -259,6 +275,7 @@ \cs_new_protected:Npn \__draw_backend_fillstroke: { \__draw_backend_literal:n { gsave } + \__draw_backend_literal:n { color.sc } \__draw_backend_literal:n { color.fc } \__draw_backend_literal:x { @@ -326,28 +343,6 @@ { \__draw_backend_literal:n { 1 ~ setlinejoin } } \cs_new_protected:Npn \__draw_backend_join_bevel: { \__draw_backend_literal:n { 2 ~ setlinejoin } } -\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1 - { \__draw_backend_color_fill:n { #1 ~ setcmykcolor } } -\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1 - { \__draw_backend_color_stroke:n { cmyk ~ #1 } } -\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 - { \__draw_backend_color_fill:n { #1 ~ setgray } } -\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 - { \__draw_backend_color_stroke:n { gray ~ #1 } } -\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1 - { \__draw_backend_color_fill:n { #1 ~ setrgbcolor } } -\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1 - { \__draw_backend_color_stroke:n { rgb ~ #1 } } -\cs_new_protected:Npn \__draw_backend_color_fill:n #1 - { - \__kernel_backend_postscript:n - { /color.fc ~ { #1 } ~ def } - } -\cs_new_protected:Npn \__draw_backend_color_stroke:n #1 - { - \__kernel_backend_literal:n { color~push~#1 } - \group_insert_after:N \__draw_color_reset: - } \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 { \__draw_backend_literal:n @@ -374,8 +369,7 @@ \__draw_backend_literal:n { @beginspecial } } %% File: l3backend-graphics.dtx -\AtBeginDocument - { \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_protected:Npn \__graphics_backend_include_eps:n #1 { \__kernel_backend_literal:x diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def index 3461b4a3ce2..007c597b7ab 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvisvgm.def @@ -25,7 +25,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-dvisvgm.def}{2020-06-29}{} + {l3backend-dvisvgm.def}{2020-08-07}{} {L3 backend support: dvisvgm} \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 @@ -34,46 +34,71 @@ \cs_new_protected:Npn \__kernel_backend_literal_svg:n #1 { \__kernel_backend_literal:n { dvisvgm:raw~ #1 { ?nl } } } \cs_generate_variant:Nn \__kernel_backend_literal_svg:n { x } +\int_new:N \g__kernel_backend_scope_int +\int_new:N \l__kernel_backend_scope_int \cs_new_protected:Npn \__kernel_backend_scope_begin: - { \__kernel_backend_literal_svg:n { <g> } } + { + \__kernel_backend_literal_svg:n { <g> } + \int_set_eq:NN + \l__kernel_backend_scope_int + \g__kernel_backend_scope_int + \group_begin: + \int_gset:Nn \g__kernel_backend_scope_int { 1 } + } \cs_new_protected:Npn \__kernel_backend_scope_end: - { \__kernel_backend_literal_svg:n { </g> } } + { + \prg_replicate:nn + { \g__kernel_backend_scope_int } + { \__kernel_backend_literal_svg:n { </g> } } + \group_end: + \int_gset_eq:NN + \g__kernel_backend_scope_int + \l__kernel_backend_scope_int + } \cs_new_protected:Npn \__kernel_backend_scope_begin:n #1 - { \__kernel_backend_literal_svg:n { <g~ #1 > } } + { + \__kernel_backend_literal_svg:n { <g ~ #1 > } + \int_set_eq:NN + \l__kernel_backend_scope_int + \g__kernel_backend_scope_int + \group_begin: + \int_gset:Nn \g__kernel_backend_scope_int { 1 } + } \cs_generate_variant:Nn \__kernel_backend_scope_begin:n { x } +\cs_new_protected:Npn \__kernel_backend_scope:n #1 + { + \__kernel_backend_literal_svg:n { <g ~ #1 > } + \int_gincr:N \g__kernel_backend_scope_int + } +\cs_generate_variant:Nn \__kernel_backend_scope:n { x } %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } -\AtBeginDocument +\cs_if_exist:cT { ver@color.sty } { - \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 + { + \tl_set:Nx #1 + { + { \exp_after:wN \use:n \current@color } + { 1 } + } + } { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nx #1 - { - { spot } - { \exp_after:wN \use:n \current@color \c_space_tl 1 } - } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } + \exp_last_unbraced:Nx \__color_backend_pickup:w + { \current@color } \s__color_stop #1 } - \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_pickup:w #1 ~ #2 \s__color_stop #3 + { \tl_set:Nn #3 { {#1} {#2} } } } -\cs_new_protected:Npn \__color_backend_cmyk:n #1 +\cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } -\cs_new_protected:Npn \__color_backend_gray:n #1 +\cs_new_protected:Npn \__color_backend_select_gray:n #1 { \__color_backend_select:n { gray ~ #1 } } -\cs_new_protected:Npn \__color_backend_rgb:n #1 +\cs_new_protected:Npn \__color_backend_select_rgb:n #1 { \__color_backend_select:n { rgb ~ #1 } } -\cs_new_protected:Npn \__color_backend_spot:n #1 - { \__color_backend_select:n {#1} } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { color~push~ #1 } @@ -81,6 +106,74 @@ } \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_fill_cmyk:n #1 + { \__color_backend_cmyk:nw { fill } #1 \s__color_stop } +\cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1 + { \__color_backend_cmyk:nw { stroke } #1 \s__color_stop } +\cs_new_protected:Npn \__color_backend_cmyk:nw + #1#2 ~ #3 ~ #4 ~ #5 \s__color_stop + { + \use:x + { + \__color_backend:nnnn + {#1} + { \fp_eval:n { -100 * ( 1 - min ( 1 , #2 + #5 ) ) } } + { \fp_eval:n { -100 * ( 1 - min ( 1 , #3 + #5 ) ) } } + { \fp_eval:n { -100 * ( 1 - min ( 1 , #4 + #5 ) ) } } + } + } +\cs_new_protected:Npn \__color_backend_fill_gray:n #1 + { \__color_backend_grab:nn { fill } {#1} } +\cs_new_protected:Npn \__color_backend_stroke_gray:n #1 + { \__color_backend_grab:nn { stroke } {#1} } +\cs_new_protected:Npn \__color_backend_gray:nn #1#2 + { + \use:x + { + \__color_backend_gray_aux:nn + {#1} + { \fp_eval:n { 100 * (#2) } } + } + } +\cs_new_protected:Npn \__color_backend_gray_aux:nn #1#2 + { \__color_backend:nnn {#1} {#2} {#2} {#2} } +\cs_new_protected:Npn \__color_backend_fill_rgb:n #1 + { \__color_backend_rgb:nw { fill } #1 \s__color_stop } +\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1 + { \__color_backend_rgb:nw { stroke } #1 \s__color_stop } +\cs_new_protected:Npn \__color_backend_rgb:nw + #1#2 ~ #3 ~ #4\s__color_stop + { + \use:x + { + \__color_backend:nnnn + { fill } + { \fp_eval:n { 100 * (#2) } } + { \fp_eval:n { 100 * (#3) } } + { \fp_eval:n { 100 * (#4) } } + } + } +\cs_new_protected:Npx \__color_backend:nnnn #1#2#3#4 + { + \__kernel_backend_scope:n + { + #1 = + " + rgb + ( + #2 \c_percent_str , + #3 \c_percent_str , + #4 \c_percent_str + ) + " + } + } +\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2 + { } +\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2 + { } %% File: l3backend-box.dtx \cs_new_protected:Npn \__box_backend_clip:N #1 { @@ -114,12 +207,12 @@ scale ( 1 , -1 ) " } - \__kernel_backend_scope_begin:x + \__kernel_backend_scope:x { clip-path = "url ( \c_hash_str l3cp \int_use:N \g__box_clip_path_int ) " } - \__kernel_backend_scope_begin:n + \__kernel_backend_scope:n { transform = " @@ -130,8 +223,6 @@ } \box_use:N #1 \__kernel_backend_scope_end: - \__kernel_backend_scope_end: - \__kernel_backend_scope_end: } \int_new:N \g__box_clip_path_int \cs_new_protected:Npn \__box_backend_rotate:Nn #1#2 @@ -171,37 +262,10 @@ \cs_generate_variant:Nn \__draw_backend_literal:n { x } \cs_new_protected:Npn \__draw_backend_begin: { - \__draw_backend_scope_begin: - \__draw_backend_scope:n { transform="translate({?x},{?y})~scale(1,-1)" } - } -\cs_new_protected:Npn \__draw_backend_end: - { \__draw_backend_scope_end: } -\cs_new_protected:Npn \__draw_backend_scope_begin: - { - \int_set_eq:NN - \l__draw_draw_scope_int - \g__draw_draw_scope_int - \group_begin: - \int_gzero:N \g__draw_draw_scope_int - } -\cs_new_protected:Npn \__draw_backend_scope_end: - { - \prg_replicate:nn - { \g__draw_draw_scope_int } - { \__draw_backend_literal:n { </g> } } - \group_end: - \int_gset_eq:NN - \g__draw_draw_scope_int - \l__draw_draw_scope_int - } -\cs_new_protected:Npn \__draw_backend_scope:n #1 - { - \__draw_backend_literal:n { <g~ #1 > } - \int_gincr:N \g__draw_draw_scope_int + \__kernel_backend_scope_begin: + \__kernel_backend_scope:n { transform="translate({?x},{?y})~scale(1,-1)" } } -\cs_generate_variant:Nn \__draw_backend_scope:n { x } -\int_new:N \g__draw_draw_scope_int -\int_new:N \l__draw_draw_scope_int +\cs_new_eq:NN \__draw_backend_end: \__kernel_backend_scope_end: \cs_new_protected:Npn \__draw_backend_moveto:nn #1#2 { \__draw_backend_add_to_path:n @@ -355,68 +419,6 @@ { \__draw_backend_scope:n { stroke-linejoin="round" } } \cs_new_protected:Npn \__draw_backend_join_bevel: { \__draw_backend_scope:n { stroke-linejoin="bevel" } } -\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1 - { \__draw_backend_color_cmyk:nw { fill } #1 \s__draw_stop } -\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1 - { \__draw_backend_color_cmyk:nw { stroke } #1 \s__draw_stop } -\cs_new_protected:Npn \__draw_backend_color_cmyk:nw - #1#2 ~ #3 ~ #4 ~ #5 \s__draw_stop - { - \use:x - { - \__draw_backend_color:nnnn - {#1} - { \fp_eval:n { -100 * ( 1 - min ( 1 , #2 + #5 ) ) } } - { \fp_eval:n { -100 * ( 1 - min ( 1 , #3 + #5 ) ) } } - { \fp_eval:n { -100 * ( 1 - min ( 1 , #4 + #5 ) ) } } - } - } -\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 - { \__draw_backend_color_grab:nn { fill } {#1} } -\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 - { \__draw_backend_color_grab:nn { stroke } {#1} } -\cs_new_protected:Npn \__draw_backend_color_gray:nn #1#2 - { - \use:x - { - \__draw_backend_color_gray_aux:nn - {#1} - { \fp_eval:n { 100 * (#2) } } - } - } -\cs_new_protected:Npn \__draw_backend_color_gray_aux:nn #1#2 - { \__draw_backend_color:nnn {#1} {#2} {#2} {#2} } -\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1 - { \__draw_backend_color_rgb:nw { fill } #1 \s__draw_stop } -\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1 - { \__draw_backend_color_rgb:nw { stroke } #1 \s__draw_stop } -\cs_new_protected:Npn \__draw_backend_color_rgb:nw - #1#2 ~ #3 ~ #4\s__draw_stop - { - \use:x - { - \__draw_backend_color:nnnn - { fill } - { \fp_eval:n { 100 * (#2) } } - { \fp_eval:n { 100 * (#3) } } - { \fp_eval:n { 100 * (#4) } } - } - } -\cs_new_protected:Npx \__draw_backend_color:nnnn #1#2#3#4 - { - \__draw_backend_scope:n - { - #1 = - " - rgb - ( - #2 \c_percent_str , - #3 \c_percent_str , - #4 \c_percent_str - ) - " - } - } \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 { \__draw_backend_scope:n @@ -444,8 +446,7 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\AtBeginDocument - { \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_protected:Npn \__graphics_backend_getbb_jpg:n #1 { \int_zero:N \l_graphics_page_int diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def index 6d90ccf514e..b811d5f7301 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def @@ -25,7 +25,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-pdfmode.def}{2020-06-29}{} + {l3backend-pdfmode.def}{2020-08-07}{} {L3 backend support: PDF mode} \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 @@ -69,51 +69,44 @@ \cs_generate_variant:Nn \__kernel_backend_matrix:n { x } %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } -\AtBeginDocument +\cs_if_exist:cT { ver@color.sty } { - \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_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 + \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 {#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 {#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 {#5} { k } + { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } } + { + \str_if_eq:nnTF {#2} { cs } { - \str_if_eq:nnTF {#2} { cs } - { - \tl_set:Nx #7 { { spot } { \use_none:n #1 ~ #5 } } - } - { - \tl_set:Nn #7 { { gray } { 0 } } - } + \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_cmyk:n #1 +\cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { #1 ~ k ~ #1 ~ K } } -\cs_new_protected:Npn \__color_backend_gray:n #1 +\cs_new_protected:Npn \__color_backend_select_gray:n #1 { \__color_backend_select:n { #1 ~ g ~ #1 ~ G } } -\cs_new_protected:Npn \__color_backend_rgb:n #1 +\cs_new_protected:Npn \__color_backend_select_rgb:n #1 { \__color_backend_select:n { #1 ~ rg ~ #1 ~ RG } } -\cs_new_protected:Npn \__color_backend_spot:n #1 - { \__color_backend_spot:w #1 \s__color_stop } -\cs_new_protected:Npn \__color_backend_spot:w #1 ~ #2 \s__color_stop - { \__color_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } } \cs_new_protected:Npx \__color_backend_select:n #1 { \cs_if_exist:NTF \tex_pdfextension:D @@ -129,6 +122,24 @@ { \tex_pdfcolorstack:D } \exp_not:N \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_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 { @@ -283,34 +294,6 @@ { \__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_color_fill_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ k } } -\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ K } } -\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ g } } -\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ G } } -\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ rg } } -\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ RG } } -\cs_new_protected:Npx \__draw_backend_color_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 \__draw_backend_color_reset: - } -\cs_new_protected:Npx \__draw_backend_color_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: - } -\cs_generate_variant:Nn \__draw_backend_color_select:n { x } \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 { \__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 } diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def index e2557ea7d3f..983dc39b90c 100644 --- a/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def @@ -25,7 +25,7 @@ %% %% File: l3backend-basics.dtx \ProvidesExplFile - {l3backend-xdvipdfmx.def}{2020-06-29}{} + {l3backend-xdvipdfmx.def}{2020-08-07}{} {L3 backend support: xdvipdfmx} \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 @@ -42,37 +42,32 @@ { \__kernel_backend_literal:n { x:grestore } } %% File: l3backend-color.dtx \cs_new_protected:Npn \__color_backend_pickup:N #1 { } -\AtBeginDocument +\cs_if_exist:cT { ver@color.sty } { - \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 { - \exp_args:NV \tl_if_head_is_space:nTF \current@color - { - \tl_set:Nx #1 - { - { spot } - { \exp_after:wN \use:n \current@color \c_space_tl 1 } - } - } - { - \exp_last_unbraced:Nx \__color_backend_pickup:w - { \current@color } \s__color_stop #1 - } + \tl_set:Nx #1 + { + { \exp_after:wN \use:n \current@color } + { 1 } + } + } + { + \exp_last_unbraced:Nx \__color_backend_pickup:w + { \current@color } \s__color_stop #1 } - \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_pickup:w #1 ~ #2 \s__color_stop #3 + { \tl_set:Nn #3 { {#1} {#2} } } } -\cs_new_protected:Npn \__color_backend_cmyk:n #1 +\cs_new_protected:Npn \__color_backend_select_cmyk:n #1 { \__color_backend_select:n { cmyk ~ #1 } } -\cs_new_protected:Npn \__color_backend_gray:n #1 +\cs_new_protected:Npn \__color_backend_select_gray:n #1 { \__color_backend_select:n { gray ~ #1 } } -\cs_new_protected:Npn \__color_backend_rgb:n #1 +\cs_new_protected:Npn \__color_backend_select_rgb:n #1 { \__color_backend_select:n { rgb ~ #1 } } -\cs_new_protected:Npn \__color_backend_spot:n #1 - { \__color_backend_select:n {#1} } \cs_new_protected:Npn \__color_backend_select:n #1 { \__kernel_backend_literal:n { color~push~ #1 } @@ -80,6 +75,24 @@ } \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_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 { @@ -221,20 +234,6 @@ { \__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_color_fill_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ k } } -\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1 - { \__draw_backend_color_select:n { #1 ~ K } } -\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ g } } -\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 - { \__draw_backend_color_select:n { #1 ~ G } } -\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ rg } } -\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1 - { \__draw_backend_color_select:n { #1 ~ RG } } -\cs_new_eq:NN \__draw_backend_color_select:n \__kernel_backend_literal_pdf:n -\cs_generate_variant:Nn \__draw_backend_color_select:n { x } \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 { \__draw_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4} @@ -315,8 +314,7 @@ \__kernel_backend_scope_end: } %% File: l3backend-graphics.dtx -\AtBeginDocument - { \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 \int_new:N \g__graphics_track_int \cs_new_protected:Npn \__graphics_backend_include_eps:n #1 { @@ -518,15 +516,12 @@ \cs_new:Npn \__pdf_backend_pageobject_ref:n #1 { @page #1 } \bool_new:N \g__pdf_landscape_bool -\AtBeginDocument +\cs_if_exist:NT \landscape { - \cs_if_exist:NT \landscape - { - \tl_put_right:Nn \landscape - { \bool_gset_true:N \g__pdf_landscape_bool } - \tl_put_left:Nn \endlandscape - { \bool_gset_false:N \g__pdf_landscape_bool } - } + \tl_put_right:Nn \landscape + { \bool_gset_true:N \g__pdf_landscape_bool } + \tl_put_left:Nn \endlandscape + { \bool_gset_false:N \g__pdf_landscape_bool } } \int_new:N \g__pdf_backend_annotation_int \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4 |