1

The recommended way when using glossaries is to avoid \gls for section headings, but to use \glsentryshort, \glsentrylong or \glsentryfull.

In my case I use small-caps for acronyms which work fine in body text. How can I tell glossaries to format the acronym using small-caps in the section headings when using, e.g., \glsentryshort?

MWE:

\documentclass{memoir}
\usepackage{tgpagella}
\usepackage[xindy,acronym,toc,smallcaps,nomain]{glossaries}
\newacronym{acronym}{acronym}{Small Caps Acronym}

\begin{document}
\section{A section header with an \glsentryshort{acronym}}
\section{But \textsc{small caps} work}
Plain text with \gls{acronym}.
\end{document}

shows the problem: enter image description here

1 Answer 1

1

A short way is to define a command \glssc which wraps around \textsc{\glsentryshort{#1}}

\documentclass{memoir}
\usepackage{tgpagella}
\usepackage[xindy,acronym,toc,smallcaps,nomain]{glossaries}
\newacronym{acronym}{acronym}{Small Caps Acronym}

\newcommand{\glssc}[1]{\textsc{\glsentryshort{#1}}}

\begin{document}
\section{A section header with an \glssc{acronym}}
\section{But \textsc{small caps} work}
Plain text with \gls{acronym}.
\end{document}

enter image description here

2
  • Hm, that's also a good pragmatic solution. Currently, I put the \textsc directly in the acronym definition to make sure it works in headings. I was just hoping that maybe there exists a setting etc. to make glossaries actually deal with such a scenario. Because I find the current behavior of glossaries not really consistent.
    – Benjamin
    Oct 27, 2015 at 17:41
  • @Benjamin: Hm, depends on the request. You could define an acronymstyle of your own of course
    – user31729
    Oct 27, 2015 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .