glossaries-extra.sty v1.50: an extension to the glossaries package
Nicola L.C. Talbot
Dickimaw Books
dickimaw-books.com
2022-11-08

Abstract
The glossaries-extra package is an extension to the glossaries package, providing additional features. In particular, it provides a completely different abbreviation mechanism. You will need at least glossaries version 4.19, but it is best to update both packages at the same time, if new releases are available for both of them.

The glossaries-extra package uses a different set of defaults to the base glossaries package. This means that if you simply replace glossaries with glossaries-extra in an existing document, there may be some differences in the PDF, and you may encounter errors. See §1.1 for more details.

This document assumes some familiarity with the glossaries package. If you are new to glossaries, you may prefer to start with the following:

List of Examples

I. User Guide

1. Introduction

The glossaries package is a flexible package, but it’s also a heavy-weight package that uses a lot of resources. As package developer, I’m caught between those users who complain about the drawbacks of a heavy-weight package with a large user manual and those users who want more features (which necessarily adds to the package weight and manual size).

The glossaries-extra package is an attempt to provide a compromise for this conflict. Version 4.22 of the glossaries package is the last version to incorporate any major new features. Future versions of glossaries will mostly just be bug fixes. New features will instead be added to glossaries-extra. This means that the base glossaries package won’t increase in terms of package loading time and allocation of resources, but those users who do want extra features available will have more of a chance of getting their feature requests accepted.

Some of the commands provided by the base glossaries package are incompatible with glossaries-extra. These are marked with 🛇 in this document.

The glossaries-extra package internally loads the glossaries package. As a general rule, it’s better to defer loading the base glossaries package to glossaries-extra rather than loading the two packages separately.

1.1. Package Defaults

I’m not happy with some of the default settings assumed by the glossaries package, and, judging from code I’ve seen, other users also seem unhappy with them, as certain package options are often used in questions posted on various sites. I can’t change the default behaviour of glossaries as it would break backward compatibility, but since glossaries-extra is a separate package, I have decided to implement some of these commonly-used options by default. You can switch them back if they’re not appropriate.

The new defaults are:

1.2. Example Differences Between glossaries and glossaries-extra

The examples below illustrate the difference in explicit package options between glossaries and glossaries-extra. There may be other differences resulting from modifications to commands provided by glossaries.

1.2.1. Basic defaults

\documentclass{article}
\usepackage{glossaries-extra}
This is like:
\documentclass{article}
\usepackage[toc,nopostdot]{glossaries}
\usepackage{glossaries-extra}

1.2.2. Language defaults

\documentclass[british]{article}
\usepackage{babel}
\usepackage{glossaries-extra}
This is like:
\documentclass[british]{article}
\usepackage{babel}
\usepackage[toc,nopostdot,translate=babel]{glossaries}
\usepackage{glossaries-extra}

1.2.3. Combined with memoir

\documentclass{memoir}
\usepackage{glossaries-extra}
This is like:
\documentclass{memoir}
\usepackage[toc,nopostdot,noredefwarn]{glossaries}
\usepackage{glossaries-extra}
However
\documentclass{memoir}
\usepackage{glossaries}
\usepackage{glossaries-extra}
This is like:
\documentclass{memoir}
\usepackage[toc=false,nopostdot=false]{glossaries}
\usepackage{glossaries-extra}
Since by the time glossaries-extra has been loaded, the base glossaries package has already redefined memoir’s glossary-related commands.

1.2.4. Abbreviations

Abbreviations are defined with \newabbreviation:

\usepackage{glossaries-extra}
\newabbreviation{svm}{SVM}{support vector machine}
\begin{document}
First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
\end{document}
This is the closest match to:
\usepackage{glossaries}
\newacronym{svm}{SVM}{support vector machine}
\begin{document}
First use: \gls{svm}. Explicit full form: \acrfull{svm}.
\end{document}
If you want to continue using \newacronym then you will need to change the style for the acronym category:
\usepackage{glossaries-extra}
\setabbreviationstyle[acronym]{long-short}
\newacronym{svm}{SVM}{support vector machine}
\begin{document}
First use: \gls{svm}. Explicit full form: \glsxtrfull{svm}.
\end{document}

Don’t use commands like \glsfirst or \glstext with abbreviations. See §4 for further details.

1.2.5. Glossary Mid-Build Placeholder (\printglossary)

Another noticeable change with glossaries-extra is that by default \printglossary will now display information text in the document if the external glossary file doesn’t exist. This is explanatory text to help new users who can’t work out what to do next to complete the document build. Once the document is set up correctly and the external files have been generated, this text will disappear.

This change is mostly likely to be noticed by users with one or more redundant empty glossaries who ignore transcript messages, explicitly use makeindex/xindy on just the non-empty glossary (or glossaries) and use the iterative \printglossaries command instead of \printglossary. For example, consider the following:

\documentclass{article}
\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{laser}{laser}{light amplification by stimulated
emission of radiation}
\begin{document}
\gls{laser}
\printglossaries
\end{document}
The above document will only display the list of acronyms at the place where \printglossaries occurs. However it will also attempt to input the gls file associated with the main glossary.

If you use makeglossaries, you’ll get the warning message:

Warning: File 'test.glo' is empty.
Have you used any entries defined in glossary 'main'?
Remember to use package option 'nomain' if you
don't want to use the main glossary.
(where the original file is called test.tex) but if you simply call makeindex directly to generate the acr file (without attempting to create the gls file) then the transcript file will always contain the message:
No file test.gls.
This doesn’t occur with makeglossaries as it will create the gls file containing the single command \null.

If you simply change from glossaries to glossaries-extra in this document, you’ll find a change in the resulting PDF if you don’t use makeglossaries and you only generate the acr file with makeindex.

The transcript file will still contain the message about the missing gls, but now you’ll also see information in the actual PDF document. The simplest remedy is to follow the advice inserted into the document at that point, which is to add the nomain package option:

\documentclass{article}
\usepackage[nomain,acronym,postdot]{glossaries-extra}
\makeglossaries
\setabbreviationstyle[acronym]{long-short}
\newacronym{laser}{laser}{light amplification by stimulated
emission of radiation}
\begin{document}
\gls{laser}
\printglossaries
\end{document}
Note the need to set the acronym style using \setabbreviationstyle before \newacronym. See §4 for further details.

1.3. Further Reading

The following documents and web pages are also available:

2. Package Options

\usepackage[〈options〉]{glossaries-extra}
This chapter describes the package options provided by glossaries-extra that are either not defined by the base glossaries package or are modified by glossaries-extra. You can additionally pass the base package options to glossaries-extra. For example, instead of:
\usepackage[nonumberlist]{glossaries}
\usepackage[abbreviations]{glossaries-extra}
you can simply do:
\usepackage[abbreviations,nonumberlist]{glossaries-extra}

It’s better not to load the glossaries package first. Leave glossaries-extra to load it, where possible, to allow for a smoother integration between the two packages.

After glossaries-extra has been loaded, some of the glossaries-extra package options may be changed with:

\glossariesextrasetup{〈options〉}
where 〈options〉 are the same as the relevant package option.

Certain options can only be supplied as package options since the settings need to be known while glossaries-extra is loading.

To change the base glossaries package’s options (that may be changed after the package has loaded), continue to use:

\setupglossaries{〈options〉}
but don’t use any of the options listed here in that command.

2.1. Glossary Lists

nomissingglstext=〈boolean〉default: true; initial: false
If true, this will suppress the warning written to the transcript and the warning text that will appear in the document if the external glossary files haven’t been generated due to an incomplete document build. However, it’s probably simpler just to fix whatever has caused the failure to build the external file or files.

abbreviations
This option has no value and can’t be cancelled. If used, it will automatically create a new glossary with the label abbreviations and redefines \glsxtrabbrvtype to this label. (The file extensions are glg-abr, gls-abr and glo-abr.) In addition, this option defines a shortcut command:
\printabbreviations[〈options〉]

which is equivalent to:
\printglossary[type=\glsxtrabbrvtype,〈options〉]
If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtabbreviations which uses \printunsrtglossary instead.

The title of the new glossary is given by

\abbreviationsnameinitial: Abbreviations

If this command is already defined, it’s left unchanged. Otherwise it’s defined to “Abbreviations” if babel hasn’t been loaded or \acronymname if babel has been loaded. However, if you’re using babel it’s likely you will need to change this. (See §15 for further details.)

If you don’t use the abbreviations package option, the \abbreviationsname command won’t be defined (unless it’s defined by an included language file).

If the abbreviations option is used and the acronym option provided by the glossaries package hasn’t been used, then \acronymtype will be set to \glsxtrabbrvtype so that acronyms defined with \newacronym can be added to the list of abbreviations. If you want acronyms in the main glossary and other abbreviations in the abbreviations glossary then you will need to redefine \acronymtype to main:

\renewcommand*{\acronymtype}{main}

Note that there are no analogous options to the glossaries package’s acronymlists option (or associated commands) as the abbreviation mechanism is handled differently with glossaries-extra.

symbols
This is passed to the base glossaries package, but glossaries-extra will additionally define:
\glsxtrnewsymbol[〈key=value list〉]{〈entry-label〉}{〈sym〉}

which is equivalent to:
\newglossaryentry{〈entry-label〉}{name={〈symbol〉},
 sort={〈entry-label〉},type={symbols},category={symbol},
〈options〉}
Note that the sort key is set to the 〈entry-label〉 not the 〈symbol〉 as the symbol will likely contain commands. If this isn’t appropriate, you can override it by using the sort key in the optional argument.

This option also sets the regular attribute to true for the symbol category and provides the category post-description hook:

\glsxtrpostdescsymbolinitial: empty

If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtsymbols which uses \printunsrtglossary.

numbers
This is passed to the base glossaries package but glossaries-extra will additionally define:
\glsxtrnewnumber[〈key=value list〉]{〈entry-label〉}{〈num〉}

which is equivalent to:
\newglossaryentry{〈entry-label〉}{name={〈number〉},
 sort={〈entry-label〉},type={numbers},category={number},
〈options〉}
Note that the sort key is set to the 〈entry-label〉. If this isn’t appropriate, you can override it by using the sort key in the optional argument.

This option also sets the regular attribute to true for the number category and provides the category post-description hook:

\glsxtrpostdescnumberinitial: empty

If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printunsrtnumbers which uses \printunsrtglossary.

acronyms
This is passed to the base glossaries package (which defines \printacronyms and creates a new glossary with the label acronym) but if glossaries-extra-bib2gls is loaded then this option will additionally provide \printunsrtacronyms which uses \printunsrtglossary.

As with the base glossaries package, this option redefines \acronymtype to acronym. Note that this option doesn’t change \glsxtrabbrvtype.

acronym=〈boolean〉default: true; initial: false
If acronym=true, this behaves like acronyms. Note that acronym=false won’t work if the base glossaries package was loaded before glossaries-extra.

index
This is passed to the base glossaries package but if glossaries-extra-bib2gls is loaded then this option will additionally provide \printunsrtindex which uses \printunsrtglossary.

The base package index option also defines:

\newterm[〈key=value list〉]{〈entry-label〉}

This definition is modified by glossaries-extra to additionally set the category to index and sets the description to discard the post-description hook (\nopostdesc) but retain \glsxtrpostdescription so that the category post-description hook can still be applied.

This option also sets the regular attribute to true for the index category and defines an associated category post-description hook:

\glsxtrpostdescindexinitial: empty

2.2. Glossary Style Options

nopostdot=〈boolean〉default: true; initial: true
This option is provided by glossaries where it simply alters a corresponding conditional that’s used inside \glspostdescription to determine whether or not to insert a full stop.

The postpunc option (see below) redefines \glspostdescription, so the nopostdot option is modified by glossaries-extra to reset the hook back to its original definition to counteract any use of the postpunc option.

This option will have no effect if the glossary style doesn’t include \glspostdescription. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.)

If you are using bib2gls, you may prefer to use the post-description-dot resource option.

postdot
This is a shortcut for nopostdot=false.

postpunc=〈value〉
This option redefines \glspostdescription to display the required punctuation. Note that this means the hook will no longer check for the nopostdot conditional.

This option will have no effect if the glossary style doesn’t include \glspostdescription. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.)

The postpunc value may either be the required punctuation or one of the following keywords:

This redefines \glspostdescription to use a full stop but also adjusts the space factor. This isn’t exactly the same as nopostdot=false since it removes the conditional from \glspostdescription. If you are using bib2gls, you may prefer to use the post-description-dot resource option.

This redefines \glspostdescription to a comma.

This redefines \glspostdescription to do nothing. This isn’t exactly the same as nopostdot=true since it removes the conditional from \glspostdescription.

stylemods=〈value〉default: default
Loads the glossaries-extra-stylemods package (see §8.6.5), which patches the styles provided with the base glossaries package so that they all use \glspostdescription. Extra hooks are also provided to make them easier to customize. The value may be one of the following:

Loads all styles that are provided by both glossaries and glossaries-extra.

Patches all the predefined styles that have been loaded, without loading any extra styles. This will typically be all the styles that are usually loaded by glossaries (for example, list and long). Package options such as nolist will alter which styles are loaded. In the case of nostyles, no styles will be loaded, so none of them will be patched.

It’s pointless using both stylemods=default and nostyles. Any glossary style packages that are subsequently loaded won’t be patched.

stylemods=〈list〉
For each element 〈tag〉 in 〈list〉, the corresponding package glossary-〈tag〉 will be loaded. You can use this in combination with nostyles to only load the particular style package or packages that you require (without loading the full set of defaults). For example,
\usepackage[nostyles,stylemods={bookindex,longextra},
 style=bookindex]{glossaries-extra}
This prevents the base glossaries package from loading the default set of styles, but loads glossaries-extra-stylemods, glossary-bookindex and glossary-longextra, and then sets the default style to bookindex.

2.3. Loading Other Packages

Some options listed in other sections, such as the stylemods and record options, also load supplementary packages.

prefix
Loads the glossaries-prefix package (if not already loaded).

accsupp
Loads the glossaries-accsupp package (if not already loaded). This option can only be used as a package option (not in \glossariesextrasetup) as glossaries-extra needs to know whether or not to provide accessibility support while it’s loading.

The glossaries-accsupp package is still experimental and so accessibility features are liable to change.

If you want to define styles that can interface with the accessibility support provided by glossaries-accsupp use the \glsaccess〈xxx〉 type of commands instead of \glsentry〈xxx〉 (for example, \glsaccesstext instead of \glsentrytext). If glossaries-accsupp hasn’t been loaded those commands are equivalent (for example, \glsaccesstext just does \glsentrytext) but if it has been loaded, then the \glsaccess〈xxx〉 commands will add the accessibility information. See §9 for further details.

2.4. Entry Definitions, References and Indexing

undefaction=〈value〉initial: error
This indicates what to do if an undefined glossary entry is referenced.

Undefined entries can’t be picked up by any commands that iterate over a glossary list. This includes \forglsentries and \glsaddall.

Produces an error message for undefined glossary entries.

Only produces a warning message for undefined glossary entries. The place where the entry has been referenced will be marked with ?? (as with undefined labels or citations). The unknown marker is produced with:
\glsxtrundeftaginitial: ??
This defaults to two question marks.

Note that \ifglsused will only display ?? in the document text with undefaction=warn if the entry hasn’t been defined, as the underlying boolean variable doesn’t exist and so is neither true nor false. (There will also be a warning in the transcript.) You may prefer to use \GlsXtrIfUnusedOrUndefined instead. See §5.10 for further details.

If you want to write a custom command that needs to generate a warning or error for an undefined reference, you can use:

\glsxtrundefaction{〈message〉}{〈additional help〉}
This will produce the unknown marker if used within the document environment. Depending on the undefaction, \glsxtrundefaction will either create an error with the given 〈message〉 and 〈additional help〉 or will create a warning with the given 〈message〉.

docdef=〈value〉default: true; initial: false
This setting governs where \newglossaryentry can be used (preamble-only or anywhere before the first glossary or anywhere within the document).

Commands like \newabbreviation and \glsxtrnewsymbol that internally use \newglossaryentry are also governed by this option. Other commands, such as \longnewglossaryentry are always preamble-only.

With just the base glossaries package, \newglossaryentry is allowed in the document environment as long as you haven’t used \makenoidxglossaries. There are, however, problems that can occur when entries are defined within the document environment (see the glossaries documentation for further details). To encourage preamble-only use, the glossaries-extra package prohibits the use of \newglossaryentry within the document environment by default, but if you really want this you can use this package option to allow it.

Note that in the case of bib2gls, all entry data is originally defined in bib files. The entry definitions (using commands like \longnewglossaryentry and \newabbreviation) are written to the glstex files that are input in the preamble.

Prohibits the use of \newglossaryentry within the document environment. All entries must be defined in the preamble.

Permits the use of \newglossaryentry in the document environment provided \makenoidxglossaries hasn’t been used (as per the base glossaries package). This will create a temporary glsdefs file that contains the entry definitions so that they can be available on the next LaTeX run at the beginning of the document to allow any glossaries in the front matter to display correctly.

If all your glossaries occur at the end of the document, consider using docdef=restricted instead.

docdef=restricted
Permits the use of \newglossaryentry in the document environment provided the entry definitions all occur before the first glossary is displayed.

This avoids the need for the glsdefs file. You will still need to take care about any changes made to the category code of characters that are required by the 〈key〉=〈value〉 mechanism (that is, the comma and equal sign) and any makeindex or xindy special character that occurs in the sort key or label. If any of those characters are made active in the document (for example, through babel shortcuts), then it can cause problems with the entry definition.

This option will allow \newglossaryentry to be used in the document with \makenoidxglossaries, but note that \longnewglossaryentry remains a preamble-only command.

With this option, if an entry appears in the glossary before it has been defined, an error will occur (or a warning if the undefaction=warn option is used). If you edit your document and either remove an entry or change its label, you may need to delete the document’s temporary files (such as the aux and gls files).

This option behaves like docdef=restricted but creates the glsdefs file for atom’s autocomplete support. This file isn’t input by glossaries-extra and so associated problems with the use of this file are avoided, but it allows the autocomplete support to find the labels in the file.

A bug fix in glossaries v4.47 has changed the format of the glsdefs file slightly.

As with docdef=restricted, entries may be defined in the preamble or anywhere in the document, but they may only be referenced after they have been defined. Entries must be defined before the associated glossary is displayed.

If you need a list of all entry labels for the use of an editor or helper script you may also want to consider the package options writeglslabels and writeglslabelnames provided by the base glossaries package. Note that with these options and with docdef=atom, only the entry labels that are visible to LaTeX can be saved. So if you are using bib2gls you will only get the labels of the entries that have already been selected by bib2gls. The bib files can be found by parsing the aux file for \glsxtr@resource (listed in the src option or \jobname.bib if src is missing).

shortcuts={〈value〉}initial: none
Unlike the base glossaries package option of the same name, this option isn’t boolean but has multiple values.

Multiple invocations of the shortcuts option within the same option list will override each other. Since these options define commands, the action can’t be undone with a later \glossariesextrasetup.

Set the shortcut commands provided by the base glossaries package for acronyms (such as \ac) but use the glossaries-extra abbreviation commands, such as \glsxtrshort and \glsxtrlong, instead of the analogous base commands, such as \acrshort and \acrlong. See §4.3.2 for further details.

shortcuts=abbreviations
Sets the abbreviation shortcuts (see §4.3.2). This setting doesn’t switch on the acronym shortcuts provided by the base glossaries package.

