0

I am using the glossaries-extra package for abbreviations in a technical document using a small-caps style for abbreviations (\setabbreviationstyle{long-short-sc}). The text contains a lot of mixed-case abbreviations (like qPCR, rRNA) which I would like to typeset in a mix of lowercase and small caps letters (like q\textsc{pcr}).

How can I do this with glossaries-extra? I will have to tell the package somehow which letters should be protected from applying small caps. Ideally, I would like to write qPCR in my definition of the abbreviation and have glossaries-extra transform the upper-case letters to small caps, because that is most convenient. However, I would also be satisfied with a solution where I have to indicate lower-case letters explicitly.

astoeriko
  • 191

1 Answers1

0

One possible approach is to use an extra category for mixed-case abbreviations. I can then use an abbreviation style that does format abbreviations with small caps, and apply the small caps manually. For example:

% Set different abbreviation styles for different categories
\setabbreviationstyle{long-short-sc}
\setabbreviationstyle[mixedcase]{long-short}

% Apply small-caps formatting for mixed-case abbreviations manually \newabbreviation{pcr}{pcr}{polymerase chain reaction} \newabbreviation[category=mixedcase]{qpcr}{q\textsc{pcr}}{quantitative \glsxtrp{short}{pcr}}

The disadvantage of this is that if I want to change my abbreviation style (for example, use full caps instead of small caps), I would have to change the definition of all the mixed-case abbreviations. I would be happy if someone has a better idea how to do this.

astoeriko
  • 191