0

I use this code to format back references in bibliography:

\renewcommand\backrefxxx[3]{%
  \hyperlink{page.#1}{$\uparrow$#1}%
}

which prints me these lovely back references: ↑1, ↑3 and so on.

How can I get the same back references but for those in the glossary? (I use the glossaries package)

1

By default, locations are encapsulated with \glsnumberformat, which is defined as:

\newcommand{\glsnumberformat}[1]{\glshypernumber{#1}}

So, if you don't use the format key, you can just redefine this command to include your marker:

\documentclass{book}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries}

\makeglossaries

\newglossaryentry{sample}{name={sample},description={an example}}
\renewcommand{\glsnumberformat}[1]{$\uparrow$\glshypernumber{#1}}

\begin{document}
\chapter{Sample}
A \gls{sample}.

\chapter{Another Sample}
Another \gls{sample}.

\printglossary 
\end{document}

Glossary sample an example. ↑1, ↑3

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.