diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def | 1197 |
1 files changed, 1197 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def new file mode 100644 index 00000000000..d259a884fe8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def @@ -0,0 +1,1197 @@ +%% +%% This is file `l3backend-dvips.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% l3backend-basics.dtx (with options: `package,dvips') +%% l3backend-color.dtx (with options: `package,dvips') +%% l3backend-box.dtx (with options: `package,dvips') +%% l3backend-draw.dtx (with options: `package,dvips') +%% l3backend-graphics.dtx (with options: `package,dvips') +%% l3backend-pdf.dtx (with options: `package,dvips') +%% +%% Copyright (C) 1990-2019 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: +%% +%% https://www.latex-project.org/lppl.txt +%% +%% This file is part of the "l3backend bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% File: l3backend-basics.dtx +\ProvidesExplFile + {l3backend-dvips.def}{2019-04-06}{} + {L3 Experimental backend support: dvips} +\cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D +\cs_new_protected:Npn \__kernel_backend_literal:n #1 + { \__kernel_backend_literal:e { \exp_not:n {#1} } } +\cs_generate_variant:Nn \__kernel_backend_literal:n { x } +\cs_new_protected:Npn \__kernel_backend_literal_postscript:n #1 + { \__kernel_backend_literal:n { ps:: #1 } } +\cs_generate_variant:Nn \__kernel_backend_literal_postscript:n { x } +\cs_new_protected:Npn \__kernel_backend_postscript:n #1 + { \__kernel_backend_literal:n { ps: SDict ~ begin ~ #1 ~ end } } +\cs_generate_variant:Nn \__kernel_backend_postscript:n { x } +\cs_new_protected:Npx \__kernel_backend_postscript_header:n #1 + { + \cs_if_exist:NTF \AtBeginDvi + { \exp_not:N \AtBeginDvi } + { \use:n } + { \__kernel_backend_literal:n { ! #1 } } + } +\cs_new_protected:Npn \__kernel_backend_align_begin: + { + \__kernel_backend_literal:n { ps::[begin] } + \__kernel_backend_literal_postscript:n { currentpoint } + \__kernel_backend_literal_postscript:n { currentpoint~translate } + } +\cs_new_protected:Npn \__kernel_backend_align_end: + { + \__kernel_backend_literal_postscript:n { neg~exch~neg~exch~translate } + \__kernel_backend_literal:n { ps::[end] } + } +\cs_new_protected:Npn \__kernel_backend_scope_begin: + { \__kernel_backend_literal:n { ps:gsave } } +\cs_new_protected:Npn \__kernel_backend_scope_end: + { \__kernel_backend_literal:n { ps:grestore } } +%% File: l3backend-color.dtx +\cs_new_protected:Npn \__color_backend_pickup:N #1 { } +\AtBeginDocument + { + \@ifpackageloaded { color } + { + \cs_set_protected:Npn \__color_backend_pickup:N #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 } \q_stop #1 + } + } + \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \q_stop #3 + { \tl_set:Nn #3 { #1 ~ #2 } } + } + { } + } +\cs_new_protected:Npn \__color_backend_cmyk:nnnn #1#2#3#4 + { + \__color_backend_select:x + { + cmyk~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } +\cs_new_protected:Npn \__color_backend_gray:n #1 + { \__color_backend_select:x { gray~ \fp_eval:n {#1} } } +\cs_new_protected:Npn \__color_backend_rgb:nnn #1#2#3 + { + \__color_backend_select:x + { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } +\cs_new_protected:Npn \__color_backend_spot:nn #1#2 + { \__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 } + \group_insert_after:N \__color_backend_reset: + } +\cs_generate_variant:Nn \__color_backend_select:n { x } +\cs_new_protected:Npn \__color_backend_reset: + { \__kernel_backend_literal:n { color~pop } } +%% File: l3backend-box.dtx +\cs_new_protected:Npn \__box_backend_clip:N #1 + { + \__kernel_backend_scope_begin: + \__kernel_backend_align_begin: + \__kernel_backend_literal_postscript:n { matrix~currentmatrix } + \__kernel_backend_literal_postscript:n + { Resolution~72~div~VResolution~72~div~scale } + \__kernel_backend_literal_postscript:n { DVImag~dup~scale } + \__kernel_backend_literal_postscript:x + { + 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 } ~ + rectclip + } + \__kernel_backend_literal_postscript:n { setmatrix } + \__kernel_backend_align_end: + \hbox_overlap_right:n { \box_use:N #1 } + \__kernel_backend_scope_end: + \skip_horizontal:n { \box_wd:N #1 } + } +\cs_new_protected:Npn \__box_backend_rotate:Nn #1#2 + { \exp_args:NNf \__box_backend_rotate_aux:Nn #1 { \fp_eval:n {#2} } } +\cs_new_protected:Npn \__box_backend_rotate_aux:Nn #1#2 + { + \__kernel_backend_scope_begin: + \__kernel_backend_align_begin: + \__kernel_backend_literal_postscript:x + { + \fp_compare:nNnTF {#2} = \c_zero_fp + { 0 } + { \fp_eval:n { round ( -(#2) , 5 ) } } ~ + rotate + } + \__kernel_backend_align_end: + \box_use:N #1 + \__kernel_backend_scope_end: + } +\cs_new_protected:Npn \__box_backend_scale:Nnn #1#2#3 + { + \__kernel_backend_scope_begin: + \__kernel_backend_align_begin: + \__kernel_backend_literal_postscript:x + { + \fp_eval:n { round ( #2 , 5 ) } ~ + \fp_eval:n { round ( #3 , 5 ) } ~ + scale + } + \__kernel_backend_align_end: + \hbox_overlap_right:n { \box_use:N #1 } + \__kernel_backend_scope_end: + } +%% File: l3backend-draw.dtx +\cs_new_eq:NN \__draw_backend_literal:n \__kernel_backend_literal_postscript:n +\cs_generate_variant:Nn \__draw_backend_literal:n { x } +\cs_new_protected:Npn \__draw_backend_begin: + { + \__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: + { + \__draw_backend_literal:n { @endspecial } + \__kernel_backend_literal:n { ps::[end] } + } +\cs_new_protected:Npn \__draw_backend_scope_begin: + { \__draw_backend_literal:n { save } } +\cs_new_protected:Npn \__draw_backend_scope_end: + { \__draw_backend_literal:n { restore } } +\cs_new_protected:Npn \__draw_backend_moveto:nn #1#2 + { + \__draw_backend_literal:x + { + \dim_to_decimal_in_bp:n {#1} ~ + \dim_to_decimal_in_bp:n {#2} ~ moveto + } + } +\cs_new_protected:Npn \__draw_backend_lineto:nn #1#2 + { + \__draw_backend_literal:x + { + \dim_to_decimal_in_bp:n {#1} ~ + \dim_to_decimal_in_bp:n {#2} ~ lineto + } + } +\cs_new_protected:Npn \__draw_backend_rectangle:nnnn #1#2#3#4 + { + \__draw_backend_literal:x + { + \dim_to_decimal_in_bp:n {#4} ~ \dim_to_decimal_in_bp:n {#3} ~ + \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ + moveto~dup~0~rlineto~exch~0~exch~rlineto~neg~0~rlineto~closepath + } + } +\cs_new_protected:Npn \__draw_backend_curveto:nnnnnn #1#2#3#4#5#6 + { + \__draw_backend_literal:x + { + \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ + \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~ + \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~ + curveto + } + } +\cs_new_protected:Npn \__draw_backend_evenodd_rule: + { \bool_gset_true:N \g__draw_draw_eor_bool } +\cs_new_protected:Npn \__draw_backend_nonzero_rule: + { \bool_gset_false:N \g__draw_draw_eor_bool } +\bool_new:N \g__draw_draw_eor_bool +\cs_new_protected:Npn \__draw_backend_closepath: + { \__draw_backend_literal:n { closepath } } +\cs_new_protected:Npn \__draw_backend_stroke: + { + \__draw_backend_literal:n { stroke } + \bool_if:NT \g__draw_draw_clip_bool + { + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + clip + } + } + \__draw_backend_literal:n { newpath } + \bool_gset_false:N \g__draw_draw_clip_bool + } +\cs_new_protected:Npn \__draw_backend_closestroke: + { + \__draw_backend_closepath: + \__draw_backend_stroke: + } +\cs_new_protected:Npn \__draw_backend_fill: + { + \__draw_backend_literal:n { gsave } + \__draw_backend_literal:n { color.fc } + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + fill + } + \__draw_backend_literal:n { grestore } + \bool_if:NT \g__draw_draw_clip_bool + { + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + clip + } + } + \__draw_backend_literal:n { newpath } + \bool_gset_false:N \g__draw_draw_clip_bool + } +\cs_new_protected:Npn \__draw_backend_fillstroke: + { + \__draw_backend_literal:n { gsave } + \__draw_backend_literal:n { color.fc } + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + fill + } + \__draw_backend_literal:n { grestore } + \__draw_backend_literal:n { stroke } + \bool_if:NT \g__draw_draw_clip_bool + { + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + clip + } + } + \__draw_backend_literal:n { newpath } + \bool_gset_false:N \g__draw_draw_clip_bool + } +\cs_new_protected:Npn \__draw_backend_clip: + { \bool_gset_true:N \g__draw_draw_clip_bool } +\bool_new:N \g__draw_draw_clip_bool +\cs_new_protected:Npn \__draw_backend_discardpath: + { + \bool_if:NT \g__draw_draw_clip_bool + { + \__draw_backend_literal:x + { + \bool_if:NT \g__draw_draw_eor_bool { eo } + clip + } + } + \__draw_backend_literal:n { newpath } + \bool_gset_false:N \g__draw_draw_clip_bool + } +\cs_new_protected:Npn \__draw_backend_dash_pattern:nn #1#2 + { + \__draw_backend_literal:x + { + [ + \exp_args:Nf \use:n + { \clist_map_function:nN {#1} \__draw_backend_dash:n } + ] ~ + \dim_to_decimal_in_bp:n {#2} ~ setdash + } + } +\cs_new:Npn \__draw_backend_dash:n #1 + { ~ \dim_to_decimal_in_bp:n {#1} } +\cs_new_protected:Npn \__draw_backend_linewidth:n #1 + { + \__draw_backend_literal:x + { \dim_to_decimal_in_bp:n {#1} ~ setlinewidth } + } +\cs_new_protected:Npn \__draw_backend_miterlimit:n #1 + { \__draw_backend_literal:x { \fp_eval:n {#1} ~ setmiterlimit } } +\cs_new_protected:Npn \__draw_backend_cap_butt: + { \__draw_backend_literal:n { 0 ~ setlinecap } } +\cs_new_protected:Npn \__draw_backend_cap_round: + { \__draw_backend_literal:n { 1 ~ setlinecap } } +\cs_new_protected:Npn \__draw_backend_cap_rectangle: + { \__draw_backend_literal:n { 2 ~ setlinecap } } +\cs_new_protected:Npn \__draw_backend_join_miter: + { \__draw_backend_literal:n { 0 ~ setlinejoin } } +\cs_new_protected:Npn \__draw_backend_join_round: + { \__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:nnnn #1#2#3#4 + { + \__draw_backend_color_fill:x + { + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + setcmykcolor + } + } +\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:nnnn #1#2#3#4 + { + \__draw_backend_color_stroke:x + { + cmyk ~ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} + } + } +\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1 + { \__draw_backend_color_fill:x { \fp_eval:n {#1} ~ setgray } } +\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1 + { \__draw_backend_color_stroke:x { gray ~ \fp_eval:n {#1} } } +\cs_new_protected:Npn \__draw_backend_color_fill_rgb:nnn #1#2#3 + { + \__draw_backend_color_fill:x + { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ setrgbcolor } + } +\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:nnn #1#2#3 + { + \__draw_backend_color_stroke:x + { rgb ~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } + } +\cs_new_protected:Npn \__draw_backend_color_fill:n #1 + { + \__kernel_backend_postscript:n + { SDict ~ begin ~ /color.fc ~ { #1 } ~ def ~ end } + } +\cs_generate_variant:Nn \__draw_backend_color_fill:n { x } +\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_generate_variant:Nn \__draw_backend_color_stroke:n { x } +\cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4 + { + \__draw_backend_literal:n + { + [ + \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ + \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + 0 ~ 0 + ] ~ + concat + } + } +\cs_new_protected:Npn \__draw_backend_box_use:Nnnnn #1#2#3#4#5 + { + \__draw_backend_literal:n { @endspecial } + \__draw_backend_literal:n { [end] } + \__draw_backend_literal:n { [begin] } + \__draw_backend_literal:n { save } + \__draw_backend_literal:n { currentpoint } + \__draw_backend_literal:n { currentpoint~translate } + \__draw_backend_cm:nnnn { 1 } { 0 } { 0 } { -1 } + \__draw_backend_cm:nnnn {#2} {#3} {#4} {#5} + \__draw_backend_cm:nnnn { 1 } { 0 } { 0 } { -1 } + \__draw_backend_literal:n { neg~exch~neg~exch~translate } + \__draw_backend_literal:n { [end] } + \hbox_overlap_right:n { \box_use:N #1 } + \__draw_backend_literal:n { [begin] } + \__draw_backend_literal:n { restore } + \__draw_backend_literal:n { [end] } + \__draw_backend_literal:n { [begin] } + \__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_protected:Npn \__graphics_backend_include_eps:n #1 + { + \__kernel_backend_literal:x + { + PSfile = #1 \c_space_tl + llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl + lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl + urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl + ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim + } + } +%% File: l3backend-pdf.dtx +\box_new:N \l__pdf_internal_box +\cs_new_protected:Npn \__pdf_backend_pdfmark:n #1 + { \__kernel_backend_postscript:n { mark #1 ~ pdfmark } } +\cs_generate_variant:Nn \__pdf_backend_pdfmark:n { x } +\cs_new_protected:Npn \__pdf_backend_catalog_gput:nn #1#2 + { \__pdf_backend_pdfmark:n { { Catalog } << /#1 ~ #2 >> /PUT } } +\cs_new_protected:Npn \__pdf_backend_info_gput:nn #1#2 + { \__pdf_backend_pdfmark:n { /#1 ~ #2 /DOCINFO } } +\int_new:N \g__pdf_backend_object_int +\prop_new:N \g__pdf_backend_object_prop +\cs_new_protected:Npn \__pdf_backend_object_new:nn #1#2 + { + \int_gincr:N \g__pdf_backend_object_int + \int_const:cn + { c__pdf_backend_object_ \tl_to_str:n {#1} _int } + { \g__pdf_backend_object_int } + \prop_gput:Nnn \g__pdf_backend_object_prop {#1} {#2} + } +\cs_new:Npn \__pdf_backend_object_ref:n #1 + { { pdf.obj \int_use:c { c__pdf_backend_object_ \tl_to_str:n {#1} _int } } } +\cs_new_protected:Npn \__pdf_backend_object_write:nn #1#2 + { + \__pdf_backend_pdfmark:x + { + /_objdef ~ \__pdf_backend_object_ref:n {#1} + /type + \str_case_e:nn + { \prop_item:Nn \g__pdf_backend_object_prop {#1} } + { + { array } { /array } + { dict } { /dict } + { fstream } { /stream } + { stream } { /stream } + } + /OBJ + } + \use:c + { __pdf_backend_object_write_ \prop_item:Nn \g__pdf_backend_object_prop {#1} :nn } + { \__pdf_backend_object_ref:n {#1} } {#2} + } +\cs_generate_variant:Nn \__pdf_backend_object_write:nn { nx } +\cs_new_protected:Npn \__pdf_backend_object_write_array:nn #1#2 + { + \__pdf_backend_pdfmark:x + { #1 [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL } + } +\cs_new_protected:Npn \__pdf_backend_object_write_dict:nn #1#2 + { + \__pdf_backend_pdfmark:x + { #1 << \exp_not:n {#2} >> /PUT } + } +\cs_new_protected:Npn \__pdf_backend_object_write_stream:nn #1#2 + { + \exp_args:Nx + \__pdf_backend_object_write_stream:nnn {#1} #2 + } +\cs_new_protected:Npn \__pdf_backend_object_write_stream:nnn #1#2#3 + { + \__pdf_postscript:n + { + [nobreak] + mark ~ #1 ~ ( #3 ) /PUT ~ pdfmark ~ + mark ~ #1 ~ << #2 >> /PUT ~ pdfmark + } + } +\cs_new_protected:Npn \__pdf_backend_object_now:nn #1#2 + { + \int_gincr:N \g__pdf_backend_object_int + \__pdf_backend_pdfmark:x + { + /_objdef ~ { pdf.obj \int_use:N \g__pdf_backend_object_int } + /type + \str_case:nn + {#1} + { + { array } { /array } + { dict } { /dict } + { fstream } { /stream } + { stream } { /stream } + } + /OBJ + } + \exp_args:Nnx \use:c { __pdf_backend_object_write_ #1 :nn } + { { pdf.obj \int_use:N \g__pdf_backend_object_int } } {#2} + } +\cs_generate_variant:Nn \__pdf_backend_object_now:nn { nx } +\cs_new:Npn \__pdf_backend_object_last: + { { pdf.obj \int_use:N \g__pdf_backend_object_int } } +\__kernel_backend_postscript_header:n + { + true ~ setglobal ~ + /pdf.globaldict ~ 4 ~ dict ~ def ~ + false ~ setglobal + } +\__kernel_backend_postscript_header:n + { + /pdf.cvs { 65534 ~ string ~ cvs } def + /pdf.dvi.pt { 72.27 ~ mul ~ Resolution ~ div } def + /pdf.pt.dvi { 72.27 ~ div ~ Resolution ~ mul } def + /pdf.rect.ht { dup ~ 1 ~ get ~ neg ~ exch ~ 3 ~ get ~ add } def + } +\__kernel_backend_postscript_header:n + { + /pdf.linkmargin { 1 ~ pdf.pt.dvi } def + /pdf.linkdp.pad { 0 } def + /pdf.linkht.pad { 0 } def + } +\__kernel_backend_postscript_header:n + { + /pdf.rect + { /Rect [ pdf.llx ~ pdf.lly ~ pdf.urx ~ pdf.ury ] } def + /pdf.save.ll + { + currentpoint + /pdf.lly ~ exch ~ def + /pdf.llx ~ exch ~ def + } + def + /pdf.save.ur + { + currentpoint + /pdf.ury ~ exch ~ def + /pdf.urx ~ exch ~ def + } + def + /pdf.save.linkll + { + currentpoint ~ + pdf.linkmargin ~ add ~ + pdf.linkdp.pad ~ add + /pdf.lly ~ exch ~ def ~ + pdf.linkmargin ~ sub + /pdf.llx ~ exch ~ def + } + def + /pdf.save.linkur + { + currentpoint ~ + pdf.linkmargin ~ sub ~ + pdf.linkht.pad ~ sub + /pdf.ury ~ exch ~ def ~ + pdf.linkmargin ~ add + /pdf.urx ~ exch ~ def + } + def + } +\__kernel_backend_postscript_header:n + { + /pdf.dest.anchor + { + currentpoint ~ exch ~ + pdf.dvi.pt ~ 72 ~ add ~ + /pdf.dest.x ~ exch ~ def ~ + pdf.dvi.pt ~ + vsize ~ 72 ~ sub ~ exch ~ sub ~ + /pdf.dest.y ~ exch ~ def + } + def + /pdf.dest.point + { pdf.dest.x ~ pdf.dest.y } def + /pdf.dest2device + { + /pdf.dest.y ~ exch ~ def + /pdf.dest.x ~ exch ~ def ~ + matrix ~ currentmatrix ~ + matrix ~ defaultmatrix ~ + matrix ~ invertmatrix ~ + matrix ~ concatmatrix ~ + cvx ~ exec + /pdf.dev.y ~ exch ~ def + /pdf.dev.x ~ exch ~ def + /pdf.tmpd ~ exch ~ def + /pdf.tmpc ~ exch ~ def + /pdf.tmpb ~ exch ~ def + /pdf.tmpa ~ exch ~ def ~ + pdf.dest.x ~ pdf.tmpa ~ mul ~ + pdf.dest.y ~ pdf.tmpc ~ mul ~ add ~ + pdf.dev.x ~ add ~ + pdf.dest.x ~ pdf.tmpb ~ mul ~ + pdf.dest.y ~ pdf.tmpd ~ mul ~ add ~ + pdf.dev.y ~ add + } + def + } +\__kernel_backend_postscript_header:n + { + /pdf.bordertracking ~ false ~ def + /pdf.bordertracking.begin + { + SDict ~ /pdf.bordertracking ~ true ~ put ~ + SDict ~ /pdf.leftboundary ~ undef ~ + SDict ~ /pdf.rightboundary ~ undef ~ + /a ~ where + { + /a + { + currentpoint ~ pop ~ + SDict /pdf.rightboundary ~ known ~ dup + { + SDict /pdf.rightboundary ~ get ~ 2 ~ index ~ lt + { not } + if + } + if + { pop } + { SDict ~ exch /pdf.rightboundary ~ exch ~ put } + ifelse ~ + moveto ~ + currentpoint ~ pop ~ + SDict /pdf.leftboundary ~ known ~ dup + { + SDict /pdf.leftboundary ~ get ~ 2 ~ index ~ gt + { not } + if + } + if + { pop } + { SDict ~ exch /pdf.leftboundary ~ exch ~ put } + ifelse + } + put + } + if + } + def + /pdf.bordertracking.end + { + /a ~ where { /a { moveto } put } if + /x ~ where { /x { 0 ~ exch ~ rmoveto } put } if ~ + SDict /pdf.leftboundary ~ known + { pdf.outerbox ~ 0 ~ pdf.leftboundary ~ put } + if ~ + SDict /pdf.rightboundary ~ known + { pdf.outerbox ~ 2 ~ pdf.rightboundary ~ put } + if ~ + SDict /pdf.bordertracking ~ false ~ put + } + def + /pdf.bordertracking.endpage + { + pdf.bordertracking + { + pdf.bordertracking.end ~ + true ~ setglobal ~ + pdf.globaldict + /pdf.brokenlink.rect [ pdf.outerbox ~ aload ~ pop ] put ~ + pdf.globaldict + /pdf.brokenlink.skip ~ pdf.baselineskip ~ put ~ + pdf.globaldict + /pdf.brokenlink.dict ~ + pdf.link.dict ~ pdf.cvs ~ put ~ + false ~ setglobal ~ + mark ~ pdf.link.dict ~ cvx ~ exec ~ /Rect + [ + pdf.llx ~ + pdf.lly ~ + pdf.outerbox ~ 2 ~ get ~ pdf.linkmargin ~ add ~ + currentpoint ~ exch ~ pop ~ + pdf.outerbox ~ pdf.rect.ht ~ sub ~ pdf.linkmargin ~ sub + ] + /ANN ~ pdf.pdfmark + } + if + } + def + /pdf.bordertracking.continue + { + /pdf.link.dict ~ pdf.globaldict + /pdf.brokenlink.dict ~ get ~ def + /pdf.outerbox ~ pdf.globaldict + /pdf.brokenlink.rect ~ get ~ def + /pdf.baselineskip ~ pdf.globaldict + /pdf.brokenlink.skip ~ get ~ def ~ + pdf.globaldict ~ dup ~ dup + /pdf.brokenlink.dict ~ undef + /pdf.brokenlink.skip ~ undef + /pdf.brokenlink.rect ~ undef ~ + currentpoint + /pdf.originy ~ exch ~ def + /pdf.originx ~ exch ~ def + /a ~ where + { + /a + { + moveto ~ + SDict ~ + begin ~ + currentpoint ~ pdf.originy ~ ne ~ exch ~ + pdf.originx ~ ne ~ or + { + pdf.save.linkll + /pdf.lly ~ + pdf.lly ~ pdf.outerbox ~ 1 ~ get ~ sub ~ def ~ + pdf.bordertracking.begin + } + if ~ + end + } + put + } + if + /x ~ where + { + /x + { + 0 ~ exch ~ rmoveto ~ + SDict~ + begin ~ + currentpoint ~ + pdf.originy ~ ne ~ exch ~ pdf.originx ~ ne ~ or + { + pdf.save.linkll + /pdf.lly ~ + pdf.lly ~ pdf.outerbox ~ 1 ~ get ~ sub ~ def ~ + pdf.bordertracking.begin + } + if ~ + end + } + put + } + if + } + def + } +\__kernel_backend_postscript_header:n + { + /pdf.breaklink + { + pop ~ + counttomark ~ 2 ~ mod ~ 0 ~ eq + { + counttomark /pdf.count ~ exch ~ def + { + pdf.count ~ 0 ~ eq { exit } if ~ + counttomark ~ 2 ~ roll ~ + 1 ~ index ~ /Rect ~ eq + { + dup ~ 4 ~ array ~ copy ~ + dup ~ dup ~ + 1 ~ get ~ + pdf.outerbox ~ pdf.rect.ht ~ + pdf.linkmargin ~ 2 ~ mul ~ add ~ sub ~ + 3 ~ exch ~ put ~ + dup ~ + pdf.outerbox ~ 2 ~ get ~ + pdf.linkmargin ~ add ~ + 2 ~ exch ~ put ~ + dup ~ dup ~ + 3 ~ get ~ + pdf.outerbox ~ pdf.rect.ht ~ + pdf.linkmargin ~ 2 ~ mul ~ add ~ add ~ + 1 ~ exch ~ put + /pdf.currentrect ~ exch ~ def ~ + pdf.breaklink.write + { + pdf.currentrect ~ + dup ~ + pdf.outerbox ~ 0 ~ get ~ + pdf.linkmargin ~ sub ~ + 0 ~ exch ~ put ~ + dup ~ + pdf.outerbox ~ 2 ~ get ~ + pdf.linkmargin ~ add ~ + 2 ~ exch ~ put ~ + dup ~ dup ~ + 1 ~ get ~ + pdf.baselineskip ~ add ~ + 1 ~ exch ~ put ~ + dup ~ dup ~ + 3 ~ get ~ + pdf.baselineskip ~ add ~ + 3 ~ exch ~ put ~ + /pdf.currentrect ~ exch ~ def ~ + pdf.breaklink.write + } + 1 ~ index ~ 3 ~ get ~ + pdf.linkmargin ~ 2 ~ mul ~ add ~ + pdf.outerbox ~ pdf.rect.ht ~ add ~ + 2 ~ index ~ 1 ~ get ~ sub ~ + pdf.baselineskip ~ div ~ round ~ cvi ~ 1 ~ sub ~ + exch ~ + repeat ~ + pdf.currentrect ~ + dup ~ + pdf.outerbox ~ 0 ~ get ~ + pdf.linkmargin ~ sub ~ + 0 ~ exch ~ put ~ + dup ~ dup ~ + 1 ~ get ~ + pdf.baselineskip ~ add ~ + 1 ~ exch ~ put ~ + dup ~ dup ~ + 3 ~ get ~ + pdf.baselineskip ~ add ~ + 3 ~ exch ~ put ~ + dup ~ 2 ~ index ~ 2 ~ get ~ 2 ~ exch ~ put + /pdf.currentrect ~ exch ~ def ~ + pdf.breaklink.write ~ + SDict /pdf.pdfmark.good ~ false ~ put ~ + exit + } + { pdf.count ~ 2 ~ sub /pdf.count ~ exch ~ def } + ifelse + } + loop + } + if + /ANN + } + def + /pdf.breaklink.write + { + counttomark ~ 1 ~ sub ~ + index /_objdef ~ eq + { + counttomark ~ -2 ~ roll ~ + dup ~ wcheck ~ + { + readonly ~ + counttomark ~ 2 ~ roll + } + { pop ~ pop } + ifelse + } + if ~ + counttomark ~ 1 ~ add ~ copy ~ + pop ~ pdf.currentrect + /ANN ~ pdfmark + } + def + } +\__kernel_backend_postscript_header:n + { + /pdf.pdfmark + { + SDict /pdf.pdfmark.good ~ true ~ put ~ + dup /ANN ~ eq + { + pdf.pdfmark.store ~ + pdf.pdfmark.dict ~ + begin ~ + Subtype /Link ~ eq ~ + currentdict /Rect ~ known ~ and ~ + SDict /pdf.outerbox ~ known ~ and ~ + SDict /pdf.baselineskip ~ known ~ and ~ + { + Rect ~ 3 ~ get ~ + pdf.linkmargin ~ 2 ~ mul ~ add ~ + pdf.outerbox ~ pdf.rect.ht ~ add ~ + Rect ~ 1 ~ get ~ sub ~ + pdf.baselineskip ~ div ~ round ~ cvi ~ 0 ~ gt + { pdf.breaklink } + if + } + if ~ + end ~ + SDict /pdf.outerbox ~ undef ~ + SDict /pdf.baselineskip ~ undef ~ + currentdict /pdf.pdfmark.dict ~ undef ~ + } + if ~ + pdf.pdfmark.good + { pdfmark } + { cleartomark } + ifelse + } + def + /pdf.pdfmark.store + { + /pdf.pdfmark.dict ~ 65534 ~ dict ~ def ~ + counttomark ~ 1 ~ add ~ copy ~ + pop + { + dup ~ mark ~ eq + { + pop ~ + exit + } + { + pdf.pdfmark.dict ~ + begin ~ def ~ end + } + ifelse + } + loop + } + def + } +\box_new:N \l__pdf_backend_content_box +\box_new:N \l__pdf_backend_model_box +\int_new:N \g__pdf_backend_annotation_int +\cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4 + { + \__pdf_backend_annotation_aux:nnnn {#1} {#2} {#3} {#4} + \int_gincr:N \g__pdf_backend_object_int + \int_gset_eq:NN \g__pdf_backend_annotation_int \g__pdf_backend_object_int + \__pdf_backend_pdfmark:x + { + + /_objdef { pdf.obj \int_use:N \g__pdf_backend_object_int } + pdf.rect ~ + #4 ~ + /ANN + } + } +\cs_new_protected:Npn \__pdf_backend_annotation_aux:nnnn #1#2#3#4 + { + \box_move_down:nn {#3} + { \hbox:n { \__pdf_postscript:n { pdf.save.ll } } } + \hbox:n {#4} + \box_move_up:nn {#2} + { + \hbox:n + { + \tex_kern:D \dim_eval:n {#1} \scan_stop: + \__pdf_postscript:n { pdf.save.ur } + } + } + \int_gincr:N \g__pdf_backend_object_int + \int_gset_eq:NN \g__pdf_backend_annotation_int \g__pdf_backend_object_int + \__pdf_backend_pdfmark:x + { + /_objdef { pdf.obj \int_use:N \g__pdf_backend_object_int } + pdf.rect + /ANN + } + } +\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 +\tl_new:N \g__pdf_backend_link_dict_tl +\int_new:N \g__pdf_backend_link_sf_int +\bool_new:N \g__pdf_backend_link_math_bool +\bool_new:N \g__pdf_backend_link_bool +\tl_new:N \l__pdf_breaklink_pdfmark_tl +\tl_set:Nn \l__pdf_breaklink_pdfmark_tl { pdfmark } +\cs_new_protected:Npn \__pdf_breaklink_postscript:n #1 { } +\cs_new_eq:NN \__pdf_breaklink_usebox:N \box_use:N +\cs_new_protected:Npn \__pdf_backend_link_begin_goto:nnw #1#2 + { \__pdf_backend_link_begin:nw { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } } +\cs_new_protected:Npn \__pdf_backend_link_begin_user:nnw #1#2 + { \__pdf_backend_link_begin:nw {#1#2} } +\cs_new_protected:Npn \__pdf_backend_link_begin:nw #1 + { + \bool_if:NF \g__pdf_backend_link_bool + { \__pdf_backend_link_begin_aux:nw {#1} } + } +\cs_new_protected:Npn \__pdf_backend_link_begin_aux:nw #1 + { + \bool_gset_true:N \g__pdf_backend_link_bool + \__pdf_postscript:n + { /pdf.link.dict ( #1 ) def } + \tl_gset:Nn \g__pdf_backend_link_dict_tl {#1} + \__pdf_backend_link_sf_save: + \mode_if_math:TF + { \bool_gset_true:N \g__pdf_backend_link_math_bool } + { \bool_gset_false:N \g__pdf_backend_link_math_bool } + \hbox_set:Nw \l__pdf_backend_content_box + \__pdf_backend_link_sf_restore: + \bool_if:NT \g__pdf_backend_link_math_bool + { \c_math_toggle_token } + } +\cs_new_protected:Npn \__pdf_backend_link_end: + { + \bool_if:NT \g__pdf_backend_link_bool + { \__pdf_backend_link_end_aux: } + } +\cs_new_protected:Npn \__pdf_backend_link_end_aux: + { + \bool_if:NT \g__pdf_backend_link_math_bool + { \c_math_toggle_token } + \__pdf_backend_link_sf_save: + \hbox_set_end: + \__pdf_backend_link_minima: + \hbox_set:Nn \l__pdf_backend_model_box { Gg } + \exp_args:Nx \__pdf_backend_link_outerbox:n + { + \int_if_odd:nTF { \value { page } } + { \oddsidemargin } + { \evensidemargin } + } + \box_move_down:nn { \box_dp:N \l__pdf_backend_content_box } + { \hbox:n { \__pdf_postscript:n { pdf.save.linkll } } } + \__pdf_breaklink_postscript:n { pdf.bordertracking.begin } + \__pdf_breaklink_usebox:N \l__pdf_backend_content_box + \__pdf_breaklink_postscript:n { pdf.bordertracking.end } + \box_move_up:nn { \box_ht:N \l__pdf_backend_content_box } + { + \hbox:n + { \__pdf_postscript:n { pdf.save.linkur } } + } + \int_gincr:N \g__pdf_backend_object_int + \int_gset_eq:NN \g__pdf_backend_link_int \g__pdf_backend_object_int + \__pdf_postscript:x + { + mark + /_objdef { pdf.obj \int_use:N \g__pdf_backend_link_int } + \g__pdf_backend_link_dict_tl \c_space_tl + pdf.rect + /ANN ~ \l__pdf_breaklink_pdfmark_tl + } + \__pdf_backend_link_sf_restore: + \bool_gset_false:N \g__pdf_backend_link_bool + } +\cs_new_protected:Npn \__pdf_backend_link_minima: + { + \hbox_set:Nn \l__pdf_backend_model_box { Gg } + \__pdf_postscript:x + { + /pdf.linkdp.pad ~ + \dim_to_decimal:n + { + \dim_max:nn + { + \box_dp:N \l__pdf_backend_model_box + - \box_dp:N \l__pdf_backend_content_box + } + { 0pt } + } ~ + pdf.pt.dvi ~ def + /pdf.linkht.pad ~ + \dim_to_decimal:n + { + \dim_max:nn + { + \box_ht:N \l__pdf_backend_model_box + - \box_ht:N \l__pdf_backend_content_box + } + { 0pt } + } ~ + pdf.pt.dvi ~ def + } + } +\cs_new_protected:Npn \__pdf_backend_link_outerbox:n #1 + { + \__pdf_postscript:x + { + /pdf.outerbox + [ + \dim_to_decimal:n {#1} ~ + \dim_to_decimal:n { -\box_dp:N \l__pdf_backend_model_box } ~ + \dim_to_decimal:n { #1 + \textwidth } ~ + \dim_to_decimal:n { \box_ht:N \l__pdf_backend_model_box } + ] + [ exch { pdf.pt.dvi } forall ] def + /pdf.baselineskip ~ + \dim_to_decimal:n { \tex_baselineskip:D } ~ dup ~ 0 ~ gt + { pdf.pt.dvi ~ def } + { pop ~ pop } + ifelse + } + } +\cs_new_protected:Npn \__pdf_backend_link_sf_save: + { + \int_gset:Nn \g__pdf_backend_link_sf_int + { + \mode_if_horizontal:TF + { \tex_spacefactor:D } + { 0 } + } + } +\cs_new_protected:Npn \__pdf_backend_link_sf_restore: + { + \mode_if_horizontal:T + { + \int_compare:nNnT \g__pdf_backend_link_sf_int > { 0 } + { \int_set_eq:NN \tex_spacefactor:D \g__pdf_backend_link_sf_int } + } + } +\use_none:n + { + \cs_if_exist:NT \@makecol@hook + { + \tl_put_right:Nn \@makecol@hook + { + \box_if_empty:NF \@cclv + { + \vbox_set:Nn \@cclv + { + \__pdf_postscript:n + { + pdf.globaldict /pdf.brokenlink.rect ~ known + { pdf.bordertracking.continue } + if + } + \vbox_unpack_drop:N \@cclv + \__pdf_postscript:n + { pdf.bordertracking.endpage } + } + } + } + \tl_set:Nn \l__pdf_breaklink_pdfmark_tl { pdf.pdfmark } + \cs_set_eq:NN \__pdf_breaklink_postscript:n \__pdf_postscript:n + \cs_set_eq:NN \__pdf_breaklink_usebox:N \hbox_unpack:N + } + } +\cs_new:Npn \__pdf_backend_link_last: + { { pdf.obj \int_use:N \g__pdf_backend_link_int } } +\cs_new_protected:Npn \__pdf_backend_link_margin:n #1 + { + \__pdf_postscript:x + { + /pdf.linkmargin { \dim_to_decimal:n {#1} ~ pdf.pt.dvi } def + } + } +\cs_new_protected:Npn \__pdf_backend_destination:nn #1#2 + { + \__pdf_postscript:n { pdf.dest.anchor } + \__pdf_backend_pdfmark:x + { + /View + [ + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ pdf.dest.point ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH ~ pdf.dest.y } + { fitbv } { /FitBV ~ pdf.dest.x } + { fith } { /FitH ~ pdf.dest.y } + { fitv } { /FitV ~ pdf.dest.x } + } + { + /XYZ ~ pdf.dest.point ~ \fp_eval:n { (#2) / 100 } + } + ] + /Dest ( \exp_not:n {#1} ) cvn + /DEST + } + } +\cs_new_protected:Npn \__pdf_backend_destination_rectangle:nn #1#2 + { + \group_begin: + \hbox_set:Nn \l__pdf_internal_box {#2} + \box_move_down:nn + { \box_dp:N \l__pdf_internal_box } + { \hbox:n { \__pdf_postscript:n { pdf.save.ll } } } + \box_use:N \l__pdf_internal_box + \box_move_up:nn + { \box_ht:N \l__pdf_internal_box } + { \hbox:n { \__pdf_postscript:n { pdf.save.ur } } } + \__pdf_backend_pdfmark:n + { + /View + [ + /FitR ~ + pdf.llx ~ pdf.lly ~ pdf.dest2device ~ + pdf.urx ~ pdf.ury ~ pdf.dest2device + ] + /Dest ( #1 ) cvn + /DEST + } + \group_end: + } +\cs_new_protected:Npn \__pdf_backend_compresslevel:n #1 { } +\cs_new_protected:Npn \__pdf_backend_compress_objects:n #1 { } +\cs_new_protected:Npn \__pdf_backend_version_major_gset:n #1 { } +\cs_new_protected:Npn \__pdf_backend_version_minor_gset:n #1 { } +\cs_new:Npn \__pdf_backend_version_major: { -1 } +\cs_new:Npn \__pdf_backend_version_minor: { -1 } +\cs_new_protected:Npn \__pdf_backend_bdc:nn #1#2 + { \__pdf_backend_pdfmark:n { /#1 ~ #2 /BDC } } +\cs_new_protected:Npn \__pdf_backend_emc: + { \__pdf_backend_pdfmark:n { /EMC } } +%% +%% +%% End of file `l3backend-dvips.def'. |