Synonym for shortcuts=abbreviations.

Implements the other (non-abbreviation) shortcut commands:
\newentry{〈entry-label〉}{〈options〉}
A synonym for \newglossaryentry.

\newsym[〈key=value list〉]{〈entry-label〉}{〈sym〉}
A synonym for \glsxtrnewsymbol (provided that the symbols package option is also used).

\newnum[〈key=value list〉]{〈entry-label〉}{〈num〉}
A synonym for \glsxtrnewnumber (provided that the numbers package option is also used).

Implements shortcuts=ac and shortcuts=other.

Implements shortcuts=abbreviations and shortcuts=other.

Implements shortcuts=ac, shortcuts=abbreviations and shortcuts=other.

Sets the shortcuts provided by the base glossaries package for acronyms (such as \ac). See the glossaries package documentation for further details.

Note that the short and long forms (\acs and \acl) don’t use \glsxtrshort and \glsxtrlong but use the original \acrshort and \acrlong, which aren’t compatible with the glossaries-extra abbreviation mechanism. The better option is to use shortcuts=ac.

Don’t use shortcuts=acronyms unless you have reverted \newacronym back to the base glossaries package’s acronym mechanism. See §4.6 for further details.

Synonym for shortcuts=acronyms.

This setting is provided by the base glossaries package. With glossaries-extra it’s equivalent to shortcuts=all.

shortcuts=falsealias: all
This setting is provided by the base glossaries package. With glossaries-extra it’s equivalent to shortcuts=none.

indexcrossrefs=〈boolean〉default: true; initial: varies
This is a boolean option that governs whether or not to automatically index any cross-referenced entries that haven’t been marked as used at the end of the document. These are entries that are identified in one of the cross-referencing fields (see and seealso) of another used entry as opposed to entries that have the cross-referencing fields set.

Since entries with the alias key are intended as synonyms for another term, the target is expected to be indexed so entries with the alias key set aren’t affected by this option.

For example:

\newglossaryentry{courgette}{name={courgette},
 description={small vegetable marrow}}
\newglossaryentry{marrow}{name={marrow},
 description={long gourd with green skin},
 seealso={courgette}}
Suppose that “marrow” is indexed (so that it appears in the glossary with the cross-reference to “courgette”) but if courgette isn’t indexed anywhere in the document (using commands like \gls or \glsadd) then there will be a broken cross-reference in the marrow location list pointing to courgette, which doesn’t appear in the glossary. With indexcrossrefs=true, the courgette entry will be indexed at the end of the document using \glsadd with format=glsxtrunusedformat, which corresponds to the command \glsxtrunusedformat.

Note that this special format \glsxtrunusedformat simply does \unskip and ignores its argument, which creates a blank location. If any of the cross-referenced entries have been indexed but haven’t been marked as used (for example, with \glsadd) then this will cause a spurious comma in the location list. This is a limitation of the way that makeindex and xindy work as they are general purpose indexing applications which require locations. If you have entries with cross-references, you may want to consider switching to bib2gls instead.

Note that bib2gls can automatically find dependent entries when it parses the bib source file, so the record option automatically implements indexcrossrefs=false.

This function is implemented by code added to the end document hook that determines whether or not to use the command \glsxtraddallcrossrefs. This command iterates over all entries in all glossaries, which adds to the overall document build time, especially if you have defined a large number of entries, so this defaults to indexcrossrefs=false, but it will be automatically switched on if you use the see or seealso keys in any entries. See also §5.9.

Enables this setting.

Disables this setting even if the see or seealso key is present in any entries.

autoseeindex=〈boolean〉default: true; initial: true
This is a boolean option that governs whether or not the see and seealso keys should automatically index the cross-reference when an entry is defined (see §5.9).

With the base glossaries package, the see key was provided as a shortcut for \glssee. For example:

\newglossaryentry{courgette}{name={courgette},
 description={small vegetable marrow}}
\newglossaryentry{zucchini}{name={zucchini},
 description={},
 see={courgette}}
is equivalent to:
\newglossaryentry{courgette}{name={courgette},
 description={small vegetable marrow}}
\newglossaryentry{zucchini}{name={zucchini},
 description={}}
\glssee{zucchini}{courgette}
This was designed for documents where only entries that are actually used in the document are defined and ensures that the cross-reference is included in the glossary, even though it may not be referenced anywhere in the document. However, it becomes problematic if neither entry is required in the document.

The glossaries-extra package modifies the action of the see key so that it also saves the value and will only perform the automated \glssee if autoseeindex=true. Similarly for the seealso key.

Note that the record option automatically implements autoseeindex=false as the corresponding action can be implemented with bib2gls’s selection option.

Enables automatic indexing using \glssee for the see key (as per the base glossaries package) and \glsxtrindexseealso for the seealso key.

For example, if an entry is defined as

\newglossaryentry{foo}{name={foo},
 description={},see={bar,baz}}
then, with autoseeindex=true and the default indexcrossrefs setting, this is equivalent to
\newglossaryentry{foo}{name={foo},description={}}
\glssee{foo}{bar,baz}
\glossariesextrasetup{indexcrossrefs=true}
\GlsXtrSetField{foo}{see}{bar,baz}

The value of the see and seealso keys will be stored in their corresponding fields (and can be accessed using commands like \glsxtrusesee and \glsxtruseseealso) but the cross-reference won’t be automatically indexed.

Note that indexcrossrefs isn’t automatically implemented by the presence of the see key when autoseeindex is false.

For example, if an entry is defined as

\newglossaryentry{foo}{name={foo},
 description={},see={bar,baz}}
then, with autoseeindex=false and the default indexcrossrefs setting, this is equivalent to
\newglossaryentry{foo}{name={foo},
 description={}}
\GlsXtrSetField{foo}{see}{bar,baz}

It’s therefore possible with this option to remove the cross-references from the location lists and set their position within the glossary style.

Another method of preventing the automatic indexing is to define the entries before the external indexing files have been opened with \makeglossaries. Since the appropriate file isn’t open, the information can’t be written to it. This will need the package option seenoindex=ignore to prevent an error occurring.

record=〈value〉default: only; initial: off
This setting indicates whether or not bib2gls is required.

This option can only be set in the preamble and can’t be used after \GlsXtrLoadResources or \glsxtrresourcefile.

With the recording setting on (record=only, record=nameref or record=hybrid), any of the commands that would typically index the entry (such as \gls, \glstext or \glsadd) will add a record to the aux file. bib2gls can then read this information to find out which entries have been used. (Remember that commands like \glsentryname don’t index, so any use of these commands won’t add a corresponding record.) See §11 for further details.

The hybrid method additionally performs the standard indexing action that’s required for makeindex or xindy to work, but this can’t be done until bib2gls has created the glstex files that provide the entry definitions. In general, it’s best to avoid the hybrid method.

Indexing is performed as per the base glossaries package using either \makeglossaries or \makenoidxglossaries. This setting implements undefaction=error.

indexing (or recording) is performed by adding bib2gls records in the aux file. Neither \makeglossaries nor \makenoidxglossaries is permitted. Use \GlsXtrLoadResources (or \glsxtrresourcefile) to set up bib2gls resource options. Glossaries should be displayed with the “unsrt” family of commands, such as \printunsrtglossary.

This setting implements undefaction=warn, autoseeindex=false, indexcrossrefs=false sort=none, and automatically loads the supplementary glossaries-extra-bib2gls package. (There should be no need to explicitly load glossaries-extra-bib2gls.)

This option also defines the location and group keys that are set by bib2gls to provide the location list and group information required by the “unsrt” family of commands.

The document build process is (assuming the file is called myDoc.tex):

pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
If you want letter groups you will need the --group or -g switch when invoking bib2gls:
pdflatex myDoc
bib2gls -g myDoc
pdflatex myDoc

Note that this setting will prevent the see from automatically implementing \glssee. (bib2gls deals with the see field.) You may explicitly use \glssee in the document, but bib2gls will ignore the cross-reference if the see field was already set for that entry.

As record=only but uses nameref records, which include the current label information given by \@currentlabel and \@currentHref. This means that the title can be included in the entry locations, if available. This setting also supports location hypertargets that don’t follow a simple 〈h-prefix〉〈the-counter〉 format, which can’t be used with other indexing options.

See §11.5.6 for further details of this option.

This option requires hyperref, otherwise it will fall back on the usual location records.

Note that \@currentHref is always globally updated whenever \refstepcounter is used, but \@currentlabel isn’t. This can cause some undesired side-effects with some settings. Remember also that the indexcounter option increments the associated counter every time an entry is indexed, which affects this option. If the location counter is the default page, only the location number is shown.

record=alsoindexalias: hybrid 🗑
Deprecated synonym of record=hybrid.

This is a hybrid setting that uses bib2gls to fetch entry information from bib files, but uses makeindex or xindy to create the glossary files (which are input with \printglossary). Note that this requires a slower and more complicated build process (see below).

This hybrid approach is provided for the rare instances where an existing xindy rule or module is too complicated to convert to a bib2gls rule but the entries need to be fetched from a bib file. There’s no benefit in using this option with makeindex.

This setting does not load glossaries-extra-bib2gls, as bib2gls is only being used to fetch the entry definitions.

Since it’s redundant to make bib2gls also sort and collate locations (in addition to xindy performing these tasks), use the resource options sort=none and save-locations=false for a faster build. Many of the other resource options are likely to be irrelevant.

This setting must be used with \makeglossaries but not with its optional argument. Each glossary should be displayed using \printglossary (or \printglossaries for all of them).

This setting should not be used with \makenoidxglossaries.

You may need to change the transcript file used by bib2gls to avoid a clash with xindy’s transcript file. This can be done with bib2gls’s --log-file or -t option.

The document build process is (assuming the file is called myDoc.tex):

pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
Note that, in this case, it’s redundant to call bib2gls with the --group or -g switch as xindy will insert the group heading information into the corresponding glossary file.

If you want bib2gls to form the letter groups then this hybrid method is inappropriate.

bibglsaux=〈basename〉initial: empty

requires bib2gls v3.0+

Alternatively, this setting can be implemented with:

\glsxtrsetbibglsaux{〈basename〉}

This option should only be used once. If used again no new file will be created. If the 〈basename〉 value is empty, records will be written to the normal aux file.

A document containing many records can result in a large aux file with information that’s only relevant to bib2gls. This option will create a new file called 〈basename〉.aux that will be used to store the records. The file will be skipped by LaTeX but will be picked up by bib2gls v3.0+ when it inputs the main aux file. Note that this creates an extra write register.

You should still supply the main aux file when you run bib2gls as 〈basename〉.aux will only contain the records and not the other information that bib2gls requires (such as the resource options).

equations=〈boolean〉default: true; initial: false
This setting will cause the default location counter to automatically switch to equation when inside a numbered equation environment, such as equation or align. The counter can be explicitly overridden with the counter \glslink option.

floats=〈boolean〉default: true; initial: false
This setting will cause the default location counter to automatically switch to the corresponding counter when inside a floating environment, such as figure or table. The counter can be explicitly overridden with the counter \glslink option.

Remember that within floats it’s the \caption command that actually uses \refstepcounter, so indexing before the caption will result in the wrong reference. The commands for use in captions and sections, such as \glsfmttext and \glsfmtshort, don’t index. (See §5.3). You may want to consider using \glsadd after the caption (not before). For example:

\begin{figure}[htbp]
  \centering
  \includegraphics{example-image}
  \caption{Sample \glsfmttext{foobar} figure}
  \glsadd{foobar}
\end{figure}

indexcounter
This option defines the indexing counter:
wrglossary
which is incremented every time an entry is indexed. This option automatically implements counter=wrglossary. This means that each location will link to the relevant part of the page where the indexing occurred (instead of to the top of the page). See the bib2gls documentation for the save-index-counter resource option for more details.

This option is primarily intended for use with bib2gls (v1.4+) and hyperref. It can be used with makeindex or xindy, but it will interfere with the location list collation, so you won’t have ranges and you’ll have duplicate page numbers present.

This option works by incrementing wrglossary with \refstepcounter and adding \label. This can cause a problem if the indexing occurs in an equation environment as amsmath forbids multiple occurrences of \label (resulting in the “Multiple \label’s” error). It’s best to change the counter to page or equation when in maths mode with this option. For example:

\renewcommand{\glslinkpresetkeys}{% 
 \ifmmode \setupglslink{counter=page}\fi}
\renewcommand{\glsaddpresetkeys}{% 
 \ifmmode \setupglsadd{counter=page}\fi}

2.5. Debugging

debug=〈value〉default: true; initial: false
Enables debugging information for draft documents. This option is defined by the base glossaries package, but is extended by glossaries-extra to provide additional settings. If no value is provided, true is assumed. The following values are available:

This setting is provided by the glossaries package and is the default. This switches off all debugging commands.

This setting is provided by the glossaries package and switches on logging information if an entry is indexed before the relevant indexing files have been opened (only applicable with makeindex and xindy). This option is extended by glossaries-extra to also display the label of unknown entries before the ?? marker.
🖹🖺

\documentclass{article}
\usepackage[debug]
{glossaries-extra}
\begin{document}
\gls{example}
\end{document}
[example]??

This uses \glsshowtargetfonttext for the annotation, which is provided by glossaries.

debug=showaccsupp
Provided by glossaries, this setting shows accessibility information (glossaries-accsupp).

Implements all debugging options.

debug=showwrgloss
This setting is only available with glossaries-extra. This implements debug=true and shows a marker (·) just before the write operation is performed by indexing commands. With record=hybrid there will be two marks: one for the write operation to the aux file and one for the associated glossary file used by makeindex/xindy. The marker is produced with the command:
\glsxtrwrglossmark

If the indexcounter option has been used, this setting will also mark where the wrglossary counter has been incremented. The marker is produced with the command:

\glsxtrwrglosscountermark{〈number〉}
This marker is also inserted before the location in the definition of \glsxtrwrglossarylocfmt.

debug=showtargets
This setting is provided by glossaries and displays the hyperlink target names whenever any glossary-related commands create a hyperlink or hypertarget (for example, \gls, \glstarget or \glshypernumber). The default is to use marginal notes in TeX’s “outer” mode and inline annotations for “inner” or maths modes. This uses \glsshowtargetinner for inner and maths annotations and \glsshowtargetouter for the outer annotation.

If there are many targets within a single paragraph this can lead to “too many floats”, so glossaries-extra provides a new package option showtargets that can be used to easily switch to inline annotations for outer mode (rather than having to redefine \glsshowtargetouter).

showtargets=〈value〉
Automatically implements debug=showtargets and adjusts the annotations according to the 〈value〉. The glossaries-extra package provides supplementary commands to support this option.

\glsxtrshowtargetouter{〈target-name〉}
Formats annotations in outer mode. This is initially \glsshowtargetouter to match debug=showtargets.

\glsxtrshowtargetinner{〈target-name〉}
Formats annotations in inner mode. This is initially \glsshowtargetinner to match debug=showtargets.

\glsshowtargetinnersymleft{name}
Shows the left annotation and marker. This uses the left symbol marker:
\glsxtrshowtargetsymbolleft

\glsshowtargetinnersymright{name}
Shows the right marker and annotation. This uses the right symbol marker:
\glsxtrshowtargetsymbolright

A marker is placed to the left of the link/target and a marginal note is used in outer mode.

A marker is placed to the right of the link/target and a marginal note is used in outer mode.

A marker and annotation are placed to the left of the link/target in all modes.

A marker and annotation are placed to the right of the link/target in all modes.

Markers are placed on either side of the link/target with the annotation on the left in all modes.

showtargets=annoteright
Markers are placed on either side of the link/target with the annotation on the right in all modes.

3. Defining Entries

The base glossaries package provides commands, such as \newglossaryentry, to define entries. The glossaries-extra package provides some additional commands, described in §3.1. For abbreviations, see §4. If you use bib2gls, it will write command definitions within the glstex file. See the bib2gls user manual for further information about those commands.

The glossaries user manual warns against using commands such as \gls within field values. However, if you really need this, the glossaries-extra package provides \glsxtrp (see §5.4). Alternatively, you may want to consider multi (compound) entries instead (see §7).

3.1. Command Definitions

\longnewglossaryentry{〈entry-label〉}{〈key=value list〉}{〈description〉}
This command is provided by the base glossaries package to cater for entries with descriptions that contain paragraph breaks. (The 〈key〉=〈value〉 interface doesn’t support paragraph breaks in the value.) The base package only provides an unstarred version of this command, which automatically inserts \leavevmode\unskip\nopostdesc at the end of the description. The glossaries-extra package replaces this with a single command:
\glsxtrpostlongdescription
which has the same effect, but can be redefined if required.

The glossaries-extra package provides a starred form:

\longnewglossaryentry*{〈entry-label〉}{〈key=value list〉}{〈description〉}
This doesn’t insert the hook at the end of the description.

For a general purpose post-description hook, see §8.6.2.

Additionally, the symbols package option provides \glsxtrnewsymbol, and the numbers package option provides \glsxtrnewnumber. See §2.1 for further details.

3.2. Glossary Entry Keys

In addition to the glossary entry keys provided by the base glossaries package (summarised in §II) the glossaries-extra package provides:

category=〈category-label〉initial: general
Assigns the category label. This should not contain any special or active characters as it’s used to form command names. See §10 for further details.

seealso={〈xr-list〉}
This key is analogous to the see key but the tag is always given by \seealsoname. The value 〈xr-list〉 should be a comma-separated list of entry labels. As with the see key, this key automatically indexes the cross-reference by default. The cross-reference will be displayed in the location list using \glsxtruseseealsoformat (see §5.9). Use autoseeindex=false to prevent the automatic indexing. (With bib2gls, adjust the selection criteria.)

With just the base glossaries package, the see key simply performs this automated indexing. With glossaries-extra the value is also saved. Similarly with the seealso key. The value isn’t saved with explicit use of \glsxtrindexseealso or \glssee.

alias={〈xr-label〉}
This is similar to the see key but the value can only be a single entry label. In addition to automatically indexing the cross-reference, this command will cause the entry with this key to have hyperlinks go to the aliased entry when referenced with commands like \gls. Whenever the entry is indexed with commands like \gls, the indexing will be performed on the target entry (the alias value). See §5.9 for further details.

Any entry that has a see, seealso or alias key set will be added to the glossary by default when using makeindex or xindy. If you don’t want this behaviour, use the autoseeindex=false package option and implement a post-description hook to insert the cross-reference. Alternatively, consider switching to bib2gls.

If you use bib2gls (see §11) then most of the glossary entry keys can be used as analogous fields in the bib file. For example, instead of writing the following code in your tex file:

\newglossaryentry{duck}{name={duck},
 description={a waterbird with webbed feet}}
\newabbreviation{svm}{SVM}{support vector machine}
You would write the following in a bib file:
@entry{duck,
 name={duck},
 description={a waterbird with webbed feet}
}
@abbreviation{svm,
  short={SVM},
  long={support vector machine},
}

There are, however, some keys that are considered internal fields by bib2gls, in that they are defined as keys by glossaries-extra and may be assigned in the glstex file that’s input by \GlsXtrLoadResources, but they should not be used in the bib files.

For example, the sort key (which is recommended with xindy where the name contains symbols) should not be used in the bib file. Instead, use the sort-field resource option or the system of sort fallbacks to choose the most appropriate field to obtain the sort value (see Gallery: Sorting). The group and location keys are also considered internal fields and are only applicable with the “unsrt” family of commands.

