2

I'd like to add a mathematical Expression to my glossary:

\newglossaryentry{Fst}{
  name        = {$F_{st}$-value},
  description = {Inbreeding coefficient,...},
  sort        = {fst}
}

Unfortunately, the Expression is not written in bold letters. According to How can I get bold math symbols? I tried:

\newglossaryentry{Fst}{
  name        = {$\bm{F_{st}}$-value},
  description = {Inbreeding coefficient,...},
  sort        = {fst}
}

But this writes Fst in bold letters not only in the glossary, but also in the main text (while -value is in bold letters in the glossary, and in normal letters in the text).

Is there a way to add mathematical formulas to the glossary in bold letters, and to the main text in normal letters?

  • Using \boldmath before \printglossary? – egreg Nov 12 '13 at 22:45
  • What exactly do you mean? I have some other formulas within the glossary, which should be normal. Only the name of the glossary entry should be in bold face, and only if its within the "glossary-start" and not when its linked within the text of another glossary entry. – Sven Nov 12 '13 at 23:13
  • Please, add a small, but complete example. We can't know what you want to have in your glossary, can we? – egreg Nov 12 '13 at 23:14
  • I understand that you want glossary terms to be in bold, but I would be very wary of defining a term in bold that isn't bold where it's used, because bold changes the meaning in maths. Here's a common example: r is a radius, r is a position vector. – Chris H Nov 13 '13 at 8:51
  • 1
    You could try using the text key for the non-bold version and have the bold version in the name key, or you can remove the math shift from the name key and define a custom style that puts the name in math bold. – Nicola Talbot Nov 13 '13 at 9:44
2

You can use the text key if you want a different display in the document text to that shown in the glossaries. Example:

\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\newglossaryentry{Fst}{
  name        = {$\boldsymbol F_{st}$-value},
  text        = {$F_{st}$-value},
  description = {Inbreeding coefficient,...},
  sort        = {fst}
}

\begin{document}

In document text: \gls{Fst}.

\printglossaries

\end{document}

This produces:

Image of resulting document

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.