[Tex/LaTex] glossaries: acronyms: How to display only the first appearance of an acronym among the Abbreviations if only its short form is used in the text

acronymsglossariesglossaries-extranumbering

I would like to display the place of the first appearance of all acronyms, used in my text, but for some acronyms I prefer to use only the short form (even for the first usage). My question is similar to this previous one, BUT the solution for that does not allow for displaying among the Abbreviations those acronyms the long form of which was always suppressed.
I tried to solve this by adding \glsadd manually to the first occurrence of \acrshort, but this results in errors during compilation.

This is a MWE for my problem:

\documentclass{article}

\usepackage{hyperref}
\usepackage[abbreviations]{glossaries-extra}
\makeglossaries

\glssetcategoryattribute{acronym}{indexonlyfirst}{true}
\setabbreviationstyle[acronym]{long-short}

\newacronym{faq}{FAQ}{Frequently Asked Questions}
\newacronym{bbc}{BBC}{British Broadcasting Corporation}

\renewcommand*{\acrshort}[1][]{\glsxtrshort[noindex,#1]}

\begin{document}
Only short: \acrshort{faq}\\ %adding \glsadd{faq} here results in errors
Long form will be used as well: \acrshort{bbc}
\newpage
Again the short form: \acrshort{faq}\\
Normal usage: \gls{bbc}\\

\printabbreviations
\end{document}

Any help is much appreciated.

Best Answer

The simplest method is to use the short style for acronyms that shouldn't expand on first use and the long-short style for the ones that should. Since the abbreviation category has long-short as the default style and the acronym category has short as the default style, you could just use \newacronym for the terms that should show the full form on first use and \newabbreviation for the others.

For example:

\documentclass{article}

\usepackage{hyperref}
\usepackage[abbreviations]{glossaries-extra}
\makeglossaries

\glssetcategoryattribute{acronym}{indexonlyfirst}{true}

\newacronym{faq}{FAQ}{Frequently Asked Questions}
\newabbreviation{bbc}{BBC}{British Broadcasting Corporation}

\begin{document}
Only short: \gls{faq}\\
Long form will be used as well: \gls{bbc}
\newpage
Again the short form: \gls{faq}\\
Normal usage: \gls{bbc}\\

\printabbreviations
\end{document}

First page:

Only short: FAQ Long form will be used as well: British Broadcasting Corporation (BBC)

Second page:

Again the short form: FAQ Normal usage: BBC Abbreviations BBC British Broadcasting Corporation 1, 2 FAQ Frequently Asked Questions 1

Since the indexonlyfirst attribute is only set for the acronym category, the FAQ entry only has one location (page 1), since it was only indexed on first use. The abbreviation category doesn't have this attribute set, so the BBC entry has two locations (page 1 and 2) as it was indexed on each use of \gls.