I use hyperlinks in math mode to if a reader does not read my thesis sequentially and finds a very arcane symbol somewhere, he may just click it and go to where it is defined. However, adding links changes the kerning making subscripts and superscripts more spaced out and other ugly things.
Consider this MWE:
\documentclass{article}
\usepackage{amsmath, amssymb, fontspec, unicode-math, tikz}
\usepackage[colorlinks=true, linkcolor=black]{hyperref}
\begin{document}
Let \hypertarget{a}{$X\colon[0,1]\times\Omega\to\mathbb{R}$} be a stochastic
process.
\tikz[overlay, baseline, anchor=base west, inner sep=0, blue]
\node {${X}_t$};%
\tikz[overlay, baseline, anchor=base west, inner sep=0, red, opacity=0.5]
\node {$\hyperlink{a}{X}_t$};
\end{document}
The output is
I'm using LuaLaTeX and texlive 2013. Is there any way to correct the kerning?
\hyperlink
in math mode:\hyperlink{a}{${X}_t$}
.\newcommand{\mathhyper}[2]{\text{\hyperlink{#1}{$#2$}}}
, you can use it insideequation
environments as\mathhyper{a}{X_t}
.