[latex3-commits] [git/LaTeX3-latex3-latex3] master: Support object in unbroken links with dvips (70512fc)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Apr 16 13:36:12 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/70512fc3e8ad98f4354abf62fc1a03bd58e3cbd1
>---------------------------------------------------------------
commit 70512fc3e8ad98f4354abf62fc1a03bd58e3cbd1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Apr 16 12:36:12 2019 +0100
Support object in unbroken links with dvips
>---------------------------------------------------------------
70512fc3e8ad98f4354abf62fc1a03bd58e3cbd1
l3kernel/l3drivers-pdf.dtx | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index f8dc7e9..a63ab69 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -181,6 +181,7 @@
%
% \begin{macro}
% {
+% driver.cvs ,
% driver.rect.ht ,
% driver.pt.dvi
% }
@@ -190,6 +191,7 @@
% \begin{macrocode}
\@@_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
}
@@ -349,7 +351,7 @@
/driver.brokenlink.skip ~ driver.baselineskip ~ put ~
driver.globaldict
/driver.brokenlink.dict ~
- driver.link.dict ~ 65534 ~ string ~ cvs ~ put ~
+ driver.link.dict ~ driver.cvs ~ put ~
false ~ setglobal ~
mark ~ driver.link.dict ~ cvx ~ exec ~ /Rect
[
@@ -544,7 +546,8 @@
% driver.pdfmark.good ,
% driver.outerbox ,
% driver.baselineskip ,
-% driver.pdfmark.dict
+% driver.pdfmark.dict ,
+% driver.pdfmark.obj
% }
% The business end of breaking links starts by hooking into |pdfmarks|.
% Unlike \pkg{hypdvips}, we avoid altering any links we have not created
@@ -574,9 +577,11 @@
Rect ~ 1 ~ get ~ sub ~
driver.baselineskip ~ div ~ round ~ cvi ~ 0 ~ gt
{ driver.breaklink }
- if
+ { driver.pdfmark.obj }
+ ifelse
}
- if ~
+ { driver.pdfmark.obj }
+ ifelse ~
end ~
SDict /driver.outerbox ~ undef ~
SDict /driver.baselineskip ~ undef ~
@@ -609,6 +614,8 @@
loop
}
def
+ /driver.pdfmark.obj
+ { /_objdef ~ exch ~ driver.link.obj ~ exch } def
}
% \end{macrocode}
% \end{macro}
@@ -729,6 +736,16 @@
{
\@@_postscript:n
{ /driver.link.dict ( #1 ~ #2 ~ #3 ~ /Subtype /Link ) def }
+ \int_gincr:N \g_@@_pdf_object_int
+ \int_gset_eq:NN \g_@@_pdf_link_int \g_@@_pdf_object_int
+ \@@_postscript:x
+ {
+ /driver.link.obj
+ {
+ { driver.obj \int_use:N \g_@@_pdf_link_int \c_space_tl driver.cvs }
+ }
+ def
+ }
\hbox_set:Nn \l_@@_pdf_content_box {#4}
\@@_pdf_link_minima:
\hbox_set:Nn \l_@@_pdf_model_box { Gg }
@@ -753,12 +770,9 @@
\hbox:n
{ \@@_postscript:n { driver.link.ur } }
}
-%% \int_gincr:N \g_@@_pdf_object_int
-%% \int_gset_eq:NN \g_@@_pdf_link_int \g_@@_pdf_object_int
\@@_postscript:x
{
mark
-%% /_objdef ~ { driver.obj \int_use:N \g_@@_pdf_link_int }
#1 #2 #3 /Subtype /Link ~
driver.annotation.border
/ANN ~ driver.pdfmark
More information about the latex3-commits
mailing list