diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 19 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 22 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def | 90 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | 163 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def | 116 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def | 105 |
8 files changed, 388 insertions, 186 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 795323b757e..2d36561733f 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -82,8 +82,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3}% \def\ExplFileDescription{L3 programming layer}% -\def\ExplFileDate{2016/04/20}% -\def\ExplFileVersion{6476}% +\def\ExplFileDate{2016/05/14}% +\def\ExplFileVersion{6495}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -17333,7 +17333,7 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3candidates.dtx 6456 2016-03-25 21:09:37Z joseph $ +\GetIdInfo$Id: l3candidates.dtx 6484 2016-05-13 19:08:30Z joseph $ {L3 Experimental additions to l3kernel} \cs_new_protected_nopar:Npn \cs_log:N { \__msg_log_next: \cs_show:N } @@ -17389,9 +17389,9 @@ \tex_kern:D -\l__box_left_new_dim \hbox:n { - \__driver_box_rotate_begin: - \box_use:N \l__box_internal_box - \__driver_box_rotate_end: + \__driver_box_use_rotate:Nn + \l__box_internal_box + \l__box_angle_fp } } \box_set_ht:Nn \l__box_internal_box { \l__box_top_new_dim } @@ -17600,9 +17600,10 @@ { \hbox_set:Nn \l__box_internal_box { - \__driver_box_scale_begin: - \hbox_overlap_right:n { \box_use:N #1 } - \__driver_box_scale_end: + \__driver_box_use_scale:Nnn + #1 + \l__box_scale_x_fp + \l__box_scale_y_fp } \fp_compare:nNnTF \l__box_scale_y_fp > \c_zero_fp { diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 5e355680c6b..615774d6de2 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -47,8 +47,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3}% \def\ExplFileDescription{L3 programming layer}% -\def\ExplFileDate{2016/04/20}% -\def\ExplFileVersion{6476}% +\def\ExplFileDate{2016/05/14}% +\def\ExplFileVersion{6495}% \let\ExplLoaderFileVersion\ExplFileVersion \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 6b11a05f308..6d06ca11f3d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -47,8 +47,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3}% \def\ExplFileDescription{L3 programming layer}% -\def\ExplFileDate{2016/04/20}% -\def\ExplFileVersion{6476}% +\def\ExplFileDate{2016/05/14}% +\def\ExplFileVersion{6495}% \let\ExplLoaderFileVersion\ExplFileVersion \ProvidesPackage{\ExplFileName} [% @@ -172,6 +172,24 @@ } } }, + driver / dvisvgm .code:n = + { + \tl_set:Nn \l__expl_driver_tl { dvisvgm } + \sys_if_engine_xetex:TF + { + \__msg_kernel_error:nnnn { expl } { wrong-driver } + { dvips } { xdvipdfmx } + \tl_set:Nn \l__expl_driver_tl { xdvipdfmx } + } + { + \sys_if_output_pdf:T + { + \__msg_kernel_error:nnnn { expl } { wrong-driver } + { dvips } { pdfmode } + \tl_set:Nn \l__expl_driver_tl { pdfmode } + } + } + }, driver / latex2e .code:n = { \tl_set:Nn \l__expl_driver_tl { latex2e } }, driver / pdfmode .code:n = diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index 0c905c2845a..59dc81cc5ce 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -46,22 +46,37 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3drivers.dtx 6472 2016-04-05 13:26:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ {L3 Experimental drivers} \ProvidesExplFile {l3dvidpfmx.def}{\ExplFileDate}{\ExplFileVersion} {L3 Experimental driver: dvipdfmx} -\cs_new_protected_nopar:Npx \__driver_state_save: - { \tex_special:D { pdf:literal~q } } -\cs_new_protected_nopar:Npx \__driver_state_restore: - { \tex_special:D { pdf:literal~Q } } -\cs_new_protected:Npx \__driver_literal:n #1 +\cs_new_protected:Npn \__driver_literal:n #1 { \tex_special:D { pdf:literal~ #1 } } -\cs_new_protected:Npx \__driver_matrix:n #1 +\cs_new_protected_nopar:Npn \__driver_scope_begin: + { \__driver_literal:n { q } } +\cs_new_protected_nopar:Npn \__driver_scope_end: + { \__driver_literal:n { Q } } +\cs_new_protected:Npn \__driver_matrix:n #1 { \__driver_literal:n { #1 \c_space_tl 0~0~cm } } +\tl_new:N \l__driver_current_color_tl +\tl_set:Nn \l__driver_current_color_tl { [ 0 ] } +\AtBeginDocument + { + \@ifpackageloaded { color } + { \tl_set:Nn \l__driver_current_color_tl { \current@color } } + { } + } +\cs_new_protected_nopar:Npx \__driver_color_ensure_current: + { + \tex_special:D { pdf:bcolor~\l__driver_current_color_tl } + \group_insert_after:N \exp_not:N \__driver_color_reset: + } +\cs_new_protected_nopar:Npx \__driver_color_reset: + { \tex_special:D { pdf:ecolor } } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { - \__driver_state_save: + \__driver_scope_begin: \__driver_literal:n { 0~ @@ -71,60 +86,47 @@ re~W~n } \hbox_overlap_right:n { \box_use:N #1 } - \__driver_state_restore: + \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } -\cs_new_protected_nopar:Npn \__driver_box_rotate_begin: +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { - \__driver_state_save: - \box_set_wd:Nn \l__box_internal_box \c_zero_dim - \fp_set:Nn \l__box_cos_fp { round ( \l__box_cos_fp , 5 ) } - \fp_compare:nNnT \l__box_cos_fp = \c_zero_fp - { \fp_zero:N \l__box_cos_fp } - \fp_set:Nn \l__box_sin_fp { round ( \l__box_sin_fp , 5 ) } + \__driver_scope_begin: + \box_set_wd:Nn #1 \c_zero_dim + \fp_set:Nn \l__driver_cos_fp { round ( cosd ( #2 ) , 5 ) } + \fp_compare:nNnT \l__driver_cos_fp = \c_zero_fp + { \fp_zero:N \l__driver_cos_fp } + \fp_set:Nn \l__driver_sin_fp { round ( sind ( #2 ) , 5 ) } \__driver_matrix:n { - \fp_use:N \l__box_cos_fp \c_space_tl - \fp_compare:nNnTF \l__box_sin_fp = \c_zero_fp + \fp_use:N \l__driver_cos_fp \c_space_tl + \fp_compare:nNnTF \l__driver_sin_fp = \c_zero_fp { 0~0 } { - \fp_use:N \l__box_sin_fp + \fp_use:N \l__driver_sin_fp \c_space_tl - \fp_eval:n { -\l__box_sin_fp } + \fp_eval:n { -\l__driver_sin_fp } } \c_space_tl - \fp_use:N \l__box_cos_fp + \fp_use:N \l__driver_cos_fp } + \box_use:N #1 + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore: -\cs_new_protected_nopar:Npn \__driver_box_scale_begin: +\fp_new:N \l__driver_cos_fp +\fp_new:N \l__driver_sin_fp +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { - \__driver_state_save: - \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) } - \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) } + \__driver_scope_begin: \__driver_matrix:n { - \fp_use:N \l__box_scale_x_fp \c_space_tl + \fp_eval:n { round ( #2 , 5 ) } ~ 0~0~ - \fp_use:N \l__box_scale_y_fp + \fp_eval:n { round ( #3 , 5 ) } } + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore: -\tl_new:N \l__driver_current_color_tl -\tl_set:Nn \l__driver_current_color_tl { gray~0 } -\AtBeginDocument - { - \@ifpackageloaded { color } - { \tl_set:Nn \l__driver_current_color_tl { \current@color } } - { } - } -\cs_new_protected_nopar:Npx \__driver_color_ensure_current: - { - \tex_special:D { color~push~\exp_not:N \l__driver_current_color_tl } - \group_insert_after:N \exp_not:N \__driver_color_reset: - } -\cs_new_protected_nopar:Npx \__driver_color_reset: - { \tex_special:D { color~pop } } %% %% %% End of file `l3dvipdfmx.def'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 367bdaf2526..30c8a6dc4f3 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -46,15 +46,11 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3drivers.dtx 6472 2016-04-05 13:26:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ {L3 Experimental drivers} \ProvidesExplFile {l3dvips.def}{\ExplFileDate}{\ExplFileVersion} {L3 Experimental driver: dvips} -\cs_new_protected_nopar:Npx \__driver_state_save: - { \tex_special:D { ps:gsave } } -\cs_new_protected_nopar:Npx \__driver_state_restore: - { \tex_special:D { ps:grestore } } \cs_new_protected:Npx \__driver_literal:n #1 { \tex_special:D @@ -66,22 +62,26 @@ neg~exch~neg~exch~translate } } +\cs_new_protected_nopar:Npn \__driver_scope_begin: + { \tex_special:D { ps:gsave } } +\cs_new_protected_nopar:Npn \__driver_scope_end: + { \tex_special:D { ps:grestore } } \cs_new:Npn \__driver_absolute_lengths:n #1 { - /savedmatrix~matrix~currentmatrix~def~ + matrix~currentmatrix~ Resolution~72~div~VResolution~72~div~scale~ DVImag~dup~scale~ #1 ~ - savedmatrix~setmatrix + setmatrix } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { - \__driver_state_save: + \__driver_scope_begin: \__driver_literal:n { \__driver_absolute_lengths:n { - 0~ + 0 ~ \dim_to_decimal_in_bp:n { \box_dp:N #1 } ~ \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~ \dim_to_decimal_in_bp:n { -\box_ht:N #1 - \box_dp:N #1 } ~ @@ -89,36 +89,34 @@ } } \hbox_overlap_right:n { \box_use:N #1 } - \__driver_state_restore: + \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } -\cs_new_protected_nopar:Npn \__driver_box_rotate_begin: +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { - \__driver_state_save: - \fp_set:Nn \l__box_angle_fp { round ( \l__box_angle_fp , 5 ) } + \__driver_scope_begin: \__driver_literal:n { - \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp + \fp_compare:nNnTF {#2} = \c_zero_fp { 0 } - { \fp_eval:n { -\l__box_angle_fp } } - \c_space_tl + { \fp_eval:n { round ( -#2 , 5 ) } } ~ rotate } + \box_use:N #1 + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore: -\cs_new_protected_nopar:Npn \__driver_box_scale_begin: +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { - \__driver_state_save: - \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) } - \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) } + \__driver_scope_begin: \__driver_literal:n { - \fp_use:N \l__box_scale_x_fp \c_space_tl - \fp_use:N \l__box_scale_y_fp \c_space_tl + \fp_eval:n { round ( #2 , 5 ) } ~ + \fp_eval:n { round ( #3 , 5 ) } ~ scale } + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore: \tl_new:N \l__driver_current_color_tl \tl_set:Nn \l__driver_current_color_tl { gray~0 } \AtBeginDocument @@ -127,12 +125,13 @@ { \tl_set:Nn \l__driver_current_color_tl { \current@color } } { } } -\cs_new_protected_nopar:Npx \__driver_color_ensure_current: +\cs_new_protected_nopar:Npn \__driver_color_ensure_current: { - \tex_special:D { color~push~\exp_not:N \l__driver_current_color_tl } - \group_insert_after:N \exp_not:N \__driver_color_reset: + \tex_special:D { color~push~\l__driver_current_color_tl } + \group_insert_after:N \__driver_color_reset: } -\cs_new_protected_nopar:Npx \__driver_color_reset: + +\cs_new_protected_nopar:Npn \__driver_color_reset: { \tex_special:D { color~pop } } %% %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def new file mode 100644 index 00000000000..5b04f5d7297 --- /dev/null +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -0,0 +1,163 @@ +%% +%% This is file `l3dvisvgm.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% l3drivers.dtx (with options: `package,dvisvgm') +%% +%% EXPERIMENTAL CODE +%% +%% Do not distribute this file without also distributing the +%% source files specified above. +%% +%% Do not distribute a modified version of this file. +%% +%% File: l3drivers.dtx Copyright(C) 2011-2016 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 this +%% license or (at your option) any later version. The latest version +%% of this license is in the file +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This file is part of the "l3kernel bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% The released version of this bundle is available from CTAN. +%% +%% ----------------------------------------------------------------------- +%% +%% The development version of the bundle can be found at +%% +%% http://www.latex-project.org/svnroot/experimental/trunk/ +%% +%% for those people who are interested. +%% +%%%%%%%%%%% +%% NOTE: %% +%%%%%%%%%%% +%% +%% Snapshots taken from the repository represent work in progress and may +%% not work or may contain conflicting material! We therefore ask +%% people _not_ to put them into distributions, archives, etc. without +%% prior consultation with the LaTeX Project Team. +%% +%% ----------------------------------------------------------------------- +%% +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ + {L3 Experimental drivers} +\ProvidesExplFile + {l3dvisvgm.def}{\ExplFileDate}{\ExplFileVersion} + {L3 Experimental driver: dvisvgm} +\cs_new_protected:Npn \__driver_literal:n #1 + { \tex_special:D { dvisvgm:raw~ #1 { ?nl } } } +\cs_new_protected_nopar:Npn \__driver_scope_begin: + { \__driver_literal:n { <g> } } +\cs_new_protected_nopar:Npn \__driver_scope_end: + { \__driver_literal:n { </g> } } +\cs_new_protected:Npn \__driver_scope_begin:n #1 + { \__driver_literal:n { <g~ #1 > } } +\cs_new_protected:Npn \__driver_box_use_clip:N #1 + { + \int_gincr:N \g__driver_clip_path_int + \__driver_literal:n + { < clipPath~id = " l3cp \int_use:N \g__driver_clip_path_int " > } + \__driver_literal:n + { + < + path ~ d = + " + M ~ 0 ~ + \dim_to_decimal:n { -\box_dp:N #1 } ~ + L ~ \dim_to_decimal:n { \box_wd:N #1 } ~ + \dim_to_decimal:n { -\box_dp:N #1 } ~ + L ~ \dim_to_decimal:n { \box_wd:N #1 } ~ + \dim_to_decimal:n { \box_ht:N #1 + \box_dp:N #1 } ~ + L ~ 0 ~ + \dim_to_decimal:n { \box_ht:N #1 + \box_dp:N #1 } ~ + Z + " + /> + } + \__driver_literal:n + { < /clipPath > } + \__driver_scope_begin:n + { + transform = + " + translate ( { ?x } , { ?y } ) ~ + scale ( 1 , -1 ) + " + } + \__driver_scope_begin:n + { + clip-path = "url ( \c_hash_str l3cp \int_use:N \g__driver_clip_path_int ) " + } + \__driver_scope_begin:n + { + transform = + " + scale ( -1 , 1 ) ~ + translate ( { ?x } , { ?y } ) ~ + scale ( -1 , -1 ) + " + } + \box_use:N #1 + \__driver_scope_end: + \__driver_scope_end: + \__driver_scope_end: + } +\int_new:N \g__driver_clip_path_int +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 + { + \__driver_scope_begin:n + { + transform = + " + rotate + ( \fp_eval:n { round ( -#2 , 5 ) } , ~ { ?x } , ~ { ?y } ) + " + } + \box_use:N #1 + \__driver_scope_end: + } +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 + { + \__driver_scope_begin:n + { + transform = + " + translate ( { ?x } , { ?y } ) ~ + scale + ( + \fp_eval:n { round ( -#2 , 5 ) } , + \fp_eval:n { round ( -#3 , 5 ) } + ) ~ + translate ( { ?x } , { ?y } ) ~ + scale ( -1 ) + " + } + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: + } +\tl_new:N \l__driver_current_color_tl +\tl_set:Nn \l__driver_current_color_tl { gray~0 } +\AtBeginDocument + { + \@ifpackageloaded { color } + { \tl_set:Nn \l__driver_current_color_tl { \current@color } } + { } + } +\cs_new_protected_nopar:Npn \__driver_color_ensure_current: + { + \tex_special:D { color~push~\l__driver_current_color_tl } + \group_insert_after:N \exp_not:N \__driver_color_reset: + } + +\cs_new_protected_nopar:Npn \__driver_color_reset: + { \tex_special:D { color~pop } } +%% +%% +%% End of file `l3dvisvgm.def'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index 045ebf399e7..05f466d3051 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -46,30 +46,30 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3drivers.dtx 6472 2016-04-05 13:26:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ {L3 Experimental drivers} \ProvidesExplFile {l3pdfmode.def}{\ExplFileDate}{\ExplFileVersion} {L3 Experimental driver: PDF mode} -\cs_new_protected_nopar:Npx \__driver_state_save: +\cs_new_protected:Npx \__driver_literal:n #1 + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D literal } + { \pdftex_pdfliteral:D } + {#1} + } +\cs_new_protected_nopar:Npx \__driver_scope_begin: { \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D save \scan_stop: } { \pdftex_pdfsave:D } } -\cs_new_protected_nopar:Npx \__driver_state_restore: +\cs_new_protected_nopar:Npx \__driver_scope_end: { \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D restore \scan_stop: } { \pdftex_pdfrestore:D } } -\cs_new_protected:Npx \__driver_literal:n #1 - { - \cs_if_exist:NTF \luatex_pdfextension:D - { \luatex_pdfextension:D literal } - { \pdftex_pdfliteral:D } - {#1} - } \cs_new_protected:Npx \__driver_matrix:n #1 { \cs_if_exist:NTF \luatex_pdfextension:D @@ -77,9 +77,34 @@ { \pdftex_pdfsetmatrix:D } {#1} } +\tl_new:N \l__driver_current_color_tl +\tl_set:Nn \l__driver_current_color_tl { 0~g~0~G } +\AtBeginDocument + { + \@ifpackageloaded { color } + { \tl_set:Nn \l__driver_current_color_tl { \current@color } } + { } + } +\int_new:N \l__driver_color_stack_int +\cs_new_protected_nopar:Npx \__driver_color_ensure_current: + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D colorstack } + { \pdftex_pdfcolorstack:D } + \exp_not:N \l__driver_color_stack_int push + { \exp_not:N \l__driver_current_color_tl } + \group_insert_after:N \exp_not:N \__driver_color_reset: + } +\cs_new_protected_nopar:Npx \__driver_color_reset: + { + \cs_if_exist:NTF \luatex_pdfextension:D + { \luatex_pdfextension:D colorstack } + { \pdftex_pdfcolorstack:D } + \exp_not:N \l__driver_color_stack_int pop \scan_stop: + } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { - \__driver_state_save: + \__driver_scope_begin: \__driver_literal:n { 0~ @@ -89,69 +114,46 @@ re~W~n } \hbox_overlap_right:n { \box_use:N #1 } - \__driver_state_restore: + \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } -\cs_new_protected_nopar:Npn \__driver_box_rotate_begin: +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { - \__driver_state_save: - \box_set_wd:Nn \l__box_internal_box \c_zero_dim - \fp_set:Nn \l__box_cos_fp { round ( \l__box_cos_fp , 5 ) } - \fp_compare:nNnT \l__box_cos_fp = \c_zero_fp - { \fp_zero:N \l__box_cos_fp } - \fp_set:Nn \l__box_sin_fp { round ( \l__box_sin_fp , 5 ) } + \__driver_scope_begin: + \box_set_wd:Nn #1 \c_zero_dim + \fp_set:Nn \l__driver_cos_fp { round ( cosd ( #2 ) , 5 ) } + \fp_compare:nNnT \l__driver_cos_fp = \c_zero_fp + { \fp_zero:N \l__driver_cos_fp } + \fp_set:Nn \l__driver_sin_fp { round ( sind ( #2 ) , 5 ) } \__driver_matrix:n { - \fp_use:N \l__box_cos_fp \c_space_tl - \fp_compare:nNnTF \l__box_sin_fp = \c_zero_fp + \fp_use:N \l__driver_cos_fp \c_space_tl + \fp_compare:nNnTF \l__driver_sin_fp = \c_zero_fp { 0~0 } { - \fp_use:N \l__box_sin_fp + \fp_use:N \l__driver_sin_fp \c_space_tl - \fp_eval:n { -\l__box_sin_fp } + \fp_eval:n { -\l__driver_sin_fp } } \c_space_tl - \fp_use:N \l__box_cos_fp + \fp_use:N \l__driver_cos_fp } + \box_use:N #1 + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore: -\cs_new_protected_nopar:Npn \__driver_box_scale_begin: +\fp_new:N \l__driver_cos_fp +\fp_new:N \l__driver_sin_fp +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { - \__driver_state_save: - \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) } - \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) } + \__driver_scope_begin: \__driver_matrix:n { - \fp_use:N \l__box_scale_x_fp \c_space_tl + \fp_eval:n { round ( #2 , 5 ) } ~ 0~0~ - \fp_use:N \l__box_scale_y_fp + \fp_eval:n { round ( #3 , 5 ) } } - } -\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore: -\tl_new:N \l__driver_current_color_tl -\tl_set:Nn \l__driver_current_color_tl { 0~g~0~G } -\AtBeginDocument - { - \@ifpackageloaded { color } - { \tl_set:Nn \l__driver_current_color_tl { \current@color } } - { } - } -\int_new:N \l__driver_color_stack_int -\cs_new_protected_nopar:Npx \__driver_color_ensure_current: - { - \cs_if_exist:NTF \luatex_pdfextension:D - { \luatex_pdfextension:D colorstack } - { \pdftex_pdfcolorstack:D } - \exp_not:N \l__driver_color_stack_int push - { \exp_not:N \l__driver_current_color_tl } - \group_insert_after:N \exp_not:N \__driver_color_reset: - } -\cs_new_protected_nopar:Npx \__driver_color_reset: - { - \cs_if_exist:NTF \luatex_pdfextension:D - { \luatex_pdfextension:D colorstack } - { \pdftex_pdfcolorstack:D } - \exp_not:N \l__driver_color_stack_int pop \scan_stop: + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: } %% %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index 50fa2f3fca0..6778d6255a4 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -46,22 +46,52 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3drivers.dtx 6472 2016-04-05 13:26:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ {L3 Experimental drivers} \ProvidesExplFile {l3xdvidpfmx.def}{\ExplFileDate}{\ExplFileVersion} {L3 Experimental driver: xdvipdfmx} -\cs_new_protected_nopar:Npx \__driver_state_save: - { \tex_special:D { pdf:literal~q } } -\cs_new_protected_nopar:Npx \__driver_state_restore: - { \tex_special:D { pdf:literal~Q } } -\cs_new_protected:Npx \__driver_literal:n #1 +\cs_new_protected:Npn \__driver_literal:n #1 { \tex_special:D { pdf:literal~ #1 } } -\cs_new_protected:Npx \__driver_matrix:n #1 +\cs_new_protected_nopar:Npn \__driver_scope_begin: + { \__driver_literal:n { q } } +\cs_new_protected_nopar:Npn \__driver_scope_end: + { \__driver_literal:n { Q } } +\cs_new_protected:Npn \__driver_matrix:n #1 { \__driver_literal:n { #1 \c_space_tl 0~0~cm } } +\tl_new:N \l__driver_current_color_tl +\tl_set:Nn \l__driver_current_color_tl { [ 0 ] } +\AtBeginDocument + { + \@ifpackageloaded { color } + { \tl_set:Nn \l__driver_current_color_tl { \current@color } } + { } + } +\cs_new_protected_nopar:Npx \__driver_color_ensure_current: + { + \tex_special:D { pdf:bcolor~\l__driver_current_color_tl } + \group_insert_after:N \exp_not:N \__driver_color_reset: + } +\cs_new_protected_nopar:Npx \__driver_color_reset: + { \tex_special:D { pdf:ecolor } } +\AtBeginDocument + { + \@ifpackageloaded { color } + { + \cs_set_protected_nopar:Npn \__driver_color_ensure_current: + { + \tex_special:D { color~push~\l__driver_current_color_tl } + \group_insert_after:N \exp_not:N \__driver_color_reset: + } + + \cs_set_protected_nopar:Npn \__driver_color_reset: + { \tex_special:D { color~pop } } + } + { } + } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { - \__driver_state_save: + \__driver_scope_begin: \__driver_literal:n { 0~ @@ -71,60 +101,47 @@ re~W~n } \hbox_overlap_right:n { \box_use:N #1 } - \__driver_state_restore: + \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } -\cs_new_protected_nopar:Npn \__driver_box_rotate_begin: +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { - \__driver_state_save: - \box_set_wd:Nn \l__box_internal_box \c_zero_dim - \fp_set:Nn \l__box_cos_fp { round ( \l__box_cos_fp , 5 ) } - \fp_compare:nNnT \l__box_cos_fp = \c_zero_fp - { \fp_zero:N \l__box_cos_fp } - \fp_set:Nn \l__box_sin_fp { round ( \l__box_sin_fp , 5 ) } + \__driver_scope_begin: + \box_set_wd:Nn #1 \c_zero_dim + \fp_set:Nn \l__driver_cos_fp { round ( cosd ( #2 ) , 5 ) } + \fp_compare:nNnT \l__driver_cos_fp = \c_zero_fp + { \fp_zero:N \l__driver_cos_fp } + \fp_set:Nn \l__driver_sin_fp { round ( sind ( #2 ) , 5 ) } \__driver_matrix:n { - \fp_use:N \l__box_cos_fp \c_space_tl - \fp_compare:nNnTF \l__box_sin_fp = \c_zero_fp + \fp_use:N \l__driver_cos_fp \c_space_tl + \fp_compare:nNnTF \l__driver_sin_fp = \c_zero_fp { 0~0 } { - \fp_use:N \l__box_sin_fp + \fp_use:N \l__driver_sin_fp \c_space_tl - \fp_eval:n { -\l__box_sin_fp } + \fp_eval:n { -\l__driver_sin_fp } } \c_space_tl - \fp_use:N \l__box_cos_fp + \fp_use:N \l__driver_cos_fp } + \box_use:N #1 + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore: -\cs_new_protected_nopar:Npn \__driver_box_scale_begin: +\fp_new:N \l__driver_cos_fp +\fp_new:N \l__driver_sin_fp +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { - \__driver_state_save: - \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) } - \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) } + \__driver_scope_begin: \__driver_matrix:n { - \fp_use:N \l__box_scale_x_fp \c_space_tl + \fp_eval:n { round ( #2 , 5 ) } ~ 0~0~ - \fp_use:N \l__box_scale_y_fp + \fp_eval:n { round ( #3 , 5 ) } } + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore: -\tl_new:N \l__driver_current_color_tl -\tl_set:Nn \l__driver_current_color_tl { gray~0 } -\AtBeginDocument - { - \@ifpackageloaded { color } - { \tl_set:Nn \l__driver_current_color_tl { \current@color } } - { } - } -\cs_new_protected_nopar:Npx \__driver_color_ensure_current: - { - \tex_special:D { color~push~\exp_not:N \l__driver_current_color_tl } - \group_insert_after:N \exp_not:N \__driver_color_reset: - } -\cs_new_protected_nopar:Npx \__driver_color_reset: - { \tex_special:D { color~pop } } %% %% %% End of file `l3xdvipdfmx.def'. |