The group and location keys are defined by the record=only and record=nameref options and are only applicable with the “unsrt” family of commands.

group={〈group-label〉}
This key is used by bib2gls within the glstex file to set the group label. This label is typically a by-product of the sorting method (see §8.6.4). If it is explicitly set without reference to the order it can result in fragmented groups, see Gallery: Logical Glossary Divisions (type vs group vs parent). The group title can be set with \glsxtrsetgrouptitle. You will need to invoke bib2gls with the --group (or -g) switch to ensure that this key is set, when required.

Letter groups are a consequence of sorting, not the other way around.

location={〈location-list〉}
Used by bib2gls to store the formatted location list. The unformatted internal location list is stored in the loclist field, as with \printnoidxglossary.

With the “unsrt” family of commands, if the location field isn’t set, then it will try the loclist field instead, using the same method as \printnoidxglossary to display the locations. If you don’t want locations with bib2gls, either use nonumberlist or use the save-locations=false resource option.

The base glossaries package provides \glsaddkey and \glsaddstoragekey to allow custom keys to be defined. The glossaries-extra package additionally provides:

\glsxtrprovidestoragekey{〈key〉}{〈default value〉}{〈no link cs〉}modifier: *
This is like \glsaddstoragekey but does nothing if the key has already been defined. As with \glsaddstoragekey, the starred version switches on field expansion for the given key (provided that it hasn’t already been defined).

\glsxtrifkeydefined{〈key〉}{〈true〉}{〈false〉}
Tests if the given key has been defined as a glossary entry key.

3.3. Plurals

Some languages, such as English, have a general rule that plurals are formed from the singular with a suffix appended. This isn’t an absolute rule. There are plenty of exceptions (for example, geese, children, churches, elves, fairies, sheep). The glossaries package allows the plural key to be optional when defining entries. In some cases a plural may not make any sense (for example, the term is a symbol) and in some cases the plural may be identical to the singular.

To make life easier for languages where the majority of plurals can simply be formed by appending a suffix to the singular, the glossaries package lets the plural field default to the value of the text field with \glspluralsuffix appended. This command is defined to be just the letter “s”. This means that the majority of terms don’t need to have the plural supplied as well, and you only need to use it for the exceptions.

For languages that don’t have this general rule, the plural field will always need to be supplied, where needed.

There are other plural fields, such as firstplural, longplural and shortplural. Again, if you are using a language that doesn’t have a simple suffix rule, you’ll have to supply the plural forms if you need them (and if a plural makes sense in the context).

If these fields are omitted, the glossaries package follows these rules:

The last case is changed with glossaries-extra. With this extension package, the shortplural field defaults to the short field with \abbrvpluralsuffix appended unless overridden by category attributes. This suffix command is set by the abbreviation styles. This means that every time an abbreviation style is implemented, \abbrvpluralsuffix is redefined, see §4.1.2 for further details.

3.4. Entry Aliases

An entry can be made an alias of another entry using the alias key. The value should be the label of the other term. There’s no check for the other’s existence when the aliased entry is defined. This is to allow the possibility of defining the other entry after the aliased entry. (For example, when used with bib2gls.)

\glsxtraliashook{〈entry-label〉}
This hook is implemented when an entry is defined with the alias key set. It does nothing by default. The value of the alias field can be obtained with \glsxtralias{〈entry-label〉}.

If an entry 〈entry-1〉 is made an alias of 〈entry-2〉 then:

The value of the alias field can be accessed with \glsxtralias (see §5.9.2).

3.5. Setting or Updating Fields

See §5.11 for accessing field values and §5.15 for testing field values.

Modifications to fields only have an effect from that point onwards and may be localised to the current scope. If you are using docdef=true, any changes to the field values won’t be saved in the glsdefs file.

Some of these commands are subtly different from each other. For example, \glsfielddef (provided by the base glossaries package), \glsxtrdeffield and \GlsXtrSetField all assign a value to a field, but \glsfielddef requires that both the entry and the field exists (so it can’t be used to set an unknown internal field), \GlsXtrSetField requires that the entry exists (so it can be used to set an internal field that doesn’t have an associated key provided that the entry has been defined), and \glsxtrdeffield doesn’t perform any existence checks (which means that it can be used to assign internal fields before the entry is actually defined).

The commands described in this section don’t require the field to have an associated glossary entry key, so you need to be careful not to misspell the field labels.

Assigning or changing fields using the commands described here won’t alter related fields. For example, if you use the text key but not the plural key when you define an entry with \newglossaryentry, the plural key will automatically be set as well, but if you change the value of the text field after the entry has been defined, the plural field won’t be changed. Particular care is required if the field contributes in some way to the indexing information, as this information is typically initialised when the entry is first defined. This includes the sort and parent keys, which should not be changed after the entry has been defined.

With bib2gls, entries aren’t defined on the first LaTeX run. This means that commands that test for existence will produce a warning and (within the document environment) the ?? unknown marker. For example:

\documentclass{article}
\usepackage[record]{glossaries-extra}
\GlsXtrLoadResources[src=myentries,selection=all]
\begin{document}
Defining info
\glsxtrdeffield{sample}{info}{some information}.
Defining note
\GlsXtrSetField{sample}{note}{some note}.

Info: \glsxtrusefield{sample}{info}.
Note: \glsxtrusefield{sample}{note}.
\end{document}
On the first LaTeX run, this produces:
Defining info . Defining note ??.

Info: some information. Note: .

At this point the sample entry hasn’t been defined, so referencing it in \GlsXtrSetField results in a warning and the double question mark ?? unknown marker in the text. The field (note) isn’t saved, so nothing is shown when the field is referenced with \glsxtrusefield. Whereas \glsxtrdeffield does save the field with the label info associated with the label sample, even though the sample entry hasn’t actually been defined. The field can then be later obtained with \glsxtrusefield. Once bib2gls has been run, the sample entry should now have its definition in the glstex file, which is loaded by \GlsXtrLoadResources and the note field can be set.

\glsxtrdeffield{〈entry-label〉}{〈field-label〉}{〈value〉}
This uses etoolbox’s \csdef command to locally set the field given by its internal label 〈field-label〉 to 〈value〉 for the entry identified by 〈entry-label〉. No existence check is performed.

\glsxtredeffield{〈entry-label〉}{〈field-label〉}{〈value〉}
This is like \glsxtrdeffield but (protected) fully expands the value before assigning it to the field.

\glsxtrapptocsvfield{〈entry-label〉}{〈field-label〉}{〈element〉}
This command is designed for fields that should contain comma-separated lists. If the field hasn’t been defined, this behaves like \glsxtrdeffield otherwise it will append a comma followed by 〈element〉 (unexpanded) to the field value. No existence check is performed. This field can be iterated over using \glsxtrforcsvfield or formatted using \glsxtrfieldformatcsvlist. See §5.13 for further details.

\glsxtrfieldlistadd{〈entry-label〉}{〈field〉}{〈value〉}
Appends the given value to the given entry’s field (identified using the field’s internal label) using etoolbox’s \listcsadd. The field value can later be iterated over using \glsxtrfielddolistloop or \glsxtrfieldforlistloop.

\glsxtrfieldlistgadd{〈entry-label〉}{〈field〉}{〈value〉}
As above but uses \listcsgadd to make a global change.

\glsxtrfieldlisteadd{〈entry-label〉}{〈field〉}{〈value〉}
As above but uses \listcseadd to expand the value.

\glsxtrfieldlistxadd{〈entry-label〉}{〈field〉}{〈value〉}
As above but uses \listcsxadd to make a global change.

\glsxtrsetfieldifexists{〈entry-label〉}{〈field-label〉}{〈code〉}
This is used by the commands \GlsXtrSetField, \gGlsXtrSetField, \xGlsXtrSetField, \eGlsXtrSetField, \GlsXtrLetField, \csGlsXtrLetField and \GlsXtrLetFieldToField to produce an error (or warning with undefaction=warn) if the entry doesn’t exist. This can be redefined to add extra checks (for example, to prohibit changing certain fields).

\GlsXtrSetField{〈entry-label〉}{〈field-label〉}{〈value〉}
This uses etoolbox’s \csdef command to locally set the field given by its internal label 〈field-label〉 to 〈value〉 for the entry identified by 〈entry-label〉.

This command is written to the glstex file by bib2gls to set fields that don’t have a corresponding key.

\gGlsXtrSetField{〈entry-label〉}{〈field-label〉}{〈value〉}
This is like \GlsXtrSetField but uses a global assignment.

\eGlsXtrSetField{〈entry-label〉}{〈field-label〉}{〈value〉}
This is like \GlsXtrSetField but (protected) fully expands the value first.

\xGlsXtrSetField{〈entry-label〉}{〈field-label〉}{〈value〉}
This is like \eGlsXtrSetField but uses a global assignment.

\GlsXtrLetField{〈entry-label〉}{〈field-label〉}{〈cs〉}
This uses etoolbox’s \cslet command to locally set the field given by its internal label 〈field-label〉 to 〈cs〉 for the entry identified by 〈entry-label〉.

\csGlsXtrLetField{〈entry-label〉}{〈field-label〉}{〈cs-name〉}
This uses etoolbox’s \csletcs command to locally set the field given by its internal label 〈field-label〉 to the control sequence given by 〈cs-name〉 for the entry identified by 〈entry-label〉.

\GlsXtrLetFieldToField{〈entry1-label〉}{〈field1-label〉}{〈entry2-label〉}{〈field2-label〉}
This assigns the field identified by its internal label 〈field1-label〉 for the entry identified by 〈entry1-label〉 to the value of the field identified by 〈field2-label〉 for the entry identified by 〈entry2-label〉

4. Abbreviations

The acronym mechanism implemented by the base glossaries package is insufficiently flexible for some documents. The glossaries-extra package provides a completely different mechanism to deal with abbreviations in a more flexible manner. The two methods are incompatible. However, the glossaries-extra package provides predefined styles that emulate the appearance of the styles provided by the base package. If you have previously used just the base glossaries package, consult Table 4.2 for the closest matching abbreviation style.

4.1. Defining Abbreviations

Abbreviations are defined using:

\newabbreviation[〈options〉]{〈entry-label〉}{〈short〉}{〈long〉}
where 〈entry-label〉 is the entry’s label (used in commands like \gls), 〈short〉 is the short form (the abbreviation) and 〈long〉 is the long form (what the abbreviation is short for). The optional argument 〈options〉 may be used to set additional keys (as per the options list in \newglossaryentry), such as type or category.

This command internally uses \newglossaryentry and sets the type to \glsxtrabbrvtype and the category to abbreviation. The category (see §10) determines the abbreviation style. The style for a particular category is set using \setabbreviationstyle. If the optional argument is omitted, the abbreviation category is assumed (see §4.5 for further details).

The following example document sets up three different abbreviation styles: long-short-sc for the abbreviation category, long-only-short-only for the custom genus category, and short-nolong for the custom common category. Note that the custom title category doesn’t have an associated style.

\setabbreviationstyle{long-short-sc}
\setabbreviationstyle[genus]{long-only-short-only}
\setabbreviationstyle[common]{short-nolong}
\newabbreviation{xml}{xml}{extensible markup language}
\newabbreviation[category={genus}]{clostridium}{C.}{Clostridium}
\newabbreviation[category={genus}]{myristica}{M.}{Myristica}
\newabbreviation[category={common}]{html}{HTML}{hypertext markup language}
\newabbreviation[category={title}]{dr}{Dr}{Doctor}
\begin{document}
First use: \gls{xml}, \gls{clostridium}, \gls{myristica},
\gls{html}, \gls{dr}.

Next use: \gls{xml}, \gls{clostridium}, \gls{myristica},
\gls{html}, \gls{dr}.
\end{document}
Example 1: Multiple abbreviation styles 📥🖹 📥🖺

Example document with multiple abbreviation styles.

If the category doesn’t have an associated style, the style for the abbreviation category will be used, as with the dr entry above, which uses the long-short-sc style because no style has been associated with its custom title category.

There are two categories that have an abbreviation style set by default: abbreviation and acronym. These are initialised as follows:

\setabbreviationstyle{long-short}
\setabbreviationstyle[acronym]{short}
This means that abbreviations defined with the default abbreviation category will show the long form followed by the short form in parentheses on first use, and those defined with the category set to acronym will only show the short form (that is, the long form won’t be shown on first use).

To make it easier to migrate a file containing entries defined with \newacronym, the glossaries-extra package redefines \newacronym to do:

\newabbreviation[type=\acronymtype,category=acronym,〈options〉]{〈entry-label〉}{〈short〉}{〈long〉}
Note that this sets the category to acronym, which means that any abbreviations defined with \newacronym will use the short style by default. If you want to use a different style, you need to set the abbreviation style for the acronym category. For example, to use the long-short style:
\setabbreviationstyle[acronym]{long-short}
This must be placed before the first instance of \newacronym.

You can’t use \setacronymstyle with glossaries-extra.

If you have defined any acronym styles with \newacronymstyle, you will have to migrate them over to \newabbreviationstyle. However, most of the predefined abbreviation styles are flexible enough to adapt to common abbreviation formats. It is possible to revert \newacronym back to using the base glossaries package’s acronym mechanism (§4.6), but it should generally not be necessary.

Terms defined with \newabbreviation (and \newacronym) can be referenced in the main document text using commands like \gls. (If you want to use shortcut commands like \ac, use the shortcuts=ac package option.) Remember that you can use the prereset and preunset options to reset or unset the first use flag (see §5.10). Alternatively, you can use the commands described in §4.3. For headings and captions, see §5.3.2.

Avoid using \glsfirst, \glsfirstplural, \glstext and \glsplural with abbreviations. Many of the abbreviation styles are too complex to work with these commands (particularly the case-changing variants or with the 〈insert〉 final optional argument or with innertextformat). Instead, use commands like \gls, \glsxtrshort, \glsxtrlong and \glsxtrfull.

4.1.1. Abbreviation Fields: long and short

The 〈short〉 and 〈long〉 arguments are internally assigned with the short and long keys (so don’t use those keys in 〈options〉), but the short and long values may first be modified by category attributes, such as markwords or markshortwords. As with other entries, avoid nested links (see §5.4). This means avoid using the \gls-like and \glstext-like commands within 〈short〉 and 〈long〉.

If an abbreviation can be formed by combining other entries, consider using the multi (compound) entry function (see §7).

4.1.2. Abbreviation Fields: longplural and shortplural

The longplural key defaults to 〈long〉\glspluralsuffix and the shortplural key defaults to 〈short〉\abbrvpluralsuffix. The aposplural attribute will instead set the shortplural to 〈short〉'\abbrvpluralsuffix and the noshortplural attribute will set shortplural to just 〈short〉 (see §10). If these values are not appropriate, you will need to explicitly set the longplural and shortplural keys in 〈options〉.

The short plural suffix \abbrvpluralsuffix is redefined by the abbreviation style. Some styles, such as the long-short style, simply redefine \abbrvpluralsuffix to just:

\glsxtrabbrvpluralsuffixinitial: \glspluralsuffix
which is defined to \glspluralsuffix.

Some styles, such as the long-short-sc style, redefine \abbrvpluralsuffix to include code to counteract the formatting of the abbreviation.

If you want to change the default short plural suffix, you need to redefine \glsxtrabbrvpluralsuffix not \abbrvpluralsuffix. If you don’t want the suffix added, then set the noshortplural attribute to true.

4.1.3. Abbreviation Fields: name and description

The name key is set according to the abbreviation style. There should not be any need to explicitly set it. Some styles require the description key to be set in 〈options〉, but other styles will set the description to the long form.

4.1.4. Abbreviation Fields: type

Abbreviations can be assigned to a particular glossary using the type key in 〈options〉. The default for \newabbreviation is:

\glsxtrabbrvtypeinitial: \glsdefaulttype
This is initialised to \glsdefaulttype (the default glossary), but the abbreviations package option will redefine it to abbreviations.

The default type for \newacronym is:

\acronymtypeinitial: \glsdefaulttype
This is initialised to \glsdefaulttype, but the acronyms package option will redefine it to acronym.

4.1.5. General Hooks

The following are general purpose hooks used within \newabbreviation. Note that there are additional hooks that are used by the abbreviation styles (see §4.5.3.1).

\glsxtrnewabbrevpresetkeyhook{〈options〉}{〈label〉}{〈short〉}
This hook is provided for further customisation, if required. It’s implemented before the entry is defined (before the shortplural and longplural keys supplied in 〈options〉 are parsed). Does nothing by default. The arguments are a legacy throwback to old versions that didn’t have \glsxtrorgshort.

\newabbreviationhook
This hook is performed just before the entry is defined. Does nothing by default.

4.2. Examples: makeindex vs bib2gls

Example document using makeindex:

\documentclass{article}
\usepackage{glossaries-extra}
\makeglossaries
\newglossaryentry{sample}{name={sample},description={an example}}
\newabbreviation{xml}{XML}{extensible markup language}
\newacronym{nasa}{NASA}{National Aeronautics and Space Administration}
\begin{document}
First use: \gls{sample}, \gls{xml} and \gls{nasa}.
Next use: \gls{sample}, \gls{xml} and \gls{nasa}.
\printglossaries
\end{document}
Example 2: \newabbreviation vs \newacronym vs \newglossaryentry 📥🖹 📥🖺

Example document illustrating the difference between \newabbreviation, \newacronym and \newglossaryentry.

Note that the long form of NASA isn’t displayed on the first use of \gls{nasa}. This is because the acronym category uses the short style by default.

In the above example, all entries are placed in the main (default) glossary. The package options abbreviations and acronyms can be used to split them off into separate glossaries.

If you use bib2gls, the analogous bib entry types are @abbreviation and @acronym. The above example can be rewritten to use bib2gls:

\documentclass{article}
\begin{filecontents*}{\jobname.bib}
@entry{sample,
 name={sample},
 description={an example}
}
@abbreviation{xml,
 short={XML},
 long={extensible markup language}
}
@acronym{nasa,
 short={NASA},
 long={National Aeronautics and Space Administration}
}
\end{filecontents*}
\usepackage[record]{glossaries-extra}
\GlsXtrLoadResources
\begin{document}
First use: \gls{sample}, \gls{xml} and \gls{nasa}.
Next use: \gls{sample}, \gls{xml} and \gls{nasa}.
\printunsrtglossaries
\end{document}
Example 3: @abbreviation vs @acronym vs @entry 📥🖹 📥🖺

Example document illustrating the difference between @abbreviation, @acronym and @entry.

4.3. Referencing (Using) Abbreviations

Since \newabbreviation internally uses \newglossaryentry, you can reference abbreviations with the \gls-like commands as with other entries. Remember that you can use the prereset and preunset options to reset or unset the first use flag (see §5.10).

In general it’s best not to use \glsfirst, \glsfirstplural, \glstext, \glsplural or their case-changing variants as many of the abbreviation styles are too complicated for those commands. If you specifically want the full form, use \gls with prereset or use \glsxtrfull. If you specifically want the short form for a particular instance, use \gls with preunset or use \glsxtrshort. If you only want the long form for a particular instance, use \glsxtrlong.

If you never want the short form with \gls, use one of the “noshort” styles, such as long-noshort. If you never want the long form with \gls, use one of the “nolong” styles, such as short-nolong.

