TransWikia.com

Glossaries package: capitalise first word of sentence in list of acronyms

TeX - LaTeX Asked by Mathias Pilch on July 24, 2021

I have seen many similar but slightly different questions on the capitalisation of glossary entries or acronyms in the text itself and in the list of acronyms, but none answered my question: How do I capitalise only the first word of a sentence in the list of acronyms, while keeping the acronyms in the text lower case?

MWE (default behaviour):

documentclass{article}
usepackage[acronyms,nomain]{glossaries-extra}

makeglossaries
setabbreviationstyle[acronym]{long-short}

newacronym{UAV}{UAV}{uninhabited aerial vehicle}

begin{document}

printglossaries

section{Section}

Small glspl{UAV} [...]

end{document}

produces everything in lower case:
MWE

But I want the "u" in "uninhabited" to be in upper case.

One Answer

Solution:

The solution is to include glssetcategoryattribute{acronym}{glossdesc}{firstuc}:

documentclass{article}
usepackage[acronyms,nomain]{glossaries-extra}

makeglossaries
setabbreviationstyle[acronym]{long-short}
glssetcategoryattribute{acronym}{glossdesc}{firstuc}

newacronym{UAV}{UAV}{uninhabited aerial vehicle}

begin{document}

printglossaries

section{Section}

Small glspl{UAV} [...]

end{document}

enter image description here

Answered by Mathias Pilch on July 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP