TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the color of glossary links when using glossaries along with hyperref? I just want to change glossary link colors not all links.

share|improve this question
Do you use the option colorlinks=true. If yes the color can be set via linkcolor=blue. – Marco Daniel Dec 16 '11 at 22:21
Yes, but it changes color of all links like table of contents and references (/ref). I just want to change the color of glossary references(/gls). – Mohammad Dec 16 '11 at 22:24
up vote 18 down vote accepted

Normally the link color is set via the option linkcolor of the package hyperref. To influence only the link color of glossaries you must redefine the command \glstextformat. In the documentation you can find:

The way the link text is displayed depends on


For example, to make all link text appear in a sans-serif font, do:


In relation to this comment here an example:


\newglossaryentry{A}{name={A}, description={A is A}}
\newglossaryentry{AA}{name={AA}, description={AA is AA}}
\newglossaryentry{B}{name={B}, description={B is B}}
\newglossaryentry{C}{name={C}, description={C is C}}
\newglossaryentry{CC}{name={CC}, description={CC is CC}}

Here I cite either \gls{A}, \gls{AA}, \gls{B}, \gls{C} or \gls{CC}.
I want three groups in the glossary output, indicated by \textbf{A},
\textbf{B} and \textbf{C} with entries in them according to their initial letter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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