[latex3-commits] [git/LaTeX3-latex3-latex3] master: Save/restore space factor when setting link with dvips (8078672)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Apr 17 14:06:19 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/8078672d7c8545f280456766777c20cd7aa1af15
>---------------------------------------------------------------
commit 8078672d7c8545f280456766777c20cd7aa1af15
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Apr 17 13:05:34 2019 +0100
Save/restore space factor when setting link with dvips
The box needs to be 'transparent'.
>---------------------------------------------------------------
8078672d7c8545f280456766777c20cd7aa1af15
l3kernel/l3drivers-pdf.dtx | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index d307482..2180b23 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -697,10 +697,19 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_pdf_link_sf_int}
+% Needed to save/restore space factor, which is needed to deal with the face
+% we need a box.
+% \begin{macrocode}
+\int_new:N \g_@@_pdf_link_sf_int
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\driver_pdf_link_begin_goto:nnw, \driver_pdf_link_begin_user:nnw}
% \begin{macro}{\@@_pdf_link:nnnn}
% \begin{macro}{\@@_pdf_link_minima:}
% \begin{macro}{\@@_pdf_link_outerbox:n}
+% \begin{macro}{\@@_pdf_link_sf_save:, \@@_pdf_link_sf_restore:}
% \begin{macro}
% {
% driver.linkdp.pad ,
@@ -752,10 +761,13 @@
def
}
\tl_gset:Nn \g_@@_pdf_link_dict_tl { #1 ~ #2 ~ #3 }
+ \@@_pdf_link_sf_save:
\hbox_set:Nw \l_@@_pdf_content_box
+ \@@_pdf_link_sf_restore:
}
\cs_new_protected:Npn \driver_pdf_link_end:
{
+ \@@_pdf_link_sf_save:
\hbox_set_end:
\@@_pdf_link_minima:
\hbox_set:Nn \l_@@_pdf_model_box { Gg }
@@ -787,6 +799,7 @@
driver.annotation.border
/ANN ~ driver.pdfmark
}
+ \@@_pdf_link_sf_restore:
}
\cs_new_protected:Npn \@@_pdf_link_minima:
{
@@ -841,6 +854,23 @@
ifelse
}
}
+\cs_new_protected:Npn \@@_pdf_link_sf_save:
+ {
+ \int_gset:Nn \g_@@_pdf_link_sf_int
+ {
+ \mode_if_horizontal:TF
+ { \tex_spacefactor:D }
+ { 0 }
+ }
+ }
+\cs_new_protected:Npn \@@_pdf_link_sf_restore:
+ {
+ \mode_if_horizontal:T
+ {
+ \int_compare:nNnT \g_@@_pdf_link_sf_int > { 0 }
+ { \int_set_eq:NN \tex_spacefactor:D \g_@@_pdf_link_sf_int }
+ }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
More information about the latex3-commits
mailing list