diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 107 |
1 files changed, 30 insertions, 77 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 384008e0540..ad402056269 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -6,7 +6,7 @@ %% %% l3drivers.dtx (with options: `package,dvips') %% -%% Copyright (C) 1990-2017 The LaTeX3 Project +%% Copyright (C) 1990-2018 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 @@ -22,12 +22,12 @@ \ProvidesExplFile {l3dvips.def}{2017/03/18}{} {L3 Experimental driver: dvips} -\cs_new_protected:Npn \__driver_color_pickup:N #1 { } +\cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { \@ifpackageloaded { color } { - \cs_set_protected:Npn \__driver_color_pickup:N #1 + \cs_set_protected:Npn \driver_color_pickup:N #1 { \exp_args:NV \tl_if_head_is_space:nTF \current@color { @@ -37,31 +37,24 @@ \exp_after:wN \use:n \current@color \c_space_tl 1 } } - { \exp_after:wN \__driver_color_pickup_aux:w \current@color \q_stop #1 } + { \exp_after:wN \__driver_color_pickup:w \current@color \q_stop #1 } } - \cs_new_protected:Npn \__driver_color_pickup_aux:w #1 ~ #2 \q_stop #3 + \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 \q_stop #3 { \tl_set:Nn #3 { #1 ~ #2 } } } { } } +\cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 + { \__driver_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } } +\cs_new_protected:Npn \driver_color_gray:n #1 + { \__driver_color_select:n { gray~ #1 } } +\cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 + { \__driver_color_select:n { rgb~ #1 ~ #2 ~ #3 } } +\cs_new_protected:Npn \driver_color_spot:nn #1#2 + { \__driver_color_select:n { color~push~\c_space_tl #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 - { - \tex_special:D - { - color~push~ - \cs_if_exist_use:cF - { __driver_color_convert_ \__driver_convert_model:w #1 \q_stop :n } - { \use:n } - {#1} - } - } -\cs_generate_variant:Nn \__driver_color_select:n { V } -\cs_new:Npn \__driver_convert_model:w #1 ~ #2 \q_stop {#1} -\cs_new:Npn \__driver_color_convert_spot:n #1 - { \__driver_color_convert_spot:w #1 \q_stop } -\cs_new:Npn \__driver_color_convert_spot:w #1 ~ #2 ~ #3 \q_stop - { \c_space_tl #2 } -\cs_new_protected:Npn \__driver_color_reset: + { \tex_special:D { color~push~ #1 } } +\cs_new_protected:Npn \driver_color_reset: { \tex_special:D { color~pop } } \cs_new_protected:Npn \__driver_literal:n #1 { @@ -288,7 +281,7 @@ { \dim_to_decimal_in_bp:n {#1} ~ setlinewidth } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:x { \fp_eval:n {#1} ~ setmiterlimit } } + { \__driver_draw_literal:n { #1 ~ setmiterlimit } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ setlinecap } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -308,89 +301,49 @@ } \cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4 { - \__driver_draw_literal:x - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ - setcmykcolor ~ - } + \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor } \__driver_draw_color_reset: } \cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4 { - \__driver_draw_literal:x - { - /l3fc ~ - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ - setcmykcolor - } ~ - def - } + \__driver_draw_literal:n + { /l3fc ~ { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor ~ } ~ def } } \cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4 { - \__driver_draw_literal:x - { - /l3sc ~ - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ - setcmykcolor - } ~ - def - } + \__driver_draw_literal:n + { /l3sc ~ { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor ~ } ~ def } } \cs_new_protected:Npn \driver_draw_color_gray:n #1 { - \__driver_draw_literal:x { fp_eval:n {#1} ~ setgray } + \__driver_draw_literal:n { #1 ~ setgray } \__driver_draw_color_reset: } \cs_new_protected:Npn \driver_draw_fill_gray:n #1 - { \__driver_draw_literal:x { /l3fc ~ { \fp_eval:n {#1} ~ setgray } ~ def } } + { \__driver_draw_literal:n { /l3fc ~ { #1 ~ setgray } ~ def } } \cs_new_protected:Npn \driver_draw_stroke_gray:n #1 - { \__driver_draw_literal:x { /l3sc ~ { \fp_eval:n {#1} ~ setgray } ~ def } } + { \__driver_draw_literal:n { /l3sc ~ { #1 ~ setgray } ~ def } } \cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3 { - \__driver_draw_literal:x - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ - setrgbcolor - } + \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ setrgbcolor } \__driver_draw_color_reset: } \cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3 { - \__driver_draw_literal:x - { - /l3fc ~ - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ - setrgbcolor - } ~ - def - } + \__driver_draw_literal:n + { /l3fc ~ { #1 ~ #2 ~ #3 ~ setrgbcolor } ~ def } } \cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3 { - \__driver_draw_literal:x - { - /l3sc ~ - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ - setrgbcolor - } ~ - def - } + \__driver_draw_literal:n + { /l3sc ~ { #1 ~ #2 ~ #3 ~ setrgbcolor } ~ def } } \cs_new_protected:Npn \driver_draw_transformcm:nnnnnn #1#2#3#4#5#6 { \__driver_draw_literal:x { [ - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + #1 ~ #2 ~ #3 ~ #4 ~ \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~ ] ~ concat |