If you need to use abbreviations in headings or captions, use commands like \glsfmtshort and \glsfmtlong (see §5.3.2). Commands like \glsentryname are likely to contain non-expandable content.

Example:

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}
\makeglossaries
\newabbreviation{svm}{SVM}{support vector machine}
\newabbreviation{html}{HTML}{hypertext markup language}

\begin{document}
\tableofcontents
\section{Introducing the \glsfmtlong{svm}}
First use: \gls{svm}.
Next use: \gls{svm}.

\section{Introducing \gls{html} (incorrect)}
First use (not!): \gls{html}.
Next use: \gls{html}.

\glsreset{html}
\section{Introducing \glsxtrshort{html} (incorrect)}
First use: \gls{html}.
Next use: \gls{html}.

\glsreset{html}
\section{Introducing \glsfmtshort{html}}
First use: \gls{html}.
Next use: \gls{html}.

\printglossaries
\end{document}
Example 4: Referencing an abbreviation (with hyperref) 📥🖹 📥🖺

Example document illustrating referencing an abbreviation (with hyperref).

In the above example, compare the first section heading (which references an abbreviation with \glsfmtlong) with the second section heading (which references an abbreviation with \gls). Note that the first use of the html entry actually occurs in the table of contents, which results in the full form showing in the table of contents, but only the abbreviation is shown in the actual section 2 heading. The PDF bookmark shows the entry label (html) not the abbreviation (HTML). There is also a nested link for section 2 in the table of contents. In some PDF viewers (such as Okular), this will lead to section 2 but, in others (such as Evince), it will lead to the HTML entry target in the glossary. Similarly for section 3.

As with the base glossaries package, the unformatted short and long forms can be obtained with \glsentryshort and \glsentrylong or, for the plural forms, \glsentryshortpl and \glsentrylongpl. These are analogous to commands like \glsentrytext and may be used in expandable contexts. The sentence case versions (\Glsentryshort, \Glsentrylong, \Glsentryshort, and \Glsentrylong) are all robust in glossaries v4.49 and lower. As from glossaries v4.50, they can expand in PDF bookmarks, but outside of PDF bookmarks they will expand to a robust internal command.

Don’t use the base glossaries package’s acronym commands, such as \acrshort. These aren’t compatible with \newabbreviation.

Each abbreviation style has a display full form, which is the format produced with the first use of \gls, and an inline full form, which is the format produced by \glsxtrfull. For some styles, such as long-short, the display and inline forms are identical.

The example below demonstrates the difference between the first use of \gls compared with the inline full form for the footnote abbreviation style. The example also uses \glsfirst to demonstrate that it produces an undesirable result with the selected abbreviation style.

🖹🖺

\setabbreviationstyle{footnote}
\newabbreviation{nasa}{NASA}{National Aeronautics and Space 
Administration}

