diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | 163 |
1 files changed, 163 insertions, 0 deletions
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'. |