6

I'm using the glossaries package to define a glossary. However, I would like all \gls{} references to appear in italic. Is there any way to do this without adding \it everywhere?

  • 1
    Welcome to the TeX.SX and thank you for the question. Could you please add your (minimal working) example starting with \documentclass... and ending with ...\end{document} to the post? It would help solvers tremendously when they try to solve it. – Malipivo Mar 31 '14 at 12:45
10

Redefine \glstextformat:

\documentclass{article}

\usepackage{glossaries}

\newglossaryentry{sample}{name={sample},description={an example}}

\renewcommand{\glstextformat}[1]{\textit{#1}}

\begin{document}

\gls{sample}.

\end{document}
  • This creates an unusual look, where italicized parentheses may surround a non-italicized acronym. Can anyone recommend a way to either italicize the acronym too, or de-italicize the parentheses? – barnhillec Apr 28 '16 at 9:30
  • @barnhillec Try redefining \acronymfont to make the acronym italicized. It depends on whether you're using one of the acronym styles (using \setacronymstyle). It might be worth asking a separate question if you want regular entries formatted differently to acronyms. – Nicola Talbot Apr 28 '16 at 13:44
  • Actually, it looks as though the linked question Different formatting for acronyms and glossary entries might be appropriate. – Nicola Talbot Apr 28 '16 at 13:47

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.