[latex3-commits] [git/LaTeX3-latex3-latex3] master: Avoid error if links are nested in dvips mode (ad5410f)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Apr 19 15:27:58 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/ad5410fa34a7d90ec28e70738d843300a39cd250
>---------------------------------------------------------------
commit ad5410fa34a7d90ec28e70738d843300a39cd250
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Apr 19 14:27:58 2019 +0100
Avoid error if links are nested in dvips mode
>---------------------------------------------------------------
ad5410fa34a7d90ec28e70738d843300a39cd250
l3kernel/l3drivers-pdf.dtx | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index 4bf3c5c..ef8c2bd 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -747,8 +747,16 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_pdf_link_bool}
+% Track link formation: we cannot nest at all.
+% \begin{macrocode}
+\bool_new:N \g_@@_pdf_link_bool
+% \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:nnnw, \@@_pdf_link_aux:nnnw}
+% \begin{macro}{\driver_pdf_link_end:, \@@_pdf_link_end:}
% \begin{macro}{\@@_pdf_link_minima:}
% \begin{macro}{\@@_pdf_link_outerbox:n}
% \begin{macro}{\@@_pdf_link_sf_save:, \@@_pdf_link_sf_restore:}
@@ -790,6 +798,12 @@
{ \@@_pdf_link_begin:nnnw {#1} { } {#2} }
\cs_new_protected:Npn \@@_pdf_link_begin:nnnw #1#2#3
{
+ \bool_if:NF \g_@@_pdf_link_bool
+ { \@@_pdf_link_begin_aux:nnnw {#1} {#2} {#3} }
+ }
+\cs_new_protected:Npn \@@_pdf_link_begin_aux:nnnw #1#2#3
+ {
+ \bool_gset_true:N \g_@@_pdf_link_bool
\@@_pdf_annotation:nnnn { 3pt } { 3pt } { 0pt } { }
\@@_postscript:n
{ /driver.link.dict ( #1 ~ #2 ~ #3 ~ /Subtype /Link ) def }
@@ -815,6 +829,11 @@
}
\cs_new_protected:Npn \driver_pdf_link_end:
{
+ \bool_if:NT \g_@@_pdf_link_bool
+ { \@@_pdf_link_end: }
+ }
+\cs_new_protected:Npn \@@_pdf_link_end:
+ {
\bool_if:NT \g_@@_pdf_link_math_bool
{ \c_math_toggle_token }
\@@_pdf_link_sf_save:
@@ -850,6 +869,7 @@
/ANN ~ driver.pdfmark
}
\@@_pdf_link_sf_restore:
+ \bool_gset_false:N \g_@@_pdf_link_bool
}
\cs_new_protected:Npn \@@_pdf_link_minima:
{
More information about the latex3-commits
mailing list