\begin{document}
\gls{nasa}['s] space 
exploration\ldots

\glsxtrfull{nasa}['s] space 
exploration\ldots

\glsfirst{nasa}['s] space 
exploration\ldots
\end{document}
Example 5: First use of \gls vs \glsxtrfull vs \glsfirst 📥🖹 📥🖺

Example document illustrating the difference between the first use of \gls compared with \glsxtrfull and \glsfirst.

In the above, the first use of \gls puts the long form in the footnote but correctly inserts the final optional argument before the footnote marker. The inline full form (obtained with \glsxtrfull) doesn’t use a footnote, but instead shows the long form in parentheses after the short form. The insert material is correctly placed after the short form. Compare this with the final line, which uses \glsfirst. This shows the long form in the footnote, but the inserted material can’t be shifted before the footnote marker, which results in the strange “NASA²’s”.

The following commands are included in the set of \glstext-like commands. They have the same options as \glstext and don’t change the first use flag. They will index (unless noindex is used), create a hyperlink (if enabled), and use the post-link hook.

\glsxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the short form using the abbreviation style’s formatting.

\Glsxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the short plural form using the abbreviation style’s formatting.

\Glsxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the long form using the abbreviation style’s formatting. As from v1.49, this command simulates first use by defining \glsxtrifwasfirstuse to do its first argument. This is done via the command:
\glsxtrsetlongfirstuse{〈entry-label〉}
which is defined as:
\newcommand{\glsxtrsetlongfirstuse}[1]{% 
 \let\glsxtrifwasfirstuse\@firstoftwo% 
}
This command takes the entry label as the argument, which is ignored by default.

To restore the original behaviour, redefine this command as follows:

\renewcommand{\glsxtrsetlongfirstuse}[1]{% 
 \letcs\glsxtrifwasfirstuse{@secondoftwo}% 
}
This command is also used by the case-changing and plural variants listed below.

\Glsxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the long plural form using the abbreviation style’s formatting.

\Glsxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrfull[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the inline full form using the abbreviation style’s formatting. Depending on the style, this may not be the same as the text produced with the first use of \gls.

\Glsxtrfull[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrfull[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrfullpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
Displays the inline full plural form using the abbreviation style’s formatting. Depending on the style, this may not be the same as the text produced with the first use of \glspl.

\Glsxtrfullpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but sentence case version.

\GLSxtrfullpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉
As above, but all caps version.

\glsxtrsetupfulldefs
This hook is used within \glsxtrfull, \glsxtrfullpl and the case-changing variations to initialise \glsxtrifwasfirstuse in case it’s required in the post-link hook. The default definition is to simulate first use. Note that changing this can cause unexpected results with abbreviation styles that set the post-link hook, such as short-postlong-user.

\glsxtrfullsaveinsert{〈entry-label〉}{〈insert〉}
This hook is used within \glsxtrfull, \glsxtrfullpl and the case-changing variations to initialise the \glsinsert placeholder. The default definition is to use \glsxtrsaveinsert. If the insert isn’t saved, it can’t be used within the post-link hook for the \glsxtrfull etc. This affects the behaviour of the “post-hyphen” abbreviation styles, such as long-hyphen-postshort-hyphen.

4.3.1. Prefixes

If you are using the glossaries-prefix package (which can be loaded via the prefix package option), then there are commands similar to \glsxtrshort and \glsxtrlong that insert the corresponding prefix and separator at the front if the short or long form, if the prefix has been set and is non-empty. In all cases, the separator is \glsprefixsep, as with \pgls.

These commands require glossaries-prefix.

\pglsxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \glsxtrshort but inserts the prefix field and separator, if the prefix value is set and non-empty.

\Pglsxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrshort but sentence case. Note the initial “P” in the command name, which matches \Pgls (similarly for the other prefix sentence case commands).

\PGLSxtrshort[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrshort but all caps.

\pglsxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \glsxtrshortpl but inserts the prefixplural field and separator, if the prefixplural value is set and non-empty.

\Pglsxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrshortpl but sentence case.

\PGLSxtrshortpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrshortpl but all caps.

\pglsxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \glsxtrlong but inserts the prefixfirst field and separator, if the prefixfirst value is set and non-empty.

\Pglsxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrlong but sentence case.

\PGLSxtrlong[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrlong but all caps.

\pglsxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \glsxtrlongpl but inserts the prefixfirstplural field and separator, if the prefixfirstplural value is set and non-empty.

\Pglsxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrlongpl but sentence case.

\PGLSxtrlongpl[〈options〉]{〈entry-label〉}[〈insert〉]modifiers: * + 〈alt-mod〉

As \pglsxtrlongpl but all caps.

4.3.2. Abbreviation Shortcut Commands

The abbreviation shortcut commands can be enabled using the shortcuts=abbreviations package option (or shortcuts=abbr or shortcuts=ac). The provided shortcut commands listed in Table 4.1. Note that \glsxtrenablerecordcount will switch the shortcuts that use the \cgls-like commands to the corresponding \rgls-like command.

Table 1: Abbreviation Shortcut Commands
Shortcut Shortcut Equivalent Command
(shortcuts=abbreviations) (shortcuts=ac)
\ab \ac \cgls
\abp \acp \cglspl
\as \acs \glsxtrshort
\asp \acsp \glsxtrshortpl
\al \acl \glsxtrlong
\alp \aclp \glsxtrlongpl
\af \acf \glsxtrfull
\afp \acfp \glsxtrfullpl
\Ab \Ac \cgls
\Abp \Acp \cglspl
\As \Acs \Glsxtrshort
\Asp \Acsp \Glsxtrshortpl
\Al \Acl \Glsxtrlong
\Alp \Aclp \Glsxtrlongpl
\Af \Acf \Glsxtrfull
\Afp \Acfp \Glsxtrfullpl
\AB \AC \cGLS
\ABP \ACP \cGLSpl
\AS \ACS \GLSxtrshort
\ASP \ACSP \GLSxtrshortpl
\AL \ACL \GLSxtrlong
\ALP \ACLP \GLSxtrlongpl
\AF \ACF \GLSxtrfull
\AFP \ACFP \GLSxtrfullpl
\newabbr \newabbr \newabbreviation

4.4. Tagging Initials

Initial tagging allows you to highlight the initials that form the abbreviation when the long form is shown in the glossary.

\GlsXtrEnableInitialTagging{〈categories〉}{〈cs〉}modifier: *

\GlsXtrEnableInitialTagging must be placed before the abbreviations are defined.

This command (robustly) defines 〈cs〉 (a control sequence) to accept a single argument, which is the letter (or letters) that needs to be tagged. The normal behaviour of 〈cs〉 within the document is to simply do its argument, but in the glossary it’s activated for those categories that have the tagging attribute set to “true”. For those cases it will use:

\glsxtrtagfont{〈text〉}
This command defaults to \underline{〈text〉} but may be redefined as required.

The control sequence 〈cs〉 can’t already be defined when used with the unstarred version of \GlsXtrEnableInitialTagging for safety reasons. The starred version will overwrite any previous definition of 〈cs〉. As with redefining any commands, ensure that you don’t redefine something important.

The first argument of \GlsXtrEnableInitialTagging is a comma-separated list of category names. The tagging attribute will automatically be set to true for those categories. You can later set this attribute for other categories (see §10) but this must be done before the glossary is displayed.

For example, the following uses initial tagging for both the acronym and abbreviation categories. The custom command \itag is defined as the tagging command.

\makeglossaries
\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag}
\setabbreviationstyle[acronym]{short-nolong-desc}
\newacronym
 [description={a system for detecting the location and
 speed of ships, aircraft, etc, through the use of radio
 waves}% description of this term
 ]
 {radar}% identifying label
 {radar}% short form
 {\itag{ra}dio \itag{d}etection \itag{a}nd \itag{r}anging}

\newabbreviation{xml}{XML}
 {e\itag{x}tensible \itag{m}arkup \itag{l}anguage}

\newabbreviation[category={other}]{tne}{TNE}
 {\itag{t}agging \itag{n}ot \itag{e}nabled}

\begin{document}
First use: \gls{radar}, \gls{xml}, \gls{tne}.

Long form only: \glsxtrlong{radar}, \glsxtrlong{xml}, \glsxtrlong{tne}.
\printglossaries
\end{document}
Example 6: Tagging abbreviation initials 📥🖹 📥🖺

Example document illustrating the use of \GlsXtrEnableInitialTagging to tag initial letters that form the abbreviation.

The underlining of the tagged letters only occurs in the glossary and then only for entries with the tagging attribute set.

4.5. Abbreviation Styles

The style for a particular category is set using:

\setabbreviationstyle[〈category〉]{〈style-name〉}
If the 〈category〉 is omitted, abbreviation is assumed. Remember that \newacronym sets the category to acronym so with \newacronym you need to change the style with:
\setabbreviationstyle[acronym]{〈style-name〉}

The abbreviation style must be set before the abbreviation with the corresponding category is defined. If you are using bib2gls, the style must be set before \GlsXtrLoadResources.

The style associated with the abbreviation category will be used if an abbreviation is defined with a category that doesn’t have an associated style.

Once you have defined an abbreviation with a given category, you can’t subsequently change the style for that category. You can’t have more than one style per category. The default style for the abbreviation category is long-short and the default style for the acronym category is short-nolong.

In the example below, the custom latin category doesn’t have an associated abbreviation style, so it uses the style assigned to the abbreviation category, not the acronym category. The only reason that the “radar” abbreviation (defined with \newacronym) uses the style associated with the acronym category is because the default definition of \newacronym sets category={acronym}.

🖹🖺

\usepackage[T1]{fontenc}
\usepackage{glossaries-extra}
\setabbreviationstyle{long-short-sc}
\newabbreviation{html}{html}{hypertext markup language}
\setabbreviationstyle[acronym]{footnote}
\newacronym{radar}{radar}{radio detection and ranging}
\newacronym[category={latin}]{ibid}{ibid}{ibidem}
\begin{document}
\gls{html}, \gls{radar} and \gls{ibid}.
\printunsrtglossaries
\end{document}
Example 7: Category without an associated abbreviation style 📥🖹 📥🖺

Example document that has an abbreviation with a category that doesn’t have an associated abbreviation style.

4.5.1. Predefined Abbreviation Styles

There are two types of abbreviation styles: those that treat the abbreviation as a regular entry (so that \gls uses \glsgenentryfmt and is encapsulated with \glsxtrregularfont) and those that don’t treat the abbreviation as a regular entry (so that \gls uses \glsxtrgenabbrvfmt and is encapsulated with \glsxtrabbreviationfont). See §5.5.5 for further details of those commands.

The non-regular abbreviation styles allow for more complex formats than the regular styles.

The regular entry abbreviation styles set the regular attribute to true for the category assigned to each abbreviation with that style. This means that on first use, \gls uses the value of the first field and on subsequent use \gls uses the value of the text field (and analogously for the plural and case-changing versions).

The non-regular abbreviation styles don’t set the regular attribute, unless it has already been set, in which case it will be changed to false. The first and text fields (and their plural forms) are set, but they aren’t used by commands like \gls, which instead use formatting commands, such as \glsxtrfullformat and \glsxtrsubsequentfmt, which are defined by the style.

In both cases, the first use of \gls may not match the text produced by \glsfirst (and likewise for the plural and case-changing versions).

The short and long fields are set as appropriate and may be accessed through commands like \glsxtrshort and \glsxtrlong. These may appear slightly differently to the way the short or long form is displayed within \gls, depending on the style.

The sample file sample-abbr-styles.pdf demonstrates all predefined styles described here.

For the “sc” styles that use \textsc, be careful about your choice of fonts as some only have limited support. For example, you may not be able to combine bold and small-caps. If you’re using pdfLaTeX, I recommend that you at least use the fontenc package with the T1 option or something similar.

The predefined styles have helper commands to make it easier to modify the format. These are described in §4.5.1.3.

Table 4.2 lists the nearest equivalent glossaries-extra abbreviation styles for the predefined acronym styles provided by glossaries, but note that the new styles use different formatting commands.

The example documents used to illustrate the predefined styles in the sub-sections below are all in the form (document class and options may vary):

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}
\setabbreviationstyle{〈style-name〉}
\newabbreviation[〈options〉]{ex}{〈short〉}{long form}
\begin{document}
First: \gls{ex}[-insert]. Next: \gls{ex}[-insert].
Full: \glsxtrfull{ex}[-insert].
\printunsrtglossaries
\end{document}
where 〈style-name〉 is the name of the abbreviation style, 〈short〉 is either “SHRT FM” or (for the small caps examples) “shrt fm”. The styles that require the description or user1 key to be set will include that in 〈options〉 otherwise the optional argument of \newabbreviation will be omitted. The examples with a style that requires \textsmaller will load relsize. The “hyphen” styles set the markwords and markshortwords attributes. Note that hyperref is loaded with the colorlinks option, so the hyperlink text will be red.

The naming scheme for abbreviation styles is as follows:

Not all combinations that fit the above syntax are provided. Pre-version 1.04 styles that didn’t fit this naming scheme are either provided with a synonym (where the former name wasn’t ambiguous) or provided with a deprecated synonym (where the former name was confusing).

4.5.1.1. Regular Styles

The following abbreviation styles set the regular attribute to true for all categories that have abbreviations defined with any of these styles. This means that they are treated like ordinary entries and are encapsulated with \glsxtrregularfont not \glsxtrabbreviationfont. The \gls-like commands are formatted according to \glsgenentryfmt.

4.5.1.1.1. Short Styles

These styles only show the short form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.5 for style commands.

short-nolong
Only the short form is shown on first use of the \gls-like commands. The inline full form uses the same parenthetical style as short-long (\glsxtrshortlongformat). Font variations are available with short-sc-nolong, short-sm-nolong and short-em-nolong.

\setabbreviationstyle{short-nolong}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 8: The short-nolong abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-nolong abbreviation style.

The long form is formatted with \glslongdefaultfont for the \glsxtrlong set of commands.

The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

The name is set to the short form (\glsxtrshortnolongname) and the description is set to the unencapsulated long form.

shortalias: short-nolong; alias: short-nolong
A synonym for short-nolong.

short-nolong-desc
As short-nolong but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with short-sc-nolong-desc, short-sm-nolong-desc and short-em-nolong-desc.

\setabbreviationstyle{short-nolong-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 9: The short-nolong-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-nolong-desc abbreviation style.

The name is set to the short form followed by the long form in parentheses (\glsxtrshortdescname), and the sort is set to just the short form.

short-descalias: short-nolong-desc; alias: short-nolong-desc
A synonym for short-nolong-desc.

nolong-short
The same as short-nolong except for the inline full form, which shows the same parenthetical style as long-short (\glsxtrlongshortformat). Font variations are available with nolong-short-sc, nolong-short-sm and nolong-short-em.

\setabbreviationstyle{nolong-short}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 10: The nolong-short abbreviation style 📥🖹 📥🖺

Example document demonstrating the nolong-short abbreviation style.

short-sc-nolong
This style is like short-nolong but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sc-nolong}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 11: The short-sc-nolong abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-nolong abbreviation style.

short-scalias: short-sc-nolong; alias: short-sc-nolong
A synonym for short-sc-nolong.

short-sc-nolong-desc
This style is like short-nolong-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sc-nolong-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 12: The short-sc-nolong-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-nolong-desc abbreviation style.

short-sc-descalias: short-sc-nolong-desc; alias: short-sc-nolong-desc
A synonym for short-sc-nolong-desc.

nolong-short-sc
This style is like nolong-short but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{nolong-short-sc}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 13: The nolong-short-sc abbreviation style 📥🖹 📥🖺

Example document demonstrating the nolong-short-sc abbreviation style.

short-sm-nolong
This style is like short-nolong but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sm-nolong}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 14: The short-sm-nolong abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-nolong abbreviation style.

short-smalias: short-sm-nolong; alias: short-sm-nolong
A synonym for short-sm-nolong.

short-sm-nolong-desc
This style is like short-nolong-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sm-nolong-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 15: The short-sm-nolong-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-nolong-desc abbreviation style.

short-sm-descalias: short-sm-nolong-desc; alias: short-sm-nolong-desc
A synonym for short-sm-nolong-desc.

nolong-short-sm
This style is like nolong-short but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{nolong-short-sm}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 16: The nolong-short-sm abbreviation style 📥🖹 📥🖺

Example document demonstrating the nolong-short-sm abbreviation style.

short-em-nolong
This style is like short-nolong but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{short-em-nolong}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 17: The short-em-nolong abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-nolong abbreviation style.

short-emalias: short-em-nolong; alias: short-em-nolong
A synonym for short-em-nolong.

short-em-nolong-desc
This style is like short-nolong-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{short-em-nolong-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 18: The short-em-nolong-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-nolong-desc abbreviation style.

short-em-descalias: short-em-nolong-desc; alias: short-em-nolong-desc
A synonym for short-em-nolong-desc.

nolong-short-em
This style is like nolong-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{nolong-short-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 19: The nolong-short-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the nolong-short-em abbreviation style.

4.5.1.1.2. Long Styles

These styles only show the long form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.6 for style commands.

long-noshort-desc
Only the long form is shown on first use and subsequent use of the \gls-like commands (\glsxtrlongformat). The inline full form uses the same parenthetical style as long-short (\glsxtrlongshortformat). Font variations are available with long-noshort-sc-desc, long-noshort-sm-desc and long-noshort-em-desc.

\setabbreviationstyle{long-noshort-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 20: The long-noshort-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-desc abbreviation style.

The long form is formatted with \glsfirstlongdefaultfont on first use and \glslongdefaultfont for subsequent use and for the \glsxtrlong set of commands.

The short form is formatted with \glsfirstabbrvdefaultfont within the inline full form and with \glsabbrvdefaultfont for the \glsxtrshort set of commands.

The name is set to the long form (\glsxtrlongnoshortdescname) and the description must be supplied.

long-descalias: long-noshort-desc; alias: long-noshort-desc
A synonym for long-noshort-desc.

long-noshort
This is like long-noshort-desc but the name is set to the short form (\glsxtrlongnoshortname) and the description is set to the unencapsulated long form.

\setabbreviationstyle{long-noshort}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 21: The long-noshort abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort abbreviation style.

longalias: long-noshort; alias: long-noshort
A synonym for long-noshort.

long-noshort-sc
This style is like long-noshort but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-sc}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 22: The long-noshort-sc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-sc abbreviation style.

long-noshort-sc-desc
This style is like long-noshort-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-sc-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 23: The long-noshort-sc-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-sc-desc abbreviation style.

long-noshort-sm
This style is like long-noshort but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-sm}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 24: The long-noshort-sm abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-sm abbreviation style.

long-noshort-sm-desc
This style is like long-noshort-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-sm-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 25: The long-noshort-sm-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-sm-desc abbreviation style.

long-noshort-em
This style is like long-noshort but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 26: The long-noshort-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-em abbreviation style.

long-noshort-em-desc
This style is like long-noshort-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{long-noshort-em-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 27: The long-noshort-em-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-noshort-em-desc abbreviation style.

long-em-noshort-em
This style is like long-noshort but it uses \glsxtremsuffix, \glsabbrvemfont, \glsfirstabbrvemfont, \glslongemfont and \glsfirstlongemfont (see §4.5.1.3.9). This emphasizes both the long and short forms.

\setabbreviationstyle{long-em-noshort-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 28: The long-em-noshort-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-em-noshort-em abbreviation style.

long-em-noshort-em-desc
This style is like long-noshort-desc but it uses \glsxtremsuffix, \glsabbrvemfont, \glsfirstabbrvemfont, \glslongemfont and \glsfirstlongemfont (see §4.5.1.3.9). This emphasizes both the long and short forms.

\setabbreviationstyle{long-em-noshort-em-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 29: The long-em-noshort-em-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-em-noshort-em-desc abbreviation style.

4.5.1.2. Non-Regular Styles

The following abbreviation styles will set the regular attribute to false if it has previously been set. If it hasn’t already been set, it’s left unset. Other attributes may also be set, depending on the style.

The non-regular styles are too complicated to use \glsgenentryfmt as the display style (with the \gls-like commands). Instead they use \glsxtrgenabbrvfmt. This means that these styles won’t work if you provide your own custom display style (using \defglsentryfmt) that doesn’t check for the regular attribute.

Avoid using \glsfirst, \glsfirstplural, \glstext and \glsplural (or their case-changing variants) with these styles. There are also some styles that can be problematic with \GLSname.

4.5.1.2.1. Long (Short) Styles

These styles show the long form followed by the short form in parentheses on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.2 for style commands.

long-short
The 〈insert〉 is placed after the long form on first use of the \gls-like commands and after the short form on subsequent use. The inline full form is the same as the display full form (\glsxtrlongshortformat). Font variations are available with long-short-sc, long-short-sm, long-short-em and long-em-short-em.

\setabbreviationstyle{long-short}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 30: The long-short abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short abbreviation style.

The long form is formatted with \glsfirstlongdefaultfont within the full form and with \glslongdefaultfont for the \glsxtrlong set of commands.

The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

The name is set to the short form (\glsxtrlongshortname) and the description is set to the unencapsulated long form.

long-short-desc
As long-short but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with long-short-sc-desc, long-short-sm-desc, long-short-em-desc and long-em-short-em-desc.

\setabbreviationstyle{long-short-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 31: The long-short-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-desc abbreviation style.

The name and sort are set to the long form followed by the short form in parentheses (\glsxtrlongshortdescname and \glsxtrlongshortdescsort).

long-short-sc
This style is like long-short but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-sc}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 32: The long-short-sc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-sc abbreviation style.

long-short-sc-desc
This style is like long-short-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-sc-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 33: The long-short-sc-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-sc-desc abbreviation style.

long-short-sm
This style is like long-short but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-sm}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 34: The long-short-sm abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-sm abbreviation style.

long-short-sm-desc
This style is like long-short-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-sm-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 35: The long-short-sm-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-sm-desc abbreviation style.

long-short-em
This style is like long-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 36: The long-short-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-em abbreviation style.

long-short-em-desc
This style is like long-short-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{long-short-em-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 37: The long-short-em-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-em-desc abbreviation style.

long-em-short-em
This style is like long-short but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

\setabbreviationstyle{long-em-short-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 38: The long-em-short-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-em-short-em abbreviation style.

long-em-short-em-desc
This style is like long-short-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

\setabbreviationstyle{long-em-short-em-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 39: The long-em-short-em-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-em-short-em-desc abbreviation style.

4.5.1.2.2. Long (Short, User) Styles

These styles are like the long (short) styles in §4.5.1.2.1 but additional content can be supplied in the field identified by \glsxtruserfield, which will be placed in the parenthetical content on first use (if set). The inline full form is the same as the display full form.

These styles use the commands \glsxtrusersuffix, \glsabbrvuserfont, \glsfirstabbrvuserfont, \glslonguserfont and \glsfirstlonguserfont (except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.

If you need to change the font, you can redefine the associated commands (listed above). However, since small caps are awkward because the short plural suffix needs to counteract the small caps, small caps versions are provided.

long-short-user
This style is like long-short but it includes the additional content in the parentheses on first use or the inline full form. The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

\setabbreviationstyle{long-short-user}

\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 40: The long-short-user abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-user abbreviation style.

long-short-user-desc
This style is like long-short-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

\setabbreviationstyle{long-short-user-desc}

\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 41: The long-short-user-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-short-user-desc abbreviation style.

This style is incompatible with \GLSname.

If you need to use \GLSname with this style, you’ll have to redefine \glsxtrlongshortuserdescname so that the field name doesn’t include the entry label. For example:

\newcommand{\glsxtrlongshortuserdescname}{%
  \protect\glslonguserfont{\the\glslongtok}%
  \space(\protect\glsabbrvuserfont{\the\glsshorttok})%
}

long-postshort-user
This style is like long-short-user but the parenthetical material is placed in the post-link hook. Note that, unlike long-short-user, the plural form isn’t used in the parenthetical material. If you require this, you will need to redefine \glsxtrpostusershortformat.

\setabbreviationstyle{long-postshort-user}

\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 42: The long-postshort-user abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-postshort-user abbreviation style.

long-postshort-user-desc
This style is like long-postshort-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

\setabbreviationstyle{long-postshort-user-desc}

\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 43: The long-postshort-user-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-postshort-user-desc abbreviation style.

This style is incompatible with \GLSname.

If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label, as for long-short-user-desc.

long-postshort-sc-user
This style is like long-postshort-user but it uses \glsxtrscusersuffix, \glsabbrvscuserfont and \glsfirstabbrvscuserfont. The name value is obtained from \glsxtrlongshortscusername.

\setabbreviationstyle{long-postshort-sc-user}

\newabbreviation[user1={extra info}]{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 44: The long-postshort-sc-user abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-postshort-sc-user abbreviation style.

long-postshort-sc-user-desc
This style is like long-postshort-sc-user but the description must be supplied. The name is obtained from \glsxtrlongshortuserdescname.

\setabbreviationstyle{long-postshort-sc-user-desc}

\newabbreviation[description={sample description},
user1={extra info}]{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 45: The long-postshort-sc-user-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-postshort-sc-user-desc abbreviation style.

This style is incompatible with \GLSname.

If you need to use \GLSname with this style, you’ll have to redefine \glsxtrlongshortscuserdescname so that the field name doesn’t include the entry label.

4.5.1.2.3. Short (Long) Styles

These styles show the short form followed by the long form in parentheses on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.2 for style commands.

short-long

The 〈insert〉 is placed after the short form on first use and subsequent use of the \gls-like commands. The inline full form is the same as the display full form (\glsxtrshortlongformat). Font variations are available with short-sc-long, short-sm-long, short-em-long and short-em-long-em.

\setabbreviationstyle{short-long}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 46: The short-long abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-long abbreviation style.

The long form is formatted with \glsfirstlongdefaultfont within the full form and with \glslongdefaultfont for the \glsxtrlong set of commands.

The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

The name is set to the short form (\glsxtrlongshortname) and the description is set to the unencapsulated long form.

short-long-desc
As short-long but the description must be supplied in the optional argument of \newabbreviation. Font variations are available with short-sc-long-desc, short-sm-long-desc, short-em-long-desc and short-em-long-em-desc.

\setabbreviationstyle{short-long-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 47: The short-long-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-long-desc abbreviation style.

The name is set to the short form followed by the long form in parentheses (\glsxtrshortlongdescname), and the sort is set to just the short form (\glsxtrshortlongdescsort).

short-sc-long
This style is like short-long but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sc-long}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 48: The short-sc-long abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-long abbreviation style.

short-sc-long-desc
This style is like short-long-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sc-long-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 49: The short-sc-long-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-long-desc abbreviation style.

short-sm-long
This style is like short-long but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sm-long}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 50: The short-sm-long abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-long abbreviation style.

short-sm-long-desc
This style is like short-long-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

\setabbreviationstyle{short-sm-long-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 51: The short-sm-long-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-long-desc abbreviation style.

short-em-long
This style is like short-long but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{short-em-long}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 52: The short-em-long abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-long abbreviation style.

short-em-long-desc
This style is like short-long-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

\setabbreviationstyle{short-em-long-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 53: The short-em-long-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-long-desc abbreviation style.

short-em-long-em
This style is like short-long but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

\setabbreviationstyle{short-em-long-em}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 54: The short-em-long-em abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-long-em abbreviation style.

short-em-long-em-desc
This style is like short-long-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont, \glsfirstlongemfont and \glslongemfont (see §4.5.1.3.9). That is, both the long and short forms are emphasized.

\setabbreviationstyle{short-em-long-em-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 55: The short-em-long-em-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-long-em-desc abbreviation style.

4.5.1.2.4. Short (Long, User) Styles

These styles are like the short (long) styles in §4.5.1.2.3 but additional content can be supplied in the field identified by \glsxtruserfield, which will be placed in the parenthetical content on first use (if set). The inline full form is the same as the display full form.

These styles use the commands \glsxtrusersuffix, \glsabbrvuserfont, \glsfirstabbrvuserfont, \glslonguserfont and \glsfirstlonguserfont (except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.

short-long-user
This style is like short-long but it includes the additional content in the parentheses on first use or the inline full form.

The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

\setabbreviationstyle{short-long-user}

\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 56: The short-long-user abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-long-user abbreviation style.

short-long-user-desc
This style is like short-long-user but the description must be provided. The name is obtained from \glsxtrshortlonguserdescname and the sort value is obtained from \glsxtrshortlongdescsort.

\setabbreviationstyle{short-long-user-desc}

\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 57: The short-long-user-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-long-user-desc abbreviation style.

This style is incompatible with \GLSname.

If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label. For example:

\newcommand{\glsxtrlongshortuserdescname}{%
  \protect\glsabbrvuserfont{\the\glsshorttok}%
  \space(\protect\glslonguserfont{\the\glslongtok})%
}

short-postlong-user
This style is like short-long but it includes the additional content in the parentheses on first use or the inline full form. The parenthetical content is placed in the post-link hook which can avoid overly long hyperlinks.

The description is obtained from \glsuserdescription, which can be redefined to include the additional information, if required.

\setabbreviationstyle{short-postlong-user}

\newabbreviation[user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 58: The short-postlong-user abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-postlong-user abbreviation style.

short-postlong-user-desc
This style is like short-postlong-user but the description must be provided. The name is obtained from \glsxtrshortlonguserdescname. The sort value is the short form.

\setabbreviationstyle{short-postlong-user-desc}

\newabbreviation[description={sample description},
user1={extra info}]{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 59: The short-postlong-user-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-postlong-user-desc abbreviation style.

This style is incompatible with \GLSname.

If you need to use \GLSname with this style, you’ll have to redefine \glsxtrshortlonguserdescname so that the field name doesn’t include the entry label, as for short-long-user-desc.

4.5.1.2.5. Hyphen Styles

These styles test if the inserted material start with a hyphen. See §4.5.1.3.1, §4.5.1.3.2 and §4.5.1.3.7 for style commands.

These styles are designed to be used with the markwords attribute and (if the short form has spaces) the markshortwords attribute. If the inserted material starts with a hyphen, the spaces will be replaced with hyphens. This replacement won’t take place if the corresponding attribute wasn’t used to mark the inter-word spaces.

Note that \glsxtrshort and \glsxtrlong (and their plural and case-changing variants) don’t perform the inter-word space substitution. The inline full form is slightly different from the display full form for the “post” styles.

long-hyphen-short-hyphen
This style is like long-short but checks the inserted material for a leading hyphen. The description is the long form encapsulated with \glslonghyphenfont. The name is obtained from \glsxtrlongshortname, and the sort value is obtained from \glsxtrlonghyphenshortsort. The inline full form is the same as the display full form.

\setabbreviationstyle{long-hyphen-short-hyphen}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 60: The long-hyphen-short-hyphen abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-short-hyphen abbreviation style.

long-hyphen-postshort-hyphen
This style is like long-hyphen-short-hyphen but places the insert and parenthetical material in the post-link hook for the display full form.

\setabbreviationstyle{long-hyphen-postshort-hyphen}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 61: The long-hyphen-postshort-hyphen abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-postshort-hyphen abbreviation style.

Note that the inline full form (\glsxtrfull) doesn’t show the insert in the post-link hook, but instead places it at the end of the link text. This is because only the \gls-like commands (not the \glstext-like commands) set the placeholder \glsinsert to the supplied insert. If you want the insert to show in the parenthetical part of the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert:

\renewcommand*{\glsxtrfullsaveinsert}[2]{\def\glsinsert{#2}}

long-hyphen-short-hyphen-desc
This style is like long-hyphen-short-hyphen but the description must be supplied. The name is obtained from \glsxtrlongshortdescname, and the sort value is obtained from \glsxtrlongshortdescsort.

\setabbreviationstyle{long-hyphen-short-hyphen-desc}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 62: The long-hyphen-short-hyphen-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-short-hyphen-desc abbreviation style.

long-hyphen-postshort-hyphen-desc
This style is like long-hyphen-short-hyphen-desc but places the insert and parenthetical material in the post-link hook for the display full form.

\setabbreviationstyle{long-hyphen-postshort-hyphen-desc}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 63: The long-hyphen-postshort-hyphen-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-postshort-hyphen-desc abbreviation style.

Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert.

long-hyphen-noshort-desc-noreg
This style is like long-noshort-desc-noreg but checks the inserted material for a leading hyphen. The description must be supplied. The name is obtained from \glsxtrlongnoshortdescname, and the sort value is obtained from \glsxtrlonghyphennoshortdescsort.

\setabbreviationstyle{long-hyphen-noshort-desc-noreg}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 64: The long-hyphen-noshort-desc-noreg abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-noshort-desc-noreg abbreviation style.

long-hyphen-noshort-noreg
This style is like long-noshort-noreg but checks the inserted material for a leading hyphen. The description is set to the unencapsulated long form. The name is obtained from \glsxtrlongnoshortname, and the sort value is obtained from \glsxtrlonghyphennoshortsort.

\setabbreviationstyle{long-hyphen-noshort-noreg}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 65: The long-hyphen-noshort-noreg abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-hyphen-noshort-noreg abbreviation style.

short-hyphen-long-hyphen
This style is like short-long but checks the inserted material for a leading hyphen. The description is the long form encapsulated with \glslonghyphenfont. The name is obtained from \glsxtrshortlongname and the sort value is obtained from \glsxtrshorthyphenlongsort.

\setabbreviationstyle{short-hyphen-long-hyphen}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 66: The short-hyphen-long-hyphen abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-hyphen-long-hyphen abbreviation style.

short-hyphen-postlong-hyphen
This style is like short-hyphen-long-hyphen but the insert and parenthetical material are placed in the post-link hook for the display full form.

\setabbreviationstyle{short-hyphen-postlong-hyphen}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 67: The short-hyphen-postlong-hyphen abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-hyphen-postlong-hyphen abbreviation style.

Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert (as described above, for the long-hyphen-postshort-hyphen style).

short-hyphen-long-hyphen-desc
This style is like short-hyphen-long-hyphen but the description must be supplied. The name is obtained from \glsxtrshortlongdescname, and the sort is obtained from \glsxtrshortlongdescsort.

\setabbreviationstyle{short-hyphen-long-hyphen-desc}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 68: The short-hyphen-long-hyphen-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-hyphen-long-hyphen-desc abbreviation style.

short-hyphen-postlong-hyphen-desc
This style is like short-hyphen-long-hyphen-desc but the insert and parenthetical material are placed in the post-link hook for the display full form.

\setabbreviationstyle{short-hyphen-postlong-hyphen-desc}

\glssetcategoryattributes{abbreviation}{markwords,markshortwords}{true}
\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 69: The short-hyphen-postlong-hyphen-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-hyphen-postlong-hyphen-desc abbreviation style.

Note that as with the long-hyphen-postshort-hyphen style, the insert isn’t included in the post-link hook by default for the inline full form. If you want the insert to show in the post-link hook for the inline full form you need to redefine \glsxtrfullsaveinsert (as described above, for the long-hyphen-postshort-hyphen style).

4.5.1.2.6. Only Styles

These styles only show the long form on first use and only show the short form on subsequent use. The inline full form is the same as the display full form. See §4.5.1.3.1, §4.5.1.3.2 and §4.5.1.3.8 for style commands.

The inline full form uses a parenthetical style with the long form followed by the short form in parentheses.

long-only-short-only
The name is obtained from \glsxtronlyname and the sort value is just the short form. The description is the long form encapsulated with \glslongonlyfont.

\setabbreviationstyle{long-only-short-only}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 70: The long-only-short-only abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-only-short-only abbreviation style.

long-only-short-only-desc
This is like long-only-short-only but the description must be supplied. The name is obtained from \glsxtronlydescname and the sort is obtained from \glsxtronlydescsort.

\setabbreviationstyle{long-only-short-only-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 71: The long-only-short-only-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-only-short-only-desc abbreviation style.

long-only-short-sc-only
This is like long-only-short-only but uses small caps. The name is obtained from \glsxtrsconlyname, and it uses \glsabbrvsconlyfont, \glsfirstabbrvsconlyfont and \glsxtrsconlysuffix for the abbreviation fonts and plural suffix.

\setabbreviationstyle{long-only-short-sc-only}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 72: The long-only-short-sc-only abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-only-short-sc-only abbreviation style.

long-only-short-sc-only-desc
This is like long-only-short-only-desc but uses small caps. The name is obtained from \glsxtrsconlydescname, and the sort is obtained from \glsxtrsconlydescsort.

\setabbreviationstyle{long-only-short-sc-only-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 73: The long-only-short-sc-only-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the long-only-short-sc-only-desc abbreviation style.

4.5.1.2.7. Footnote Styles

These styles show the short form (\glsxtrshortformat) with the long form as a footnote on first use. On subsequent use only the short form is shown. See §4.5.1.3.1 and §4.5.1.3.4 for style commands.

The inline full form uses the same parenthetical style as short-long (\glsxtrshortlongformat). Font variations are available with short-sc-footnote, short-sm-footnote and short-em-footnote.

short-footnote
The 〈insert〉 is placed after the short form on first use and subsequent use of the \gls-like commands.

🖹🖺

\setabbreviationstyle{short-footnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 74: The short-footnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-footnote abbreviation style.

The long form is formatted with \glsfirstlongfootnotefont within the full form and with \glslongfootnotefont for the \glsxtrlong set of commands.

The short form is formatted with \glsfirstabbrvdefaultfont within the full form and with \glsabbrvdefaultfont for subsequent use and for the \glsxtrshort set of commands.

The name is set to the short form (\glsxtrfootnotename) and the description is set to the unencapsulated long form.

This style automatically sets the nohyperfirst attribute to true for the entry’s category.

footnotealias: short-footnote; alias: short-footnote
A synonym for short-footnote.

short-footnote-desc
As short-footnote but the description must be supplied in the optional argument of \newabbreviation.

🖹🖺

\setabbreviationstyle{short-footnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 75: The short-footnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-footnote-desc abbreviation style.

The name is set to the short form followed by the long form in parentheses (\glsxtrfootnotedescname), and the sort is set to just the short form (\glsxtrfootnotedescsort).

footnote-descalias: short-footnote-desc; alias: short-footnote-desc
A synonym for short-footnote-desc.

short-postfootnote
Similar to short-footnote but the footnote command is placed in the post-link hook. This avoids the problem of nested hyperlinks caused by the footnote marker hyperlink being inside the link text (which is why the short-footnote style switches on the nohyperfirst attribute). Using the post-link hook makes it possible to check for following punctuation so that the footnote marker can be shifted after the punctuation character.

🖹🖺

\setabbreviationstyle{short-postfootnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 76: The short-postfootnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-postfootnote abbreviation style.

postfootnotealias: short-postfootnote; alias: short-postfootnote
A synonym for short-postfootnote.

short-postfootnote-desc
Similar to short-footnote-desc but the footnote command is placed in the post-link hook as with short-postfootnote.

🖹🖺

\setabbreviationstyle{short-postfootnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 77: The short-postfootnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-postfootnote-desc abbreviation style.

postfootnote-descalias: short-postfootnote-desc; alias: short-postfootnote-desc
A synonym for short-postfootnote-desc.

short-sc-footnote
This style is like short-footnote but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sc-footnote}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 78: The short-sc-footnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-footnote abbreviation style.

short-sc-footnote-desc
This style is like short-footnote-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sc-footnote-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 79: The short-sc-footnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-footnote-desc abbreviation style.

short-sc-postfootnote
This style is like short-postfootnote but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sc-postfootnote}

\newabbreviation{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 80: The short-sc-postfootnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-postfootnote abbreviation style.

short-sc-postfootnote-desc
This style is like short-postfootnote-desc but it uses \glsxtrscsuffix, \glsabbrvscfont and \glsfirstabbrvscfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sc-postfootnote-desc}

\newabbreviation[description={sample description}]
{ex}{shrt fm}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 81: The short-sc-postfootnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sc-postfootnote-desc abbreviation style.

short-sm-footnote
This style is like short-footnote but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sm-footnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 82: The short-sm-footnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-footnote abbreviation style.

short-sm-footnote-desc
This style is like short-footnote-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sm-footnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 83: The short-sm-footnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-footnote-desc abbreviation style.

short-sm-postfootnote
This style is like short-postfootnote but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sm-postfootnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 84: The short-sm-postfootnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-postfootnote abbreviation style.

short-sm-postfootnote-desc
This style is like short-postfootnote-desc but it uses \glsxtrsmsuffix, \glsabbrvsmfont and \glsfirstabbrvsmfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-sm-postfootnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 85: The short-sm-postfootnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-sm-postfootnote-desc abbreviation style.

short-em-footnote
This style is like short-footnote but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-em-footnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 86: The short-em-footnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-footnote abbreviation style.

short-em-footnote-desc
This style is like short-footnote-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-em-footnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 87: The short-em-footnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-footnote-desc abbreviation style.

short-em-postfootnote
This style is like short-postfootnote but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-em-postfootnote}

\newabbreviation{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 88: The short-em-postfootnote abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-postfootnote abbreviation style.

short-em-postfootnote-desc
This style is like short-postfootnote-desc but it uses \glsxtremsuffix, \glsabbrvemfont and \glsfirstabbrvemfont (see §4.5.1.3.9).

🖹🖺

\setabbreviationstyle{short-em-postfootnote-desc}

\newabbreviation[description={sample description}]
{ex}{SHRT FM}{long form}

\begin{document} First: \gls{ex}[-insert]. Next: \gls{ex}[-insert]. Full: \glsxtrfull{ex}[-insert]. First plural: \glspl[prereset]{ex}[-insert].
\printunsrtglossaries
\end{document}

Example 89: The short-em-postfootnote-desc abbreviation style 📥🖹 📥🖺

Example document demonstrating the short-em-postfootnote-desc abbreviation style.

4.5.1.2.8. Short Styles

These styles only show the short form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.5 for style commands. They are essentially identical to the corresponding regular style listed in §4.5.1.2.8 except that they change the regular attribute to false.

short-nolong-noreg
This style is a non-regular version of the short-nolong style.

short-nolong-desc-noreg
This style is a non-regular version of the short-nolong-desc style.

nolong-short-noreg
This style is a non-regular version of the nolong-short style.

4.5.1.2.9. Long Styles

These styles only show the long form on both first use and subsequent use. See §4.5.1.3.1 and §4.5.1.3.6 for style commands. They are essentially identical to the corresponding regular style listed in §4.5.1.2.9 except that they change the regular attribute to false.

long-noshort-desc-noreg
This style is a non-regular version of the long-noshort-desc style.

long-noshort-noreg
This style is a non-regular version of the long-noshort style.

long-em-noshort-em-noreg
This style is a non-regular version of the long-em-noshort-em style.

long-em-noshort-em-desc-noreg
This style is a non-regular version of the long-em-noshort-em-desc style.

4.5.1.3. Formatting Commands and Hooks

These commands are used by the predefined abbreviation styles. These are considered user commands, which you can redefine to customize the style.

4.5.1.3.1. General

These commands apply to all styles.

\ifglsxtrinsertinside 〈true〉\else 〈false〉\fiinitial: \iffalse
This conditional is used to determine whether the 〈insert〉 part should go inside or outside of the style’s font formatting commands. The default setting is false.

\glsxtrinsertinsidetrue
Set the insert inside conditional to true.

\glsxtrinsertinsidefalse
Set the insert inside conditional to false.

\glsxtrparen{〈text〉}
Used for parenthetical content in the inline full form and also, for some styles, the display full form. Note that this formats the opening and closing parentheses according to the inner formatting, but not the argument, which should already incorporate it. The default definition is:
\newcommand*{\glsxtrparen}[1]{%
 \glsxtrgenentrytextfmt{(}#1\glsxtrgenentrytextfmt{)}}

\glsxtrfullsep{〈entry-label〉}
Separator placed before \glsxtrparen. This is a space by default, but it includes the inner formatting. The argument (the entry label) is ignored by default:
\newcommand*{\glsxtrfullsep}[1]{\glsxtrgenentrytextfmt{ }}
You can redefine this to use \glsabspace if you want to have a non-breakable space if the short form is less than \glsacspacemax in width. (You can use \glsacspace instead, but note that \glsacspace doesn’t incorporate the inner formatting.)

\glsabbrvdefaultfont{〈text〉}
Abbreviation font command used by styles that don’t have specific font markup (for example, long-short but not long-em-short-em). This just does its argument.

\glsfirstabbrvdefaultfont{〈text〉}
First use abbreviation font command used by styles that don’t have specific font markup. This is defined to just use \glsabbrvdefaultfont.

\glsxtrdefaultrevert{〈text〉}
This is the default definition of \glsxtrrevert used by styles that don’t have specific font markup. If you redefine \glsabbrvdefaultfont, you will need to redefine \glsxtrdefaultrevert as applicable.

\glslongdefaultfont{〈text〉}
Long form font command used by styles that don’t have specific font markup. This just does its argument.

\glsfirstlongdefaultfont{〈text〉}
First use long form font command used by styles that don’t have specific font markup. This is defined to just use \glslongdefaultfont.

4.5.1.3.2. Parenthetical Styles

These commands apply to the parenthetical styles, such as long-short.

\glsxtrlongshortname
This command should expand to the value of the name key for styles like long-short. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}

\glsxtrlongshortdescsort
This command should expand to the sort value used by styles such as long-short-desc. The default definition is:
\expandonce\glsxtrorglong\space (\expandonce\glsxtrorgshort)
Note that this uses the original 〈long〉 and 〈short〉 values supplied to \newabbreviation.

This command is irrelevant with the “unsrt” family of commands.

\glsxtrlongshortdescname
This command should expand to the name value used by styles such as long-short-desc. The default definition is:
\glsxplongfont{\the\glslongtok}{\glscategorylabel}%
\protect\glsxtrfullsep{\the\glslabeltok}%
\protect\glsxtrparen
  {\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}}
This essentially expands to 〈long〉 (〈short〉) but includes the style font changing commands, the inner text formatting, and accessibility support.

\glsxtrshortlongname
This command should expand to the value of the name key for styles like short-long. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}

\glsxtrshortlongdescsort
This command should expand to the value of the sort key for styles like short-long-desc. The default definition is just \expandonce\glsxtrorgshort.

This command is irrelevant with the “unsrt” family of commands.

\glsxtrshortlongdescname
This command should expand to the value of the name key for styles like short-long-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
\protect\glsxtrfullsep{\the\glslabeltok}%
\protect\glsxtrparen
  \glsxplongfont{\the\glslongtok}{\glscategorylabel}

4.5.1.3.3. User Styles

These commands apply to the “user” styles, such as long-short-user.

\glsxtruserfield
This command should expand to the internal label of the field used to store the additional information that should be shown in the parenthetical material on first use. The default is useri, which corresponds to the user1 key.

\glsxtruserparensep
The separator used within the parenthetical content. This defaults to a comma followed by a space.

\glsxtruserfieldfmt{〈text〉}
Used to encapsulate the value of the field given by \glsxtruserfield within \glsxtruserparen and \GLSxtruserparen. This simply does its argument by default.

The inner formatting with both \glsxtruserparen and \GLSxtruserparen, and the case-change with the latter, will be included in the argument of \glsxtruserfieldfmt.

For example, to emphasize the user value and separate it with a semi-colon instead of a comma:

\renewcommand{\glsxtruserparensep}{; }
\renewcommand{\glsxtruserfieldfmt}[1]{\emph{#1}}

\glsabbrvuserfont{〈text〉}
Formatting for the “user” short form. This defaults to \glsabbrvdefaultfont.

\glsfirstabbrvuserfont{〈text〉}
Formatting for the “user” short form shown on first use. This defaults to \glsabbrvuserfont.

\glsxtrusersuffixinitial: \glsxtrabbrvpluralsuffix
Short plural suffix used by the “user” styles. This defaults to \glsxtrabbrvpluralsuffix.

\glslonguserfont{〈text〉}
Formatting for the “user” long form. This defaults to \glsabbrvdefaultfont.

\glsfirstlonguserfont{〈text〉}
Formatting for the “user” short form shown on first use. This defaults to \glslonguserfont.

\glsabbrvscuserfont{〈text〉}
Formatting for the “sc-user” short form. This uses \glsabbrvscfont, which in turn uses \textsc to apply a small caps style, so your document font needs to support it.

\textsc uses small capital glyphs for lowercase characters. Uppercase characters show as normal capitals. This means that you need to use lowercase characters in the abbreviation.

\glsfirstabbrvscuserfont{〈text〉}
Formatting for the “sc-user” short form shown on first use. This defaults to \glsabbrvscuserfont.

\glsxtrscuserrevert{〈text〉}
Counteracts the effect of \glsabbrvscuserfont. The default is \glsxtrscrevert. If you redefine \glsabbrvscuserfont, you will need to redefine \glsxtrscuserrevert as applicable.

\glsxtrscusersuffix
Short plural suffix used by the “sc-user” styles. This defaults to \glsxtrscsuffix.

\glsuserdescription{〈text〉}{〈entry-label〉}
The description field is set to this, where the 〈text〉 argument is the long form, for the “user” styles where the description is set by default. This is defined to ignore its second argument:
\newcommand*{\glsuserdescription}[2]{\glslonguserfont{#1}}
If you want to include the information contained in the field identified by \glsxtruserfield, the second argument provides a way of accessing that field without relying on the \glscurrententrylabel placeholder. For example:
\renewcommand*{\glsuserdescription}[2]{%
 \glslonguserfont{#1}%
 \ifglshasfield{\glsxtruserfield}{#2}%
 {, \glscurrentfieldvalue}%
 {}%
}

\glsxtruserparen{〈text〉}{〈entry-label〉}
If the field given by \glsxtruserfield has been set, this essentially does:
\glsxtrfullsep{〈entry-label〉}\glsxtrparen{〈text〉, 〈user-value〉}
otherwise it does:
\glsxtrfullsep{〈entry-label〉}\glsxtrparen{〈text〉}
It’s a little more complicated than this as the definition includes the inner formatting around the comma and the field value (〈user-value〉). The comma separator is given by \glsxtruserparensep, and the field value is encapsulated with \glsxtruserfieldfmt (with the inner formatting inside).

If you redefine this command, you will also need to redefine the following one in a similar manner.

\GLSxtruserparen{〈text〉}{〈entry-label〉}
As above but the content of the field given by \glsxtruserfield is converted to all caps. Note that simply applying an uppercase command to \glsxtruserparen can fail as it can cause the label to be converted to all caps, which is the reason why a separate command to internally perform the case-change is provided.

\glsxtrlongshortuserdescname
Expands to the value for the name key for styles like long-short-user-desc. The default definition is:
\protect\glslonguserfont{\the\glslongtok}%
\protect\glsxtruserparen
{\protect\glsabbrvuserfont{\the\glsshorttok}}{\the\glslabeltok}

\glsxtrlongshortscusername
Expands to the value for the name key for styles like long-postshort-sc-user styles where the description is automatically set. The default definition is:
\protect\glsabbrvscuserfont{\the\glsshorttok}

\glsxtrlongshortscuserdescname
Expands to the value for the name key for styles like long-postshort-sc-user-desc. The default definition is:
\protect\glslonguserfont{\the\glslongtok}%
\protect\glsxtruserparen
{\protect\glsabbrvscuserfont{\the\glsshorttok}}{\the\glslabeltok}

\glsxtrshortlonguserdescname
Expands to the value for the name key for styles like short-long-user-desc. The default definition is:
\protect\glsabbrvuserfont{\the\glsshorttok}%
\protect\glsxtruserparen
  {\protect\glslonguserfont{\the\glslongpltok}}%
  {\the\glslabeltok}

\glsxtruserlongshortformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
This command is used on the first use of \gls or with \glsxtrfull by styles like long-short-user to format the long form followed by the short form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtruserlongshortformat}[4]{%
  \glsxtrlongformat{#1}{#2}{#3}%
  \glsxtrusershortformat{#1}{#4}%
}

\Glsxtruserlongshortformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for sentence case.

\GLSxtruserlongshortformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for all caps.

\glsxtruserlongshortplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
This command is used on the first use of \glspl or with \glsxtrfullpl by styles like long-short-user to format the plural long form followed by the plural short form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtruserlongshortplformat}[4]{%
  \glsxtrlongplformat{#1}{#2}{#3}%
  \glsxtrusershortplformat{#1}{#4}%
}

\Glsxtruserlongshortplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for sentence case.

\GLSxtruserlongshortplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for all caps.

\glsxtrusershortlongformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
This command is used on the first use of \gls or with \glsxtrfull by styles like short-long-user to format the short form followed by the long form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtrusershortlongformat}[4]{%
  \glsxtrshortformat{#1}{#2}{#3}%
  \glsxtruserlongformat{#1}{#4}%
}

\Glsxtrusershortlongformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for sentence case.

\GLSxtrusershortlongformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for all caps.

\glsxtrusershortlongplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
This command is used on the first use of \glspl or with \glsxtrfullpl by styles like short-long-user to format the plural short form followed by the plural long form (with optional user information) in parentheses. The default definition is:
\newcommand*{\glsxtrusershortlongplformat}[4]{%
  \glsxtrshortplformat{#1}{#2}{#3}%
  \glsxtruserlongplformat{#1}{#4}%
}

\Glsxtrusershortlongplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for sentence case.

\GLSxtrusershortlongplformat{〈entry-label〉}{〈insert〉}{〈long-fmt-cs〉}{〈short-fmt-cs〉}
As above but for all caps.

\glsxtrusershortformat{〈entry-label〉}{〈fmt-cs〉}
Used to format the singular short form in parentheses (with \glsxtruserparen) on the first use of \gls or \Gls or with \glsxtrfull or \Glsxtrfull for styles like long-short-user. The default definition is:
\newcommand*{\glsxtrusershortformat}[2]{%
  \glsxtruserparen{\glsxtrshortformat{#1}{}{#2}}{#1}%
}

\glsxtrusershortplformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtrusershortformat but for the first use of \glspl or with \glsxtrfull for styles like long-short-user. This has a similar definition to the above but with \glsxtrshortplformat.

\GLSxtrusershortformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtrusershortformat but is used with the all caps \GLS or \GLSxtrfull. This uses \GLSxtruserparen instead of \glsxtruserparen.

\GLSxtrusershortplformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtrusershortplformat but is used with the all caps \GLSpl or \GLSxtrfullpl. This uses \GLSxtruserparen instead of \glsxtruserparen.

\glsxtrpostusershortformat{〈entry-label〉}{〈fmt-cs〉}
Used in the post-link hook to format the short form in parentheses for styles like long-postshort-user. The default definition is:
\newcommand*{\glsxtrpostusershortformat}[2]{%
  \glsxtrifallcaps
  {\GLSxtrusershortformat{#1}{#2}}%
  {\glsxtrusershortformat{#1}{#2}}%
}
Note that this doesn’t check if the plural form was used. If you require this, you will need to redefined this command to include \glsifplural:
\renewcommand*{\glsxtrpostusershortformat}[2]{%
  \glsifplural
  {%
    \glsxtrifallcaps
    {\GLSxtrusershortplformat{#1}{#2}}%
    {\glsxtrusershortplformat{#1}{#2}}%
  }%
  {%
    \glsxtrifallcaps
    {\GLSxtrusershortformat{#1}{#2}}%
    {\glsxtrusershortformat{#1}{#2}}%
  }%
}

\glsxtruserlongformat{〈entry-label〉}{〈fmt-cs〉}
Used to format the singular long form in parentheses (with \glsxtruserparen) on the first use of \gls or \Gls or with \glsxtrfull for styles like short-long-user. The default definition is:
\newcommand*{\glsxtruserlongformat}[2]{%
  \glsxtruserparen{\glsxtrlongformat{#1}{}{#2}}{#1}%
}

\GLSxtruserlongformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtruserlongformat but all caps. This uses \GLSxtruserparen instead of \glsxtruserparen.

\glsxtruserlongplformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtruserlongformat but for the first use of \glspl or with \glsxtrfull for styles like short-long-user. This has a similar definition to \glsxtruserlongformat but with \glsxtrlongplformat.

\GLSxtruserlongplformat{〈entry-label〉}{〈fmt-cs〉}
As \glsxtruserlongplformat but all caps. This uses \GLSxtruserparen instead of \glsxtruserparen.

\glsxtrpostuserlongformat{〈entry-label〉}{〈fmt-cs〉}
Used in the post-link hook to format the long form in parentheses for styles like short-postlong-user. The default definition is:
\newcommand*{\glsxtrpostuserlongformat}[2]{%
  \glsxtrifallcaps
  {\GLSxtruserlongformat{#1}{#2}}%
  {\glsxtruserlongformat{#1}{#2}}%
}
Note that, as with \glsxtrpostusershortformat, this doesn’t check if the plural form was used. If you require this, you will need to redefined this command to include \glsifplural.

4.5.1.3.4. Footnote Styles

These commands are only used by the footnote styles.

\glsxtrfootnotename
This command should expand to the value of the name key. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}

\glsxtrfootnotedescname
This command should expand to the value of the name key for styles like footnote-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
\protect\glsxtrfullsep{\the\glslabeltok}%
\protect\glsxtrparen
 {\glsxplongfont{\the\glslongtok}{\glscategorylabel}}%

\glsxtrfootnotedescsort
This command should expand to the value of the sort key for styles like footnote-desc. The default definition is simply \the\glsshorttok.

This command is irrelevant with the “unsrt” family of commands.

\glslongfootnotefont{〈text〉}
The formatting command used for the long form in the footnote styles. The default is to simply use \glslongdefaultfont.

\glsfirstlongfootnotefont{〈text〉}
The formatting command used for the first use long form in the footnote styles. The default is to simply use \glslongfootnotefont.

\glsxtrabbrvfootnote{〈entry-label〉}{〈text〉}
The command that produces the footnote. The default definition ignores the first argument:
\newcommand*{\glsxtrabbrvfootnote}[2]{\footnote{#2}}

\glsxtrfootnotelongformat{〈entry-label〉}{〈fmt-cs〉}
This command is used within the footnote to display the long form formatted with 〈fmt-cs〉 for the footnote styles on first use of \gls, \Gls and \GLS. The default definition is simply:
\newcommand*{\glsxtrfootnotelongformat}[2]{%
  \glsxtrlongformat{#1}{}{#2}%
}
For example, if the footnote should start with an uppercase letter then simply redefine this to use \Glsxtrlongformat instead:
\renewcommand*{\glsxtrfootnotelongformat}[2]{%
  \Glsxtrlongformat{#1}{}{#2}%
}

\glsxtrfootnotelongplformat{〈entry-label〉}{〈fmt-cs〉}
This command is used within the footnote to display the plural long form formatted with 〈fmt-cs〉 for the footnote styles on first use of \glspl, \Glspl and \GLSpl. The default definition is simply:
\newcommand*{\glsxtrfootnotelongplformat}[2]{%
  \glsxtrlongplformat{#1}{}{#2}%
}

\glsxtrpostfootnotelongformat{〈entry-label〉}{〈fmt-cs〉}
This command is used for the “postfootnote” styles. This is simply defined to do \glsxtrfootnotelongformat. Note that there’s no plural equivalent as the “postfootnote” styles don’t check if the plural command (\glspl etc) was used.

4.5.1.3.5. No-Long Styles

These commands are used by the “nolong” styles.

\glsxtrshortnolongname
This command should expand to the value of the name key for styles like short-nolong. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}

\glsxtrshortdescname
This command should expand to the value of the name key for styles like short-nolong-desc. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}%
\protect\glsxtrfullsep{\the\glslabeltok}%
\protect\glsxtrparen
  {\glsxplongfont{\the\glslongtok}{\glscategorylabel}}%

4.5.1.3.6. No-Short Styles

These commands are used by the “noshort” styles.

\glsxtrlongnoshortdescname
This command should expand to the value of the name key for styles like long-noshort-desc. The default definition is:
\glsxplongfont{\the\glslongtok}{\glscategorylabel}

\glsxtrlongnoshortname
This command should expand to the value of the name key for styles like long-noshort. The default definition is:
\glsxpabbrvfont{\the\glsshorttok}{\glscategorylabel}

4.5.1.3.7. Hyphen Styles

These are commands used by the “hyphen” styles. They are designed to work with the markwords and markshortwords attributes.

\glsabbrvhyphenfont{〈text〉}
The formatting command used for the short form in the hyphen styles. The default is to simply use \glsabbrvdefaultfont.

\glsfirstabbrvhyphenfont{〈text〉}
The formatting command used for the short form in the hyphen styles on first use. The default is to simply use \glsabbrvhyphenfont.

\glslonghyphenfont{〈text〉}
The formatting command used for the long form in the hyphen styles. The default is to simply use \glslongdefaultfont.

\glsfirstlonghyphenfont{〈text〉}
The formatting command used for the long form in the hyphen styles on first use. The default is to simply use \glslonghyphenfont.

\glsxtrhyphensuffixinitial: \glsxtrabbrvpluralsuffix
Short plural suffix used by the “hyphen” styles. This defaults to \glsxtrabbrvpluralsuffix.

\glsxtrlonghyphenshortsort
Expands to the sort value for the styles like long-hyphen-short-hyphen. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

\glsxtrshorthyphenlongsort
Expands to the sort value for the styles like short-hyphen-long-hyphen. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

\glsxtrlonghyphennoshortsort
Expands to the sort value for the styles like long-hyphen-noshort-noreg. This defaults to the original short value (\glsxtrorgshort). This command is irrelevant with the “unsrt” family of commands.

\glsxtrlonghyphennoshortdescsort
Expands to the sort value for the styles like long-hyphen-noshort-desc-noreg. This defaults to the original long value (\glsxtrorglong). This command is irrelevant with the “unsrt” family of commands.

\glsxtrlonghyphenshort{〈entry-label〉}{〈long〉}{〈short〉}{〈insert〉}
Formats the long and short form for the full or first use long-hyphen-short-hyphen style. This uses \glsxtrifhyphenstart to test if the 〈insert〉 starts with a hyphen. If it does, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The short form is placed in parentheses with \glsxtrparen, preceded by the \glsxtrfullsep separator. The 〈insert〉 is placed after both the long and the short form.

\GLSxtrlonghyphenshort{〈entry-label〉}{〈long〉}{〈short〉}{〈insert〉}
As above, but the 〈insert〉 is converted to all caps. The 〈short〉 and 〈long〉 arguments should be supplied as all caps. Note that it’s not possible to simply do \glsxtrlonghyphenshort with \MakeUppercase{〈insert〉} as the argument as this will interfere with the check to determine if 〈insert〉 starts with a hyphen.

\glsxtrlonghyphennoshort{〈entry-label〉}{〈long〉}{〈insert〉}
Formats the long form for the full or first use long-hyphen-noshort-desc-noreg style. This uses \glsxtrifhyphenstart to test if the 〈insert〉 starts with a hyphen. If it does, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The 〈insert〉 is placed after the long form.

\GLSxtrlonghyphennoshort{〈entry-label〉}{〈long〉}{〈insert〉}
As above but converts 〈insert〉 to all caps. The 〈long〉 argument should already be in all caps. Note that it’s not possible to simply do \glsxtrlonghyphennoshort with \MakeUppercase{〈insert〉} as the argument as this will interfere with the check to determine if 〈insert〉 starts with a hyphen.

\glsxtrlonghyphen{〈entry-label〉}{〈long〉}{〈insert〉}
Formats the long form for the full or first use long-hyphen-postshort-hyphen style. This is similar to the above, but the 〈insert〉 argument is only used to check if it starts with a hyphen. The actual 〈insert〉 is placed in the post-link hook.

\xpglsxtrposthyphenshort
This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on first use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphenshort for all caps or \glsxtrposthyphenshort otherwise. Note that this doesn’t show the plural by default. If you require the plural form, you need to redefine this to add a check with \glsifplural:
\newcommand*{\xpglsxtrposthyphenshort}{%
  \glsifplural
  {%
    \glsxtrifallcaps
    {%
      \expandafter\GLSxtrposthyphenshortpl\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
    {%
      \expandafter\glsxtrposthyphenshortpl\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
  }%
  {%
    \glsxtrifallcaps
    {%
      \expandafter\GLSxtrposthyphenshort\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
    {%
      \expandafter\glsxtrposthyphenshort\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
  }%
}

\glsxtrposthyphenshort{〈entry-label〉}{〈insert〉}
If 〈insert〉 starts with a hyphen, \glsxtrwordsep is locally set to \glsxtrwordsephyphen to replace the inter-word spaces with hyphens. The 〈insert〉 encapsulated with \glsfirstlonghyphenfont is then done (to complete the long form, which has already been displayed with \glsxtrlonghyphen in the link text). Then the short form followed by the 〈insert〉 is placed in parentheses (with \glsxtrparen preceded by \glsxtrfullsep).

\GLSxtrposthyphenshort{〈entry-label〉}{〈insert〉}
As above but all caps.

\glsxtrposthyphenshortpl{〈entry-label〉}{〈insert〉}
As \glsxtrposthyphenshort but plural.

\GLSxtrposthyphenshortpl{〈entry-label〉}{〈insert〉}
As above but all caps.

\xpglsxtrposthyphensubsequent
This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphensubsequent for all caps or \glsxtrposthyphensubsequent otherwise.

\glsxtrposthyphensubsequent{〈entry-label〉}{〈insert〉}
This command is used in the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. Only the 〈insert〉 is done.

\GLSxtrposthyphensubsequent{〈entry-label〉}{〈insert〉}
As above but all caps.

\glsxtrshorthyphenlong{〈entry-label〉}{〈short〉}{〈long〉}{〈insert〉}
Formats the short and long form for the full or first use short-hyphen-long-hyphen style. Similar to \glsxtrlonghyphenshort but the short and long forms are swapped.

\GLSxtrshorthyphenlong{〈entry-label〉}{〈short〉}{〈long〉}{〈insert〉}
As above, but the 〈insert〉 is converted to all caps. The 〈short〉 and 〈long〉 arguments should be supplied as all caps. Note that it’s not possible to simply do \glsxtrshorthyphenlong with \MakeUppercase{〈insert〉} as the argument as this will interfere with the check to determine if 〈insert〉 starts with a hyphen.

\glsxtrshorthyphen{〈short〉}{〈entry-label〉}{〈insert〉}
Formats the short form for the full or first use short-hyphen-postlong-hyphen style. The 〈insert〉 argument is only used to check if it starts with a hyphen. The actual 〈insert〉 is placed in the post-link hook.

\xpglsxtrposthyphenlong
This command is used in the post-link hook for the short-hyphen-postlong-hyphen style on first use. It expands the placeholder commands (\glslabel and \glsinsert) and uses \GLSxtrposthyphenlong for all caps or \glsxtrposthyphenlong otherwise. Note that this doesn’t show the plural by default. If you require the plural form, you need to redefine this to add a check with \glsifplural:
\newcommand*{\xpglsxtrposthyphenlong}{%
  \glsifplural
  {%
    \glsxtrifallcaps
    {%
      \expandafter\GLSxtrposthyphenlongpl\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
    {%
      \expandafter\glsxtrposthyphenlongpl\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
  }%
  {%
    \glsxtrifallcaps
    {%
      \expandafter\GLSxtrposthyphenlong\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
    {%
      \expandafter\glsxtrposthyphenlong\expandafter\glslabel
         \expandafter{\glsinsert}%
    }%
  }%
}

\glsxtrposthyphenlong{〈entry-label〉}{〈insert〉}
This command is used in the post-link hook for the short-hyphen-postlong-hyphen style on first use. Similar to \glsxtrposthyphenshort but shows the long form instead of the short form.

\GLSxtrposthyphenlong{〈entry-label〉}{〈insert〉}
As above but all caps.

\glsxtrposthyphenlongpl{〈entry-label〉}{〈insert〉}
As \glsxtrposthyphenlong but plural.

\GLSxtrposthyphenlongpl{〈entry-label〉}{〈insert〉}
As above but all caps.

4.5.1.3.8. Only Styles

These are commands used by the “only” styles, such as long-only-short-only.

\glsabbrvonlyfont{〈text〉}
The formatting command used for the short form in the only styles. The default is to simply use \glsabbrvdefaultfont.

\glsfirstabbrvonlyfont{〈text〉}
The formatting command used for the short form in the only styles on first use. The default is to simply use \glsabbrvonlyfont.

\glslongonlyfont{〈text〉}
The formatting command used for the long form in the only styles. The default is to simply use \glslongdefaultfont.

\glsfirstlongonlyfont{〈text〉}
The formatting command used for the long form in the only styles on first use. The default is to simply use \glslongonlyfont.

\glsxtronlysuffixinitial: \glsxtrabbrvpluralsuffix
Short plural suffix used by the “only” styles. This defaults to \glsxtrabbrvpluralsuffix.

\glsabbrvsconlyfont{〈text〉}
The formatting command used for the short form in the “sc-only” styles. The default is to simply use \glsabbrvscfont.

\glsfirstabbrvsconlyfont{〈text〉}
The formatting command used for the short form in the “sc-only” styles on first use. The default is to simply use \glsabbrvsconlyfont.

\glsxtrsconlyrevert{〈text〉}
Counteracts the effect of \glsabbrvsconlyfont. The default is \glsxtrscrevert. If you redefine \glsabbrvsconlyfont, you will need to redefine \glsxtrsconlyrevert as applicable.

\glsxtrsconlysuffixinitial: \glsxtrscsuffix
Short plural suffix used by the “sc-only” styles. This defaults to \glsxtrscsuffix.

\glsxtronlyname
Expands to the value for the name key for the “only” styles. The default definition is:
\protect\glsabbrvonlyfont{\the\glsshorttok}

\glsxtronlydescname
Expands to the value for the name key for the “only” styles where the description should be described, such as long-only-short-only-desc. The default definition is:
\protect\glslongfont{\the\glslongtok}

\glsxtronlydescsort
Expands to the value for the sort key for the “only” styles where the description should be described, such as long-only-short-only-desc. The default definition is \the\glslongtok.

This command is irrelevant with the “unsrt” family of commands.

\glsxtrsconlyname
Expands to the value for the name key for the “sc-only” styles. The default definition is:
\protect\glsabbrvsconlyfont{\the\glsshorttok}

\glsxtrsconlydescname
Expands to the value for the name key for the “sc-only” styles where the description should be described. The default definition is to simply use \glsxtronlydescname.

\glsxtrsconlydescsort
Expands to the value for the sort key for the “sc-only” styles where the description should be described, such as long-only-short-only-desc. The default definition is to simply use \glsxtronlydescsort.

This command is irrelevant with the “unsrt” family of commands.

4.5.1.3.9. Fonts

These are commands used by styles that use a particular font shape or size, identified by one of the following two-letter tags: “sc” (\textsc), “sm” (\textsmaller) or “em” (\emph).

For the “sc-user” styles, see §4.5.1.3.3. For the “sc-only” styles, see §4.5.1.3.8.

\glsabbrvscfont{〈text〉}
Formatting for the “sc” short form. This uses \textsc to apply a small caps style, so your document font needs to support it.

\textsc uses small capital glyphs for lowercase characters. Uppercase characters show as normal capitals. This means that you need to use lowercase characters in the abbreviation.

\glsfirstabbrvscfont{〈text〉}
Formatting for the “sc” short form shown on first use. This defaults to \glsabbrvscfont.

\glsxtrscrevert{〈text〉}
Counteracts the effect of \glsabbrvscfont. This defaults to \glstextup. If you redefine \glsabbrvscfont, you will need to redefine \glsxtrscrevert as applicable.

\glsxtrscsuffix
Short plural suffix used by the “sc” styles. This needs to counteract the smallcaps, so it’s defined as:
\protect\glstextup\glsxtrabbrvpluralsuffix

\glsabbrvsmfont{〈text〉}
Formatting for the “sm” short form. This uses \textsmaller, which is defined by the relsize package. You will need to load that package if you want to use any of the “sm” styles.

\textsmaller reduces the font size, so if you want to use it to simulate small caps, you need to use uppercase characters in the abbreviation.

\glsfirstabbrvsmfont{〈text〉}
Formatting for the “sm” short form shown on first use. This defaults to \glsabbrvsmfont.

\glsxtrsmrevert{〈text〉}
Counteracts the effect of \glsabbrvsmfont. This defaults to \textlarger. If you redefine \glsabbrvsmfont, you will need to redefine \glsxtrsmrevert as applicable.

\glsxtrsmsuffixinitial: \glsxtrabbrvpluralsuffix
Short plural suffix used by the “sm” styles. This defaults to \glsxtrabbrvpluralsuffix.

\glsabbrvemfont{〈text〉}
Formatting for the “em” short form. This uses \emph.

\glsfirstabbrvemfont{〈text〉}
Formatting for the “em” short form shown on first use. This defaults to \glsabbrvemfont.

\glsxtremrevert{〈text〉}
Counteracts the effect of \glsabbrvemfont. This defaults to \textup. If you redefine \glsabbrvemfont, you will need to redefine \glsxtremrevert as applicable.

\glsxtremsuffixinitial: \glsxtrabbrvpluralsuffix
Short plural suffix used by the “em” styles. This defaults to \glsxtrabbrvpluralsuffix.

\glslongemfont{〈text〉}
Formatting for the “em” long form. This uses \emph.

\glsfirstlongemfont{〈text〉}
Formatting for the “em” short form shown on first use. This defaults to \glslongemfont.

4.5.2. Advanced Style Commands

These commands should typically not be needed in a document, but are provided for advanced users. See §4.5.1.3 for commands to adjust the predefined abbreviation styles.

\glssetabbrvfmt{〈category〉}
Sets the current formatting commands (§4.5.3.2) associated with the abbreviation style associated with the given category. That is, the command redefinitions provided in the third argument (〈display definitions〉) of \newabbreviationstyle are applied.

If no abbreviation style has been set for the given category, the style associated with the abbreviation category is used.

This command is used:

\glsuseabbrvfont{〈style-name〉}{〈text〉}
A robust command that applies the abbreviation font for the given category to the supplied text.

\glsuselongfont{〈style-name〉}{〈text〉}
A robust command that applies the long font for the given category to the supplied text.

\GlsXtrUseAbbrStyleSetup{〈style-name〉}
This implements the given abbreviation style’s setup code. Note that this expects the placeholder macros and token registers to be set. This may be used in the 〈setup〉 of \newabbreviationstyle to inherit the setup code of a related style.

\GlsXtrUseAbbrStyleFmts{〈style-name〉}
This implements the given abbreviation style’s display definitions code. This may be used in the 〈display definitions〉 of \newabbreviationstyle to inherit the formatting of a related style.

\xpglsxtrpostabbrvfootnote
This is used by styles like postfootnote to ensure that the label and inner and outer formatting are expanded before being passed to \glsxtrpostabbrvfootnote, otherwise they may lose their definitions before the footnote text is typeset.

\glsxtrpostabbrvfootnote{〈entry-label〉}{〈fmt-code〉}
This is used by the footnote styles that defer the footnote to the post-link hook. The default definition is:
\newrobustcmd*{\glsxtrpostabbrvfootnote}[2]{%
 \glsxtrabbrvfootnote{#1}%
 {#2\glsxtrpostfootnotelongformat{#1}{\glsfirstlongfootnotefont}}%
}
The second argument will be the expansion of \glsxtrassignlinktextfmt, to allow the inner formatting to be picked up, if required.

\glsxtrifhyphenstart{〈text〉}{〈true〉}{〈false〉}
This command is used by the hyphen styles to determine if the insert material starts with a hyphen. Does 〈true〉 if 〈text〉 starts with a hyphen otherwise does 〈false〉.

\GlsXtrWarnDeprecatedAbbrStyle{〈old-name〉}{〈new-name〉}
This command is used to generate a warning (with \GlossariesExtraWarning) if a deprecated abbreviation style is used.

4.5.3. Defining New Abbreviation Styles

If none of the predefined styles suit your requirements, you can define your own custom style using:

\newabbreviationstyle{〈style-name〉}{〈setup〉}{〈display definitions〉}
The first argument is the style name. This is used internally to form control sequences, so the name shouldn’t contain any special characters.

The second argument sets up the information that’s required when an abbreviation is defined (which is why the style must be set before the abbreviations with that style are defined). The relevant commands for this argument are listed in §4.5.3.1.

The third argument defines the commands that determine how the display style (\gls) and the inline style (\glsxtrfull) are formatted. The relevant commands for this argument are listed in §4.5.3.2.

\renewabbreviationstyle{〈style-name〉}{〈setup〉}{〈display definitions〉}
Redefines an existing abbreviation style.

\letabbreviationstyle{〈new style〉}{〈existing style〉}
Defines a synonym of an existing abbreviation style.

4.5.3.1. Style Initialisation Hooks

The style initialisation hooks should be placed in the second argument (〈setup〉) of \newabbreviationstyle. They ensure that all the fields are correctly initialised when the entry is defined with the underlying \newglossaryentry command. They may also be used to set category attributes.

The following is prepended to 〈setup〉 to initialise the final hook:

\renewcommand*{\GlsXtrPostNewAbbreviation}{}

When an entry is defined with \newabbreviation, the following steps are performed:

  1. 1.Token registers are initialised to the information provided in the arguments of \newabbreviation: \glskeylisttok, \glslabeltok, \glsshorttok and \glslongtok.

  2. 2.The commands \glsxtrorgkeylist, \glsxtrorgshort and \glsxtrorglong are defined to the options, short and long values supplied to \newabbreviation. (The \glskeylisttok \glsshorttok and \glslongtok token registers may be changed before the entry is actually defined. These commands may be used to obtain the original values.)

  3. 3.\ExtraCustomAbbreviationFields is initialised to do nothing.

  4. 4.Accessibility settings are initialised, if required. These redefine \ExtraCustomAbbreviationFields to set the accessibility fields.

  5. 5.The command \glscategorylabel is defined to abbreviation.

  6. 6.The options list is parsed for the following keys: category and, if accessibility is enabled, access, textaccess, pluralaccess, firstaccess, firstpluralaccess, shortaccess, shortpluralaccess, longaccess, and longpluralaccess.

  7. 7.The abbreviation style is applied for the category given by \glscategorylabel (which may have been changed when the options were parsed in the previous step) or the fallback if no abbreviation style is associated with that category. This performs both the 〈setup〉 and 〈display definitions〉 provided when the style was defined with \newabbreviationstyle.

  8. 8.The long plural form is initialised to its default value (〈long〉\glspluralsuffix).

  9. 9.The markwords attribute, if set, is implemented for the singular long form. It will also mark the entry as having a description with formatting (using \glsexclapplyinnerfmtfield).

  10. 10.The markshortwords attribute is implemented, if set, otherwise the insertdots attribute is implemented, if set, for the singular short form.

  11. 11.The aposplural attribute is implemented, if set, otherwise the noshortplural attribute is implemented, if set. This step will set the default short plural.

  12. 12.\glsshorttok is updated to reflect any changes.

  13. 13.The \glsxtrnewabbrevpresetkeyhook hook is performed.

  14. 14.The options list is parsed for the shortplural and longplural keys. The \glskeylisttok token is updated to only include the remaining keys that haven’t yet been processed.

  15. 15.The markwords attribute, if set, is implemented for the plural long form.

  16. 16.The markshortwords attribute, if set, otherwise the insertdots attribute, if set, is implemented for the plural short form.

  17. 17.The \glsshortpltok and \glslongpltok registers are set.

  18. 18.\newabbreviationhook performed.

  19. 19.The entry is defined using \newglossaryentry with the key value list:
    type={\glsxtrabbrvtype},
    category={abbreviation},
    short={\the\glsshorttok},
    shortplural={\the\glsshortpltok},
    long={\the\glslongtok},
    longplural={\the\glslongpltok},
    name={\the\glsshorttok},
    \CustomAbbreviationFields,
    \ExtraCustomAbbreviationFields
    \the\glskeylisttok
    

  20. 20.Add the name, first, firstplural, text and plural keys to the list of inner formatting exclusions, as they include formatting commands.

  21. 21.Final hook \GlsXtrPostNewAbbreviation performed.

Note that when these hooks (except the last) are used, the entry hasn’t yet been defined. However, some information will have already been picked up from the arguments of \newabbreviation. These can be accessed in the hooks using the following (but make sure they are fully expanded):

\glscategorylabel
Expands to the entry’s category label.

\glskeylisttok
A token register that contains the options that were passed to \newabbreviation with pre-processed options removed. Use \the\glskeylisttok to expand it.

The original option list, as supplied to \newabbreviation, can be obtained with:

\glsxtrorgkeylist
(Not a token register.)

\glslabeltok
A token register that contains the entry’s label. Use \the\glslabeltok to expand it.

\glsshorttok
A token register that contains the short form (which may have been modified after being passed to \newabbreviation). Use \the\glsshorttok to expand it.

The original short form, as supplied to \newabbreviation, can be obtained with:

\glsxtrorgshort
(Not a token register.)

\glsshortpltok
A token register that contains the short plural form (which may have been obtained from the short form or modified after being passed to \newabbreviation). Use \the\glsshortpltok to expand it.

\glslongtok
A token register that contains the long form (which may have been modified after being passed to \newabbreviation). Use \the\glslongtok to expand it.

The original long form, as supplied to \newabbreviation, can be obtained with:

\glsxtrorglong
(Not a token register.)

\glslongpltok
A token register that contains the long plural form (which may have been obtained from the long form or modified after being passed to \newabbreviation). Use \the\glslongpltok to expand it.

\ExtraCustomAbbreviationFields
Expands to additional field definitions for the entry. This is used to add the accessibility fields (such as shortaccess), if enabled. The abbreviation style may append (\appto) or prepend (\preto) additional information, if required, to this hook.

If you alter this hook, make sure that you include the trailing comma after each 〈key〉={value}, including the last one.

\CustomAbbreviationFields
Expands to the default field definitions for the entry. Take care to protect any commands that shouldn’t be expanded. The comma may be omitted from the final 〈key〉={value}.

\GlsXtrPostNewAbbreviation
A hook that’s used after the entry has been defined (at the end of \newabbreviation). This can be used to set category attributes, define the post-link hook, or mark the entry as having a complex style (with \glsxtrsetcomplexstyle).

For example, the long-short abbreviation style includes the following in 〈setup〉:

\renewcommand*{\GlsXtrPostNewAbbreviation}{%
  \glsxtrsetcomplexstyle{\the\glslabeltok}{3}%
  \glshasattribute{\the\glslabeltok}{regular}%
  {%
    \glssetattribute{\the\glslabeltok}{regular}{false}%
  }%
  {}%
}
Note that in the above, the commands within the definition of \GlsXtrPostNewAbbreviation are all expanded when that hook is used. However, if this hook defines other commands or hooks that will be used later, then make sure that the definitions of those commands use the inner hook’s own placeholder commands.

Remember that the post-link hook uses \glslabel to reference the current label. Don’t use \glslabeltok as that will contain the label of the last abbreviation to be defined.

For example, the long-hyphen-postshort-hyphen style has:

\renewcommand*{\GlsXtrPostNewAbbreviation}{%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}%
  \csdef{glsxtrpostlink\glscategorylabel}{%
    \glsxtrifwasfirstuse
    {%
      \expandafter\glsxtrposthyphenshort\expandafter\glslabel
       \expandafter{\glsinsert}%
    }%
    {%
      \expandafter\glsxtrposthyphensubsequent\expandafter\glslabel
       \expandafter{\glsinsert}%
    }%
  }%
  \glshasattribute{\the\glslabeltok}{regular}%
  {%
    \glssetattribute{\the\glslabeltok}{regular}{false}%
  }%
  {}%
}
In the above, \glslabeltok and \glscategorylabel are used in the parts that will be expanded at the end of \newabbreviation, but \glslabel and \glsinsert are used in the definition of the post-link hook, which won’t be expanded until the entry is referenced in the document with a command such as \gls. (The use of \expandafter is included to assist innertextformat.)

\glsxtrsetcomplexstyle{〈entry-label〉}{〈n〉}
This command should go in the definition of \GlsXtrPostNewAbbreviation to indicate that the entry given by 〈entry-label〉 has an abbreviation style that is complex. The second argument 〈n〉 should be numeric and indicates why it doesn’t work with \glsfirst, \Glsfirst, \GLSfirst, \glsfirstplural, \Glsfirstplural or \GLSfirstplural: 1 (all caps doesn’t work), 2 (all caps and insert doesn’t work), 3 (insert doesn’t work).

\glsfirstinnerfmtabbrvfont{〈text〉}
This is a robust command that applies both \glsfirstabbrvfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

\glsfirstxpabbrvfont{〈text〉}{〈category〉}
If the markshortwords attribute is true, this does \protect\glsfirstabbrvfont{〈text〉} otherwise it does \glsfirstinnerfmtabbrvfont{〈text〉}.

This command is designed to be used within \CustomAbbreviationFields to set the first and firstplural keys, so it needs to partially expand within \newabbreviation. For example, the postfootnote includes the following lines in the definition of \CustomAbbreviationFields:

first={\glsfirstxpabbrvfont{\the\glsshorttok}{\glscategorylabel}},%
firstplural={\glsfirstxpabbrvfont{\the\glsshortpltok}{\glscategorylabel}},
This will be expanded before being passed to \newglossaryentry. If the markshortwords attribute is true, this will end up as:
first={\protect\glsfirstabbrvfont{〈short〉}},%
firstplural={\protect\glsfirstabbrvfont{〈shortpl〉}}
otherwise it will end up as:
first={\glsfirstinnerfmtabbrvfont{〈short〉}},%
firstplural={\glsfirstinnerfmtabbrvfont{〈shortpl〉}},%
where 〈short〉 and 〈shortpl〉 are, respectively, the values in the \glsshorttok and \glsshortpltok registers.

The placeholder registers and macros (such as \glsshorttok and \glscategorylabel) must be expanded before being passed to \newglossaryentry as their values are unreliable outside of \newabbreviation.

\glsinnerfmtabbrvfont{〈text〉}
This is a robust command that applies both \glsabbrvfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

\glsxpabbrvfont{〈text〉}{〈category〉}
If the markshortwords attribute is true, this does \protect\glsabbrvfont{〈text〉} otherwise it does \glsinnerfmtabbrvfont{〈text〉}. This command is designed for the name, text and plural keys within \CustomAbbreviationFields.

\glsfirstinnerfmtlongfont{〈text〉}
This is a robust command that applies both \glsfirstlongfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

\glsfirstxplongfont{〈category〉}{〈text〉}
If the markwords attribute is true, this does \protect\glsfirstlongfont{〈text〉} otherwise it does \glsfirstinnerfmtlongfont{〈text〉}. This command is designed for the first and firstplural keys within \CustomAbbreviationFields.

\glsinnerfmtlongfont{〈text〉}
This is a robust command that applies both \glslongfont and the inner formatting command \glsxtrgenentrytextfmt. This is used by the following command.

\glsxplongfont{〈category〉}{〈text〉}
If the markwords attribute is true, this does \protect\glslongfont{〈text〉} otherwise it does \glsinnerfmtlongfont{〈text〉}. This command is designed for the name, text and plural keys within \CustomAbbreviationFields (if they should include the long form in their value, such as the long-noshort-desc style).

\glsxtrAccSuppAbbrSetNoLongAttrs{〈category〉}
If accessibility support has been enabled with accsupp, this command will initialise support for the name, first, firstplural, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess, firstshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

This command is provided for abbreviation styles where the name, first and text are just the formatted abbreviation. The first field may just be the long form or may be a combination of short and long.

\glsxtrAccSuppAbbrSetNameLongAttrs{〈category〉}
If accessibility support has been enabled with accsupp, this command will initialise support for the first, firstplural, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The firstshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

This command is provided for abbreviation styles where the first and text are just the formatted abbreviation. The name field may just be the long form or may be a combination of short and long.

\glsxtrAccSuppAbbrSetFirstLongAttrs{〈category〉}
If accessibility support has been enabled with accsupp, this command will initialise support for the name, text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess and textshortaccess attributes are set to true. (Does nothing if accessibility support has not been enabled.)

This command is provided for abbreviation styles where the name and text are just the formatted abbreviation. The first field may just be the long form or may be a combination of short and long.

\glsxtrAccSuppAbbrSetTextShortAttrs{〈category〉}
If accessibility support has been enabled with accsupp, this command will initialise support for the text and plural fields for the given category (using \glsxtrprovideaccsuppcmd). The textshortaccess attribute is set to true. (Does nothing if accessibility support has not been enabled.)

This command is provided for abbreviation styles where the text is just the formatted abbreviation. The name and first fields may just be the long form or may be a combination of short and long. The name may also be short but followed by the long form in the description.

\glsxtrAccSuppAbbrSetNameShortAttrs{〈category〉}
If accessibility support has been enabled with accsupp, this command will initialise support for the name field for the given category (using \glsxtrprovideaccsuppcmd). The nameshortaccess attribute is set to true. (Does nothing if accessibility support has not been enabled.)

This command is provided for abbreviation styles where only the name is just the formatted abbreviation. The first and text fields may just be the long form or may be a combination of short and long.

4.5.3.2. Style Formatting Commands

The final 〈display definitions〉 argument of \newabbreviationstyle should contain the redefinitions of the style commands listed here that are used to format abbreviations.

Whenever an abbreviation style is activated with commands like \setabbreviationstyle, \newabbreviation or \glssetabbrvfmt, 〈display definitions〉 are implemented.

If you simply want to adjust the formatting of one of the predefined styles, you should redefine the associated commands listed in §4.5.1.3.

The following initialisation is always prepended to 〈display definitions〉 so you can omit them if the default is appropriate for your style:

\renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}%
\renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}%
\renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}%
\renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}%
\renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}%
\renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}%
\let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt
\let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt
\let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt
\let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt
\let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt
\let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt
In the event that any styles omit defining the newer \GLSxtrfullformat or \GLSxtrfullplformat, these are also initialised to defaults but ideally they should have their definitions provided.

The minimal set of commands that should have their definitions provided are the abbreviation plural suffix (\abbrvpluralsuffix) the display full forms: \glsxtrfullformat, \glsxtrfullplformat and their case-changing variants.

The inline full form commands only need to be provided if they behave differently from the display full form. The subsequent use commands only need to be provided if the default (only show the short form) isn’t suitable.

The content of 〈display definitions〉 is placed within the definition of an internal control sequence, so remember to use ## instead of # to reference command parameters.

4.5.3.2.1. Suffix and Fonts

These are the generic suffix and font commands that vary according to the abbreviation style. The style should provide the appropriate definitions. The suffix should always be provided. The font commands are only required if the style applies any font formatting to either the long or short form.

\abbrvpluralsuffixinitial: \glsxtrabbrvpluralsuffix
The plural suffix for the short form. For example, the long-short style defines this to just use \glsxtrabbrvpluralsuffix, but the smallcaps styles, such as long-short-sc define this to \glsxtrscsuffix in order to counteract the small caps font.

\glsfirstabbrvfont{〈text〉}
The font formatting command for the short form on first use. For example, the long-short-sc style has:
\renewcommand*\glsfirstabbrvfont[1]{\glsfirstabbrvscfont{##1}}

\glsabbrvfont{〈text〉}
The font formatting command for the short form. For example, the long-short-sc style has:
\renewcommand*\glsabbrvfont[1]{\glsabbrvscfont{##1}}

\glsxtrrevert{〈text〉}
This command is designed to counteract the effect of \glsabbrvfont if, for some reason, it shouldn’t be applied to part of the abbreviation. For example, you may prefer not to have digits reduced with the smaller (“sm”) styles.

\glsfirstlongfont{〈text〉}
The font formatting command for the long form on first use. For example, the long-short-sc style has:
\renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}

\glslongfont{〈text〉}
The font formatting command for the long form. For example, the long-short-sc style has:
\renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}

4.5.3.2.2. First Use Display Format

These commands always need to be provided.

\glsxtrfullformat{〈entry-label〉}{〈insert〉}
The singular display full form used on the first use of \gls.

\glsxtrfullplformat{〈entry-label〉}{〈insert〉}
The plural display full form used on the first use of \glspl.

\Glsxtrfullformat{〈entry-label〉}{〈insert〉}
The sentence case singular display full form used on the first use of \Gls.

\Glsxtrfullplformat{〈entry-label〉}{〈insert〉}
The sentence case plural display full form used on the first use of \Glspl.

\GLSxtrfullformat{〈entry-label〉}{〈insert〉}
The all caps singular display full form used on the first use of \GLS.

\GLSxtrfullplformat{〈entry-label〉}{〈insert〉}
The all caps plural display full form used on the first use of \GLSpl.

4.5.3.2.3. Subsequent Use Display Format

These commands only need to be provided if the \gls-like commands don’t simply show the short form.

\glsxtrsubsequentfmt{〈entry-label〉}{〈insert〉}
The singular form for subsequent use of \gls.

\glsxtrsubsequentplfmt{〈entry-label〉}{〈insert〉}
The plural form for subsequent use of \glspl.

\Glsxtrsubsequentfmt{〈entry-label〉}{〈insert〉}
The sentence case singular form for subsequent use of \Gls.

\Glsxtrsubsequentplfmt{〈entry-label〉}{〈insert〉}
The sentence case plural form for subsequent use of \Glspl.

\GLSxtrsubsequentfmt{〈entry-label〉}{〈insert〉}
The all caps singular form for subsequent use of \GLS.

\GLSxtrsubsequentplfmt{〈entry-label〉}{〈insert〉}
The all caps plural form for subsequent use of \GLSpl.

The defaults all show the short form and insert encapsulated with the inner formatting \glsxtrgenentrytextfmt and \glsabbrvfont. The purpose of the inner f