summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvips.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvips.def666
1 files changed, 628 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
index db72b671eff..bc9cdcd2874 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
@@ -5,6 +5,12 @@
%% The original source files were:
%%
%% l3drivers.dtx (with options: `package,dvips')
+%% l3drivers-basics.dtx (with options: `package,dvips')
+%% l3drivers-color.dtx (with options: `package,dvips')
+%% l3drivers-box.dtx (with options: `package,dvips')
+%% l3drivers-draw.dtx (with options: `package,dvips')
+%% l3drivers-image.dtx (with options: `package,dvips')
+%% l3drivers-pdf.dtx (with options: `package,dvips')
%%
%% Copyright (C) 1990-2019 The LaTeX3 Project
%%
@@ -19,6 +25,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: l3drivers.dtx
+%% File: l3drivers-basics.dtx
\ProvidesExplFile
{l3dvips.def}{2019-04-06}{}
{L3 Experimental driver: dvips}
@@ -26,6 +33,30 @@
\cs_new_protected:Npn \__driver_literal:n #1
{ \__driver_literal:e { \exp_not:n {#1} } }
\cs_generate_variant:Nn \__driver_literal:n { x }
+\cs_new_protected:Npn \__driver_literal_postscript:n #1
+ { \__driver_literal:n { ps:: #1 } }
+\cs_generate_variant:Nn \__driver_literal_postscript:n { x }
+\cs_new_protected:Npn \__driver_postscript:n #1
+ { \__driver_literal:n { ps: SDict ~ begin ~ #1 ~ end } }
+\cs_generate_variant:Nn \__driver_postscript:n { x }
+\cs_new_protected:Npn \__driver_postscript_header:n #1
+ { \__driver_literal:n { ! #1 } }
+\cs_new_protected:Npn \__driver_align_currentpoint_begin:
+ {
+ \__driver_literal:n { ps::[begin] }
+ \__driver_literal_postscript:n { currentpoint }
+ \__driver_literal_postscript:n { currentpoint~translate }
+ }
+\cs_new_protected:Npn \__driver_align_currentpoint_end:
+ {
+ \__driver_literal_postscript:n { neg~exch~neg~exch~translate }
+ \__driver_literal:n { ps::[end] }
+ }
+\cs_new_protected:Npn \__driver_scope_begin:
+ { \__driver_literal:n { ps:gsave } }
+\cs_new_protected:Npn \__driver_scope_end:
+ { \__driver_literal:n { ps:grestore } }
+%% File: l3drivers-color.dtx
\cs_new_protected:Npn \driver_color_pickup:N #1 { }
\AtBeginDocument
{
@@ -72,30 +103,13 @@
\cs_new_protected:Npn \__driver_color_select:n #1
{
\__driver_literal:n { color~push~ #1 }
- \__driver_literal_postscript:n { /l3fc~{ }~def }
+ \__driver_postscript:n { /driver.fc~{ }~def }
\group_insert_after:N \__driver_color_reset:
}
\cs_generate_variant:Nn \__driver_color_select:n { x }
\cs_new_protected:Npn \__driver_color_reset:
{ \__driver_literal:n { color~pop } }
-\cs_new_protected:Npn \__driver_literal_postscript:n #1
- { \__driver_literal:n { ps:: #1 } }
-\cs_generate_variant:Nn \__driver_literal_postscript:n { x }
-\cs_new_protected:Npn \__driver_align_currentpoint_begin:
- {
- \__driver_literal:n { ps::[begin] }
- \__driver_literal_postscript:n { currentpoint }
- \__driver_literal_postscript:n { currentpoint~translate }
- }
-\cs_new_protected:Npn \__driver_align_currentpoint_end:
- {
- \__driver_literal_postscript:n { neg~exch~neg~exch~translate }
- \__driver_literal:n { ps::[end] }
- }
-\cs_new_protected:Npn \__driver_scope_begin:
- { \__driver_literal:n { ps:gsave } }
-\cs_new_protected:Npn \__driver_scope_end:
- { \__driver_literal:n { ps:grestore } }
+%% File: l3drivers-box.dtx
\cs_new_protected:Npn \driver_box_use_clip:N #1
{
\__driver_scope_begin:
@@ -149,16 +163,14 @@
\hbox_overlap_right:n { \box_use:N #1 }
\__driver_scope_end:
}
-\cs_new_eq:NN \__driver_image_getbb_eps:n \image_read_bb:n
-\cs_new_protected:Npn \__driver_image_include_eps:n #1
- { \__driver_literal:n { PSfile = #1 } }
+%% File: l3drivers-draw.dtx
\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_postscript:n
\cs_generate_variant:Nn \__driver_draw_literal:n { x }
\cs_new_protected:Npn \driver_draw_begin:
{
\__driver_literal:n { ps::[begin] }
\__driver_draw_literal:n { @beginspecial }
- \__driver_draw_literal:n { /l3fc~{ }~def }
+ \__driver_darw_literal:n { SDict ~ begin ~ /driver.fc ~ { } ~ def ~ end }
}
\cs_new_protected:Npn \driver_draw_end:
{
@@ -233,7 +245,7 @@
\cs_new_protected:Npn \driver_draw_fill:
{
\__driver_draw_literal:n { gsave }
- \__driver_draw_literal:n { l3fc }
+ \__driver_draw_literal:n { driver.fc }
\__driver_draw_literal:x
{
\bool_if:NT \g__driver_draw_eor_bool { eo }
@@ -254,7 +266,7 @@
\cs_new_protected:Npn \driver_draw_fillstroke:
{
\__driver_draw_literal:n { gsave }
- \__driver_draw_literal:n { l3fc }
+ \__driver_draw_literal:n { driver.fc }
\__driver_draw_literal:x
{
\bool_if:NT \g__driver_draw_eor_bool { eo }
@@ -354,7 +366,7 @@
{ rgb ~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} }
}
\cs_new_protected:Npn \__driver_draw_color_fill:n #1
- { \__driver_draw_literal:n { /l3fc ~ { #1 } ~ def } }
+ { \__driver_postscript:n { SDict ~ begin ~ /driver.fc ~ { #1 } ~ def ~ end } }
\cs_generate_variant:Nn \__driver_draw_color_fill:n { x }
\cs_new_protected:Npn \__driver_draw_color_stroke:n #1
{
@@ -394,6 +406,13 @@
\__driver_draw_literal:n { [begin] }
\__driver_draw_literal:n { @beginspecial }
}
+%% File: l3drivers-image.dtx
+\cs_new_eq:NN \__driver_image_getbb_eps:n \image_read_bb:n
+\cs_new_protected:Npn \__driver_image_include_eps:n #1
+ { \__driver_literal:n { PSfile = #1 } }
+%% File: l3drivers-pdf.dtx
+\tl_const:Nn \c__driver_pdf_AR_fix_tl
+ { /Ff ~ 65537 /FT /Btn /Subtype /Widget }
\int_new:N \g__driver_pdf_object_int
\prop_new:N \g__driver_pdf_object_prop
\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2
@@ -405,12 +424,12 @@
\prop_gput:Nnn \g__driver_pdf_object_prop {#1} {#2}
}
\cs_new:Npn \driver_pdf_object_ref:n #1
- { { l3obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } }
+ { { driver.obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } }
\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2
{
- \__driver_literal_postscript:x
+ \__driver_postscript:x
{
- mark ~ /_objdef ~ \driver_pdf_object_ref:n {#1} ~
+ mark /_objdef ~ \driver_pdf_object_ref:n {#1}
/type
\str_case_e:nn
{ \prop_item:Nn \g__driver_pdf_object_prop {#1} }
@@ -428,18 +447,18 @@
}
\cs_new_protected:Npn \__driver_pdf_object_write_array:nn #1#2
{
- \__driver_literal_postscript:x
+ \__driver_postscript:x
{
- mark ~ \driver_pdf_object_ref:n {#1} ~
+ mark ~ \driver_pdf_object_ref:n {#1}
[ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark
}
}
\cs_new_protected:Npn \__driver_pdf_object_write_dict:nn #1#2
{
- \__driver_literal_postscript:x
+ \__driver_postscript:x
{
- mark ~ \driver_pdf_object_ref:n {#1} ~
- << ~ \exp_not:n {#2} ~ >> ~ /PUT ~ pdfmark
+ mark ~ \driver_pdf_object_ref:n {#1}
+ << \exp_not:n {#2} >> /PUT ~ pdfmark
}
}
\cs_new_protected:Npn \__driver_pdf_object_write_stream:nn #1#2
@@ -451,16 +470,587 @@
}
\cs_new_protected:Npn \__driver_pdf_object_write_stream:nnn #1#2#3
{
- \__driver_literal_postscript:n
+ \__driver_postscript:n
+ {
+ [nobreak]
+ mark ~ #1 ~ ( #3 ) /PUT ~ pdfmark ~
+ mark ~ #1 ~ << #2 >> /PUT ~ pdfmark
+ }
+ }
+\__driver_postscript_header:n
+ {
+ true ~ setglobal ~
+ /driver.globaldict ~ 4 ~ dict ~ def ~
+ false ~ setglobal
+ }
+\__driver_postscript_header:n
+ {
+ /driver.cvs { 65534 ~ string ~ cvs } def
+ /driver.pt.dvi { 72.27 ~ div ~ Resolution ~ mul } def
+ /driver.rect.ht { dup ~ 1 ~ get ~ neg ~ exch ~ 3 ~ get ~ add } def
+ }
+\__driver_postscript_header:n
+ {
+ /driver.linkmargin { 1 ~ driver.pt.dvi } def
+ /driver.linkdp.pad { 0 } def
+ /driver.linkht.pad { 0 } def
+ }
+\__driver_postscript_header:n
+ {
+ /driver.annotation.border
+ { /Rect [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ] } def
+ /driver.annotation.ll
+ {
+ currentpoint
+ /driver.lly ~ exch ~ def
+ /driver.llx ~ exch ~ def
+ }
+ def
+ /driver.annotation.ur
+ {
+ currentpoint
+ /driver.ury ~ exch ~ def
+ /driver.urx ~ exch ~ def
+ }
+ def
+ /driver.link.ll
+ {
+ currentpoint ~
+ driver.linkmargin ~ add ~
+ driver.linkdp.pad ~ add
+ /driver.lly ~ exch ~ def ~
+ driver.linkmargin ~ sub
+ /driver.llx ~ exch ~ def
+ }
+ def
+ /driver.link.ur
+ {
+ currentpoint ~
+ driver.linkmargin ~ sub ~
+ driver.linkht.pad ~ sub
+ /driver.ury ~ exch ~ def ~
+ driver.linkmargin ~ add
+ /driver.urx ~ exch ~ def
+ }
+ def
+ }
+\__driver_postscript_header:n
+ {
+ /driver.bordertracking ~ false ~ def
+ /driver.bordertracking.begin
+ {
+ SDict ~ /driver.bordertracking ~ true ~ put ~
+ SDict ~ /driver.leftboundary ~ undef ~
+ SDict ~ /driver.rightboundary ~ undef ~
+ /a ~ where
+ {
+ /a
+ {
+ currentpoint ~ pop ~
+ SDict /driver.rightboundary ~ known ~ dup
+ {
+ SDict /driver.rightboundary ~ get ~ 2 ~ index ~ lt
+ { not }
+ if
+ }
+ if
+ { pop }
+ { SDict ~ exch /driver.rightboundary ~ exch ~ put }
+ ifelse ~
+ moveto ~
+ currentpoint ~ pop ~
+ SDict /driver.leftboundary ~ known ~ dup
+ {
+ SDict /driver.leftboundary ~ get ~ 2 ~ index ~ gt
+ { not }
+ if
+ }
+ if
+ { pop }
+ { SDict ~ exch /driver.leftboundary ~ exch ~ put }
+ ifelse
+ }
+ put
+ }
+ if
+ }
+ def
+ /driver.bordertracking.end
+ {
+ /a ~ where { /a { moveto } put } if
+ /x ~ where { /x { 0 ~ exch ~ rmoveto } put } if ~
+ SDict /driver.leftboundary ~ known
+ { driver.outerbox ~ 0 ~ driver.leftboundary ~ put }
+ if ~
+ SDict /driver.rightboundary ~ known
+ { driver.outerbox ~ 2 ~ driver.rightboundary ~ put }
+ if ~
+ SDict /driver.bordertracking ~ false ~ put
+ }
+ def
+ /driver.bordertracking.endpage
+ {
+ driver.bordertracking
+ {
+ driver.bordertracking.end ~
+ true ~ setglobal ~
+ driver.globaldict
+ /driver.brokenlink.rect [ driver.outerbox ~ aload ~ pop ] put ~
+ driver.globaldict
+ /driver.brokenlink.skip ~ driver.baselineskip ~ put ~
+ driver.globaldict
+ /driver.brokenlink.dict ~
+ driver.link.dict ~ driver.cvs ~ put ~
+ false ~ setglobal ~
+ mark ~ driver.link.dict ~ cvx ~ exec ~ /Rect
+ [
+ driver.llx ~
+ driver.lly ~
+ driver.outerbox ~ 2 ~ get ~ driver.linkmargin ~ add ~
+ currentpoint ~ exch ~ pop ~
+ driver.outerbox ~ driver.rect.ht ~ sub ~ driver.linkmargin ~ sub
+ ]
+ /ANN ~ driver.pdfmark
+ }
+ if
+ }
+ def
+ /driver.bordertracking.continue
+ {
+ /driver.link.dict ~ driver.globaldict
+ /driver.brokenlink.dict ~ get ~ def
+ /driver.outerbox ~ driver.globaldict
+ /driver.brokenlink.rect ~ get ~ def
+ /driver.baselineskip ~ driver.globaldict
+ /driver.brokenlink.skip ~ get ~ def ~
+ driver.globaldict ~ dup ~ dup
+ /driver.brokenlink.dict ~ undef
+ /driver.brokenlink.skip ~ undef
+ /driver.brokenlink.rect ~ undef ~
+ currentpoint
+ /driver.originy ~ exch ~ def
+ /driver.originx ~ exch ~ def
+ /a ~ where
+ {
+ /a
+ {
+ moveto ~
+ SDict ~
+ begin ~
+ currentpoint ~ driver.originy ~ ne ~ exch ~
+ driver.originx ~ ne ~ or
+ {
+ driver.link.ll
+ /driver.lly ~
+ driver.lly ~ driver.outerbox ~ 1 ~ get ~ sub ~ def ~
+ driver.bordertracking.begin
+ }
+ if ~
+ end
+ }
+ put
+ }
+ if
+ /x ~ where
+ {
+ /x
+ {
+ 0 ~ exch ~ rmoveto ~
+ SDict~
+ begin ~
+ currentpoint ~
+ driver.originy ~ ne ~ exch ~ driver.originx ~ ne ~ or
+ {
+ driver.link.ll
+ /driver.lly ~
+ driver.lly ~ driver.outerbox ~ 1 ~ get ~ sub ~ def ~
+ driver.bordertracking.begin
+ }
+ if ~
+ end
+ }
+ put
+ }
+ if
+ }
+ def
+ }
+\__driver_postscript_header:n
+ {
+ /driver.breaklink
+ {
+ pop ~
+ counttomark ~ 2 ~ mod ~ 0 ~ eq
+ {
+ counttomark /driver.count ~ exch ~ def
+ {
+ driver.count ~ 0 ~ eq { exit } if ~
+ counttomark ~ 2 ~ roll ~
+ 1 ~ index ~ /Rect ~ eq
+ {
+ dup ~ 4 ~ array ~ copy ~
+ dup ~ dup ~
+ 1 ~ get ~
+ driver.outerbox ~ driver.rect.ht ~
+ driver.linkmargin ~ 2 ~ mul ~ add ~ sub ~
+ 3 ~ exch ~ put ~
+ dup ~
+ driver.outerbox ~ 2 ~ get ~
+ driver.linkmargin ~ add ~
+ 2 ~ exch ~ put ~
+ dup ~ dup ~
+ 3 ~ get ~
+ driver.outerbox ~ driver.rect.ht ~
+ driver.linkmargin ~ 2 ~ mul ~ add ~ add ~
+ 1 ~ exch ~ put
+ /driver.currentrect ~ exch ~ def ~
+ driver.breaklink.write
+ {
+ driver.currentrect ~
+ dup ~
+ driver.outerbox ~ 0 ~ get ~
+ driver.linkmargin ~ sub ~
+ 0 ~ exch ~ put ~
+ dup ~
+ driver.outerbox ~ 2 ~ get ~
+ driver.linkmargin ~ add ~
+ 2 ~ exch ~ put ~
+ dup ~ dup ~
+ 1 ~ get ~
+ driver.baselineskip ~ add ~
+ 1 ~ exch ~ put ~
+ dup ~ dup ~
+ 3 ~ get ~
+ driver.baselineskip ~ add ~
+ 3 ~ exch ~ put ~
+ /driver.currentrect ~ exch ~ def ~
+ driver.breaklink.write
+ }
+ 1 ~ index ~ 3 ~ get ~
+ driver.linkmargin ~ 2 ~ mul ~ add ~
+ driver.outerbox ~ driver.rect.ht ~ add ~
+ 2 ~ index ~ 1 ~ get ~ sub ~
+ driver.baselineskip ~ div ~ round ~ cvi ~ 1 ~ sub ~
+ exch ~
+ repeat ~
+ driver.currentrect ~
+ dup ~
+ driver.outerbox ~ 0 ~ get ~
+ driver.linkmargin ~ sub ~
+ 0 ~ exch ~ put ~
+ dup ~ dup ~
+ 1 ~ get ~
+ driver.baselineskip ~ add ~
+ 1 ~ exch ~ put ~
+ dup ~ dup ~
+ 3 ~ get ~
+ driver.baselineskip ~ add ~
+ 3 ~ exch ~ put ~
+ dup ~ 2 ~ index ~ 2 ~ get ~ 2 ~ exch ~ put
+ /driver.currentrect ~ exch ~ def ~
+ driver.breaklink.write ~
+ SDict /driver.pdfmark.good ~ false ~ put ~
+ exit
+ }
+ { driver.count ~ 2 ~ sub /driver.count ~ exch ~ def }
+ ifelse
+ }
+ loop
+ }
+ if
+ /ANN
+ }
+ def
+ /driver.breaklink.write
+ {
+ counttomark ~ 1 ~ add ~ copy ~
+ pop ~ driver.currentrect
+ /ANN ~ pdfmark
+ }
+ def
+ }
+\__driver_postscript_header:n
+ {
+ /driver.pdfmark
+ {
+ SDict /driver.pdfmark.good ~ true ~ put ~
+ dup /ANN ~ eq
+ {
+ driver.pdfmark.store ~
+ driver.pdfmark.dict ~
+ begin ~
+ Subtype /Link ~ eq ~
+ currentdict /Rect ~ known ~ and ~
+ SDict /driver.outerbox ~ known ~ and ~
+ SDict /driver.baselineskip ~ known ~ and ~
+ {
+ Rect ~ 3 ~ get ~
+ driver.linkmargin ~ 2 ~ mul ~ add ~
+ driver.outerbox ~ driver.rect.ht ~ add ~
+ Rect ~ 1 ~ get ~ sub ~
+ driver.baselineskip ~ div ~ round ~ cvi ~ 0 ~ gt
+ { driver.breaklink }
+ { driver.pdfmark.obj }
+ ifelse
+ }
+ { driver.pdfmark.obj }
+ ifelse ~
+ end ~
+ SDict /driver.outerbox ~ undef ~
+ SDict /driver.baselineskip ~ undef ~
+ currentdict /driver.pdfmark.dict ~ undef ~
+ }
+ if ~
+ driver.pdfmark.good
+ { pdfmark }
+ { cleartomark }
+ ifelse
+ }
+ def
+ /driver.pdfmark.store
+ {
+ /driver.pdfmark.dict ~ 65534 ~ dict ~ def ~
+ counttomark ~ 1 ~ add ~ copy ~
+ pop
+ {
+ dup ~ mark ~ eq
+ {
+ pop ~
+ exit
+ }
+ {
+ driver.pdfmark.dict ~
+ begin ~ def ~ end
+ }
+ ifelse
+ }
+ loop
+ }
+ def
+ /driver.pdfmark.obj
+ { /_objdef ~ exch ~ driver.link.obj ~ exch } def
+ }
+\box_new:N \l__driver_pdf_content_box
+\box_new:N \l__driver_pdf_model_box
+\int_new:N \g__driver_pdf_annotation_int
+\cs_new_protected:Npn \driver_pdf_annotation:nnnn #1#2#3#4
+ {
+ \__driver_pdf_annotation:nnnn {#1} {#2} {#3} {#4}
+ \int_gincr:N \g__driver_pdf_object_int
+ \int_gset_eq:NN \g__driver_pdf_annotation_int \g__driver_pdf_object_int
+ \__driver_postscript:x
+ {
+ mark
+ /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
+ driver.annotation.border ~
+ #4 ~
+ /ANN ~ pdfmark
+ }
+ }
+\cs_new_protected:Npn \__driver_pdf_annotation:nnnn #1#2#3#4
+ {
+ \box_move_down:nn {#3}
+ { \hbox:n { \__driver_postscript:n { driver.annotation.ll } } }
+ \hbox:n {#4}
+ \box_move_up:nn {#2}
+ {
+ \hbox:n
+ {
+ \tex_kern:D \dim_eval:n {#1} \scan_stop:
+ \__driver_postscript:n { driver.annotation.ur }
+ }
+ }
+ \int_gincr:N \g__driver_pdf_object_int
+ \int_gset_eq:NN \g__driver_pdf_annotation_int \g__driver_pdf_object_int
+ \__driver_postscript:x
+ {
+ mark
+ /_objdef { driver.obj \int_use:N \g__driver_pdf_object_int }
+ driver.annotation.border ~
+ \c__driver_pdf_AR_fix_tl
+ /ANN ~ pdfmark
+ }
+ }
+\cs_new:Npn \driver_pdf_annotation_last:
+ { { driver.obj \int_use:N \g__driver_pdf_annotation_int } }
+\int_new:N \g__driver_pdf_link_int
+\tl_new:N \g__driver_pdf_link_dict_tl
+\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
+\cs_new_protected:Npn \driver_pdf_link_begin_goto:nnw #1#2
+ { \__driver_pdf_link_begin:nw { #1 /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
+ {
+ \bool_if:NF \g__driver_pdf_link_bool
+ { \__driver_pdf_link_begin_aux:nw {#1} }
+ }
+\cs_new_protected:Npn \__driver_pdf_link_begin_aux:nw #1
+ {
+ \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
+ }
+ \tl_gset:Nn \g__driver_pdf_link_dict_tl {#1}
+ \__driver_pdf_link_sf_save:
+ \mode_if_math:TF
+ { \bool_gset_true:N \g__driver_pdf_link_math_bool }
+ { \bool_gset_false:N \g__driver_pdf_link_math_bool }
+ \hbox_set:Nw \l__driver_pdf_content_box
+ \__driver_pdf_link_sf_restore:
+ \bool_if:NT \g__driver_pdf_link_math_bool
+ { \c_math_toggle_token }
+ }
+\cs_new_protected:Npn \driver_pdf_link_end:
+ {
+ \bool_if:NT \g__driver_pdf_link_bool
+ { \__driver_pdf_link_end: }
+ }
+\cs_new_protected:Npn \__driver_pdf_link_end:
+ {
+ \bool_if:NT \g__driver_pdf_link_math_bool
+ { \c_math_toggle_token }
+ \__driver_pdf_link_sf_save:
+ \hbox_set_end:
+ \__driver_pdf_link_minima:
+ \hbox_set:Nn \l__driver_pdf_model_box { Gg }
+ \exp_args:Nx \__driver_driver_link_outerbox:n
+ {
+ \int_if_odd:nTF { \value { page } }
+ { \oddsidemargin }
+ { \evensidemargin }
+ }
+ \box_move_down:nn { \box_dp:N \l__driver_pdf_content_box }
+ { \hbox:n { \__driver_postscript:n { driver.link.ll } } }
+ \__driver_postscript:n { driver.bordertracking.begin }
+ \hbox_unpack:N \l__driver_pdf_content_box
+ \__driver_postscript:n { driver.bordertracking.end }
+ \box_move_up:nn { \box_ht:N \l__driver_pdf_content_box }
+ {
+ \hbox:n
+ { \__driver_postscript:n { driver.link.ur } }
+ }
+ \__driver_postscript:x
+ {
+ mark
+ \g__driver_pdf_link_dict_tl /Subtype /Link ~
+ driver.annotation.border
+ /ANN ~ driver.pdfmark
+ }
+ \__driver_pdf_link_sf_restore:
+ \bool_gset_false:N \g__driver_pdf_link_bool
+ }
+\cs_new_protected:Npn \__driver_pdf_link_minima:
+ {
+ \hbox_set:Nn \l__driver_pdf_model_box { Gg }
+ \__driver_postscript:x
+ {
+ /driver.linkdp.pad ~
+ \dim_to_decimal:n
+ {
+ \dim_max:nn
+ {
+ \box_dp:N \l__driver_pdf_model_box
+ - \box_dp:N \l__driver_pdf_content_box
+ }
+ { 0pt }
+ } ~
+ driver.pt.dvi ~ def
+ /driver.linkht.pad ~
+ \dim_to_decimal:n
+ {
+ \dim_max:nn
+ {
+ \box_ht:N \l__driver_pdf_model_box
+ - \box_ht:N \l__driver_pdf_content_box
+ }
+ { 0pt }
+ } ~
+ driver.pt.dvi ~ def
+ }
+ }
+\cs_new_protected:Npn \__driver_driver_link_outerbox:n #1
+ {
+ \__driver_postscript:x
+ {
+ /driver.outerbox
+ [
+ \dim_to_decimal:n {#1} ~
+ \dim_to_decimal:n { -\box_dp:N \l__driver_pdf_model_box } ~
+ \dim_to_decimal:n { #1 + \textwidth } ~
+ \dim_to_decimal:n { \box_ht:N \l__driver_pdf_model_box }
+ ]
+ [ exch { driver.pt.dvi } forall ] def
+ /driver.baselineskip ~
+ \dim_to_decimal:n { \tex_baselineskip:D } ~ dup ~ 0 ~ gt
+ { driver.pt.dvi ~ def }
+ { pop ~ pop }
+ ifelse
+ }
+ }
+\cs_new_protected:Npn \__driver_pdf_link_sf_save:
+ {
+ \int_gset:Nn \g__driver_pdf_link_sf_int
+ {
+ \mode_if_horizontal:TF
+ { \tex_spacefactor:D }
+ { 0 }
+ }
+ }
+\cs_new_protected:Npn \__driver_pdf_link_sf_restore:
+ {
+ \mode_if_horizontal:T
+ {
+ \int_compare:nNnT \g__driver_pdf_link_sf_int > { 0 }
+ { \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
+ {
+ \vbox_set:Nn \@cclv
+ {
+ \vbox_unpack_drop:N \@cclv
+ \__driver_postscript:n
+ { driver.bordertracking.endpage }
+ }
+ }
+\cs_new:Npn \driver_pdf_link_last:
+ { { driver.obj \int_use:N \g__driver_pdf_link_int } }
+\cs_new_protected:Npn \driver_pdf_link_margin:n #1
+ {
+ \__driver_postscript:x
{
- [nobreak] ~
- mark ~ #1 ~ ( #3 ) ~ /PUT ~ pdfmark ~
- mark ~ #1 ~ << #2 >> ~ /PUT ~ pdfmark
+ /driver.linkmargin { \dim_to_decimal:n {#1} ~ driver.pt.dvi } def
}
}
\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { }
\cs_new_protected:Npn \driver_pdf_objects_enable: { }
\cs_new_protected:Npn \driver_pdf_objects_disable: { }
+\cs_new_protected:Npn \driver_pdf_version_major_gset:n #1 { }
+\cs_new_protected:Npn \driver_pdf_version_minor_gset:n #1 { }
+\cs_new:Npn \driver_pdf_version_major: { -1 }
+\cs_new:Npn \driver_pdf_version_minor: { -1 }
%%
%%
%% End of file `l3dvips.def'.