2

I want to highlight my glossaries entries with bold or italic formatting.

I have used the following command but then the whole document is very colorful what I didn't want to have it like this.

\usepackage[colorlinks=true,linkcolor=blue]{hyperref}

I define my definitions like this:

\newglossaryentry{fps}{
  name=Frame per second,
  description= {
  TEXT..... }
}

And I reference this entry in the content with \gls{fps}.

How can I highlight in this example the word Frame per Second in the text

  • 1
    Try \renewcommand{\glstextformat}[1]{\textbf{\em #1}} or \renewcommand{\glstextformat}[1]{\textbf{\itshape #1}} – Nicola Talbot Jun 2 '14 at 12:08
  • @NicolaTalbot This works perfect for my! – aetbaar_444 Jun 2 '14 at 12:26
  • You can also use colour if you wish e.g. if you wanted blue for these but not for all links. – cfr Jun 2 '14 at 23:20
1

(Converting my comment into an answer.)

You can redefine \glstextformat. For example:

\documentclass{article}

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

\makeglossaries

\newglossaryentry{fps}{
  name=Frame per second,
  description={TEXT.....}
}

\renewcommand{\glstextformat}[1]{\textbf{\em #1}}

\begin{document}

\gls{fps}

\printglossaries

\end{document}

This produces:

image of document with term in bold italic

Or (as mentioned by @cfr) you can add colour:

\documentclass{article}

\usepackage{xcolor}
\usepackage[hidelinks]{hyperref}
\usepackage{glossaries}

\makeglossaries

\newglossaryentry{fps}{
  name=Frame per second,
  description={TEXT.....}
}

\renewcommand{\glstextformat}[1]{\textbf{\color{blue}\em #1}}

\begin{document}

\gls{fps}

\printglossaries

\end{document}

This produces:

image of document with term displayed in bold italic blue text

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.