[Tex/LaTex] Clickable hyperlink with \overset and XeLaTeX

amsmathhyperrefxetex

I would like my document to have clickable hyperlinks inside \overset environments. I'm using XeLaTeX because of the fonts…

This is a (rather) minimal example:

\documentclass[a4paper, 12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[xetex, colorlinks=true, citecolor=blue, linkcolor=blue]{hyperref}

\begin{document}

\begin{equation}
    a = b \label{eq} \tag{$\ast$}
\end{equation}

\[ \eqref{eq} \] % working hyperlink here.

\[ c = a \overset{\eqref{eq}}{=} b \] % existing but non-clickable hyperlink here.

\end{document}

Any help is greatly appreciated!

Best Answer

This is a workaround for XeLaTeX as pointed out by @user700902:

\documentclass[a4paper, 12pt]{article}
\usepackage{amsmath}
\usepackage[xetex, colorlinks=true, linkcolor=blue]{hyperref}

\begin{document}

\begin{equation}
    a = b \label{eq} \tag{$\ast$}
\end{equation}

\[ c  = a \overset{\mbox{\scriptsize\eqref{eq}}}{=} b\] % thanks user700902 

\end{document}

I however chose to use LuaLaTeX, which didn't require any change of the source code.

Related Question