diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 81 |
1 files changed, 50 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index feb19384f46..ee2d45c8aa1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -929,8 +929,16 @@ \int_new:N \g__driver_pdf_link_sf_int \bool_new:N \g__driver_pdf_link_math_bool \bool_new:N \g__driver_pdf_link_bool +\tl_new:N \l__driver_breaklink_obj_tl +\tl_set:Nn \l__driver_breaklink_obj_tl + { /_objdef ~ { driver.obj \int_use:N \g__driver_pdf_link_int } } +\tl_new:N \l__driver_breaklink_pdfmark_tl +\tl_set:Nn \l__driver_breaklink_pdfmark_tl { pdfmark } +\cs_new_protected:Npn \__driver_breaklink_postscript:n #1 { } +\cs_generate_variant:Nn \__driver_breaklink_postscript:n { x } +\cs_new_eq:NN \__driver_breaklink_usebox:N \box_use:N \cs_new_protected:Npn \driver_pdf_link_begin_goto:nnw #1#2 - { \__driver_pdf_link_begin:nw { #1 /A << /S /GoTo /D ( #2 ) >> } } + { \__driver_pdf_link_begin:nw { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } } \cs_new_protected:Npn \driver_pdf_link_begin_user:nnw #1#2 { \__driver_pdf_link_begin:nw {#1#2} } \cs_new_protected:Npn \__driver_pdf_link_begin:nw #1 @@ -943,17 +951,7 @@ \bool_gset_true:N \g__driver_pdf_link_bool \__driver_pdf_annotation:nnnn { 3pt } { 3pt } { 0pt } { } \__driver_postscript:n - { /driver.link.dict ( /Subtype /Link #1 ) def } - \int_gincr:N \g__driver_pdf_object_int - \int_gset_eq:NN \g__driver_pdf_link_int \g__driver_pdf_object_int - \__driver_postscript:x - { - /driver.link.obj - { - { driver.obj \int_use:N \g__driver_pdf_link_int \c_space_tl driver.cvs } - } - def - } + { /driver.link.dict ( #1 ) def } \tl_gset:Nn \g__driver_pdf_link_dict_tl {#1} \__driver_pdf_link_sf_save: \mode_if_math:TF @@ -985,20 +983,31 @@ } \box_move_down:nn { \box_dp:N \l__driver_pdf_content_box } { \hbox:n { \__driver_postscript:n { driver.save.linkll } } } - \__driver_postscript:n { driver.bordertracking.begin } - \hbox_unpack:N \l__driver_pdf_content_box - \__driver_postscript:n { driver.bordertracking.end } + \__driver_breaklink_postscript:n { driver.bordertracking.begin } + \__driver_breaklink_usebox:N \l__driver_pdf_content_box + \__driver_breaklink_postscript:n { driver.bordertracking.end } \box_move_up:nn { \box_ht:N \l__driver_pdf_content_box } { \hbox:n { \__driver_postscript:n { driver.save.linkur } } } + \int_gincr:N \g__driver_pdf_object_int + \int_gset_eq:NN \g__driver_pdf_link_int \g__driver_pdf_object_int + \__driver_breaklink_postscript:x + { + /driver.link.obj + { + { driver.obj \int_use:N \g__driver_pdf_link_int \c_space_tl driver.cvs } + } + def + } \__driver_postscript:x { mark - \g__driver_pdf_link_dict_tl /Subtype /Link ~ + \l__driver_breaklink_obj_tl + \g__driver_pdf_link_dict_tl \c_space_tl driver.rect - /ANN ~ driver.pdfmark + /ANN ~ \l__driver_breaklink_pdfmark_tl } \__driver_pdf_link_sf_restore: \bool_gset_false:N \g__driver_pdf_link_bool @@ -1068,22 +1077,32 @@ { \int_set_eq:NN \tex_spacefactor:D \g__driver_pdf_link_sf_int } } } -\tl_gput_left:Nn \@startcolumn - { - \__driver_postscript:n - { - driver.globaldict /driver.brokenlink.rect ~ known - { driver.bordertracking.continue } - if - } - } -\tl_gput_left:Nn \@makecol +\use_none:n { - \vbox_set:Nn \@cclv + \cs_if_exist:NT \@makecol@hook { - \vbox_unpack_drop:N \@cclv - \__driver_postscript:n - { driver.bordertracking.endpage } + \tl_put_right:Nn \@makecol@hook + { + \box_if_empty:NF \@cclv + { + \vbox_set:Nn \@cclv + { + \__driver_postscript:n + { + driver.globaldict /driver.brokenlink.rect ~ known + { driver.bordertracking.continue } + if + } + \vbox_unpack_drop:N \@cclv + \__driver_postscript:n + { driver.bordertracking.endpage } + } + } + } + \tl_clear:N \l__driver_breaklink_obj_tl + \tl_set:Nn \l__driver_breaklink_pdfmark_tl { driver.pdfmark } + \cs_set_eq:NN \__driver_breaklink_postscript:n \__driver_postscript:n + \cs_set_eq:NN \__driver_breaklink_usebox:N \hbox_unpack:N } } \cs_new:Npn \driver_pdf_link_last: |