The solution to the original problem was resolved here: Acronyms sorted alphabetically in Index
, in which I was trying to include acronyms in the index every time the command \gls{acronym}
was used. The provided code worked very well, however, I noticed the acronyms are only displayed in the Index when used twice or more (MWE and output below). I have a long list of acronyms only mentioned once throughout the text and I need them all to be displayed in the Index. Any ideas?
\documentclass[11pt]{article}
\usepackage{makeidx}
\makeindex
\usepackage[acronym,toc,shortcuts]{glossaries}
\makeglossaries
\renewcommand*{\CustomAcronymFields}{%
name={\the\glsshorttok},%
symbol={\the\glsshorttok},%
text={\the\glsshorttok\protect\index{\the\glslongtok\space(\the\glsshorttok)}},%
plural={\the\glsshorttok\noexpand\acrpluralsuffix\protect\index{\the\glslongtok\space(\the\glsshorttok)}},%
first={\the\glslongtok\space(\the\glsshorttok)},%
firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\the\glsshorttok)},%
description={\the\glslongtok}%
}
\SetCustomStyle
\newacronym{cd}{CD}{compact disk}
\newacronym{cho}{CHO}{chinese hamster ovary}
\newacronym{bhk}{BHK}{baby hamster kidney}
\newacronym{hek}{HEK}{human embryonic kidney}
\newacronym{hgh}{HGH}{human growth hormone}
\newacronym{scfv}{scFv}{small chain variable fragment}
\newacronym{pi}{pI}{isoelectric point}
\begin{document}
\noindent
First\index{first} use of \gls{cd}\\
subsequent\index{subsequent} use of \gls{cd}
, and
\gls{cho} and
\gls{bhk} and
\gls{hek} and
\gls{hgh} and again \gls{hgh} %used twice and displayed, likewise \gls{cd}
\gls{scfv} and
\gls{pi}.
\printglossaries
\printindex
\end{document}