\usepackage[pdfborder={0 0 0}]{hyperref}

\usepackage[acronym, toc, nonumberlist,  section=section]{glossaries} 

\newglossary[mlg]{mathlist}{myi}{myg}{Mathematical Conventions}
                                 % activate glossaries-package
    description={column vector and scalar (lower case letter)},

\printglossary[title=Mathematical Conventions, type=mathlist,style=long,nonumberlist]



My aim is that $\gls{sy:na}^{2}$ has the same effect as $n_a^2$, however it has the effect of ${n_a}^2$. When I comment out the

\usepackage[pdfborder={0 0 0}]{hyperref}

line, the superscript works as desired. How can this be circumvented?

enter image description here

  • 2
    Welcome to TeX.SE! I can't reproduce your issue. When I write a small example document around your code I get the correct (i.e., first) output for the $\gls{sy:na}^{2}$ snippet. Could you add an example document to your code (full document, with documentclass, usepackage statements, begin document, end document, max 20 lines) that demonstrates the issue? – Marijn May 8 at 15:54
  • @Marijn I found that using hyperref leads to the undesired behavior. Any idea how this can be circumvented without refraining from hyperref – Flo Ryan May 9 at 11:41
  • I also found that additional brackets provide a remedy (\gls{sy:na}[^2]). I would however prefer a solution that doesn't require throwing additional brackets at my tex files. – Flo Ryan May 9 at 12:27
  • Do you want to use the standard notation (^2 or ^{2}) or would it be acceptable to define an additional command, something like \glssquare{sy:na}? In that case you can do some tricks with positioning. – Marijn May 9 at 12:52
  • As stated in my answer, I might just settle with \glsdisablehyper . Thank you anyway! – Flo Ryan May 9 at 12:53

One possible solution is to suppress hyperlinks for glossary entries using


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.