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?
Asked
Active
Viewed 2,670 times
1 Answers
11
Redefine \glstextformat:
\documentclass{article}
\usepackage{glossaries}
\newglossaryentry{sample}{name={sample},description={an example}}
\renewcommand{\glstextformat}[1]{\textit{#1}}
\begin{document}
\gls{sample}.
\end{document}
Nicola Talbot
- 41,153
-
1This 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 09:30
-
@barnhillec Try redefining
\acronymfontto 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
\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