2

I am looking to sort using glossaries-extra and xindy for my glossaries in lualatex. I have some acronyms that have a square bracket as part of the acronym. Is there a way to tell xindy to ignore square brackets while sorting it? See MWE.

MWE:

\documentclass{article}

\usepackage[automake,xindy,acronym,nonumberlist]{glossaries-extra}

\makeglossaries

\newacronym{sa}{SA}{some acronym}
\newacronym{aa}{AA}{another acronym}
\newacronym{yaa}{[YAA]}{yet another acronym}

\begin{document}

\glsaddall

\printglossary[type=\acronymtype]

\end{document}

which will put the acronym in square brackets first, instead of last (see picture).

enter image description here

Is there a way for xindy to ignore square brackets and still sort properly?

1 Answer 1

2

You can set the optional sort key for this entry:

\documentclass{article}

\usepackage[automake,xindy,acronym,nonumberlist]{glossaries-extra}

\makeglossaries

\newacronym{sa}{SA}{some acronym}
\newacronym{aa}{AA}{another acronym}
\newacronym[sort=YAA]{yaa}{[YAA]}{yet another acronym}

\begin{document}

\glsaddall

\printglossary[type=\acronymtype]

\end{document}

enter image description here

1
  • Ahh thank you! I tried to find some option to ignore punctuation. This is much better. Thanks!
    – jfang5
    Commented Sep 3, 2021 at 14:57

You must log in to answer this question.

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