[latex3-commits] [git/LaTeX3-latex3-latex3] master: Support math mode in dvips links (5b392c6)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Apr 17 14:10:53 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/5b392c6dee7a7a0784b55e8e3605362bf2deebd9

>---------------------------------------------------------------

commit 5b392c6dee7a7a0784b55e8e3605362bf2deebd9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Apr 17 13:10:53 2019 +0100

    Support math mode in dvips links
    
    Again, this is about boxes.


>---------------------------------------------------------------

5b392c6dee7a7a0784b55e8e3605362bf2deebd9
 l3kernel/l3drivers-pdf.dtx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index 2180b23..85b3d10 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -705,6 +705,13 @@
 %    \end{macrocode}
 % \end{variable}
 %
+% \begin{variable}{\g_@@_pdf_link_math_bool}
+%   Needed to save/restore math mode.
+%    \begin{macrocode}
+\bool_new:N \g_@@_pdf_link_math_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_minima:}
@@ -762,11 +769,18 @@
       }
     \tl_gset:Nn \g_@@_pdf_link_dict_tl { #1 ~ #2 ~ #3 }
     \@@_pdf_link_sf_save:
+    \mode_if_math:TF
+      { \bool_gset_true:N \g_@@_pdf_link_math_bool }
+      { \bool_gset_false:N \g_@@_pdf_link_math_bool }
     \hbox_set:Nw \l_@@_pdf_content_box
       \@@_pdf_link_sf_restore:
+      \bool_if:NT \g_@@_pdf_link_math_bool
+        { \c_math_toggle_token }
   }
 \cs_new_protected:Npn \driver_pdf_link_end:
   {
+      \bool_if:NT \g_@@_pdf_link_math_bool
+        { \c_math_toggle_token }
       \@@_pdf_link_sf_save:
     \hbox_set_end:
     \@@_pdf_link_minima:





More information about the latex3-commits mailing list