I'm trying to achieve the effect from this existing question: \gls
should produce hyperlinks, but without the distracting frames, while all other links behave as usual.
The answer to that question was to change the border color to white. However, this tends to obscure punctuation marks around the reference. I therefore tried to set pdfborder
to zeros, but that seemed to have no effect.
After some trial and error, I ended up with this MWE:
\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{glossaries}
\newacronym{foo}{foo}{foobar}
\makenoidxglossaries
\defglsentryfmt[\glsdefaulttype]{\hypersetup{linkbordercolor=green,pdfborder=0 0 0.1}\glshyperlink[\glsgenentryfmt]{\glslabel}}
\begin{document}
\section{\label{x}Foo}
In Section~\ref{x} we saw that \gls{foo}.
\printnoidxglossaries
\end{document}
Note how there are actually two borders, one affected by my settings, one unaffected. You can also see that the period is almost completely obscured, so a white border is undesirable. Where does this second hyperlink come from and how do I influence its appearance?