- •The glossaries package: a guide for beginners
texdoc glossariesbegin
- •glossaries-extra and bib2gls: an introductory guide
texdoc bib2gls-begin
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.
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.
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:
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.
Abbreviations are defined with
Another noticeable change with glossaries-extra is that by default
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
If you use makeglossaries, you’ll get the warning message:
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:
The following documents and web pages are also available:
After glossaries-extra has been loaded, some of the glossaries-extra package options may be changed with:
To change the base glossaries package’s options (that may be changed after the package has loaded), continue to use:
The title of the new glossary is given by
If the abbreviations option is used and the acronym option provided by the glossaries package hasn’t been used, then
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.
This option also sets the regular attribute to
If glossaries-extra-bib2gls is also loaded then this option will additionally provide
This option also sets the regular attribute to
If glossaries-extra-bib2gls is also loaded then this option will additionally provide
As with the base glossaries package, this option redefines
The base package index option also defines:
This option also sets the regular attribute to
The postpunc option (see below) redefines
If you are using bib2gls, you may prefer to use the post-description-dot resource option.
The postpunc value may either be the required punctuation or one of the following keywords:
Some options listed in other sections, such as the stylemods and record options, also load supplementary packages.
If you want to define styles that can interface with the accessibility support provided by glossaries-accsupp use the
Note that
If you want to write a custom command that needs to generate a warning or error for an undefined reference, you can use:
Commands like
With just the base glossaries package,
If all your glossaries occur at the end of the document, consider using docdef=restricted instead.
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 = 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
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).
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
Note that the short and long forms (
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:
Note that this special format
This function is implemented by code added to the end document hook that determines whether or not to use the command
With the base glossaries package, the see key was provided as a shortcut for
The glossaries-extra package modifies the action of the see key so that it also saves the value and will only perform the automated
For example, if an entry is defined as
For example, if an entry is defined as
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
With the recording setting on (record=only, record=nameref or record=hybrid), any of the commands that would typically index the entry (such as
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.
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):
See §11.5.6 for further details of this option.
Note that
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.
This setting must be used with
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):
Alternatively, this setting can be implemented with:
This option should only be used once. If used again no new file will be created. If the 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 .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.
Remember that within floats it’s the
This option works by incrementing wrglossary with
This uses
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:
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
The base glossaries package provides commands, such as
The glossaries user manual warns against using commands such as
The glossaries-extra package provides a starred form:
Additionally, the symbols package option provides
In addition to the glossary entry keys provided by the base glossaries package (summarised in §II) the glossaries-extra package provides:
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:
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
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.
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
The base glossaries package provides
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
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
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.)
If an entry
Note that with record=only, the location list for aliased entries is controlled with bib2gls’s settings.
The value of the alias field can be accessed with
See §5.11 for accessing field values and §5.15 for testing field values.
Some of these commands are subtly different from each other. For example,
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.
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
This command is written to the glstex file by bib2gls to set fields that don’t have a corresponding key.
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.
Abbreviations are defined using:
This command internally uses
The following example document sets up three different abbreviation styles: long-short-sc for the abbreviation category, long-only-short-only for the custom
If the category doesn’t have an associated style, the style for the abbreviation category will be used, as with the
There are two categories that have an abbreviation style set by default: abbreviation and acronym. These are initialised as follows:
To make it easier to migrate a file containing entries defined with
If you have defined any acronym styles with
Terms defined with
The short and long keys (so don’t use those keys in ), 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
The longplural key defaults to
The short plural suffix
Some styles, such as the long-short-sc style, redefine
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 , but other styles will set the description to the long form.
Abbreviations can be assigned to a particular glossary using the type key in . The default for
The default type for
The following are general purpose hooks used within
Example document using makeindex:
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
Since
In general it’s best not to use
If you never want the short form with
Example:
As with the base glossaries package, the unformatted short and long forms can be obtained with
Each abbreviation style has a display full form, which is the format produced with the first use of
Example 5 demonstrates the difference between the first use of
In Example 5, the first use of
The following commands are included in the set of
To restore the original behaviour, redefine this command as follows:
If you are using the glossaries-prefix package (which can be loaded via the prefix package option), then there are commands similar to
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
Initial tagging allows you to highlight the initials that form the abbreviation when the long form is shown in the glossary.
This command (robustly) defines tagging attribute set to “true”. For those cases it will use:
The control sequence
The first argument of
For example, the following uses initial tagging for both the acronym and abbreviation categories. The custom command
The style for a particular category is set using:
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
There are two types of abbreviation styles: those that treat the abbreviation as a regular entry (so that
The regular entry abbreviation styles set the regular attribute to
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
In both cases, the first use of
The short and long fields are set as appropriate and may be accessed through commands like
The sample file sample-abbr-styles.pdf demonstrates all predefined styles described here.
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):
The naming scheme for abbreviation styles is as follows:
This is for the parenthetical styles. The
If
If the
The modifier
The modifier
If the
Examples:
Some styles set the regular attribute. In some cases, there’s a version of the style that doesn’t set this attribute. For example, long-em-noshort-em sets the regular attribute. The long-em-noshort-em-noreg style is a minor variation of that style that sets the attribute to
There are a few “noshort” styles, such as long-hyphen-noshort-noreg, where there isn’t a corresponding regular version. This is because the style won’t work properly with the regular attribute set, but the naming scheme is maintained for consistency with the other “noshort” styles.
The display style uses
If
Examples:
Like description key must be provided when defining abbreviations with this style.
Examples:
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).
The following abbreviation styles set the regular attribute to
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.
The long form is formatted with
The short form is formatted with
The name is set to the short form (
The name is set to the short form followed by the long form in parentheses (
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.
The long form is formatted with
The short form is formatted with
The name is set to the long form (
The following abbreviation styles will set the regular attribute to
The non-regular styles are too complicated to use
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.
The long form is formatted with
The short form is formatted with
The name is set to the short form (
The name and sort are set to the long form followed by the short form in parentheses (
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
These styles use the 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.
If you need to use
If you need to use
If you need to use
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.
The first use and subsequent use of the
The long form is formatted with
The short form is formatted with
The name is set to the short form (
The name is set to the short form followed by the long form in parentheses (
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
These styles use the commands
The description is obtained from
If you need to use
The description is obtained from
If you need to use
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.
Note that
Note that the inline full form (
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
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
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
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.
These styles show the short form (
The inline full form uses the same parenthetical style as short-long (
The long form is formatted with
The short form is formatted with
The name is set to the short form (
This style automatically sets the nohyperfirst attribute to
The name is set to the short form followed by the long form in parentheses (
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
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
These commands are used by the predefined abbreviation styles. These are considered user commands, which you can redefine to customize the style.
These commands apply to all styles.
These commands apply to the parenthetical styles, such as long-short.
These commands apply to the “user” styles, such as long-short-user.
The inner formatting with both
For example, to emphasize the user value and separate it with a semi-colon instead of a comma:
If you redefine this command, you will also need to redefine the following one in a similar manner.
These commands are only used by the footnote styles.
These commands are used by the “nolong” styles.
These commands are used by the “noshort” styles.
These are commands used by the “hyphen” styles. They are designed to work with the markwords and markshortwords attributes.
These are commands used by the “only” styles, such as long-only-short-only.
These are commands used by styles that use a particular font shape or size, identified by one of the following two-letter tags: “sc” (
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.
If no abbreviation style has been set for the given category, the style associated with the abbreviation category is used.
This command is used:
If none of the predefined styles suit your requirements, you can define your own custom style using:
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 (
The style initialisation hooks should be placed in the second argument (
The following is prepended to
When an entry is defined with
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
The original option list, as supplied to
The original short form, as supplied to
The original long form, as supplied to
For example, the long-short abbreviation style includes the following in :
For example, the long-hyphen-postshort-hyphen style has:
This command is designed to be used within
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.
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.
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.
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.
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.
The final
Whenever an abbreviation style is activated with commands like
The following initialisation is always prepended to
The minimal set of commands that should have their definitions provided are the abbreviation plural suffix (
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.
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.
These commands always need to be provided.
These commands only need to be provided if the
The defaults all show the short form and insert encapsulated with the inner formatting
The markshortwords attribute complicates matters as it inserts
If a custom style doesn’t need to support innertextformat or
These commands only need to be provided if the inline full form is different from the display full form.
These are commands that can be used in the definitions of the above to ensure that the appropriate accessibility fields and inner formatting is supported.
Accessibility support is implemented with
This is then encapsulated (including or excluding the
Accessibility support is implemented with
This is then encapsulated (including or excluding the
The syntax is the same as for
It’s possible to revert
If you really need to use the original base glossaries package’s acronym mechanism, it’s better to stick with just glossaries and not use glossaries-extra. However, it may be that you need to use a glossaries-extra feature, such as
The display style for each glossary identified in the acronym lists is switched to the default acronym display style.
Entries can be referenced using the
The
The
The
With glossaries-extra, it’s possible to define an additional modifier for your own use with:
It’s also possible to redefine the star and plus modifiers:
The
The
Depending on the settings (the wrgloss option or the wrgloss attribute), the indexing may come before the text:
The base glossaries package provides a way to adjust the formatting of the link text for the
The heading commands (described in §5.3) are designed to prevent indexing or changes to the first use flag if they appear in the table of contents (or list of figures, etc) or if they appear in the page header.
Although the base glossaries package warns against nested link text, the glossaries-extra package provides
If you need to simply access a field value without any formatting, see §5.11. (See §3.5 to set field values.) If you want to encapsulate the value with the appropriate accessibility tag, see §9.2.
Commands such as
The
Some options are provided by the base glossaries package, but there are some additional options provided by glossaries-extra, which are listed in §5.1.2. Below, indicates the options that are passed in the optional argument of the calling command (such as
The order that the options are applied is:
You can (locally) set your preferred default options for the
If you want to add to the existing options, you can use one of the following commands (both may be scoped).
For example, to prevent indexing in the front matter and back matter but not in the main matter:
The default location encap is glsnumberformat but can be changed (locally) with:
The default options for
Note that
This hook will also implement the local repeat unset feature of
If you prefer to have the default to place the indexing after the link text, you can redefine this hook as follows:
Within any of the hooks that are used by the
Within any of the hooks that are used by
Options for the
Some formatting commands require direct access to the actual text or else the content has to be placed inside a box (which inhibits line-breaking). These commands won’t work with textformat as the text is usually too deeply embedded. This option provides a way of using those problematic commands, however there’s still no guarantee that they will work (for example, in the case of custom styles or where the field value itself contains commands).
Note that this is different from using
For example:
Note the effect of using a global reset but a local unset in the example below. Both options are performed, but the unset locally overrides the global reset.
If you are using bib2gls, you may want to consider instead using format=glsignore to create an ignored location that ensures the entry is selected without adding a location to the location list. (Don’t use this method for the other indexing methods as you’ll end up with invisible locations with spurious commas in your location lists.)
This option corresponds to a conditional:
For example, to index a location in a supplementary document:
If you want a hyperlink to an external file, you can use:
For example, if both sample-suppl-hyp.pdf and sample-suppl-main-hyp.pdf are in the same directory, then viewing sample-suppl-main-hyp.pdf in Evince will take you to the correct location in the linked document (when you click on the S.2 external link), but Okular will take you to the top of the first page of the linked document.
This method can only be used where there is one external source for the designated category (identified by the externallocation attribute). For multiple sources, you need to use bib2gls v1.7+, which is the better method in general as it can automatically fetch the relevant locations from the aux files of the designated external documents without the need to explicitly use
Unless you are using record=nameref, you must ensure that it’s possible to form from for some (where is given by thevalue or the value of the location counter). This restriction is due to the limitations imposed by makeindex and xindy.
Case-changing commands, such as
It’s not possible to upload all these new versions at the same time, so it will be necessary to stagger their deployment. The new case-changing features will work best when all these new versions are installed. In the interim, a reduced feature set will be used.
Both the base glossaries package and the glossaries-extra package provide sentence case commands, which convert the first letter to uppercase. These are provided for situations where an entry is referenced at the start of a sentence. Sentence-casing is also implemented when the attributes glossname or glossdesc are set to
The case conversion is performed using:
The LaTeX3 kernel now provides a suitable expandable command that works with UTF-8, and mfirstuc v2.08+ provides
Internally,
For example, with mfirstuc v2.07 you would need to do something like:
Whilst you can redefine
Both
As from glossaries v4.50,
With glossary entry references, there are commands that take a label as the argument, which shouldn’t have any case-changed applied, but also shouldn’t be skipped. For example:
As from glossaries v4.50+, commands like
Finally, there are mappings. These are commands that should be substituted with another command, which is expected to perform the case-change. For example:
As from glossaries v4.50+, commands like
In order to integrate the full set of features provided by mfirstuc v2.08+, you will need both glossaries v4.50+ and glossaries-extra v1.49+.
The glossaries user manual cautions against using commands like
The glossaries-extra package tries to resolve the header problem by modifying
If you use
To get around all these problems, the glossaries user manual recommends using the expandable non-hyperlink commands, such as
For example:
If the case conversion is applied by, then the case-change can be prevented by encapsulating the label with
This section is irrelevant if you use
The commands listed here are provided for use within captions or section headings. They are designed to overcome some of the problems illustrated in the previous section. Note that they only have a single argument, the entry label. There are no optional arguments. Below, “header” refers to page header text added with
Each command
There is currently only support for the name, text, plural, first, firstplural, short, shortplural, long, and longplural fields, and also limited support for the full form of abbreviations. For other fields, you will need to follow the recommendation of the glossaries manual (as discussed above in §5.3.1).
The previous example can be rewritten as follows:
The options noindex and hyper=false are hard-coded when the commands listed below, such as
The full form is slightly different as it doesn’t correspond to an individual field but instead is formed from a combination of the short and long fields (the order depending on the abbreviation style). Since it’s too complicated to simply expand to the appropriate style, a simple expandable command is provided for the PDF bookmarks:
The commands described here are irrelevant if you use
If you need to know whether or not some code is inside a header or contents list, you can use:
If you need to know whether or not some code is inside a contents list (but not the header), you can use:
If you need to know whether or not some code is in the PDF bookmarks or heading, you can use:
If this command occurs within the toc file, it will do its argument but if
If gettitlestring has been loaded (used by nameref to provide
The commands described in §5.3.2, such as
Unfortunately the case-changing commands can’t expand and therefore aren’t appropriate for the bookmarks (which need to be a PDF string). This means that the sentence case and all caps commands also use the unmodified field value for the bookmark. For example,
The
All the similar commands listed below are defined in an analogous way, except for the glossaries-prefix commands, where only the sentence case title version is provided. This is because commands like
The definitions of
The glossaries-extra definitions of
Complications arise when you use the
For example, things can go wrong if the following is used with the glossaries package:
The main problems are:
With mfirstuc v2.08+ and glossaries v1.49+, this issue should now be resolved for sentence case where
In the above, the first use of the
Now let’s suppose the
In this case, the first use of the
Now let’s suppose the
Now the first use of the
This is all aggravated when using just the base glossaries package when the acronym style is set with
Another oddity occurs if you reset the
Even without this, the short form has nested formatting commands, which amount to
For these reasons, with just the base glossaries package, it’s better to use the simple expandable commands like
The glossaries-extra package provides two other ways of dealing with these problems:
This command partially expands, so it will expand to just the field value if it occurs in the PDF bookmarks. Otherwise it will behave much like the commands described in §5.3.2, but with additional outer scoping and the post-link hook is suppressed.
Rather than testing the existence of the given field, this tests the existence of
The post-link hook is suppressed by the initialisation command:
Note that, as with commands like
At the start of each glossary, the default options are locally changed with:
There are also sentence case and all caps versions.
There are some shortcut commands for the most common fields:
For example:
The way that this works is as follows:
Note that in the above example, with older versions of mfirstuc and glossaries, it’s not possible to use
The
The link text, which includes the final optional (if supplied). The actual content depends on the command used (for example,
The abbreviation commands (
The commands
The 5.5.4.
The outer formatting command, described in §5.5.1. This doesn’t include the post-link hook. If you want to include the post-link hook then you need to encapsulate the entire
Some sensitive formatting commands need to have the actual text in their argument (or else have the argument in an unbreakable box). The inner format, which is described in §5.5.3. In general, unless you require one of these sensitive commands, avoid setting the inner text format as it requires support from the underlying style (either the entry format style or the abbreviation style), which may not be available.
The following example document is ugly, but demonstrates the outer formatting (typewriter font), middle formatting (bold for regular entries and italic for abbreviations), inner formatting (highlighted in yellow), hyperlinks (red), and the category post-link hook (the description follows in parentheses for general entries on first use).
If you have a formatting command that needs to have its argument fully-expanded before being applied, you may be able to use:
The inner formatting can be unpredictable. For example, abbreviation styles are complicated and so the inner formatting command is included in some of the field values, such as the name, which is why the abbreviation name is highlighted in the glossary. In the above example, the inner formatting is included in the category post-link hook, but only because
Similarly, the short-postfootnote style is applied to the acronym category, and sets the post-link hook for that category (which looks head for punctuation). The inner formatting is applied to the footnote text but not the marker.
The post-link hook for the general category is now much simpler and doesn’t include support for the inner formatting, so it’s not highlighted.
None of the post-link content is incorporated into the hyperlink, outer or middle formatting.
In general, it’s better to adjust the abbreviation’s style commands (see §4.5.1.3) rather than use the middle or inner formatting if abbreviations need to be displayed in a particular font.
By default, the outer formatting is produced with
For example:
After the textformat attribute is set, the
Note that the only time that the post-link hook is included in the formatting is when the entire
The middle formatting comes between the outer formatting (§5.5.1 above) and the inner formatting (§5.5.3 below).
The middle formatting is implemented by the entry format style (§5.5.5) for the
If you provide your own custom entry format style you will need to add support for the middle formatting, if required.
The following document has a regular entry (sample), a regular abbreviation (radar, which uses short-nolong the default acronym style), and a non-regular abbreviation (HTML, which uses long-short the default abbreviation style):
Note that this doesn’t use
If you want to format the link text, the best method is to either use the outer formatting or encapsulate the entire
For example, if the sample document from §5.5.1 is adjusted to include the soul package and the following line is added to the document:
The inner formatting is designed to provide a workaround, but it must be implemented deep within the entry style formatting. This means that if you provide your own custom style, you will need to add the appropriate commands if you want that style to support inner formatting. You may also need to switch to using
With the default entry style, the above example can be changed to:
The following uses
Below are the commands used to support inner formatting.
Sometimes it may be necessary to include
The
The
For example, the link text for
The post-link hook is a convenient way of automatically appending content after each instant of the
Within the post-link hook, you can use the placeholder commands, such as
The post-link hook is implemented with
The main post-link hook is defined as:
If you want your own custom code to determine whether or not to check for a period (instead of using known category attributes), you can redefine:
The test to determine whether or not full stop is determined by:
It may be useful to test for other punctuation characters. For example, styles such as short-postfootnote will move the footnote after certain punctuation characters.
A convenient way of moving code after the punctuation character is to use:
The earlier example can be adapted to put the asterisk after following punctuation:
You can add additional punctuation marks with:
For example:
You can set the list with:
If you want code in the post-link hook that’s not dependent on the category, consider prepending it to
For convenience, some commands are provided that may be of use in the category post-link hook:
For example:
The following commands are also provided for use in the post-link hook:
It’s possible you may also want to reference the inserted material. For the
If you only want to save the insert for the
For example, the post-link hook might contain:
The
The glossaries-extra package redefines
Then there’s a check (with
Regular entries are formatted according to:
The generic regular entry format
Abbreviations that aren’t considered regular, are formatted according to:
If you want to define your own custom entry format, you will need to consider whether or not your format should support regular and non-regular abbreviation styles. Further detail can be found in the documented code:
The
The hyperfirst=false package option and the category attributes nohyper, nohyperfirst and nohypernext can also be used to automatically switch off the hyperlink. See also the hyperoutside option that determines whether the hyperlink should be inside or outside of the outer formatting.
The hyperlink target is usually created by
The target for an entry with the label
The target can also be changed to a link to an external file with the targeturl category attribute.
It’s possible that you may want to prefix labels to ensure uniqueness. For example, this manual references both the
If you also want the plural and sentence case versions you can use
For commands that require the link text to be specified, you can use:
If you are using bib2gls, it can pick up the custom commands that are defined using the above, so it can detect dependencies when it parses fields such as description. If you provide your own custom command with just
Another possibility when using bib2gls is to set up known label prefixes, see §11.5.7 for further details.
If you use bib2gls with record counting, there are commands to
Defining commands in this manner (rather than simply using
Indexing is normally performed implicitly by the
If you want all defined entries to appear in the glossary, regardless of whether or not they have been used in the document, then you can use
The glossaries-extra package provides a similar command:
If you want to index a specific subset of entries, rather than all entries for a given glossary, you can use:
Explicit ranges can be formed by including
Alternatively, you can use format=encap in , but remember that this will need to be the same in both
The mandatory argument of
The optional argument
For example, with:
Here’s another example:
In the context of glossaries and glossaries-extra, indexing refers to the mechanism used to ensure that an entry is included in its associated glossary. (If you also want to use
Since both makeindex and xindy are general purpose indexing applications they require an associated location (or a cross-reference) since indexes are typically used to lookup the locations in the document where the term occurs. Although glossaries are similar to indexes they can simply be used to provide brief summaries of each term without any locations. The way that makeindex and xindy work means that valid locations (that is, locations that conform to makeindex/xindy syntax) must be supplied even if no location list is required. If an invalid location is used, an error will occur during the makeindex/xindy step in the build process, even if the location will eventually be ignored when typesetting the glossary.
All location lists can be suppressed with the nonumberlist option (which simply discards the location list for each entry), but there are occasions where only some locations need to be suppressed. The main way of hiding a location is to encapsulate the location with a command that does nothing. The
The “noidx” method similarly writes indexing information, but in this case the information is written to the aux file. Again, empty locations can cause spurious commas in the location lists.
The only method that recognises
The location corresponds to a counter. The default is the page counter, but may be changed with the counter package option, the optional argument of
Note that bib2gls v3.0+ converts an empty location (which can occur when the location counter is 0 and should be formatted as a Roman numeral) to an ignored location. For example, if you use counter=part but have
The location counter must expand to syntax that’s recognised by the indexing application. This is very restrictive with makeindex, which only recognises Western Arabic (
There’s no restriction on the location syntax with bib2gls. The only limitation is that if bib2gls can’t determine an associated numeric value according to its location parser, it won’t form ranges. This means that with bib2gls, you can set arbitrary text as the location (that’s not related to a counter) with thevalue. You can also use thevalue with makeindex and xindy, but only if the value matches the required location syntax.
Both makeindex and xindy order the locations in the location lists. For example:
With makeindex, the location list is grouped into the different number formats (
With bib2gls, the location list is always in order of indexing. The above example document can be converted to use bib2gls as follows:
Another important difference between bib2gls and the other indexing methods is the treatment of cross-references identified by the cross-reference keys see, seealso and alias. With bib2gls, the cross-referencing information is picked up when bib2gls parses the bib file and is used to establish dependencies, which ensures that when entries with cross-references are selected, their cross-referenced entries will also be selected.
With the other methods, cross-references are added to an entry’s location list by indexing the entry with a special format. The see, seealso and alias keys automatically trigger this indexing unless autoseeindex=false. See §5.9 for further details.
Every time an entry is indexed, the following hook is also used:
The indexing code is encapsulated with:
The base glossaries package always performs the indexing before the link text for the
Every time an entry is indexed, an internal field associated with the entry’s label is globally updated to keep a count of the number of times the entry has been indexed. The value can be accessed with:
Note that the index count is a running total. This is not the same as the record count saved by bib2gls’s --record-count switch, which represents the total number of records for the given entry from the previous LaTeX run.
The base glossaries package defines:
The modified definition uses:
The base glossaries package only provides the see key, which automatically indexes the cross-reference using
The glossaries-extra package saves the value of the see key and additionally provides the seealso and alias keys that perform similar functions. The values of the see, seealso and alias keys can all be accessed at a later point in the document.
If an entry with a cross-reference has been included in the glossary, there’s no guarantee that the cross-referenced entry will also be included. It won’t be included if it hasn’t been indexed anywhere in the document. You can use the indexcrossrefs package option to search for cross-references that require indexing at the end of the document, but note that this can be time-consuming if you have a large number of entries.
Example (see and seealso keys):
The cross-referenced entries (pumpkin, cucumber and melon) will only appear in the glossary if they are also indexed in the document. This can be implemented automatically with indexcrossrefs.
The seealso key in the
The see key may optionally start with [ ] to replace the default
Example (alias key):
If you want the
If you have a file containing a large number of entry definitions shared across multiple documents, then the use of the see, seealso or alias key can cause unwanted entries to appear in the document. This can be demonstrated as follows. Suppose the file myentries.tex contains:
There are a number of methods to address some of these problems. The first method has the cross-referencing keys in the tex file (as above), but disables the auto-indexing:
However, this still doesn’t solve the problem that the zucchini entry isn’t included in the glossary. It needs to be indexed, but indexing has been suppressed. Firstly, because the automatic indexing triggered by the alias key has been suppressed with autoseeindex=false, and, secondly, because the presence of the alias key automatically suppresses indexing with the
The second method is to not use those keys in the entry definitions and use
Since cucumber isn’t required in the document, I haven’t included it in the cross-reference list for gourd. This method is flexible as it allows the cross-referencing to vary between documents. For example, another document may instead have:
The third method is to switch to bib2gls. The file myentries.tex can be converted to myentries.bib using:
Note that the above doesn’t include the gourd entry (which cross-references entries that have been indexed). The selection criteria can be changed to also include unrecorded entries that cross-reference selected entries. There are two options to choose from: selection={recorded and deps and see}, which will apply to all cross-reference fields (see, seealso and alias, or selection={recorded and deps and see not also}, which doesn’t consider the seealso field.
Changing the resource options in the above example to:
If you have switched off the indexing of the cross-reference fields (with autoseeindex=false) or want to suppress the location lists, then you can adjust the glossary style or hooks to include the cross-references since they won’t be shown otherwise.
The actual indexing of the seealso key is performed with:
With makeindex,
By default, this hook just sets noindex=true. If you would like to add locations to the aliased location list then you can redefine it to use:
This can be time consuming if there are a large number of entries defined. If this is the case, you may want to consider switching to bib2gls and use either selection={recorded and deps and see} or selection={recorded and deps and see not also}.
There should be no need to use
Each entry has an associated first use flag (a conditional or boolean variable), which determines whether or not the entry has been marked as “used”. Unsetting this flag means that the entry is marked as used. Resetting the flag means that the entry is marked as unused.
The
The purpose of this is to allow for additional information that needs to be shown when a term first appears in a document. For example, an abbreviation may need to have its full form shown on the instance. However, there are some cases where that additional information may need to be shown again or where the literal first instance of the term may need to be in its terse form. For example, if the term is used in the front matter.
If any
The base glossaries package provides commands to explicitly unset or reset the first use flag either locally (confined to the current scope) or globally. These commands are:
The glossaries-extra package adds hooks to the above commands. These do nothing by default, but are modified by
The base package also provides commands to unset or reset all entries or all entries within particular glossaries:
With glossaries-extra you can unset a specific subset of entries.
You can test if an entry has been marked as used with
For example, in the following document the “html” entry is first used in the abstract, which shows both the long and the short form, but it would be helpful for the full form to be reshown in the main section about web pages. This is achieved by resetting the first use flag.
The glossaries-extra package provides the options preunset and prereset, which can be used to unset or reset the first use flag before the link text. This means that in the above example, the line:
As mentioned above, the first use flag is unset before the post-link hook, so
For example,
The preunset and prereset options will additionally redefine
If you want to check if the calling command was both the first use and it was a
The unset function performed by the
If you are using the undefaction=warn option (which is automatically implemented by the record option), the first use flag is undefined and so is neither true nor false, in which case
Sometimes commands like
One example of this is using
The buffer can be locally cleared with:
In order to restore the normal behaviour of
Before you stop the unset buffering, you can iterate over the current buffer.
It’s possible to locally unset entries before use (analogous to preunset=local) if the entry has already been encountered in the buffer. This will still be problematic for situations where changing a conditional causes a problem, but may be useful in some situations. This feature is enabled with:
This feature can be switched off with:
The way this feature works is as follows (while buffering is active):
For example, consider the following beamer document:
I could put
The frame can be placed inside a buffering zone:
The “repeat local” function can be used so that repeated references for the same entry can be locally unset before use. This can be enabled with
The following example uses
Other alternatives include using
The change in the first use flag isn’t the only content within the
Buffering can also be used to simply gather the labels that have been referenced with a
See §3.5 for setting fields after an entry has been defined, §5.13 for fields that contain comma-separated lists or whose values may be contained within comma-separated lists, §5.9.2 for cross-referencing fields (see, seealso and alias), and §5.15 for testing field values. See also the base glossaries package’s commands, such as
This command has a recursive definition. If the entry given by
Then, regardless of whether or not the entry has a parent, it will do
These commands assume that a given entry has a special purpose field that’s used to store information on how to format text.
This uses tracklang’s interface to determine the language label that corresponds to the language tag. If the language label can be determined, the will be encapsulated with
If
If tracklang can’t determine the corresponding language label to use with
For example:
An entry may have a particular formatting style associated with it (rather than a more general category-wide format). This needs to be provided by a text-block command that takes a single argument. The name (without the leading backslash) should be stored in the field identified by:
If you don’t want the complexity of
There are also sentence case versions of the above commands:
If you are writing
These commands are for field values that are comma-separated lists (for example, the field has been constructed with
With glossaries-extra, the first item in
With glossaries-extra, if there are at least three elements in the list, the separator between the final two elements will be given by:
It’s possible to prematurely break the loop at the end of the current iteration with:
The following demonstrates the difference between
This command internally uses
Comma-separated list fields are covered in §5.13. The commands in this section are for fields that store etoolbox internal lists. Elements can be appended to these fields using commands
This command first assigns
The unstarred version adds implicit grouping to make nesting easier. The starred version doesn’t (to make assignments easier).
There are three basic ways of counting entry references:
This method is extended by glossaries-extra and is described in §6.1. This method relies on the document only using the
Entry counting is provided by the base glossaries package and is enabled with
Since entry counting relies on the first use flag, it doesn’t take the
The glossaries-extra package modifies
Prior to v1.49, the associated counter was reset back to 0 when the first use flag is reset. This behaviour is now only implemented if the following conditional is true:
With just the base glossaries package, the associated entry counting commands, such as
In order to activate entry counting with glossaries-extra, you not only need to use
The commands like
As with the
If the entry count at the end of the previous run doesn’t exceed the trigger value, the corresponding formatting command is used instead. For example,
The glossaries-extra package provides some additional commands:
The test to determine whether or not an entry trips the trigger value is performed by:
For example, in the following document the trigger value is set to 1. The CSS entry is only used once (which doesn’t exceed the trigger). The HTML entry is used twice (which does exceed the trigger). The sample entry is only used once, but entry counting hasn’t been enabled on its category (the default general).
The sample entry is only used once, but it has the default general category, which doesn’t have the entrycount attribute set.
Note that if the build process only had one LaTeX call before running makeglossaries, the HTML entry would also not appear in the glossary. This is because on the first LaTeX run, the total from the previous run is 0 (because there’s no information in the aux file).
The glossaries-extra package also provides the ability to count per sectional unit instead:
The unit entry counting provides separate totals for each section unit. As above, this uses the entrycount attribute to provide the trigger value but also requires the unitcount attribute, which should be set to the name of the appropriate counter, such as section or chapter.
As before, there is a command provided to enable the feature and set the corresponding attributes at the same time:
The counter value is used as part of a label, which means that
The commands for accessing the totals,
For example:
The HTML entry is used a total of three times, but the expansion and indexing suppression trigger is tripped in both sections because the per-unit total (1 for the first section and 2 for the second chapter) is less than or equal to the trigger value.
The sample entry has only been used once, but it doesn’t trip the indexing suppression because it’s in the general category, which hasn’t been listed in
The per-unit entry counting can be used for other purposes. In the following example document, the trigger value is set to zero, which means the index suppression won’t be triggered, but the unit entry count is used to automatically suppress the hyperlink for commands like
The earlier warning about using the page counter still applies. If the first instance of
As from version 1.26, an alternative method of entry counting is to count the number of times the
To enable link counting use the preamble-only command:
When enabled, the
You can access the internal count register using:
It’s also possible to access the display value (
You can test if the counter has been defined using:
The counter name can be obtained using
This is useful if you just want to change the display for specific entries but isn’t convenient if you want to change the display for all entries. Instead, it’s simpler to redefine
Here’s an example document that uses link counting to disable the hyperlink after the first reference. This redefines
The abbreviation category doesn’t have the linkcount attribute set (since it’s not listed in the argument of
To reset the counter every section use the optional argument to set the parent counter:
Nested entries (where the entry definition references other entries) are discussed in §5.4. This chapter deals with occasions where a term or phrase may consist of multiple sub-terms that are independently defined. (Examples in §7.1.5 and §7.1.6 provide workarounds for nested entries.)
For example, the names of bacteria, such as Clostridium botulinum and Clostridium perfringens, are made up of the genus (for example, Clostridium) and the species (for example, botulinum or perfringens). The genus is often abbreviated after first use. For example, C. botulinum. However, if the name is defined as a single term consisting of both the genus and species then it’s not possible to apply the abbreviation when a different species with the same genus is used. Consider the following document:
This is quite awkward to write. This chapter describes how to provide a shortcut for this kind of construct. Each term should be defined as normal (as in the above example), and a “multi-entry” label is then defined with the list of labels of the entries that need to be referenced.
The 7.9.
The earlier example can now be modified to include the following:
Once defined, a multi-entry set can be referenced in the document using commands like:
There are some variants of
The
There is limited support for docdef=true. The multi-entry definition can be picked up from the aux file on the next run to allow cross-references in any glossaries that occur at the start of the document. Any changes made with commands like
By default
If you want to change the multi-entry options (locally) you can use:
Note that
If you don’t want the other elements in the glossary, you can suppress the indexing with indexothers=false (§7.9.1) or put them in an ignored glossary. For example:
The
If you don’t want to have to keep track of which labels refer to multi-entries and which refer to individual entries you can use:
You may prefer to define your own shortcut commands for common combinations. For example, (assuming these commands haven’t already been defined by the shortcuts option):
Bacteria names are represented by the genus (for example, Clostridium) followed by the species (for example, botulinum). This example has the genus as a parent of the species.
The hyper=allmain option makes the entire content of each
This example has a minor modification to the previous one. In this case the multi-entries are defined with a suffix:
This is an alternative to the previous example. Instead of storing the extra information in the firstsuffix key, the information is stored in the user1 key of the last element (the species). A category suffix is used to look up the field and append it.
The first example (§7.1.1) can be modified so that the species are also abbreviations. In this case, the separators are modified to suppress the space (
Note that the separator attributes apply to the category of the element before the separator (not to the multi-entry category).
This example is an alternative way of dealing with nested links (see §5.4).
This uses the multioptions attribute to skip “other” elements on subsequent use. The problematic abbreviation (SHTML) is defined as a fragment that simply expands to “enabled” on first use. Note that the description has to be supplied for the glossary. The resulting document is shown below.
The key difference here from the example using
The problem is that with the colorlinks package option, it’s not obvious where the hyperlinks start and end. The suffix (shtml) will hyperlink to the “shtml” entry in the glossary, so the “enabled” hyperlink is redundant. The simplest fix for this is to add hyper=notmainfirst to the option list, which will prevent “enabled” from being a hyperlink.
Another problem occurs where
The complete set of options are now:
This method still has two main drawbacks: the description must be added manually and the long form can’t be accessed with
This is a modified version of the previous example. In this case, the main element isn’t a fragment and also happens to have the same label as the multi-entry set. (
In this case, the nested parts are marked up with custom commands:
This means that it’s no longer necessary to manually insert the description and the long form can be accessed as usual with
The abbreviations all use the long-postshort-sc-user style, which places the short form in the post-link hook on first use. The
Within
The complete document is as follows:
One way around this is to modify the prefix to ensure that the main element’s first use flag matches the multi-entry’s first use flag:
The showtargets=annoteleft option can be used to mark up the links with the targets. For example, the first instance of
The remaining problem is how to deal with the possibility that
Individual elements: ssi and html.
This means that the abbreviations ssi and html aren’t explained in the document text. One way around this is to only locally unset the other element first use flags:
Multi-entry next use: shtml.
Individual elements: server-side includes (ssi) and hypertext markup language (html).
The list of labels provided in the final argument of
The main element allows you to determine which target to use if you want the entire content of
You can change the main element using:
The main element can also be used to identify which element should be displayed in the plural with
A multi-entry may have associated prefixes and suffixes. These are scoped and are placed outside of the hyperlinks and encapsulating commands. They are not affected by case-changing commands, such as
The prefix is inserted with:
The suffix is inserted with:
Note that in both cases the category corresponds to the multi-entry category (see §7.8).
To define a category-dependent prefix, use:
To define a category-dependent suffix, use:
The default definition of
If you need to obtain the prefix for a particular category, you can use:
The default definition of
If you need to obtain the suffix for a particular category, you can use:
The current prefix
For example:
The separators between each instance of
These commands may be redefined as required. For example, to have no space between two elements that have both been marked as used and are both abbreviations (disregarding category attributes):
There are some commands for redefining the above separators to common combinations.
Note that this doesn’t take into account fonts, hooks, abbreviation styles or plural forms (e.g.
The
The definitions of the following commands are scoped within the
To test if the current multi-entry is the first use:
At each iteration of the loop over the element list, the following commands are set, which can be accessed in hooks such as
There is a hook that occurs at the end the
The mpostlinkelement=custom option uses:
The mpostlinkelement=last option uses:
The mpostlinkelement=main option uses:
The default settings
If you have the final element’s post-link hook enabled and the multi-entry post-link hook enabled (for example,
The following commands are available for use in these hooks and may also be used in the definition of
The following commands relate to the last element.
Test if the last element was skipped:
Test if the last element was its first use:
Test if the last element was plural:
Test if the last element was had any case-changing applied:
The following commands relate to the main element.
Test if the main element was skipped:
Test if the main element was its first use:
Test if the main element was plural:
Test if the main element was had any case-changing applied:
Each multi-entry set has an associated first use flag. This is independent of the first use flag associated with the individual entries that make up the set. As with the
You can determine whether or not a multi-entry set has been marked as used with:
You can (globally) unset the flag (mark the set as having been referenced) with:
It’s also possible to unset or reset all multi-entries.
A multi-entry set may have an associated category set using the category key described in §7.9. This isn’t set by default, but if it is set the category may have attributes set in the usual way. The multi-entry category is independent of the individual entry categories. The following attribute is recognised by commands like
Note that you can’t access the category or its attributes via the multi-entry label (for example, with
The settings that govern all multi-entries can be set using:
Whenever the
These options are described below.
See §7.3 for more information on prefixes and suffixes. Note that the prefixes and suffixes are not affected by case-changing commands such as
Note that it is technically possible to set the skip options so that both the main and the other elements are skipped. However, by default, this will generate a warning and only the final optional argument (the
The warning and the insertion of the
If, for some particular reason, you want this scenario, you can redefine this command to omit the warning.
The
The reset… options all use:
An alternative way of resetting the other elements is to use:
The commands listed in this section all behave like
You can use the pre-element hook
If you load the glossaries-prefix package (either after glossaries-extra) or with the prefix package option, then the following commands will use one of the
If the glossaries-prefix package hasn’t been loaded then
Multi-entry labels may be used in the cross-referencing keys see and seealso. The formatting command will use:
For example, to use the short or text fields:
A multi-entry label may also be used in the alias key. The hyperlink target will be the target for the main entry. For example:
You can test if a label represents a multi-entry using:
The
In the bib2gls v2.9+ user manual, these multi-entry sets are referred to as “compound entries” or “compound sets” to differentiate them from bib2gls’s multi-entry types (such as
Each instance of one of the
With bib2gls, you can either define the compound entries in the document with
You can use the resource option compound-adjust-name to replace the name field of the main entry to:
This command is defined in glossaries-extra-bib2gls, which is automatically loaded with record=only and record=nameref. Case-changing versions of this command are also available.
Note that the above commands don’t take the prefix or suffix into account (see §7.3).
The separator between each element in the sub-lists is produced with:
The separator between the last element of
The
Each element label in the sub-lists is encapsulated with:
As with the base glossaries package, you need to establish the indexing method in the preamble and use the appropriate
If the optional argument is omitted, it will be treated as per the original
The base glossaries package provides
With the indexing options provided by the base glossaries package, if you want a term to appear in more than one glossary, it’s necessary to define a duplicate entry with a different label. With the “unsrt” family of commands, the same entry can appear in multiple glossaries. This can be done by simply copying the entry’s label to the required glossary using:
Note that the type field will still be set to the original glossary. This is considered the entry’s primary glossary. There’s no field that keeps track of the additional glossaries the entry has been copied to.
If used with
You can test if an entry has already been added to a glossary with:
You can test if a glossary is empty with:
To test for the existence of a glossary, you can use
The base glossaries package provides
The base glossaries package provides
The base package provides
In addition to the options available with
Note that this option will also affect the targets used by the
Within the glossaries, the
If the above example is modified to:
Note that this has prepended
It’s possible to combine targetnameprefix with prefix={} but that will also affect the
The base glossaries package provides two ways of displaying a glossary, depending on the indexing option:
The glossaries-extra package provides an alternative that doesn’t require sorting or indexing.
There is also a starred version which has a mandatory argument:
As with
This means you now have the option to simply list all entries on the first LaTeX run without the need for a post-processor, however there will be no location list in this case, as that has to be set by a post-processor such as bib2gls (see §11).
The way that
A label is appended to the glossary’s internal label list whenever an entry is defined. This means that the list will normally be in order of definition, but it’s also possible to copy an entry’s label to another glossary’s internal label list using
If you really want to use
If, conversely, you don’t want any groups formed, regardless of the glossary style, you can disable them with groups=false. The above example can be modified so that the document contains:
I’ve also switched to two column mode to display the result in a more compact form. The first two glossaries are shown on the left and the last two are on the right:
The “unsrt” family of commands were designed for use with bib2gls, which uses more complex alphanumeric group labels to allow for greater customization and to avoid conflict where there are multiple glossaries or hierarchical levels with potentially the same letter groups.
The way that bib2gls works is to select entries from a bib file, according to the document requirements, sort the entries, and then write the entry definitions (with commands like
While it is possible to use
Groups and hierarchy are discussed in more detail in §8.4.1. See §8.4.2 for location lists and §8.4.3.1. Advanced commands and further detail about the way
Here’s a longer example that uses stylemods to automatically load glossary-bookindex:
The first
The document build again simply requires one LaTeX call. The result is shown in Example 137.
There are some oddities in both lists. It’s the glossary style that determines the formatting of the entries according to the entry’s hierarchical level, but it looks strange for the duck and mallard entries to be indented when they don’t follow after their parent entry.
As the internal loop within
The way that the group is determined depends on whether or not the group key has been defined. If it isn’t defined (the default), then the group label is obtained from the uppercase character code of the first token of the sort key. If the token doesn’t have an uppercase character code (indicating that it’s not a letter) or if the sort value is empty then the label will be set to
Remember that if the sort key hasn’t been set, it will be assigned automatically to the same value as the name key (or with sort=use or sort=def to a numerical value). The sort key will be empty if you use sort=clear. The sort=none setting simply skips the pre-processing of the sort key (such as sanitizing).
For example, the ant entry doesn’t explicitly use the sort key, so the sort value is obtained from the name key, which is set to
The ant entry is followed by “adder”. The same process determines that the “adder” group label is also 65. There’s no change in the group label from the previous entry (ant) so no header is inserted.
By default, this group check is omitted for child entries, which is why no group header is inserted before duck or mallard. So the next entry to be checked for a group is the zebra entry, which has the group label 90 (the decimal code for “Z”). Again there’s no title associated with that label so the title is simply the label.
The zebra entry is followed by aardvark which, following the same process, has the group label 65. This is different from the previous group label (90) so a group header is inserted. This is why there are two “90” letter groups.
If the group key has been defined (which is the case with record=only and record=nameref) then the group label is obtained from the group field. If the group field is defined but empty then the entry will belong to the empty group. The value of the sort field is now irrelevant.
So, simply adding the record option to the above example document will cause the group headers to disappear. This is because the group key will now be defined but is empty for each entry. Even with a style like bookindex, there won’t be any group headers.
Provided the group key has been defined, the field used to store the group label is given by:
The follow example document uses record to create the group key and assigns group labels with associated titles. Note that the secondarygroup field doesn’t have an associated key, so it needs to be set with a field assignment command, such as
Note that even though the duck and mallard entries have the group and secondarygroup fields set, there’s no group title for them in either glossary because they are child entries.
The following hook is used just before the header information is appended:
The above document can be modified to show the sub-group headings:
Note that the mallard entry (which has hierarchical level 2) has its group shown in the first glossary (where the group is formed for all levels) but not in the second glossary (where the redefinition of
There’s a small visual distinction between the group titles in different hierarchical levels in the above. The top-level (level 0) groups have the title centred, whereas the sub-groups have their titles indented by the same amount as the corresponding sub-entries. This is due to the glossary style. Other styles may use the same formatting for all hierarchical levels.
The glossary styles provided with glossaries-extra and the base styles patched by glossaries-extra-stylemods all redefine:
A default definition that simply does
The bookindex style defines
The above examples are contrived and demonstrate the need to define entries in a sensible order to achieve a sensible glossary with
To switch to bib2gls, the entry data needs to be provided in a bib file. For example, the file animalfamilies.bib might contain:
The glstex file created by bib2gls (which will then be input by
It’s more complicated than this as helper commands are provided to make it easier to customize and the entries will all have category={index} since they were defined with
Note that the group and secondarygroup fields haven’t been set for the child entries (duck and mallard). This is the default behaviour and it means that regardless of the definition you provide for
This will add support for level 0 (no parent) and level 1 (parent but no grandparent) entries. Deeper levels won’t have support. The --group switch is still required.
The “unsrt” family of commands check for the existence of the location and loclist keys. These are both defined by the record option. (The loclist field is also used by
The location field (if set) should contain the formatted location list. This is checked first and used if not empty. Otherwise the loclist field (if set) is used, but that will use the same method as
It’s possible to choose a different field for the formatted location list by redefining:
Whichever field is used, the formatted location list is passed to the appropriate glossary style command (
If there’s no location field or if the tested fields are empty, then an empty argument (with no
To provide a better understanding of how filtered and inner glossaries work, it’s useful to understand the difference between
In the first case, makeindex or xindy is used to create a file that contains content in the form:
The group headings (see §8.4.1) are typeset using
The
The initial setup part sets the glossary style (which determines the definitions of theglossary,
In the case of bib2gls, there isn’t a glossary file to input. Instead, bib2gls is used to create a file that contains the entry definitions, which is input in the document preamble (via
The
The
The
In both hooks, the argument will be
The
There are hooks and commands available for use within those hooks that may be adjusted to customize the way the glossary is displayed. These are described below.
At each iteration (while the glossary content is being constructed), the following steps are performed:
Once the glossary construction (
The handler command
The following are additional commands that may be useful in the above hooks.
For example, the following skips all entries that have the category set to symbol:
It’s possible you may want to combine multiple glossaries sequentially, as sub-blocks of a single list. The inner part of
As with
There are two ways this command may be used.
The start of the environment sets up the glossary style and does the header:
For example, the following has two glossaries but displays them as inner glossaries:
The other way that
It’s possible to redefine this so that it also displays an inner glossary. The following example has the terms “pictograph” and “Greek symbol” in the
This creates a custom command
If you are using bib2gls then it’s possible to only list entries that match a particular counter value. For example, you may want a mini-glossary at the start of a section that only lists the entries that have been recorded in that section. This can be done by using the handler to skip entries that don’t have a matching record. It can also be implemented with record counting, as shown in Example 156 in §11.4.
It’s also possible to make each indexing instance automatically make a note of a particular counter using:
This command may only be used in the preamble (with record) and indicates that whenever an entry is indexed, the following line should be added to the aux file:
There are two ways of skipping an entry. The first is to redefine
The file myentries.bib contains the following:
This means that
The following command is provided that performs something similar:
The above example can be rewritten using
Other variations include creating a secondary glossary that’s ordered differently for the mini-glossaries. For example:
There is an alternative method that ensures the mini-glossaries are ordered by use within the section. This can be done by redefining
This creates a glossary with the label
The glossary needs to be set appropriately. For example:
It may be that you don’t want a list but would rather display entry details throughout the document. You can simply do
However, if may be that you want to use hyperref and have commands like
This is designed to behave much like the way the name is displayed in the glossary. It performs the following:
This reflects the behaviour of the predefined hierarchical styles. A bug in pre-version 1.31 used
It’s also possible to select a different field (rather than using name):
If you have loaded the glossaries-accsupp package (through the accsupp option) then accessibility support will be provided if there’s a corresponding command:
This means that my custom command can be changed to:
If I want the description to behave more like it does in a glossary in need to make the following modification:
You can also use
If
If
If you’re using a page style or table of contents that doesn’t use
The glossaries-extra package redefines
The commands
The command
For example, if you are using glossaries-accsupp, you could use the symbolaccess field:
This means you can then do:
If you want to adapt a style to use another field instead of name, you can use:
The glossaries-extra package adds a hook to
The post-name hook
The post-name hook also does:
The glossaries package provides the hook
The glossaries-extra package redefines
If you want to modify the hook for all entries (without affecting the postpunc or postdot options), then redefine
The above all do nothing by default. You can redefine them with
You can reference the current entry within these hooks using
The glossaries package provides
These commands have no effect outside of the glossary (except with standalone entries that use
The location list is now placed inside the argument of:
Note that if you are using the “unsrt” family of commands the location list will only be present if the appropriate field has been set (see §8.4.2). There’s no need to save locations with bib2gls or with
Sometimes users like to insert “page” or “pages” in front of the location list. This is quite fiddly to do with the base glossaries package, but glossaries-extra provides a way of doing this. First you need to enable this option and specify the text to display using:
See the accompanying sample file sample-pages.tex for an example.
Location lists displayed with
If the range identifiers aren’t present, this just uses
By default the start range command saves the format in:
The end command checks that the format matches the start of the range, does:
This means that the list
The letter or symbol or number groups are a by-product of the indexing application. These are usually determined during the sorting according to the first (significant) character of the sort value. If the first character is an alphabetical character, the group is a letter group, with the group label the same as the letter. If the sort value is numeric, the group is a number group, with the label
With xindy, the number group is automatically provided with the xindy=glsnumbers package option. It can be suppressed with xindy={glsnumbers=false} (see the base glossaries user manual for further details).
With bib2gls, group formation requires --group (or -g). This setting is off by default to allow for a faster process where no groups are required. When this setting is on, there are additional groups, depending on the sort method. For example, if you use a date-time sort method, then you will have date-time groups.
The base glossaries package provides a simplistic way of assigning a title to a group to allow for the use of language-sensitive commands
The glossaries-extra-stylemods package (more conveniently loaded through the glossaries-extra stylemods option) modifies some of the predefined styles that are provided with the glossaries package.
The stylemods option may be provided without a value, in which case all currently defined styles will be patched. Alternatively, you can supply a comma-separated list as the value, which indicates that, for each in the list, the package glossary- should be loaded and, if it’s a package provided with the base glossaries package, patched. For example:
The glossaries-extra-stylemods package adjusts the predefined styles so that they all use
With bib2gls you can instead redefine
The patched inline style is dealt with slightly differently. The original definition provided by the glossary-inline package uses
The tabular-like styles, such as long are adjusted so that the
The list styles use:
The description (including the post-description hook) is governed by:
The hard-coded
For just the list style and its letter group variations (not the altlist or listdotted variations) the location list for child entries is followed by:
The default value of
The separator between groups (if not nogroupskip) is now given by:
The group headings for styles like treegroup are formatted with:
This means that if you want to change all three to use a particular style you only need to redefine
The separator between groups without headers is given by:
The separator between groups with headers is now given by:
The styles that display the group titles now use:
The glossary-tree package provides the commands
The index-like and tree-like styles insert the pre-location list space with:
The styles like treenoname use:
For the tree styles (but not the treenoname or alttree styles), the description is displayed using:
If either the symbol or description is present these will use
There are some additional commands for use with the alttree style to make it easier to modify. These commands are only defined if the glossary-tree package has already been loaded, which is typically the case unless the notree or nostyles option has been used when loading glossaries.
The following only set the value if
The widest entry value can later be retrieved using:
Note that if you are using bib2gls, you can use the resource option set-widest which will try to determine the widest name of all the selected entries. This isn’t guaranteed to work as it may depend on fonts or commands that bib2gls can’t replicate, but it should be suitable for names that just consist of text, and can be more efficient than iterating over all the defined entries using TeX.
The command
The layout of the symbol, description and location list is governed by:
There is now a user level command that performs the initialisation for the alttree style:
For additional commands that are available with the alttree style, see the documented code (glossaries-extra-code.pdf). See also the accompanying sample files sample-alttree.tex, sample-alttree-sym.tex and sample-alttree-marginpar.tex.
The glossaries-extra package comes with some new styles. The associated style package needs to be loaded. This can be done with
The glossary-bookindex package provides the glossary style bookindex. This is very similar to the mcolindexgroup style but is designed for indexes, so by default only the name and location list are displayed. This style is demonstrated in Example 146 (using bib2gls). Note that some entries don’t have location lists because they weren’t recorded in the document, but were included as dependencies. See §5.9.1 for dealing with cross-references that may not be required.
The bookindex style only supports a maximum hierarchical level of 2 (top-level, level 1 and level 2). It’s primarily designed for use with bib2gls. It may be used with other indexing options, but some features may not be present and UTF-8 characters may cause a problem with non-Unicode engines in letter group headings or PDF bookmarks. (bib2gls uses numeric identifies by default to avoid these problems, see §8.4.1.)
The number of columns is given by:
This style uses the multicols environment. If the command:
Each top-level entry is displayed using:
Alternatively you can use the
Sub-entries are displayed using:
The separator used before the location list for top-level entries is given by:
The separator used before the location list for sub-entries is given by:
The actual location list is encapsulated with:
The separator used between a top-level parent and child entry is given by:
The separator used between a sub-level parent and child entry is given by:
The separator between top-level entries is given by:
The separator between two level 1 entries is given by:
The separator between two level 2 entries is given by:
At the end of each letter group, the following hooks are done in order:
For example, the resource option seealso=omit instructs bib2gls to omit the seealso cross-reference from the location list. (The see cross-reference will still be added unless you also have see=omit.) The seealso cross-reference can instead be appended after the child entries using:
The bookindex style uses group headings. (If you use bib2gls remember to invoke it with the --group or -g switch, see §8.4.1.) The heading will use:
The group heading is formatted according to:
The skip after a group header is given by:
The glossary-bookindex package provides some supplementary commands that aren’t used by default, but may be used when adjusting the style. These commands should only be used within one of the
You can display the first entry associated with the current page using:
The entry is formatted using:
These commands are designed for use in page headers or footers where the page number is stable. For example,
Then if you’re using fancyhdr you can set the page style to show the first and last entry for the current page with:
The glossary-longextra package provides additional tabular-like styles similar to those provided by glossary-longbooktabs (which is automatically loaded). These don’t support hierarchical levels except for homographs (level 1 entries with the same name as their parent).
By default, these styles use the longtable environment, but if you know that your glossary won’t span more than a page and you need to use it in a context that’s incompatible with longtable, you can instead setup these styles to use tabular instead. In order to do this you must use:
For example:
For either tabular or longtable, the column titles are formatted according to:
Most styles show the name which, as with other predefined styles, also includes the entry item number (if entrycounter is on) and hypertarget anchor. These are all performed for top-level entries with:
The horizontal alignment for the name column is obtained with:
For styles that show the description, that’s formatted with:
The horizontal alignment for the description column is obtained with:
If you are using bib2gls, you may be able to use the set-widest option, otherwise to set the widest name, use:
You can update the widest name with:
Although these styles don’t support hierarchy, the following is provided for child entries:
For styles that show the location list, that’s formatted with:
The horizontal alignment for the location list column is obtained with:
For styles that show the symbol (in addition to the name), that’s formatted with:
The horizontal alignment for the symbol column (except for the long-sym-desc and long-desc-sym styles) is obtained with:
Top-level group headings are formatted with:
Sub-level groups are only supported with the “unsrt” family of commands (see §8.4.1). When they are supported, the heading will be formatted with:
The styles are sub-divided below into the set of elements that are shown in each column, which may consist of: name, symbol, description or location list. There will be blank cells if any of the corresponding fields have not been set or if the location list has been suppressed.
These styles don’t display the symbol or location list, regardless of whether or not they have been set. In each case, the style starts with:
If you want to set
These styles don’t show the location list. In each case, the style starts with:
If you want to set
These styles don’t display the symbol, regardless of whether or not the symbol field has been set. In each case, the style starts with:
If you want to set
These styles show the name, description, symbol and location list. In each case, the style starts with:
If you want to set
These are two-column styles designed to show only the symbol and description. However, if the symbol isn’t set then the name will be used instead. If this occurs, you may need to change the width of the description column.
The horizontal alignment for the symbol column is obtained with:
These styles have the entry item number (if entrycounter is on) and the hypertarget anchor (if enabled) in the symbol column since there’s no name shown (unless the symbol is missing). These are all performed by for top-level entries by:
The following commands use the above if the symbol field is set, otherwise they show the name.
In each case, the style starts with:
If you want to set
These styles are designed for abbreviations. They display the short and long forms, rather than the name and description, although these may happen to match. They are primarily intended for mini-glossaries or similar summary lists.
Although these styles don’t show the name or description, they still use some of the name and description settings provided by glossary-longextra. The column for the short form uses the same alignment as for the name columns (
If the short field hasn’t been set, the short column will show the name instead, and if the long field hasn’t been set, the long column will show the description instead (using the same commands as for styles like long-name-desc, which do use the associated formatting commands and attributes).
These styles use the following commands:
The table header is given by:
The table footer is given by:
The table header is given by:
The table footer is given by:
These styles allow one, two or three custom columns in addition to the name column. The “custom1” styles indicate one custom column, the “custom2” styles indicate two custom columns, and the “custom3” styles indicate three custom columns. Some styles also include the description column. These styles don’t display the location. However, if you are using bib2gls you can set one of the custom fields to location, but if you have long location lists you may need to change the corresponding alignment command to switch to a paragraph column.
The following styles also have a description column, which uses
The glossary-topic package provides glossary styles designed for hierarchical glossaries where the top-level entries are topic titles. This package automatically loads the multicol package. If the glossary-tree package is also loaded then commands like
This package provides styles designed for glossaries that are lists of topics. That is, the top-level entries are considered topic titles (which may or may not have an associated symbol or description) and the sub-entries are items within that topic. By default the location list isn’t shown for the top-level entries but is shown after the description for sub-entries (unless suppressed with nonumberlist or save-locations=false).
The following styles are provided:
Both styles can have a widest name set like the alttree style, using the commands provided by glossary-tree and glossaries-extra-stylemods or with the set-widest resource option. If a widest name is set, then the sub-entry names will be placed in a box of the given width otherwise they won’t be placed in a box. In Example 149, the widest names have been set for level 1 and level 2 using:
Both of the above styles use the following commands.
There is also a length for additional indentation used in the second paragraph onwards for child entries with multi-paragraph descriptions:
Although the styles don’t support letter groups by default, if you have many topics (top-level entries) and you feel that it would help the reader to divide them up into headed letter groups, you can redefine:
Sub-groups are only available with bib2gls and the group-level option. If they are supported, sub-group headings are formatted according to:
Top-level entries are formatted according to:
If the entry has the description key set (tested with
The sub-entries first set up the paragraph and hanging indentations using:
The sub-entry has its information displayed using:
This is followed by the symbol in parentheses if set. Then, if the description is set, the description and post-description hook are displayed followed by:
Finally the location list is displayed using:
The glossary-table package is new to version 1.49. It automatically loads the longtable, array and booktabs packages. If you want to use
The glossary-table package doesn’t provide any general purpose styles, but instead provides one highly customized style (table), which is designed to work with a supplied command:
Tabular styles such as long create a longtable with one entry per row and no caption. The longheader style is similar but adds a header row, and the long-booktabs style includes rules above and below the header row and at the end of the table. In all these longtable styles, the glossary title is outside of the style, and is typically put in a sectioning command. Similarly, the glossary preamble
The table style, on the other hand, allows multiple entries per row. The glossary title (title) is the table caption with what’s normally the table of contents title (toctitle) as the caption title for the list of tables. Similarly, the preamble and postamble are included in the table header and footer, instead of being outside of the table.
This means that
The block styles (see §8.7.4.3) alter the way the table style sets up the longtable environment and the way that the entries are formatted. The top level glossary style command
This means that the child entries will be listed in one of the columns in the block, according to the style. This can make the column quite wide. The child names aren’t displayed by default but the block styles support the subentrycounter option. The child entries are listed in a tabular environment, which means they are contained in the same row as their parent and can’t be broken across a page.
A “block” indicates a block of columns used to format one entry (and, optionally, its children). One row of the table may contain multiple blocks. For example, a block may consist of two columns with the name in the first column and the description in the second, or may consist of three columns with the name in the first column, the symbol in the second, and the description in the third. So if a block style has 3 columns, and the desired number of blocks is set to 2, then the table will have a total of 3×2=6 columns.
The style supports up to 1 hierarchical level, but you will need the save-child-count resource option if you want the level 1 sub-entries to show. Deeper level entries are omitted. Sub-entries are automatically filtered by a custom hook that
For example, the following will filter entries that have the category set to general:
You can use the init option to locally redefine commands within
An extra field (the “other” field) may be added with the other key. If this value is empty, then no extra field will be added. Some block styles, such as other-name and symbol-other put the other field in its own column. If the other field isn’t set, this will lead to an empty column.
If there isn’t a designated column for the other field, then block styles that show the description will put the other field in before the description, but in the same column as the description. Otherwise, block styles that don’t show the description, will put the other field after the name, but in the same column as the name.
The following example uses the name block style, which only has one column per block. The name is followed by the description in parentheses (if set), which is then followed by the child list. I redefined
Entries with a hierarchical level greater than 0 are filtered out (see above). This takes the leveloffset option into account. Child entries can be included, but only by checking if the childcount field has been set and is non-zero. This is done by:
If the child count is non-zero, taking both childcount and child filtering into account, then
Each child item is display using
The separator between each child item is given by:
The optional argument of
Some default settings are changed: groups=false and nogroupskiptrue. If you want letter group headings, you will need to both add groups=true to the options list and invoke bib2gls with the --group switch. The group headings will span the entire width of the table. This may result in empty blocks at the end of the previous row. If you want a vertical gap before the group heading (but not before the first group), you will need to add nogroupskipfalse, but you will also need to load glossary-longbooktabs. Note that this option is designed to be used with group headings and will have no effect with groups=false.
Additionally, the following options may also be used.
If the table spans across multiple pages, the caption for subsequent pages will be produced with:
The header text is produced with one of the following commands:
The block style may be set with the block-style option or with:
The following block styles are predefined.
The rows are separated with:
The following commands are used in the column specifier where a left, right or centred column is required, taking the par option into account. Note that with par=justified, the result will always be
This command is used in the column specifier where a left-justified column is required.
This command is used in the column specifier where a right-justified column is required.
This command is used in the column specifier where a centred column is required.
If par=justified or par=ragged, the column widths will be calculated. The following length registers will be set, where applicable to the block style.
Unless par=false, the table will be the width of a line and each block will have equal width.
Note that in all the above, the width doesn’t include the inter-column space given by
Formatting for the name, symbol, description and other field values are applied by the following commands.
The other field’s internal label is provided by expanding:
The value for the child entries is displayed with:
You can test whether or not the other field is set for a given entry with:
The column headers are supplied by the following commands, where applicable.
The column headers are formatted according to:
The glossaries package comes with a supplementary package glossaries-accsupp that helps provide accessibility support. The glossaries-extra package provides additional support, but only if the glossaries-accsupp package has already been loaded when the relevant commands are defined. The best and simplest way to do this is through the accsupp package option.
See the “Accessibility Support” chapter in the glossaries user guide for further information about glossaries-accsupp.
The accessibility fields relating to abbreviations are shortaccess, shortpluralaccess, longaccess and longpluralaccess. These provide the replacement text for the corresponding short, shortplural, long and longplural fields. The access field provides the replacement text for the name field.
Some of these accessibility fields are automatically assigned by
The attributes that specifically relate to accessibility in abbreviations are listed below. The “actual short value” means the value obtained from the short value after any markup commands have have locally redefined using
Finally, if shortaccess hasn’t already been set, it will be set to:
The glossary style commands such as
If the glossaries-accsupp package hasn’t been loaded or if the relevant accessibility field hasn’t been set, these commands simply do the corresponding
These
The default entry display style
Each entry defined by
The use of categories can give you more control over the way entries are displayed in the text or glossary. Note that an entry’s category is independent of the glossary type. Be careful not to confuse category with type.
An entry may have its category field changed using commands such as
There are also some iterative commands available:
These are the category labels that are set or referenced by glossaries-extra.
Each category may have a set of attributes, where each attribute has an associated value for its given category. An entry’s attribute set corresponds to the attributes associated with the entry’s category.
As with the category, the attribute name is also a label. You can provide your own custom attributes, which you can set and access with the commands described in §10.2.2.
This section lists attributes that glossaries-extra sets or accesses. If an attribute hasn’t been set, a default is assumed. For boolean attributes, the test may simply be to determine if the attribute has been set to
See §9.1 for abbreviation accessibility attributes.
The general and acronym categories have the regular attribute automatically set to
Note that this can cause a problem if you access a field that doesn’t end with a full stop. For example:
This setting will also adjust the long plural. This attribute is only applicable to entries defined using
This setting will only adjust the short plural if the shortplural key isn’t used. This setting will take precedence over insertdots.
This attribute is best used with the discardperiod attribute set to “true”.
As from version 1.07,
Remember that glossary styles may additionally apply a font change, such as the list styles which put the name in the optional argument of
All the predefined glossary styles start each entry listing with
For example:
If you want a mixture in your document of entries that link to an internal glossary and entries that link to an external URL then you can use
Attributes can be set using the following commands:
An attribute can be locally unset using:
Attribute values can be obtained with the following commands:
Attributes can be tested with the following commands.
For example:
The command line application bib2gls performs two functions in one:
This means that you can use a reference managing system to maintain the database and it reduces the TeX overhead by only defining the entries that are actually required in the document. If you currently have a tex file that contains hundreds of definitions, but you only use a dozen or so in your document, then the build time is needlessly slowed by the unrequired definitions that occur when the file is input. (You can convert an existing tex file containing glossary definitions to a bib file using convertgls2bib, supplied with bib2gls.)
There are some new commands and options added to glossaries-extra to help assist the integration of bib2gls into the document build process.
This chapter just provides a general overview of bib2gls. The full details and some sample documents are provided in the bib2gls manual
An example of the contents of bib file that stores glossary entries that can be extracted with bib2gls called, say, terms.bib:
Here are some symbols in a file called, say, symbols.bib:
To ensure that bib2gls can find out which entries have been used in the document, you need the record package option:
The glstex file created by bib2gls is loaded using:
The
If you are using or developing a build system that needs to know which applications to run as part of the document build, you can search the aux for for instances of
Since the glstex file won’t exist on the first LaTeX run, the record package option additionally switches on undefaction=warn. Any use of commands like
Note that as from v1.12,
These commands are provided by glossaries-extra for use with bib2gls.
The information provided with
If you have complex regular expressions or use assign-fields (bib2gls v3.3+), you may find it more convenient to redefine
If you have multiple resource commands and you want a default set of options you can supply them in the definition of:
As with makeindex and xindy, the
The formatted location list is stored in the location field (unless save-locations=false). Additionally, the individual locations are stored in the loclist field as an etoolbox internal list (as with
See the bib2gls manual for information on how to separate the location list into groups associated with different counters.
The default behaviour is for bib2gls to select all entries that have a record in the aux file, and any dependent entries (including parent and cross-references). The
The selection option indicates which entries should be selected from the bib files (listed in src). For example, selection=all indicates to select all entries, regardless of whether or not the entries have been referenced in the document. This will lead to empty location lists for some (or all) entries. The default setting is selection=recorded and deps, which indicates to select all entries that have records and any dependent entries. See the bib2gls user manual for more details of this option.
With makeindex and xindy, the terms (read from the associated input file) are sorted and the code to typeset the glossary is written to an output file, which is then input by
The indexing information, such as the location list or letter groups, is stored in fields such as location or group (where applicable), so the information can be included by
There are many sorting options provided by bib2gls. The default is to sort according to the system locale. If the document has a language setting, you can use sort=doc to instruct bib2gls to sort according to that. (The language tag obtained from tracklang’s interface is written to the aux file.) For a multilingual document you need to explicitly set the locale using a well-formed language tag. For example:
Suppose the bib examples shown earlier have been stored in the files terms.bib, abbrvs.bib and symbols.bib which may either be in the current directory or on TeX’s path. Then the document might look like:
The entries can be separated into different glossaries with different sort methods:
Or you can have multiple instance of
This will result in a glossary where the first group has the label
You can provide your own custom sort rule. For example, if you are using XeLaTeX or LuaLaTeX:
Some of the options, including sort-rule, allow Unicode characters to be indicated in the format
For example, the above can be rewritten as:
As from version 1.1 of bib2gls, you can save the total record count for each entry by invoking bib2gls with the --record-count or --record-count-unit switches. These options will ensure that when each entry is written to the glstex file bib2gls will additionally set the following internal fields for that entry:
Note that the record count includes locations that bib2gls discards, such as ignored records, duplicates and partial duplicates (unless you filter them out with --record-count-rule). It doesn’t include cross-reference records. For example, suppose a document has an entry with the label
Then the total record count (stored in the recordcount field) is 2+1+4+1=8, the total for the page counter (stored in the recordcount.page field) is 2+1+4=7, and the total for the section counter (stored in the recordcount.section field) is 1.
With the unit counting on as well, the following fields are assigned:
You can access these fields using the following commands which will expand to the field value if set or to 0 if unset:
There are commands analogous to the entry counting commands like
The recordcount attribute may be set with
Commands like
For example, to assign the entry to an ignored glossary:
To make it easier to switch on record counting for an existing document, you can use:
For example, using the earlier terms.bib, abbrvs.bib and symbols.bib example files:
I’ve added post-link hooks to the entry and symbol categories to show the description on first use (but not for the abbreviation category).
If you want unit record counting you need to remember to invoke bib2gls with --record-count-unit and you will also need to redefine
This would require records with the counter set to chapter. This can be done with the counter package option:
If you want page numbers in the location lists then you will need to record each entry with both the page and chapter counters. This can be done with the hook that occurs before the
The definition of
Consider the following (using the abbreviations defined in the earlier abbrvs.bib):
The previous example used the trigger-type resource option to move entries with the glstriggerrecordformat encap (that is, they didn’t exceed the trigger value) to another glossary. Unfortunately, using that option in this case will move all three abbreviations to the trigger-type glossary. The
A simple solution is to omit any entries that don’t have the location field set when displaying the glossary:
The complete document is:
Record counting doesn’t have to be used with the
By defining one of more of these commands before the glstex file is input, it’s possible to pick up the information, without the need to iterate over all entries later. For example, the following will create a mini-glossary for each particular location and populate it with entries that have a record for that location.
The previous example can be altered to strip the
If glossaries-extra-bib2gls is loaded via the record package option then the check for associated language files (see §15) will also search for the existence of glossariesxtr-.ldf for each document dialect (where is the four letter script identifier, such as
Glossaries are displayed with the “unsrt” family of commands (see §8.4). Some styles, such as bookindex, are customized for use with bib2gls.
The following commands are shortcuts that use
If you have complex regular expressions or use assign-fields, you may find it more convenient to redefine
This command locally redefines escape sequences used in regular expressions so that they detokenize when they expand. This means that you won’t need to use
For example, with
A convenient shortcut for use in the entry-type-aliases setting:
You may also want to provide storage keys for BibTeX’s standard fields rather than having to alias them all. This can be done with:
There are many locale alphabetical rules provided with bib2gls, such as sort=de-1996 for German new orthography. However, it may be that your particular locale isn’t supported, or you want a rule that covers multiple scripts or non-alphabetic symbols.
The sort=custom setting combined with sort-rule provides a way to define your own sort rule. For example, suppose I have a file called animals.bib that contains:
The commands listed below provide common rule blocks for use in the sort-rule resource option. If you want a rule for a specific locale, you can provide similar commands in a file called glossariesxtr-.ldf, where identifies the dialect, locale, region or root language. See the description of
If the rules are for a particular script (independent of language or region) then they can be provided in a file given by glossariesxtr-.ldf instead. For example, the file glossariesxtr-Cyrl.ldf could contain:
Alternatively, if the rules are specific to a subject rather than a region or language, then you can provide a supplementary package. For example, if you have a package called, say, mapsymbols that provides map symbols, then the file mapsymbols.sty might contain:
The following commands are provided by glossaries-extra-bib2gls. They should be separated by the rule separator characters
For example, the following will place the mathematical Greek symbols (
There are a number of Latin rule blocks. Some of these included extended characters or ligatures (such as ß or œ) but they don’t include accented characters. If you require a Latin rule block that includes accented characters, digraphs, trigraphs or other extended characters, then it’s best to provide similar commands in a glossariesxtr-.ldf file for the particular language or region.
Additionally, there are commands that just cover the uppercase and lowercase forms of a special Greek character (
Additionally, there are commands for math italic partial differential ∂ (0x1D715)
A glstex file will typically start with
If you use the set-widest resource option, bib2gls v1.8+ will write the following command in the glstex file:
If bib2gls can’t determine the widest name (typically because the name field consists of commands that aren’t recognised by the interpreter) then bib2gls v1.8+ will write the following to the glstex file:
The glstex files may also contain instances of
The
The parent key identifies a parent entry (by its label), so determining if an entry has a parent can easily be achieved by testing if the parent field has been set (using
The other way around, testing if an entry has any children, is much harder. The base glossaries package provides
It’s much easier with bib2gls, as there are resource options available to save this information. The save-child-count option saves the child count for each entry in the childcount internal field. This total only includes the child entries that have been selected by the resource set.
Locations in external documents can be manually added by explicitly setting thevalue when an entry is indexed. However, this is a bit inconvenient so bib2gls provides a way to do this automatically. Both the main document and the supplemental document need to use the record option, and the entries provided via src in the main document must have the same labels as those in the supplementary document. The supplemental document is identified by the supplemental-locations resource option. See the bib2gls manual for further details.
Nameref records include the current title and hypertarget. These records are enabled with record=nameref and provide a more reliable way of saving the location hypertarget, which can’t be obtained with makeindex or xindy.
This option is best used with counter=chapter or counter=section if you want the title included in the location list. If the indexing counter is the default page, only the location number is shown. Similarly for counter=equation (or equations=true).
Normally locations are recorded in the aux file in the form:
The final argument
Since bib2gls is customized specifically for use with glossaries-extra, it’s now possible to save , so the recordnameref option does this. By providing both and , you can determine which target you would rather use. The default is to use , which will take you to the place where the corresponding counter was incremented with
With bib2gls v1.8+, normal locations are displayed using:
The locations identified by
If hyperref has been loaded, then
For example, if the record was created with counter=section but occurred in a table caption, then
In the above example with the section counter, will be the value of
The actual anchor used is obtained from the expansion of:
For example, to switch to
To allow for different formatting according to the counter name,
The following location formats are predefined. The equation counter:
If the corresponding
If
The link is encapsulated with the text-block command whose name is given by
The following command is provided but not used by default:
For compactness, bib2gls merges normal records if the , and all match. (An order of precedence can be provided for format conflicts.) With nameref records, you can use the --merge-nameref-on switch provided by bib2gls v1.8+ to determine how to merge nameref records. This switch must be followed by one of the following keywords:
Dual entries can be defined with entry types like
It may be useful to have a hyperlink from the entry in one glossary to its dependent in the other glossary. This can be achieved by instructing bib2gls to save the label of the entry’s opposite using dual-field. The value of this resource option indicates the field in which to save the label. If omitted,
The glossary style can then be adapted to check if the field has been set and, if so, to create a hyperlink. The following command is provided to assist with this:
The above example can be adapted as follows:
If you prefer instead to have the backlink on the name in both glossaries, then this can more easily be achieved with a resource option such as dual-backlink.
The commands described below were designed for use with bib2gls’s dual entries, but may also be used in other contexts where a label may potentially have a number of possible prefixes.
It’s possible to use commands like
Each possible prefix (which may be empty) is identified by:
You can prepend a prefix to the list using:
The list of known prefixes can be (locally) cleared with:
You can test if a prefix is already in the list with:
In the event that there’s no match for any of the prefixes (which will occur on the first LaTeX run before the glstex file has been created), the fallback is determined by the conditional:
In general it’s best to avoid adding multiple instances of the same prefix, so you can check with this command before adding a prefix to the list. However, it can be useful to repeat a prefix at the start or end of the list so that it can be used as a fallback for entries that haven’t yet been defined.
With the list of possible prefixes set up (including an empty prefix if necessary), you can use:
There are also analogous commands for the plural and case-changing versions:
If you want to use a specific field you can instead use:
Information is written to the transcript file with
This family of
If the requested field isn’t set (according to
If you need to know whether the requested field or the fallback field was used, the following will be set to the actual field used.
For example, suppose the file entries.bib contains:
What’s really needed is:
An alternative is to use
On the first LaTeX call (when the glstex file doesn’t exist), neither
Once bib2gls has been run and the glstex file exists, then
In the case of
If you change the label prefixes, remember to update the corresponding
Note that bib2gls v1.8+ provides hooks that identify the label prefixes in the glstex file:
The helper commands in the resource files are defined using
If then indexcounter field is set for the entry given by , this command does
The glossaries-extra-bib2gls package also provides definitions of the missing mathematical Greek commands:
It’s possible that you may also want a normal index as well as the glossary, and you may want entries to automatically be added to the index (as in this document). There are two attributes that govern this: indexname and dualindex.
The
The internal macro used by the glossaries package to write the information to the external glossary file is modified to check for the dualindex attribute.
In both cases, the indexing is done through:
The actual value is given by:
The sort value is assigned using:
The command used to perform the actual indexing is:
For example, to index the value of the first key, instead of the name key:
If the value of the attribute is “true”, no encap will be added, otherwise the encap will be the attribute value. For example:
By default the format key won’t be used with the dualindex attribute. You can allow the format key to override the attribute value by using the preamble-only command:
The
If this isn’t the case, you can use the following preamble-only commands to set the correct characters.
The base glossaries package advises against defining entries in the document environment. As mentioned in §2.4, this ability is disabled by default with glossaries-extra but can be enabled using the docdef package options.
Although this can be problematic, the glossaries-extra package provides a way of defining and using entries within the document environment without the tricks used with the docdef option. There are limitations with this approach, so take care with it. This function is disabled by default, but can be enabled using the preamble-only command:
The second optional argument
If you are considering doing something like:
There are also plural and case-changing alternatives to
The category is set to:
The glossaries-extra package comes with some additional files. Those listed in §14.1 provide dummy entries for testing various styles. They should be placed on TeX’s path.
There are also some sample files listed in §14.2. These should be located in the package documentation directory.
The base glossaries package provides files with dummy entries for testing. The glossaries-extra package provides an additional file with entries.
There are also bib files corresponding to all the available tex files for use with bib2gls.
The glossaries-extra package comes with some sample files that are listed below. There are also sample files provided with the glossaries package and with bib2gls. See also the Dickimaw Books Gallery.
There’s only one command provided by glossaries-extra that you’re likely to want to change in your document and that’s
You can redefine
Alternatively you can use the title key when you print the list of abbreviations. For example:
The other fixed text commands are the diagnostic messages, which shouldn’t appear in the final draft of your document.
The glossaries-extra package has the facility to load language modules (whose filename is in the form glossariesxtr-.ldf) if they exist, but won’t warn if they don’t. If glossaries-extra-bib2gls is loaded via the record package option then the check for language resource files will additionally search for an associated language script file given by glossariesxtr-.ldf where is the four letter script identifier, such as
If you want to write your own language module, you just need to create a file called glossariesxtr-.ldf, where identifies the language or dialect (see the tracklang package). For example, glossariesxtr-french.ldf. The file should start with:
You can adapt this for other languages by replacing all instances of the language identifier
This ldf file then needs to be put somewhere on TeX’s path so that it can be found by glossaries-extra. You might also want to consider uploading it to CTAN so that it can be useful to others. (Please don’t send it to me. I already have more packages than I am able to maintain.)
If you additionally want to provide translations for the diagnostic messages used when a glossary is missing, you need to redefine the following commands:
See the documented code (glossaries-extra-code.pdf) for further details.
Accessibility text corresponding to the name field. This field will be automatically set by
Behaves in a similar manner to see={[
The entry’s category (must be a simple label). §3.2; 33
If set, the value indicates the location counter to use by default when indexing this entry (overrides the counter associated with the glossary or the counter package option).
The entry’s description, as displayed in the glossary. If required in the text, use
Accessibility text corresponding to the description field.
The plural form of the entry’s description, if applicable. If omitted, this is set to the same value as the description, since descriptions tend not to be a singular entity.
Accessibility text corresponding to the descriptionplural field.
The entry’s text, as displayed on first use of
Accessibility text corresponding to the first field. This field will be automatically set by
The entry’s plural form, as displayed on first use of plural
Accessibility text corresponding to the firstplural field. This field will be automatically set by
The group label that identifies which group the entry belongs to. This key is only available with the record=only and record=nameref options, and is set by bib2gls, if invoked with --group or -g. This is an internal key assigned by bib2gls as a by-product of sorting. Explicit use without reference to the order of entries can result in fragmented groups. The corresponding title can be set with
The formatted location list used by the “unsrt” family of commands. This key is only available with the record option and is set by bib2gls unless save-locationsfalse is set. §3.2; 35
A field that is set by
Accessibility text corresponding to the long field.
As long but the plural form.
Accessibility text corresponding to the longplural field.
The entry’s name, as displayed in the glossary. This typically isn’t used outside of the glossary (the text and plural keys are used instead). However, if there is a need to specifically display the entry name, use
The label of the entry’s parent (from which the entry’s hierarchical level is obtained).
The entry’s plural form, as displayed on subsequent use of plural
Accessibility text corresponding to the plural field. This field will be automatically set by
The subsequent use singular prefix.
The first use singular prefix.
The first use plural prefix.
The subsequent use plural prefix.
With the base glossaries package this simply triggers an automatic cross-reference with
Behaves in a similar manner to see={[
A field that is set by
Accessibility text corresponding to the short field. This field will be automatically set by
As short but the plural form. The default is obtained by appending the abbreviation plural suffix, but this behaviour can be altered by category attributes. See §4 for further details.
Accessibility text corresponding to the shortplural field. This field will be automatically set by
Specifies the value to use for sorting (overrides the default). This key is usually required for xindy if the name key only contains commands (for example, the entry is a symbol), but explicitly using this key in other contexts can break certain sort methods. Don’t use the sort field with bib2gls .
The entry’s associated symbol (optional), which can be displayed with
Accessibility text corresponding to the symbol field.
The plural form of the symbol, if applicable, which can be displayed with
Accessibility text corresponding to the symbolplural field.
The entry’s text, as displayed on subsequent use of
Accessibility text corresponding to the text field. This field will be automatically set by
Assigns the entry to the glossary identified by .
A generic field, which can be displayed with
Accessibility text corresponding to the user1 field.
A generic field, which can be displayed with
Accessibility text corresponding to the user2 field.
A generic field, which can be displayed with
Accessibility text corresponding to the user3 field.
A generic field, which can be displayed with
Accessibility text corresponding to the user4 field.
A generic field, which can be displayed with
Accessibility text corresponding to the user5 field.
A generic field, which can be displayed with
Accessibility text corresponding to the user6 field.
Used with the save-child-count resource option to store the entry’s child count.
Used with the save-child-count resource option to store the entry’s children as an etoolbox internal list.
Used with the indexcounter package option and the save-index-counter resource option. The value is set to the hyperlink target of the first wrglossary location or the first instance for a specific location encap.
Used by
Used with the --record-count switch to store the total number of records for the associated entry.
Used with the --record-count switch to store the total number of records with the location counter for the associated entry.
Used with the --record-count-unit switch to store the total number of records with the location counter set to for the associated entry.
Used with
Used by bib2gls to store the group label obtained from the secondary sort.
Corresponds to user1 key.
Corresponds to user2 key.
Corresponds to user3 key.
The location counter.
The control sequence name (without the leading backslash) that should be used to encapsulate the entry location.
Determines whether or not the link text should have a hyperlink (provided hyperlinks are supported).
Determines whether the hyperlink should be inside or outside of
The name of the control sequence to use for the inner formatting. §5.1.2; 190
If true use
If true this option will suppress indexing. If you are using bib2gls, you may want to consider using format=glsignore to prevent a location but ensure that the entry is selected. §5.1.2; 192
Determines whether or not to unset the first use flag after the link text. The value may be one of:
The prefix to use for the entry’s hyperlink target. §5.1.2; 195
Determines whether or not to reset the entry before the link text. Allowed values: none (no reset), local (localise the reset) and global. §5.1.2; 190
Determines whether or not to unset the entry before the link text. Allowed values: none (no unset), local (localise the unset) and global. §5.1.2; 191
The name of the control sequence to use instead of
Set the hyper location to this value instead of obtaining it from
Set the location to this value instead of obtaining it from the location counter. §5.1.2; 194
Only available with
Determines whether to do the indexing before or after the link text. Allowed values: before and after. §5.1.2; 193
Options to pass to the
The category to assign to the multi-entry set. §7.9.6; 361
The value to pass to the format option for the main entry. §7.9.2; 357
The value to pass to the format option for the “other” elements. §7.9.2; 357
The prefix to use on first use of the multi-entry. §7.9.4; 359
Determines whether or not to skip the main entry on first use. §7.9.5; 359
Determines whether or not to skip the “other” elements on first use. §7.9.5; 359
The suffix to use on first use of the multi-entry. §7.9.4; 359
Indicates whether or not to use hyperlinks, if supported, for all elements. This option is for use in the optional argument of
Indicates which elements should have hyperlinks, if supported. This option is a multi-entry setting, see §7.9. §7.9.6; 360
Indicates if the main element should be indexed, should only be indexed on first use or should not indexed. §7.9.1; 356
Indicates if the “other” elements should be indexed, should only be indexed on first use or should not indexed. §7.9.1; 357
Options to pass to the
The default options to pass to commands like
Indicates whether or not the multi-entry post-link hook should be enabled and, if so, whether it should only be enabled on first or subsequent use. §7.9.3; 358
Indicates which post-link hook to use if the multi-entry post-link hook has been enabled. §7.9.3; 358
Indicates whether or not the multi-entry first use flag should be unset. §7.10; 363
Options to pass to the
Indicates which post-link hooks should be enabled. §7.9.3; 357
Indicates whether or not the prereset options should have a local or global effect. §7.10; 363
Indicates whether or not to reset all elements’ first use flag before using
Indicates whether or not to reset the main entry’s first use flag before using
Indicates whether or not to reset all “other” elements’ first use flag before using
Multi-entry options that will override any conflicting options already assigned to the multi-entry. §7.10; 362
The control sequence name of the command that should encapsulate the entire content. §7.9.6; 361
Indicates whether or not to unset all elements’ first use flag before using
Indicates whether or not to unset the main entry’s first use flag before using
Indicates whether or not to unset all “other” elements’ first use flag before using
The prefix to use on subsequent use of the multi-entry. §7.9.4; 359
Determines whether or not to skip the main entry on subsequent use. §7.9.5; 360
Determines whether or not to skip the “other” elements on subsequent use. §7.9.5; 360
The suffix to use on subsequent use of the multi-entry. §7.9.4; 359
If true, enable the entry counter.
If true, treats all entries as though they have the same hierarchical level (the value of leveloffset). This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. §8.3; 381
Enables group formation. This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. Note that no groups will be formed when invoking bib2gls with the default --no-group, regardless of this setting. §8.3; 382
Adds
Set or increment the hierarchical level offset. If starts with
Suppress the gap implemented by some glossary styles between groups.
Suppress the location list. Note that nonumberlist=false will have no effect with the save-locations=false resource option as there won’t be any location lists to display.
Suppress the post-description punctuation.
Indicates whether or not glossary section headers will be numbered and also if they should automatically be labelled. The numberedsection package option will change the default setting to match. §8.3; 380
Redefines
Redefines
Redefines
Only available with
Use the glossary style. §8.3; 381
If true, enable the sub-entry counter.
If true, each entry in the glossary should have a hypertarget created, if supported by the glossary style and if hyperlinks are enabled. §8.3; 384
Sets the glossary title (overriding the default). §8.3; 380
Sets the glossary toc title (overriding the default). §8.3; 380
Identifies the glossary to display.
An abbreviation style like long-em-noshort-em-desc but sets the regular attribute to
An abbreviation style like long-noshort-desc but formats both the long and short form in an emphasized font (
An abbreviation style like long-em-noshort-em but sets the regular attribute to
An abbreviation style like long-noshort but formats both the long and short form in an emphasized font (
An abbreviation style like long-short-desc but formats both the long and short form in an emphasized font (
An abbreviation style like long-short but formats both the long and short form in an emphasized font (
An abbreviation style like long-noshort-desc but checks if the inserted material starts with a hyphen (use with markwords attribute). 107
An abbreviation style like long-hyphen-short-hyphen but doesn’t show the short form on first use. 107
An abbreviation style like long-hyphen-short-hyphen-desc but places the insert and parenthetical material in the post-link hook. 106
An abbreviation style like long-hyphen-short-hyphen but places the insert and parenthetical material in the post-link hook. 104
An abbreviation style like long-hyphen-short-hyphen but the description must be supplied. 105
An abbreviation style like long-short but checks if the inserted material starts with a hyphen (use with markwords or markshortwords attributes). 103
As long-noshort-desc but it will set the regular attribute to
An abbreviation style that only shows the long form on first use and subsequent use. The short form won’t be showed unless you use a command like
An abbreviation style like long-noshort-desc but formats the short form in an emphasized font (
An abbreviation style like long-noshort but formats the short form in an emphasized font (
As long-noshort but it will set the regular attribute to
An abbreviation style like long-noshort-desc but formats the short form in a small caps font (
An abbreviation style like long-noshort but formats the short form in a small caps font (
An abbreviation style like long-noshort-desc but formats the short form in a smaller font (
An abbreviation style like long-noshort but formats the short form in a smaller font (
An abbreviation style that only shows the long form on first use and subsequent use. The short form won’t be showed unless you use a command like
An abbreviation style like long-only-short-only but the description must be supplied. 112
An abbreviation style that only shows the long form on first use and only shows the short form on subsequent use. 111
An abbreviation style like long-only-short-sc-only but the description must be supplied. 113
An abbreviation style like long-only-short-only but uses small caps for the short form. 112
An abbreviation style like long-postshort-sc-user but the description must be supplied. 92
An abbreviation style like long-postshort-user but formats the short form in a small caps font (
An abbreviation style like long-postshort-user but the description must be supplied. 90
An abbreviation style like long-short-user but the parenthetical content is placed in the post-link hook. 90
As long-short but the description must be supplied in . 82
An abbreviation style like long-short-desc but formats the short form in an emphasized font (
An abbreviation style like long-short but formats the short form in an emphasized font (
An abbreviation style like long-short-desc but formats the short form in a small caps font (
An abbreviation style like long-short but formats the short form in a small caps font (
An abbreviation style like long-short-desc but formats the short form in a smaller font (
An abbreviation style like long-short but formats the short form in a smaller font (
An abbreviation style like long-short-user but the description must be supplied. 89
An abbreviation style like long-short but includes the value of the field identified by
An abbreviation style that shows the long form followed by the short form on first use. If the argument is used with the
An abbreviation style like nolong-short but formats the short form in an emphasized font (
As nolong-short but it will set the regular attribute to
An abbreviation style like nolong-short but formats the short form in a small caps font (
An abbreviation style like nolong-short but formats the short form in a smaller font (
As short-nolong but the inline full form shows the long form followed by the short form in parentheses. 66
An abbreviation style like short-footnote-desc but formats the short form in an emphasized font (
An abbreviation style like short-footnote but formats the short form in an emphasized font (
An abbreviation style like short-long-desc but formats the short form in an emphasized font (
An abbreviation style like short-long-desc but formats both the long and short form in an emphasized font (
An abbreviation style like short-long but formats both the long and short form in an emphasized font (
An abbreviation style like short-long but formats the short form in an emphasized font (
An abbreviation style like short-nolong-desc but formats the short form in an emphasized font (
An abbreviation style like short-nolong but formats the short form in an emphasized font (
An abbreviation style like short-postfootnote-desc but formats the short form in an emphasized font (
An abbreviation style like short-postfootnote but formats the short form in an emphasized font (
As short-footnote but the description must be supplied in . 115, 116
An abbreviation style that shows the short form with the long form as a footnote on first use. If the argument is used with the
An abbreviation style like short-hyphen-long-hyphen but the description must be supplied. 110
An abbreviation style like short-long but checks if the inserted material starts with a hyphen (use with markwords or markshortwords attributes). 108
An abbreviation style like short-hyphen-long-hyphen-desc but the insert and parenthetical material are placed in the post-link hook. 110
An abbreviation style like short-hyphen-long-hyphen but the insert and parenthetical material are placed in the post-link hook. 109
As short-long but the description must be supplied in . 94
An abbreviation style like short-long-user but the description must be supplied. 100
An abbreviation style like short-long but includes the value of the field identified by
An abbreviation style that shows the short form followed by the long form on first use. If the argument is used with the
As short-nolong-desc but it will set the regular attribute to
As short-nolong but the description must be supplied in . 66, 66
As short-nolong but it will set the regular attribute to
An abbreviation style that only shows the short form on first use and subsequent use. The long form won’t be showed unless you use a command like
As short-postfootnote but the description must be supplied in . 117, 118
Similar to short-footnote but the footnote is placed in the post-link hook. 116, 117
An abbreviation style like short-postlong-user but the description must be supplied. 102
An abbreviation style like short-long but includes the value of the field identified by
An abbreviation style like short-footnote-desc but formats the short form in a small caps font (
An abbreviation style like short-footnote but formats the short form in a small caps font (
An abbreviation style like short-long-desc but formats the short form in a small caps font (
An abbreviation style like short-long but formats the short form in a small caps font (
An abbreviation style like short-nolong-desc but formats the short form in a small caps font (
An abbreviation style like short-nolong but formats the short form in a small caps font (
An abbreviation style like short-postfootnote-desc but formats the short form in a small caps font (
An abbreviation style like short-postfootnote but formats the short form in a small caps font (
An abbreviation style like short-footnote-desc but formats the short form in a smaller font (
An abbreviation style like short-footnote but formats the short form in a smaller font (
An abbreviation style like short-long-desc but formats the short form in a smaller font (
An abbreviation style like short-long but formats the short form in a smaller font (
An abbreviation style like short-nolong-desc but formats the short form in a smaller font (
An abbreviation style like short-nolong but formats the short form in a smaller font (
An abbreviation style like short-postfootnote-desc but formats the short form in a smaller font (
An abbreviation style like short-postfootnote but formats the short form in a smaller font (
This style displays the glossary in a table for (either longtable or tabular) with two columns: the long form and the short form. §8.7.2.6; 465
This style displays the glossary in a table for (either longtable or tabular) with two columns: the short form and the long form. §8.7.2.6; 464
As list but starts the description on a new line.
Like tree but the width of the widest name must be supplied (using a command like
As alttree but has headers at the start of each group.
This style is designed for indexes. Symbols and descriptions are not shown. Since descriptions aren’t shown, there’s no post-description hook. §8.7.1
A hierarchical style that supports up to level 2, similar to normal indexes, but symbols and descriptions are shown.
As index but has headers at the start of each group.
A compact style with all entries listed in the same paragraph and no groups, locations or symbols.
This style uses the description environment and places the entry name in the optional argument of
A list-like style that has a dotted leader between the name and description. The location list isn’t shown.
As list but has headers at the start of each group.
As listgroup but has a row at the start with hyperlinks to each group.
This style displays the glossary using longtable and horizontal rules from the booktabs package.
This style displays the glossary in a table for (either longtable or tabular) with two columns: the custom 1 field and the name. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with three columns: the custom 1 field, custom 2 field, and the name. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with four columns: the custom 1 field, custom 2 field, custom 3 field, and the name. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with three columns: the description, the custom 1 field and the name. §8.7.2.7; 473
This style displays the glossary in a table for (either longtable or tabular) with four columns: the description, the custom 1 field, the custom 2 field and the name. §8.7.2.7; 473
This style displays the glossary in a table for (either longtable or tabular) with five columns: the description, the custom 1 field, the custom 2 field, the custom 3 field and the name. §8.7.2.7; 474
This style displays the glossary in a table for (either longtable or tabular) with two columns: the description and the name. §8.7.2.1; 453
This style displays the glossary in a table for (either longtable or tabular) with three columns: the description, symbol and name. §8.7.2.2; 456
This style displays the glossary in a table for (either longtable or tabular) with two columns: the description and the symbol. §8.7.2.5; 462
This style displays the glossary in a table for (either longtable or tabular) with three columns: the location list, description and name. §8.7.2.3; 457
This style displays the glossary in a table for (either longtable or tabular) with four columns: the location list, description, symbol and name. §8.7.2.4; 459
This style displays the glossary in a table for (either longtable or tabular) with four columns: the location list, symbol, description and name. §8.7.2.4; 459
This style displays the glossary in a table for (either longtable or tabular) with two columns: the name and the custom 1 field. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, the custom 1 field and the description. §8.7.2.7; 473
This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, custom 1 field and custom 2 field. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, the custom 1 field, the custom 2 field and the description. §8.7.2.7; 473
This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, custom 1 field, custom 2 field and custom 3 field. §8.7.2.7; 470
This style displays the glossary in a table for (either longtable or tabular) with five columns: the name, the custom 1 field, the custom 2 field, the custom 3 field and the description. §8.7.2.7; 473
This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, description and location list. §8.7.2.3; 456
This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, description, symbol and location list. §8.7.2.4; 458
This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, description and symbol. §8.7.2.2; 454
This style displays the glossary in a table for (either longtable or tabular) with two columns: the name and the description. §8.7.2.1; 453
This style displays the glossary in a table for (either longtable or tabular) with four columns: the name, symbol, description and location list. §8.7.2.4; 458
This style displays the glossary in a table for (either longtable or tabular) with three columns: the name, symbol and description. §8.7.2.2; 455
This style displays the glossary in a table for (either longtable or tabular) with three columns: the symbol, description and name. §8.7.2.2; 455
This style displays the glossary in a table for (either longtable or tabular) with two columns: the symbol and the description. §8.7.2.5; 461
This style uses the longtable environment (provided by the longtable package). Symbols and sub-entry names are not shown.
This style uses the longtable environment (provided by the longtable package) with a header row. Symbols and sub-entry names are not shown.
This style displays the glossary using longtable with ragged right paragraph formatting for the description column.
As index but puts the content inside a multicols environment.
As mcolindex but has headers at the start of each group.
As tree but puts the content inside a multicols environment.
This style displays the glossary using supertabular.
This style displays the glossary using supertabular with ragged right paragraph formatting for the description column.
This style is specific to
This style is designed for hierarchical glossaries where the top-level entry represents a topic. §8.7.3; 474
Similar to topic but the sub-entries are placed in a multicols environment. §8.7.3; 474
A hierarchical style that supports unlimited levels (although a deep hierarchy may not fit the available line width) with that shows symbols and descriptions.
As tree but has headers at the start of each group.
As treegroup but has a row at the start with hyperlinks to each group.
Like tree but the child entries don’t have their name shown.
Internal command used within the construction of the glossary code by the “unsrt” family of commands. Should not be used or modified but
Information in the aux about a multi-label defined in the previous LaTeX run. §7.13; 373
Set to the definition of
Set to the definition of
Set to the definition of
Redefines
Redefines
A synonym for
A synonym for
A synonym for
Expands to the title of the
Style-sensitive abbreviation suffix. This is the command that’s actually used in the value of the shortplural key when an entry is defined with
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
As
Displays the full form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
As
Displays the plural full form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
As
Displays the long form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
As
Displays the plural long form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
Used to encapsulate the acronym short form on subsequent use by the base glossaries package. This is redefined by glossaries-extra to use
Expands to the title of the
Expands to the label of the default acronym glossary. The acronym or acronyms package option will redefine this to
Used for the plural suffixes for the base package’s acronym mechanism. Not used with glossaries-extra’s abbreviations, which use
As
Displays the short form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
As
Displays the plural short form of an acronym. Only for use with the base glossaries package’s acronym mechanism. This command is not compatible with
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
Defined with
Used as a cross-reference tag (provided by language packages, such as babel).
Used by
Appends (locally)
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
A synonym for
Defined with
Indicates that the bib2gls records are in the file identified in the argument , which corresponds to the file .aux identified in the option bibglsaux=.
Hook written to the glstex file identifying the dual label prefix. §11.5.7; 594
Defines secondary terms provided with
Hook written to the glstex file identifying the primary label prefix. §11.5.7; 594
Sets the last group title.
Sets the location record count for the given entry. §11.4.2; 555
Sets the total record count for the given entry. §11.4.2; 554
Hook written to the glstex file identifying the tertiary label prefix. §11.5.7; 594
Converts title case, where may contain text-block commands. The starred form only permits a text-block command at the start of the argument. Limitations apply, see the mfirstuc documentation for further details, either:
Converts title case. Limitations apply, see the mfirstuc documentation for further details, either:
Defined by
Like
Like
Like
Format used by
Format used by
Format used by
Like
Like
Like
Format used by
Format used by
Format used by
Defined with
Defined by
Defined by
Like
Defined by the
Expands to the default field definitions for the entry. §4.5.3.1; 165
Overrides the default display format (
Used as a separator between locations.
Used between the start and end of a location range.
Expands to the title of the description column for headed tabular-like styles.
As
As
Does
As
As
As
As
As
Set by the
Set by the
Expands to the fallback field to use for the
As
As
As
As
As
Defined with
If the glossary given by doesn’t exist, this does , otherwise it generates an error and does . This uses the starred form of
Formats the comma-separated list datatool documentation for further details, either:
Does datatool documentation for further details, either:
As
As
As
Expands to the title of the name column for headed tabular-like styles.
Defined with
Defined with
Expands to additional fields that need to be set with
Used to encapsulate the acronym short form on first use by the base glossaries package. This is redefined by glossaries-extra to use
Defined by
Defined by
Iterates overall all lists of abbreviations, defines the command §8; 379
Iterates overall all glossaries that have been declared lists of acronyms, defines the command to the current label and does . Use
Iterates overall all the glossary labels given in the argument, defines the command to the current label and does . If the optional argument is omitted, the list of all non-ignored glossaries is assumed.
Does
Iterates over all entries in the given glossary and, at each iteration, defines the command to the current entry label and does . The optional argument is the glossary label and defaults to
As
As
As
Expands to the default prefix for the entry’s hypertarget anchor in the glossary.
Issues a warning with
Writes an information message to the transcript.
Change allowed options that are defined or modified by the glossaries-extra package. Note that some options can only be passed as package options. §2; 8
Writes a warning in the transcript with the current line number. The nowarn option redefines this command to do nothing.
Writes a warning in the transcript without a corresponding line number. The nowarn option redefines this command to do nothing.
Used within the glossary to encapsulate the location list (redefined by the nonumberlist option).
Inserted after
Expands to the default glossary title (provided by glossaries if not already defined).
Used at the end of the glossary.
Used at the start of the glossary. This will be locally redefined to the preamble associated with the current glossary, if one has been set.
Occurs at the start of a glossary (except with
Initialised by the
Initialised by the
Used to format a top-level entry. This command should be redefined by the glossary style.
As
Used by glossary styles to display the entry’s description.
As
Used by glossary styles to display the entry’s name.
Behaves like
As
Used by glossary styles to display the entry’s symbol.
Used at the start of each glossary to set the current options for the
As
As
References the entry identified by first use and whether or not the regular attribute has been set. The argument may be inserted at the end of the link text or may be inserted at a different point (for example, after the long form on first use for some abbreviation styles. For the first optional argument, see
Formatting command for the short form used by the abbreviation styles that don’t apply a font change by default. 132
Short form font used by the “em” abbreviation styles. 158
Font formatting command for the short form, initialised by the abbreviation style. 171
Short form font used by the “hyphen” abbreviation styles. 148
Short form font used by the “only” abbreviation styles. 154
Short form font used by the small caps “sc” abbreviation styles. 156
Short form font used by the “sc-only” styles, such as long-only-short-sc-only. 154
Short form font used by the small caps “sc-user” abbreviation styles. 136
Short form font used by the “sm” abbreviation styles. 157
Short form font used by the “user” abbreviation styles. 135
As
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the description key with the accessibility support enabled for that key (descriptionaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the descriptionplural key with the accessibility support enabled for that key (descriptionpluralaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the first key with the accessibility support enabled for that key (firstaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the firstplural key with the accessibility support enabled for that key (firstpluralaccess). If there is no accessibility support, this just uses
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Similar to
Applies accsupp.
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the long key with the accessibility support enabled for that key (longaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the longplural key with the accessibility support enabled for that key (longpluralaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the name key with the accessibility support enabled for that key (access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the plural key with the accessibility support enabled for that key (pluralaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the short key with the accessibility support enabled for that key (shortaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the shortplural key with the accessibility support enabled for that key (shortpluralaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the symbol key with the accessibility support enabled for that key (symbolaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the symbolplural key with the accessibility support enabled for that key (symbolpluralaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the text key with the accessibility support enabled for that key (textaccess). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user1 key with the accessibility support enabled for that key (user1access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user2 key with the accessibility support enabled for that key (user2access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user3 key with the accessibility support enabled for that key (user3access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user4 key with the accessibility support enabled for that key (user4access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user5 key with the accessibility support enabled for that key (user5access). If there is no accessibility support, this just uses
The all caps version of
The sentence case version of
If accessibility support was enabled when glossaries-extra was loaded (accsupp) this will display the value of the user6 key with the accessibility support enabled for that key (user6access). If there is no accessibility support, this just uses
Applies
Uses a non-breakable space if the short form is less than
Expands to the maximum value used by
Indexes the entry identified by
Iterates over all glossaries (or all those listed in the types option) and indexes each entry in the glossary. The optional argument are passed to
Iterates over all glossaries listed in and indexes each entry (with format=glsignore) that hasn’t already been indexed. This command can’t be used with bib2gls. Use the selection=all resource option instead. §5.8; 260
Iterates over all glossaries listed in and indexes each entry (with format=glsignore) that hasn’t been used. This command can’t be used with bib2gls. Use the selection=all resource option instead.
Does
Defines a new glossary entry key with the given default value and commands that are analogous to
Hook implemented after setting the options passed to
Hook implemented before setting the options passed to
Provides a new glossary entry key with a default value and a command for simply accessing the value (without indexing or hyperlinks). The starred version switches on field expansion for the given key.
Used to display the top-level entry item in the altlist styles. §8.6.5.3; 433
Inserted before the child descriptions for the alttree styles. §8.6.5.4; 435
Inserted before the top-level descriptions for the alttree styles. §8.6.5.4; 435
Appends post-link hook associated with the category identified by the label (or simply defines it, if it doesn’t already exist). §5.5.4; 250
Expands to the prefix for the label used by numberedsection=autolabel and numberedsection=nameref.
Expands to a literal backslash.
Just does
Initialised by the
Expands to
Expands to the entry’s category. §10; 515
Expands to the category label of the abbreviation that is in the process of being defined by
Separator used between elements of a multi-entry set where only the next element have been marked as used. §7.4; 345
Separator used between elements of a multi-entry set where neither the previous nor the next element has been marked as used. §7.4; 346
Separator used between elements of a multi-entry set where both elements have been marked as used. §7.4; 345
Separator used between elements of a multi-entry set where only the previous element have been marked as used. §7.4; 346
Assigned at the start of each entry item within the glossary. This command may be used by glossary hooks, such as the post-description hook, to reference the current entry.
Defined within the “unsrt” family of commands to the current hierarchical level (taking leveloffset into account). §8.4.3; 404
Conditional commands such as
May be used within
May be used within
The custom text provided by
Used when
Expands to the label of the default glossary, which is normally
Defines post-description hook associated with the category identified by the label . This simply (re)defines
Defines post-link hook associated with the category identified by the label . This simply (re)defines
Defines post-name hook associated with the category identified by the label . This simply (re)defines
As
As
References the entry identified by description value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
As
Does descriptionaccess replacement text (if set).
Does descriptionpluralaccess replacement text (if set).
A length register used to set the width of the description column for tabular-like styles.
As
References the entry identified by link text. This command unsets the first use flag (use
Formats the location list for the given entry. Redefined by glossaries-extra-bib2gls to obtain the location list from the location field. §11.5.8; 595
Does undefaction=error) or a warning (undefaction=warn) and, within the document environment, it will insert the unknown marker
Similar to
Like
Does undefaction=error) or a warning (undefaction=warn).
Enables entry counting.
Enables entry unit counting. §6.1; 315
Encapsulates the indexing code (within
As
Used by
Expands to the current entry count running total or 0 if not available (needs to be enabled with
Partially robust command that displays the value of the description field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the description field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the description field doesn’t contain any fragile commands.
Simply expands to the value of the descriptionplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the descriptionplural field doesn’t contain any fragile commands.
Partially robust command that displays the value of the first field with the first letter converted to uppercase. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the first field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the first field doesn’t contain any fragile commands.
Partially robust command that displays the value of the firstplural field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the firstplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the firstplural field doesn’t contain any fragile commands.
The default display format used by the
Expands to the number of times the given entry has been indexed. This will expand to 0 if the entry hasn’t been indexed or hasn’t been defined. §5.8; 267
Does nothing if entrycounter=false, otherwise increments and displays the associated counter.
Displays the value of the long field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the long field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the long field doesn’t contain any fragile commands.
Displays the value of the longplural field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the longplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the longplural field doesn’t contain any fragile commands.
Partially robust command that displays the value of the name field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the name key. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the name key doesn’t contain any fragile commands.
Displays the location list for the given entry. Redefined by glossaries-extra-bib2gls to obtain the location list from the location field. §11.5.8; 595
Expands to the value of the parent field. Expands to nothing if the parent field hasn’t been set and expands to
Used when
Partially robust command that displays the value of the plural field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the plural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the plural field doesn’t contain any fragile commands.
Expands to the final entry count total from the previous LaTeX run or if 0 if not available (needs to be enabled with
Expands to the maximum entry unit count total from the previous LaTeX run or if 0 if not available (needs to be enabled with
Expands to the final entry count total from the previous LaTeX run or if 0 if not available (needs to be enabled with
Displays the value of the short field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the short field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the short field doesn’t contain any fragile commands.
Displays the value of the shortplural field with sentence case applied. Does nothing if the entry hasn’t been defined. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the shortplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the shortplural field doesn’t contain any fragile commands.
Partially robust command that displays the value of the symbol field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the symbol field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the symbol field doesn’t contain any fragile commands.
As
Simply expands to the value of the symbolplural field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the symbolplural field doesn’t contain any fragile commands.
Partially robust command that displays the value of the text field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the text field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the text field doesn’t contain any fragile commands.
Applies title case to the value supplied in the given field (which is obtained with
Simply expands to the value of the type key. Does nothing if the entry hasn’t been defined.
Partially robust command that displays the value of the user1 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user1 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user1 field doesn’t contain any fragile commands.
Partially robust command that displays the value of the user2 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user2 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user2 field doesn’t contain any fragile commands.
Partially robust command that displays the value of the user3 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user3 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user3 field doesn’t contain any fragile commands.
Partially robust command that displays the value of the user4 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user4 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user4 field doesn’t contain any fragile commands.
Partially robust command that displays the value of the user5 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user5 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user5 field doesn’t contain any fragile commands.
Partially robust command that displays the value of the user6 field with sentence case applied. As from glossaries v4.50, this command can expand in PDF bookmarks. Outside of PDF bookmarks it will expand to a robust internal command.
Simply expands to the value of the user6 field. Does nothing if the entry hasn’t been defined. May be used in expandable contexts provided that the user6 field doesn’t contain any fragile commands.
Locally adds the field given by its internal field label to the inner formatting exclusion list for the entry identified by . This typically means that the field value already contains the inner formatting. §5.5.3; 245
Expand field values when defining entries, except for those that explicitly have expansion disabled with
A general purpose hook that’s performed within
If glossaries-extra has been loaded, this command will first check for the existence of the command
Locally assigns the field (identified by the internal field label ) for the entry identified by . Produces an error (or warning with undefaction=warn) if the entry or field doesn’t exist. Note that this doesn’t update any associated fields.
Locally assigns the full expansion of field (identified by the internal field label ) for the entry identified by . Produces an error (or warning with undefaction=warn) if the entry or field doesn’t exist. Note that this doesn’t update any associated fields.
Fetches the value of the given field for the given entry and stores it in the command internal field label) hasn’t been defined. Uses
As
As
Finds and sets the widest name for all entries in the given glossaries. §8.6.5.4; 439
Like
Like
Like
Finds and sets the widest name for all entries with hierarchical level less than or equal to 2 in the given glossaries. §8.6.5.4; 439
A synonym for
Finds and sets the widest name for all top-level entries in the given glossaries. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.
Finds and sets the widest name for all entries that have been marked as used in the given glossaries. §8.6.5.4; 439
Like
Like
Like
Finds and sets the widest name for all entries that have been marked as used with hierarchical level less than or equal to 2 in the given glossaries. §8.6.5.4; 439
Finds and sets the widest name for all top-level entries that have been marked as used in the given glossaries. §8.6.5.4; 439
As
As
References the entry identified by first value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with
Formatting command for the short form on first use used by the abbreviation styles that don’t apply a font change by default. 132
Short form font used by the “em” abbreviation styles on first use. 158
Font formatting command for the short form on first use, initialised by the abbreviation style. 171
Short form font used by the “hyphen” abbreviation styles on first use. 148
Short form font used by the “only” abbreviation styles on first use. 154
Short form font used by the small caps “sc” abbreviation styles on first use. 157
Short form font used by the “sc-only” abbreviation styles on first use. 154
Short form font used by the small caps “sc-user” abbreviation styles on first use. 136
Short form font used by the “sm” abbreviation styles on first use. 157
Short form font used by the “user” abbreviation styles on first use. 136
Does firstaccess replacement text (if set).
Applies both
Applies both
Formatting command for the long form on first use used by the abbreviation styles that don’t apply a font change by default. 133
Long form font used by the “em” abbreviation styles on first use. 158
Font formatting command for the long form on first use, initialised by the abbreviation style. 171
Formatting command for the first use long form used by the footnote abbreviation styles. 145
Long form font used by the “hyphen” abbreviation styles on first use. 148
Long form font used by the “only” abbreviation styles on first use. 154
Long form font used by the “user” abbreviation styles on first use. 136
As
As
References the entry identified by firstplural value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with
Does firstpluralaccess replacement text (if set).
If the markshortwords attribute is set for the given category, this encapsulates with
If the markwords attribute is set for the given category, this encapsulates with
As
As
Applies the formatting command internal field label, including appended. Used by the inner formatting commands. Note that
For use within captions or section titles to display the formatted all caps first. §5.3.2; 212
For use within captions or section titles to display the formatted sentence case first. §5.3.2; 212
For use within captions or section titles to display the formatted first. §5.3.2; 212
For use within captions or section titles to display the formatted all caps firstplural. §5.3.2; 213
For use within captions or section titles to display the formatted sentence case firstplural. §5.3.2; 213
For use within captions or section titles to display the formatted firstplural. §5.3.2; 212
Designed for use in section headings or captions, this expands to just
Designed for use in section headings or captions, this expands to just
Designed for use in section headings or captions, this expands to just
Designed for use in section headings or captions, this expands to just
Designed for use in section headings or captions, this expands to just
Designed for use in section headings or captions, this expands to just
As
A shortcut that applies
For use within captions or section titles to display the formatted all caps long form. §5.3.2; 208
For use within captions or section titles to display the formatted sentence case long form. §5.3.2; 207
For use within captions or section titles to display the formatted long form. §5.3.2; 207
For use within captions or section titles to display the formatted all caps long plural form. §5.3.2; 208
For use within captions or section titles to display the formatted sentence case long plural form. §5.3.2; 208
For use within captions or section titles to display the formatted long plural form. §5.3.2; 208
For use within captions or section titles to display the formatted all caps name. §5.3.2; 211
For use within captions or section titles to display the formatted sentence case name. §5.3.2; 211
For use within captions or section titles to display the formatted name. §5.3.2; 210
For use within captions or section titles to display the formatted all caps plural. §5.3.2; 212
For use within captions or section titles to display the formatted sentence case plural. §5.3.2; 212
For use within captions or section titles to display the formatted plural. §5.3.2; 211
For use within captions or section titles to display the formatted all caps short form. §5.3.2; 206
For use within captions or section titles to display the formatted sentence case short form. §5.3.2; 206
For use within captions or section titles to display the formatted short form. §5.3.2; 206
For use within captions or section titles to display the formatted all caps short plural form. §5.3.2; 207
For use within captions or section titles to display the formatted sentence case short plural form. §5.3.2; 207
For use within captions or section titles to display the formatted short plural form. §5.3.2; 206
For use within captions or section titles to display the formatted all caps text. §5.3.2; 211
For use within captions or section titles to display the formatted sentence case text. §5.3.2; 211
For use within captions or section titles to display the formatted text. §5.3.2; 211
Iterates over all entry in the given list of glossaries (or all non-ignored glossaries, if the optional argument is omitted) and performs for those entries that have the category set to . Within , the current entry can be referenced with and the glossary can be referenced with . §10; 516
Iterates over all entry in the given list of glossaries (or all non-ignored glossaries, if the optional argument is omitted) and performs for those entries that have the attribute given by set to . Within , the current entry can be referenced with and the glossary can be referenced with . §10; 516
The display format used by
Expands to the value of the given attribute for the category associated with the entry identified by §10.2.2; 528
Expands to the value of the given attribute for the given category. Expands to nothing if the attribute hasn’t been set. §10.2.2; 528
Expands to the widest top-level name. §8.6.5.4; 438
Expands to the widest name for the given hierarchical level or to the widest top-level name, if no widest name set for . §8.6.5.4; 438
Inserted at the start of each group in a glossary (unless groups=false) to display the group’s heading, if applicable, using the title associated with or, if no title provided, just . This command is defined by glossary styles as appropriate.
Inserted before each group heading (except the first) in a glossary (unless groups=false). This command is defined by glossary styles as appropriate. Most of the predefined styles define this command to check the nogroupskip option.
Tests if the given attribute has been set for the category associated with the entry identified by etoolbox’s
Tests if the given attribute has been set for the given category (using etoolbox’s
Expands to a literal hash
Expands to
Creates a hyperlink to the given entry with the hyperlink text provided in the optional argument. If omitted, the default is
This will encapsulate each location with a hyperlink, if supported. This may be used as a location encap. The argument may be a single location or locations delimited by
Tests if the field given by its internal field label has been added to the inner formatting exclusion list for the entry identified by . §5.5.3; 244
Tests if the category associated with the entry identified by §10.2.2; 529
Tests if the category associated with the entry given by
Tests if the entry identified by category set to (uses
Tests if the given category has the given attribute set to §10.2.2; 528
Does datatool’s
Tests if the given category has the given attribute set to
Tests if the value obtained from
Does regular attribute explicitly set to
Does regular attribute explicitly set to
Initialised by the
Does regular attribute explicitly set to
Does regular attribute explicitly set to
Does nothing. When used as a location encap, this signifies to bib2gls that the entry is required but the location shouldn’t be added to the location list. With other indexing methods, this simply creates an invisible location.
Indicates what indexing option has been chosen.
Used to format sub-group headers for the indexgroup styles.
Hook that initialises the prereset, preunset and postunset settings. §5.1.1; 188
Formats the description, symbol and location list for top-level entries.
Formats the description, symbol and location list for child entries.
Robust command that applies both
Applies both
The final
A token register that stores the options passed to
The current entry label, initialised by the
A token register that stores the entry’s label. §4.5.3.1; 163
Fetches the value of the given field (identified by its internal label ) for the entry given by and stores it in the command .
As
References the entry identified by link text. This command does not alter or depend on the first use flag (use
Hook used at the end of the code in the
Hook implemented after setting the options passed to the
Hook implemented before setting the options passed to the
Encapsulates the link text and indexing. Just does by default. §5; 183
Used after the child entry location list for the list styles. §8.6.5.3; 433
Used before the child entry location list for the list styles. §8.6.5.3; 432
Used to display the description for the list styles. §8.6.5.3; 433
A length register used by listdotted.
Used by
Used after group headings in the listgroup styles. §8.6.5.3; 433
Used to display the group headings in the listgroup styles. §8.6.5.3; 433
Used for the group skip in the list styles. §8.6.5.3; 433
Used to disable problematic commands at the start the list styles to provide better integration with gettitlestring.
Used to display the top-level entry item in the list styles. §8.6.5.3; 433
Used before the top-level entry location list for the list styles. §8.6.5.3; 432
Locally resets the entry’s first use flag. That is, this marks the entry as “not used”.
Locally resets the first use flag for all entries in whose labels are listed in the comma-separated list. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.
Locally resets each listed entry’s first use flag. §5.10; 283
Locally unsets the entry’s first use flag. That is, this marks the entry as “used”.
Locally unsets the first use flag for all entries in whose labels are listed in the comma-separated list. If the optional argument is omitted, the list of all non-ignored glossaries is assumed.
Locally unsets each listed entry’s first use flag. §5.10; 283
Does longaccess replacement text (if set).
Formatting command for the long form used by the abbreviation styles that don’t apply a font change by default. 133
Long form font used by the “em” abbreviation styles. 158
Expands to the column alignment for the first custom field. §8.7.2.7; 468
Expands to the internal field name of the first custom field. §8.7.2.7; 465
The format of the first custom entry. §8.7.2.7; 466
Expands to the header name of the first custom column. §8.7.2.7; 466
Expands to the column alignment for the second custom field. §8.7.2.7; 468
Expands to the internal field name of the second custom field. §8.7.2.7; 466
The format of the second custom entry. §8.7.2.7; 467
Expands to the header name of the second custom column. §8.7.2.7; 466
Expands to the column alignment for the third custom field. §8.7.2.7; 468
Expands to the internal field name of the third custom field. §8.7.2.7; 466
The format of the third custom entry. §8.7.2.7; 467
Expands to the header name of the third custom column. §8.7.2.7; 466
The header for the longtable long-custom3-name style. §8.7.2.7; 469
The header for the long-custom3-name style. §8.7.2.7; 469
Used to set the length
The header for the longtable long-custom2-name style. §8.7.2.7; 469
The header for the long-custom2-name style. §8.7.2.7; 469
Used to set the length
The header for the longtable long-custom1-name style. §8.7.2.7; 468
The header for the long-custom1-name style. §8.7.2.7; 468
Used to set the length
The footer for the custom styles. §8.7.2.7; 468
The horizontal alignment for the description column. §8.7.2; 450
The header for the longtable long-desc-custom3-name style. §8.7.2.7; 473
The header for the long-desc-custom3-name style. §8.7.2.7; 473
The header for the longtable long-desc-custom2-name style. §8.7.2.7; 472
The header for the long-desc-custom2-name style. §8.7.2.7; 472
The header for the longtable long-desc-custom1-name style. §8.7.2.7; 472
The header for the long-desc-custom1-name style. §8.7.2.7; 472
Used by the glossary-longextra styles to display a top-level entry’s description and post-description hook. §8.7.2; 450
Sets the header and footer for the long-desc-name style with longtable. §8.7.2.1; 454
Displays the footer for the long-desc-name style. §8.7.2.1; 454
Displays the header for the long-desc-name style. §8.7.2.1; 453
Sets the header and footer for the long-desc-sym style with longtable. §8.7.2.5; 462
Sets the header and footer for the long-desc-sym-name style with longtable. §8.7.2.2; 456
Displays the footer for the long-desc-sym-name style. §8.7.2.2; 456
Displays the header for the long-desc-sym-name style. §8.7.2.2; 456
Displays the footer for the long-desc-sym style. §8.7.2.5; 462
Displays the header for the long-desc-sym style. §8.7.2.5; 462
Formats the top-level group heading. §8.7.2; 452
Used to format the column headers. §8.7.2; 449
The horizontal alignment for the location list column. §8.7.2; 451
Sets the header and footer for the long-loc-desc-name style with longtable. §8.7.2.3; 457
Displays the footer for the long-loc-desc-name style. §8.7.2.3; 457
Displays the header for the long-loc-desc-name style. §8.7.2.3; 457
Sets the header and footer for the long-loc-desc-sym-name style with longtable. §8.7.2.4; 460
Displays the footer for the long-loc-desc-sym-name style. §8.7.2.4; 459
Displays the header for the long-loc-desc-sym-name style. §8.7.2.4; 459
Used by the glossary-longextra styles to display a top-level entry’s location list. §8.7.2; 451
Sets the header and footer for the long-loc-sym-desc-name style with longtable. §8.7.2.4; 459
Displays the footer for the long-loc-sym-desc-name style. §8.7.2.4; 459
Displays the header for the long-loc-sym-desc-name style. §8.7.2.4; 459
Computes the value of
The formatting for the long form in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 463
The long column header for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 463
Sets the header and footer for the abbr-short-long style with longtable. §8.7.2.6; 465
Displays the footer for the abbr-short-long style. §8.7.2.6; 465
Displays the header for the abbr-short-long style. §8.7.2.6; 465
The horizontal alignment for the name column. §8.7.2; 450
The header for the longtable long-name-custom1-desc style. §8.7.2.7; 471
The header for the long-name-custom1-desc style. §8.7.2.7; 471
The header for the longtable long-name-custom1 style. §8.7.2.7; 468
The header for the longtable long-name-custom2-desc style. §8.7.2.7; 472
The header for the long-name-custom2-desc style. §8.7.2.7; 472
The header for the longtable long-name-custom2 style. §8.7.2.7; 469
The header for the longtable long-name-custom3-desc style. §8.7.2.7; 472
The header for the long-name-custom3-desc style. §8.7.2.7; 472
The header for the longtable long-name-custom3 style. §8.7.2.7; 469
The header for the long-name-custom3 style. §8.7.2.7; 469
The header for the long-name-custom2 style. §8.7.2.7; 469
The header for the long-name-custom1 style. §8.7.2.7; 468
Sets the header and footer for the long-name-desc style with longtable. §8.7.2.1; 453
Sets the header and footer for the long-name-desc-loc style with longtable. §8.7.2.3; 457
Displays the footer for the long-name-desc-loc style. §8.7.2.3; 457
Displays the header for the long-name-desc-loc style. §8.7.2.3; 457
Sets the header and footer for the long-name-desc-sym style with longtable. §8.7.2.2; 454
Sets the header and footer for the long-name-desc-sym-loc style with longtable. §8.7.2.4; 458
Displays the footer for the long-name-desc-sym-loc style. §8.7.2.4; 458
Displays the header for the long-name-desc-sym-loc style. §8.7.2.4; 458
Displays the footer for the long-name-desc-sym style. §8.7.2.2; 454
Displays the header for the long-name-desc-sym style. §8.7.2.2; 454
Displays the footer for the long-name-desc style. §8.7.2.1; 453
Displays the header for the long-name-desc style. §8.7.2.1; 453
Used by the glossary-longextra styles to add the hypertarget (if supported) and display a top-level entry’s name. §8.7.2; 450
Sets the header and footer for the long-name-sym-desc style with longtable. §8.7.2.2; 455
Sets the header and footer for the long-name-sym-desc-loc style with longtable. §8.7.2.4; 459
Displays the footer for the long-name-sym-desc-loc style. §8.7.2.4; 458
Displays the header for the long-name-sym-desc-loc style. §8.7.2.4; 458
Displays the footer for the long-name-sym-desc style. §8.7.2.2; 455
Displays the header for the long-name-sym-desc style. §8.7.2.2; 455
Computes the value of
The short column header for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 462
Sets the header and footer for the abbr-short-long style with longtable. §8.7.2.6; 464
Displays the footer for the abbr-short-long style. §8.7.2.6; 464
Displays the header for the abbr-short-long style. §8.7.2.6; 464
Sets the value of
The formatting, including the target, for the short form in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 463
The format of the first custom sub-entry. §8.7.2.7; 467
The format of the second custom sub-entry. §8.7.2.7; 467
The format of the third custom sub-entry. §8.7.2.7; 467
Used by the glossary-longextra styles to display a child entry’s description and post-description hook. §8.7.2; 450
Formats the sub-group heading, if supported. §8.7.2; 452
Used by the glossary-longextra styles to display a child entry’s location list. §8.7.2; 451
The formatting for child entry long forms in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 464
Used by the glossary-longextra styles to add the hypertarget (if supported) for child-entries. The name isn’t shown by default. §8.7.2; 450
The formatting, including the target, for child entry short forms in the abbr-long-short and abbr-short-long styles. §8.7.2.6; 463
Used by the glossary-longextra styles to display a child entry’s symbol. §8.7.2; 452
Adds the hypertarget (if supported) and displays the symbol if set or the name otherwise for child entries. §8.7.2.5; 460
Adds the hypertarget (if supported) and displays the symbol for child entries. §8.7.2.5; 460
The horizontal alignment for the symbol column. §8.7.2; 452
Used by the glossary-longextra styles to display a top-level entry’s symbol. §8.7.2; 452
The horizontal alignment for the symbol column when it’s being used instead of the name. §8.7.2.5; 460
Adds the hypertarget (if supported) and displays the symbol if set or the name otherwise for top-level entries. §8.7.2.5; 460
Adds the hypertarget (if supported) and displays the symbol for top-level entries. §8.7.2.5; 460
Sets the header and footer for the long-sym-desc style with longtable. §8.7.2.5; 461
Sets the header and footer for the long-sym-desc-name style with longtable. §8.7.2.2; 455
Displays the footer for the long-sym-desc-name style. §8.7.2.2; 455
Displays the header for the long-sym-desc-name style. §8.7.2.2; 455
Displays the footer for the long-sym-desc style. §8.7.2.5; 461
Displays the header for the long-sym-desc style. §8.7.2.5; 461
Computes the value of
Computes the value of
Computes the value of
Only for use with the tabular setting, this should expand to the tabular environment’s vertical alignment specifier. §8.7.2; 449
As
Sets
Sets
Font formatting command for the long form, initialised by the abbreviation style. 172
Formatting command for the long form used by the footnote abbreviation styles. 145
Long form font used by the “hyphen” abbreviation styles. 148
Long form font used by the “only” abbreviation styles. 154
A token register that stores the long plural form (which may have been modified after being passed to
Does longpluralaccess replacement text (if set).
A token register that stores the long form (which may have been modified after being passed to
Long form font used by the “user” abbreviation styles. 136
Converts lowercase. §5.2.2; 199
Used by
If mfirstuc v2.08+ is installed, this will use
If mfirstuc v2.08+ is installed, this will use
If mfirstuc v2.08+ is installed, this will use
As
As
References the entry identified by name value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does access replacement text (if set).
Used by
Designed for use with makeindex and xindy, this may be placed in an entry’s description to override nonumberlist.
Don’t expand field values when defining entries, except for those that explicitly have expansion enabled with
Used to display a location in the location list. §11.5.6; 580
Designed for use with makeindex and xindy, this may be placed in an entry’s description to suppress the entry’s location list.
The default format for entry locations. If hyperlinks are defined, this will use
Expands to the title of the
A length register used to set the width of the location list column for tabular-like styles.
Paragraph break (for instances where
Applies a patch to longtable to check for instances of the group skip occurring at a page break.
Shortcut for
Shortcut for
The definition of
Expands to a literal percent sign.
As
As
As
As
As
References the entry identified by plural value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with
Does pluralaccess replacement text (if set).
Expands to the letter “s” and is used to form default plurals. This command isn’t language-sensitive as there’s guarantee when it will be expanded. (It may be expanded when the entry is defined or it may be expanded when the entry is used). If you need to suppress this suffix for abbreviations, use the noshortplural attribute. If you need an apostrophe before the “s” for single-letter abbreviations to avoid ambiguity, use the aposplural attribute.
A hook that is usually placed after the description in glossary styles. Some of the styles provided with the glossaries package don’t use this hook. The glossaries-extra-stylemods redefines those styles to include the hook. The default definition of this command tests for the nopostdot option, but the postpunc option redefines the command to implement the chosen punctuation.
Used at the end of the theglossary environment.
Formats the top-level entry’s description, symbol and location list.
Formats the child entry’s description, symbol and location list.
A post-link hook used after all the
Separator between the prefix and the term.
Hook used with sort=standard to adjust the default sort value (with
Prepends post-link hook associated with the category identified by the label (or simply defines it, if it doesn’t already exist). §5.5.4; 250
Shortcut for
Shortcut for
Shortcut for
Shortcut for
Shortcut for
Shortcut for
References (using
Like
Globally resets the entry’s first use flag. That is, this marks the entry as “not used”.
Globally resets all entries associated with the listed glossaries or all glossaries if
Sets
Sets
Inserted into the glossary code to counteract the effect of
Indexes the entry identified by
Used by
Used to format the see cross-reference in the location list. This requires a location argument for makeindex even though it isn’t required. The default definition is
Used by
Used by
Used by
Used by
Iterates over a comma-separated list of entry labels
Used by
Used by sentence case commands, such as
Locally sets the given attribute to §10.2.2; 527
Globally sets the given attribute to §10.2.2; 527
Globally sets each attribute in the comma separated §10.2.2; 527
Locally sets the given attribute to §10.2.2; 527
Globally sets each attribute in the comma separated §10.2.2; 527
Defines the multi-entry separators to use a non-breaking space (
Defines the multi-entry separators to use no separator for abbreviations. §7.4; 348
Defines the multi-entry separators to use §7.4; 348
Expand the value of the field identified by its internal field label when defining entries (overrides
Don’t expand the value of the field identified by its internal field label when defining entries (overrides
Locally sets the regular attribute to
Indicates that hierarchical level.
Does shortaccess replacement text (if set).
Applies
A token register that stores the short plural form (which may have been modified after being passed to
Does shortpluralaccess replacement text (if set).
A token register that stores the short form (which may have been modified after being passed to
Formats the target name when debug=showtargets is enabled using either
Font declaration used by debugging annotations.
Text-block command that checks for math mode and switches to the font given by the
Formats the target name for inner and maths mode when debug=showtargets is enabled.
Shows the left inner annotation followed by the left marker symbol
Shows the right marker symbol
Formats the target name for outer mode when debug=showtargets is enabled. This places a marker (
Marker (◁) used in debugging annotations.
Essentially does
Does nothing if subentrycounter=false, otherwise increments and displays the associated counter.
Used to format sub-group headings. Only applicable with the “unsrt” family of commands. This command won’t occur in glossaries that use
As
As
References the entry identified by symbol value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does symbolaccess replacement text (if set).
As
Does symbolpluralaccess replacement text (if set).
Expands to the title of the
Displays the child entry identified by
Separator used by
Length register used for the width of each block with par=justified or par=ragged. Set by the block style. §8.7.4.4; 494
Produces the caption for the first page of the table. §8.7.4.2; 487
Expands to
Iterates over the childlist field and formats each child entry in the list for use in the block styles. Does nothing if the list is empty. §8.7.4.1; 485
Expands to the alignment of the description column. §8.7.4.4; 493
Formatting applied to the description. §8.7.4.4; 495
Header for the description column. §8.7.4.2, §8.7.4.4; 488, 497
Length register used for the width of the description column with par=justified or par=ragged. Set by the block style. §8.7.4.4; 494
Formats the header. §8.7.4.4; 497
Internally used by the custom handler in
Internally used by
Expands to
Expands to the alignment of the name column. §8.7.4.4; 493
Formatting applied to the name. §8.7.4.4; 495
Header for the name column. §8.7.4.2, §8.7.4.4; 488, 497
Length register used for the width of the name column with par=justified or par=ragged. Set by the block style. §8.7.4.4; 494
Used to start a new row. §8.7.4.4; 492
Produces the caption for following pages of the table. §8.7.4.2; 487
Used to display the other field. §8.7.4.4; 496
Expands to the alignment of the other column. §8.7.4.4; 494
Expands to the internal field label of the other field. §8.7.4.4; 496
Formatting applied to the other field. §8.7.4.4; 496
Header for the other column. §8.7.4.2, §8.7.4.4; 488, 497
Length register used for the width of the other column with par=justified or par=ragged. Set by the block style. §8.7.4.4; 494
Appended to the caption in
Length register that specifies the vertical skip after the preamble. §8.7.4.4; 495
Code performed by
Length register that specifies the vertical skip before the postamble. §8.7.4.4; 495
Expands to
Sets the default block style. §8.7.4.3; 489
Formatting applied to the child description. §8.7.4.4; 496
Expands to the column alignment used by glstablesubentries. §8.7.4.1; 486
Formatting applied to the child name. §8.7.4.4; 495
Used to display the sub-entry other field. §8.7.4.4; 496
Formatting applied to the other field.
Formatting applied to the child symbol. §8.7.4.4; 495
Expands to the alignment of the symbol column. §8.7.4.4; 493
Formatting applied to the symbol. §8.7.4.4; 495
Header for the symbol column. §8.7.4.2, §8.7.4.4; 488, 497
Length register used for the width of the symbol column with par=justified or par=ragged. Set by the block style. §8.7.4.4; 494
Used by glossary styles to create a hypertarget (if enabled) for the entry (identified by ). The is usually
As
As
References the entry identified by text value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. If you have defined the entry with
Does textaccess replacement text (if set).
The default outer text formatting command used by the
Counteracts the effect of
Expands to a literal tilde character.
Used to set the indentation for sub-levels. §8.7.3; 479
Used by
Expands to the number of columns for topicmcols. §8.7.3; 475
Expands to the multicols environment name to use for topicmcols. §8.7.3; 474
Used to format the top-level description. §8.7.3; 479
Used to format the top-level group headings, if required. §8.7.3; 478
Initialisation hook. §8.7.3; 477
Used to format top-level entries. §8.7.3; 478
Used to format the top-level location list. §8.7.3; 479
Hook inserted before a top-level entry. §8.7.3; 478
Vertical space inserted before the description for a top-level entry. §8.7.3; 479
Length register used for the top-level paragraph indent. §8.7.3; 476
Vertical space inserted after the description for a top-level entry. §8.7.3; 479
Vertical space inserted before a top-level entry. §8.7.3; 478
Used to format the sub-group headings, if supported. §8.7.3; 478
Length register used for the child indent. §8.7.3; 476
Used to format child entries. §8.7.3; 480
Horizontal box used for child name if a widest name has been provided. §8.7.3; 480
Length register used for the child paragraph indent. §8.7.3; 477
Horizontal separator used after child names. §8.7.3; 480
Formats the child location lists. §8.7.3; 480
Font command to apply to the child entry name. §8.7.3; 480
Separator before the child location lists. §8.7.3; 480
Used to format the name and (if provided) symbol for the top-level entry title. §8.7.3; 479
Font command to apply to the top-level entry title. §8.7.3; 479
Displays the given child entry’s description with pre and post hooks for the tree styles. §8.6.5.4; 436
Formats the child description (if set) and location list for the tree styles. §8.6.5.4; 437
Space inserted before child descriptions. §8.6.5.4; 435
Used before the child entry location list for the tree and index styles. §8.6.5.4; 436
Displays the top-level symbol in parentheses, if set, for the tree styles. §8.6.5.4; 437
Used as the default name format for the tree and index styles. §8.6.5.4; 434
Displays the given top-level entry’s description with pre and post hooks for the tree styles. §8.6.5.4; 436
Formats the top-level description (if set) and location list for the tree styles. §8.6.5.4; 437
Used to format the group title for the treegroup and indexgroup styles. §8.6.5.4; 434
After group header skip for the treegroup and indexgroup styles. §8.6.5.4; 434
Group skip for the tree and index styles. §8.6.5.4; 434
Used to indent the top-level entries for the index styles.
Used to format the name for the tree and index styles.
Used to format the navigation element for styles like treehypergroup. §8.6.5.4; 434
Inserted before the location list when there’s no description or symbol for the tree styles. §8.6.5.4; 437
Displays the given child entry’s description and post hook for the treenoname styles. §8.6.5.4; 436
Displays the given child entry’s description and location list for the treenoname styles.
Displays the given top-level entry’s description with pre and post hooks for the treenoname styles. §8.6.5.4; 436
Displays the given top-level entry’s description and location list for the treenoname styles.
Displays the given top-level entry’s symbol in parentheses for the treenoname styles. §8.6.5.4; 436
Space inserted before top-level descriptions. §8.6.5.4; 435
Pre group header hook the treegroup and indexgroup styles. §8.6.5.4; 435
Used before the top-level entry location list for the tree and index styles. §8.6.5.4; 435
Used to display the sub-group header in the treegroup styles.
Used to indent the level 1 entries for the index styles.
Pre sub-group header hook the treegroup and indexgroup styles.
Used to indent the level 2 entries for the index styles.
Displays the top-level symbol in parentheses, if set, for the tree styles. §8.6.5.4; 436
Used as a special location format that indicates that the record is a trigger record. §11.4; 548
For use in expandable contexts where the field value is required but the contents should not be expanded. The field should be identified by its internal field label. Expands to nothing with no error or warning if the entry or field aren’t defined.
Globally unsets the entry’s first use flag. That is, this marks the entry as “used”.
Globally unsets all entries associated with the listed glossaries or all glossaries if
Locally unsets the given attribute for the given category. §10.2.2; 528
Similar to
Converts uppercase. §5.2.3; 199
Description encapsulator for styles like long-short-user. 137
As
As
References the entry identified by user1 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user1access replacement text (if set).
As
As
References the entry identified by user2 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user2access replacement text (if set).
As
As
References the entry identified by user3 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user3access replacement text (if set).
As
As
References the entry identified by user4 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user4access replacement text (if set).
As
As
References the entry identified by user5 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user5access replacement text (if set).
As
As
References the entry identified by user6 value. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Does user6access replacement text (if set).
Performs the indexing code unless indexing should be suppressed. §5.8; 267
If the markshortwords attribute is set for the given category, this encapsulates with
If the markwords attribute is set for the given category, this encapsulates with
As
If
An aux file command used with
Used in the aux file to provide the record for bib2gls (record=only). Ignored by LaTeX. §11.5.6; 579
Used in the aux file to provide the nameref record for bib2gls. Ignored by LaTeX. §11.5.6; 579
Used in the aux file to provide the resource options for bib2gls for each resource set. Ignored by LaTeX. §11; 534
Used by
Command that produces the footnote for the footnote abbreviation styles, such as short-footnote and short-postfootnote. 145
The default plural suffix used for abbreviations. §4.1.2; 44
Expands to the label of the default abbreviation glossary. The abbreviations package option will redefine this to
Initialised accessibility support for the name, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the name and text are just the formatted abbreviation. §4.5.3.1; 169
Initialised accessibility support for the first, firstplural, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the first and text are just the formatted abbreviation. §4.5.3.1; 168
Initialised accessibility support for the name field (if enabled with accsupp). This command is provided for abbreviation styles where only the name is just the formatted abbreviation. §4.5.3.1; 169
Initialised accessibility support for the name, first, firstplural, text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the name, first and text are just the formatted abbreviation. §4.5.3.1; 168
Initialised accessibility support for the text and plural fields (if enabled with accsupp). This command is provided for abbreviation styles where the text is just the formatted abbreviation. §4.5.3.1; 169
Activates
Expands to the anchor required by
Iterates over all defined entries and indexes any cross-references (identified by the see or seealso keys) that haven’t been used. §5.9.3; 281
User-level hook used by
Used by the “unsrt” family of commands to perform if the entry identified by should have support for groups. §8.4.1; 394
Adds
Indexes any cross-references (identified by the see or seealso keys) that haven’t been used. §5.9.3; 281
Expands to the value of the alias field for the entry identified by . If the field isn’t set, this will expand to nothing. If the entry isn’t defined, this will expand to
Hook implemented when the alias key is provided when an entry is defined. §3.4; 36
Length register for the subsequent paragraph indentation for the alttree-like styles. §8.6.5.4; 441
Initialisation code performed by the alttree-like styles. §8.6.5.4; 441
Formats the symbol, description and location for child entries for the alttree-like styles. §8.6.5.4; 441
Formats the symbol, description and location for top-level entries for the alttree-like styles. §8.6.5.4; 440
For use with fields that should contain comma-separated lists, this will append a command followed by
Locally append
Used to strip common formatting commands from a field value to supply the text-only accessibility content when initialising the default shortaccess and shortpluralaccess values. §9.1; 498
Used by the
Initialised by the
Applies the command obtained from the control sequence name supplied in the innertextformat attribute for the category assigned to the entry given by
Identifies formats that should trigger an automatic
The indexing command used by by the auto-indexing feature. §12; 598
Used to assign the sort value for the auto-indexing feature. §12; 598
Expands to the “actual” part for the auto-indexing feature. §12; 597
Escapes the sort value used by the auto-indexing feature. §12; 598
Expands to the Basic Latin digit character sort rules. 569
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Accesses the
Expands to the BibTeX to bib2gls entry aliases for use in entry-type-aliases. §11.5.2; 559
Accesses the
Accesses the
Accesses the
Used by the bookindex style at the end of a letter group (where the last top-level entry is given by ). §8.7.1; 445
Used by the bookindex style between two entries where is the last top-level entry and is the next entry, which is a top-level entry. §8.7.1; 445
Adds a bookmark with
Expands to the number of columns for the bookindex style. §8.7.1; 442
If not empty this should expand to the option argument for multicols. §8.7.1; 443
Used by the bookindex style to obtain the first mark and, if found, format it with
Used by the bookindex style to format the first mark. §8.7.1; 448
Used by the bookindex style to format a group header. §8.7.1; 447
Formats the sub-group header.
Used by the bookindex style to obtain the last mark and, if found, format it with
Used by the bookindex style to format the last mark. §8.7.1; 448
Used by the bookindex style to display top-level location lists. §8.7.1; 444
Used by the bookindex style to mark an entry in the aux file. §8.7.1; 447
Expands to the name of the multicols environment to use. §8.7.1; 443
Used by the bookindex style to display a top-level entry’s name. §8.7.1; 443
Used by the bookindex style to separate a top-level parent and child entry. §8.7.1; 444
Used by the bookindex style to separate a sub-level parent and child entry. §8.7.1; 444
Used by the bookindex style insert after a group header. §8.7.1; 447
Used by the bookindex style to display a separator before top-level location lists. §8.7.1; 444
Used by the bookindex style at the end of a letter group (where the last level 1 entry is given by ). §8.7.1; 445
As
Used by the bookindex style to display child location lists. §8.7.1; 444
Used by the bookindex style to display a child entry’s name. §8.7.1; 443
Used by the bookindex style to display a separator before child location lists. §8.7.1; 444
Used by the bookindex style at the end of a letter group (where the last level 2 entry is given by ). §8.7.1; 445
As
Expands to the default category set by commands like
Expands to the accessibility support command for the given internal field label and category, which is used by
Sets hyper=false if the nohyperfirst attribute is set. §5.1.1; 188
Clears the list of known prefixes. §11.5.7; 587
Locally clears the buffer, but doesn’t stop buffering. §5.10.1; 287
Expands to the third set of combining diacritic sort rules. 567
Expands to the second set of combining diacritic sort rules. 567
Expands to the first set of combining diacritic sort rules. 566
Expands to the fourth set of combining diacritic sort rules. 567
Expands to all the combining diacritic sort rules. 566
Expands to control character sort rules. 566
Copies the entry to the internal glossary list for the given glossary. The starred version performs a global change. The unstarred version can be localised. Only for use with the “unsrt” family of commands. §8; 378
Used by
Expands to currency character sort rules. 569
Placeholder command for use in post-link hooks. This expands to empty if the calling command was one of the
Placeholder command for use in multi-entry hooks, this expands to the control sequence name of the calling command. §7.5; 350
Default inner formatting. Initialised to just do . §5.5.3; 243
Expands to default resource options. §11; 536
The default definition of
The default all caps subsequent format style that only shows the short form and insert (with support for innertextformat). 174
The default sentence case subsequent format style that only shows the short form and insert (with support for innertextformat). 174
The default subsequent format style that only shows the short form and insert (with support for innertextformat). 174
The default all caps subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174
The default sentence case subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174
The default subsequent plural format style that only shows the short form and insert (with support for innertextformat). 174
Like
Used by shortcuts=abbreviations and shortcuts=all. This command redefines itself to do nothing because it can only be used once.
Used by shortcuts=ac and shortcuts=acother. This command redefines itself to do nothing because it can only be used once.
Used by shortcuts=other and shortcuts=all. This command redefines itself to do nothing because it can only be used once.
Expands to 0–9 digit character sort rules (includes superscript and subscript digits). 569
If full stop and the entry’s category attributes indicate that a full stop should be discarded (such as discardperiod), then is performed, otherwise is done and the is processed. The actual test to determine if is a full stop is performed by
Used to discard a following full stop when the retainfirstuseperiod attribute is set. §5.5.4; 247
Discards the pending buffer and restores
Used to display an end location from an explicit range. §8.6.3; 428
Hook used by
Used to display records created with record=nameref. §11.5.6; 580
Used to display a single location. §8.6.3; 428
Used to display a start location from an explicit range. §8.6.3; 428
Like
Used to automatically index (using
If
Hook used whenever an entry is indexed. Does nothing by default. §5.8; 266
Adds a hyperlink to the given entry’s dual (whose label is stored in the field given by
Expands to the internal field label used by
Like
The definition of
The plural suffix used by the emphasized (“em”) abbreviation styles. 158
Enables entry counting for the given list of categories with the given trigger value (which must be an integer). §6.1; 310
Enables unit entry counting for the given list of categories with the given trigger value (which must be an integer) and the associated counter. §6.1; 315
Allows the format key to override the attribute value. §12; 599
Robustly defines the command §4.4; 56
Enables link counting for the given categories. §6.2; 319
Enables on the fly commands, such as
Enables the location list tag. §8.6.3; 427
Redefines the
When used within
As
Does
Expands to the name field of the given entry’s parent or does nothing if the entry doesn’t have the parent field set or isn’t defined. §5.11; 293
Used by
Iterates over the given field’s value using etoolbox’s
Iterates over the given field’s value using etoolbox’s
Formats the comma-separated list stored in the given field (identified by its internal label) for the entry identified by using datatool-base’s
Formats the value of the given field, which should be an etoolbox internal list, using the same list handler macro as datatool’s
Uses etoolbox’s
Appends etoolbox’s
Appends etoolbox’s
Appends etoolbox’s
Appends etoolbox’s
As
Converts title case (expanding the first token once). Uses
Uses etoolbox’s
Maintained for backwards-compatibility used to typeset
Maintained for backwards-compatibility used to typeset
As
Behaves like
As
As the unstarred version
Expands to the default options for
Formats the link text used in
Used by
Expands to the name of the used by
Used by
Expands to the name value for styles like short-footnote-desc. 144
Expands to the sort value for styles like short-footnote-desc. 145
Used in the footnote text to format the singular long form. 145
Used in the footnote text to format the plural long form. 146
Expands to the name value for styles like short-footnote. 144
Iterates over the comma-separated list stored in the given field (identified by its internal label) for the entry identified by and performs
If the entry given by
Expands to the internal field label used by
Used by
Iterates over the labels stored in the current buffer. §5.10.1; 287
Expands to the number forms fraction character sort rules. 570
As
As
References the entry identified by short and long values, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. The format produced by this command may not match the format produced by the first use of
The all caps singular display full form (defined by the abbreviation style). 172
The sentence case singular display full form (defined by the abbreviation style). 172
The singular display full form (defined by the abbreviation style). 172
As
As
References the entry identified by shortplural and longplural values, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. The format produced by this command may not match the format produced by the first use of
The all caps plural display full form (defined by the abbreviation style). 172
The sentence case plural display full form (defined by the abbreviation style). 172
The plural display full form (defined by the abbreviation style). 172
Implemented at the start of all the inline full form commands like
Separator used by the parenthetical inline full form and also for some display full forms. 132
The display format used by
Redefined by the
A shortcut that expands to the ignorable rules, combining diacritic rules, hyphen rules, general punctuation rules, digit rules, and fraction rules. 570
Expands to the A–G subset of General Latin I sort rules. 572
Expands to the A–M subset of General Latin I sort rules. 572
Expands to the H–M subset of General Latin I sort rules. 572
Expands to the third set of General Latin sort rules. 571
Expands to the second set of General Latin sort rules. 571
Expands to the first set of General Latin sort rules. 570
Expands to the fourth set of General Latin sort rules. 571
Expands to the N–S subset of General Latin I sort rules. 572
Expands to the N–Z subset of General Latin I sort rules. 572
Expands to the T–Z subset of General Latin I sort rules. 572
Expands to the eighth set of General Latin sort rules. 572
Expands to the seventh set of General Latin sort rules. 571
Expands to the sixth set of General Latin sort rules. 571
Expands to the fifth set of General Latin sort rules. 571
Punctuation accent subset of
Punctuation bracket subset of
Expands to the second set of general punctuation (including currency) sort rules. 569
Expands to the first set of general punctuation (including currency) sort rules. 568
Punctuation mark subset of
Punctuation quote subset of
Expands to all sets of general punctuation sort rules. 567
Punctuation sign subset of
Obtains the title corresponding to the group identified by and stores the result in the control sequence . §8.6.4; 430
Expands to the internal field label used to store the group label (requires record). §8.4.1; 392
Used for standalone entries to display the name with
Like
Used to display the all caps entry’s first field in the page header. §5.3.3; 225
Used to display the sentence case entry’s first field in the page header (converts to all caps if headuc attribute is
Used to display the entry’s first field in the page header (converts to all caps if headuc attribute is
Used to display the all caps entry’s firstplural field in the page header. §5.3.3; 225
Used to display the sentence case entry’s firstplural field in the page header (converts to all caps if headuc attribute is
Used to display the entry’s firstplural field in the page header (converts to all caps if headuc attribute is
Used to display the entry’s all caps full form in the page header. §5.3.3; 221
Used to display the entry’s sentence case full form in the page header (converts to all caps if headuc attribute is
Used to display the entry’s full form in the page header (converts to all caps if headuc attribute is
Used to display the entry’s all caps full plural form in the page header. §5.3.3; 222
Used to display the entry’s sentence case full plural form in the page header (converts to all caps if headuc attribute is
Used to display the entry’s full plural form in the page header (converts to all caps if headuc attribute is
The behaviour of
The behaviour of
The behaviour of
The behaviour of
The behaviour of
The behaviour of
Used to display the all caps entry’s name field in the page header. §5.3.3; 222
Used to display the sentence case entry’s name in the page header (converts to all caps if headuc attribute is
Used to display the entry’s name in the page header (converts to all caps if headuc attribute is
Used to display the all caps entry’s plural field in the page header. §5.3.3; 224
Used to display the sentence case entry’s plural field in the page header (converts to all caps if headuc attribute is
Used to display the entry’s plural field in the page header (converts to all caps if headuc attribute is
The behaviour of
The behaviour of
The behaviour of
The behaviour of
The behaviour of
The behaviour of
Used to display the all caps entry’s text field in the page header. §5.3.3; 223
Used to display the sentence case entry’s text field in the page header (converts to all caps if headuc attribute is
Used to display the entry’s text field in the page header (converts to all caps if headuc attribute is
Displays the entry’s hierarchical name where each name is converted to uppercase. §5.11; 295
Displays the entry’s hierarchical name where the first name is converted to uppercase. §5.11; 295
Displays the entry’s hierarchical name where each element name has its first character converted to uppercase. §5.11; 294
Displays the entry’s hierarchical name using sentence case. §5.11; 294
Displays the entry’s hierarchical name. §5.11; 294
Separator used by commands like
Expands to hyphen character sort rules. 567
The plural suffix used by the “hyphen” abbreviation styles (such as short-hyphen-long-hyphen). 148
Used to inform bib2gls to include the given command when it searches for dependencies. §5.7; 259
Shortcut for
User hook to trigger a check for a following full stop. This should do if there should be a check for a following full stop otherwise should do . §5.5.4; 248
Does glossary doesn’t exist, this does and will either generate an error (undefaction=error) or a warning (undefaction=warn). This command considers ignored glossaries as existing. §8; 379
Compares the (numeric) value of the field identified by its internal label for the entry identified by with where is the comparison operator (
A shortcut that uses
Tests if the entry given by field identified by its internal label set to . This internally uses
Like
A shortcut that uses
Expandable command that tests if the given field (identified by its internal label) is undefined for the entry given by . Internally uses etoolbox’s
Tests if the value stored in the given field (identified by its internal label) for the entry identified by is contained in the comma-separated list using
Tests if the field identified by its internal label for the entry given by is defined and is not empty. This is like
Tests if the value in the childcount field is non-zero (using
If the category associated with the entry given by headuc attribute set to
Tests whether or not the noindex has been set. Does if noindex=true otherwise does . §5.8; 267
Does glossary identified by , otherwise it does . If the glossary doesn’t exist, this does and will either generate an error (undefaction=error) or a warning (undefaction=warn). This command considers ignored glossaries as existing. §8; 378
Does
Normally just expands to
Tests if the given glossary entry key. Does if the key has been defined, otherwise does false. §3.2; 35
Performs
Does full stop, otherwise does . §5.5.4; 248
Does
Does used, otherwise does . Note that this command will generate an error or warning (according to undefaction) if the entry hasn’t been defined, but will still do . §5.10; 285
Tests if the given value (field (identified by its internal label) for the entry identified by using
Initialised by the
Initialised by the
A shortcut that nests
Expands to
A shortcut that nests
Like
A shortcut that expands to the control rules, space rules and non-printable rules. 570
Increments the link counter with
Index the current entry’s alias. May only be used within the definition of
Creates a hyperlink (if supported) to the target obtained from indexcounter, if the field has been defined with the given hyperlink text (otherwise just does ). §11.5.8; 596
Indexes the entry identified by “see also” cross-reference to the entries identified in the comma-separated list . The cross-reference list is prefixed with
Hook that initialises the hyperoutside setting. §5.1.1; 188
Hook that initialises the wrgloss setting. §5.1.1; 188
Corresponds to wrgloss=after.
Corresponds to wrgloss=before.
Used by
Used by
Used by
Used by
Used by
Used by
Sets the
Sets the
Used by
(Sort rule) expands to the variations of Latin A (includes 0x00AA and 0x2090). 572
(Sort rule) expands to the variations of Latin å. 575
(Sort rule) expands to the variations of Latin ae-ligature. 574
(Sort rule) expands to the variations of Latin E (includes 0x2091). 573
(Sort rule) expands to rule for ßand ſs. 574
(Sort rule) expands to rule for ßand ſz. 574
(Sort rule) expands to the variations of Latin eth. 574
(Sort rule) expands to the variations of Latin H (includes 0x2095). 573
(Sort rule) expands to the variations of Latin I (includes 0x2071). 573
(Sort rule) expands to the variations of Latin insular G and g, G. 575
(Sort rule) expands to the variations of Latin K (includes 0x2096). 573
(Sort rule) expands to the variations of Latin L (includes 0x2097).
(Sort rule) expands to the variations of Latin ł. 575
(Sort rule) expands to the variations of Latin M (includes 0x2098). 573
(Sort rule) expands to the variations of Latin N (includes 0x2099). 573
(Sort rule) expands to the variations of Latin O (includes 0x00BA and 0x2092). 573
(Sort rule) expands to the variations of Latin oe-ligature. 574
(Sort rule) expands to the variations of Latin ø. 575
(Sort rule) expands to the variations of Latin P (includes 0x209A). 573
(Sort rule) expands to the variations of Latin S (includes 0x209B). 573
(Sort rule) expands to the variations of Latin schwa. 575
(Sort rule) expands to the variations of Latin T (includes 0x209C). 574
(Sort rule) expands to the variations of Latin thorn. 574
(Sort rule) expands to the variations of Latin wynn. 575
(Sort rule) expands to the variations of Latin X (includes 0x2093). 574
Like
Assigns the field identified by its internal label for the entry identified by to the value of the field identified by for the entry identified by . §3.5; 40
Expands to the name of the link counter associated with the given entry (no check for existence). §6.2; 320
Expands to the internal link count register associated with the given register or 0 if it hasn’t been defined. §6.2; 320
A shortcut that uses
Locally assigns the given title group identified by . §8.6.4; 430
Defined by
Expands to the internal field label used to obtain the formatted location list for the “unsrt” family of commands. §8.4.2; 400
Used to create a hyperlink to either an external or an internal location, depending on whether or not
Expands to the entry’s record count for the given counter and location (stored in the recordcount. . field) or to 0 if not set. §11.4; 546
Expands to the range format (set by
As
As
References the entry identified by long value, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
As
As
Encapsulates the long field for the given entry with . The argument is the insertion material supplied in the final optional argument of the
As
As
As
Formats the long form according to the long-hyphen-postshort-hyphen style. 150
As
Formats the long form according to the long-hyphen-noshort-desc-noreg style. 149
Expands to the sort value for the long-hyphen-noshort-desc-noreg styles. 149
Expands to the sort value for the long-hyphen-noshort-noreg styles. 149
As
Formats the long and short form according to the long-hyphen-short-hyphen style. 149
Expands to the sort value for the long-hyphen-short-hyphen styles. 148
Expands to the name value for styles like long-noshort-desc. 147
Expands to the name value for styles like long-noshort. 147
As
As
References the entry identified by longplural value, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
As
As
As
As
As
As
Expands to the name value for long-short-desc styles. 134
Expands to the sort value for long-short-desc styles. 133
As
As
Formats the long form with
Expands to the name value for long-short styles. 133
As
As
As
Expands to the value for the name key for styles like long-postshort-sc-user-desc. 138
Expands to the value for the name key for styles like long-postshort-sc-user. 138
Expands to the value for the name key for styles like long-short-user-desc. 138
Hook that’s performed at the start of
Expands to the second set of math Greek sort rules. 576
Expands to the first set of math Greek sort rules. 575
(Sort rule) expands to the variations of math italic Greek alpha. 577
(Sort rule) expands to the variations of math italic Greek beta. 577
(Sort rule) expands to the variations of math italic Greek chi. 577
(Sort rule) expands to the variations of math italic Greek delta. 577
(Sort rule) expands to the variations of math italic Greek digamma. 577
(Sort rule) expands to the variations of math italic Greek epsilon. 577
(Sort rule) expands to the variations of math italic Greek eta. 577
(Sort rule) expands to the variations of math italic Greek gamma. 577
Expands to the second set of math italic Greek sort rules. 576
Expands to the first set of math italic Greek sort rules. 576
(Sort rule) expands to the variations of math italic Greek iota. 577
(Sort rule) expands to the variations of math italic Greek kappa. 577
(Sort rule) expands to the variations of math italic Greek lambda. 577
Expands to the second set of math italic lowercase Greek sort rules. 577
Expands to the first set of math italic lowercase Greek sort rules. 577
(Sort rule) expands to the variations of math italic Greek mu. 577
(Sort rule) expands to the Unicode codepoint for nabla. 577
(Sort rule) expands to the variations of math italic Greek nu. 577
(Sort rule) expands to the variations of math italic Greek omega. 577
(Sort rule) expands to the variations of math italic Greek omicron. 577
(Sort rule) expands to the Unicode codepoint for math italic partial differential. 577
(Sort rule) expands to the variations of math italic Greek phi. 577
(Sort rule) expands to the variations of math italic Greek pi. 577
(Sort rule) expands to the variations of math italic Greek psi. 577
(Sort rule) expands to the variations of math italic Greek rho. 577
(Sort rule) expands to the variations of math italic Greek sigma. 577
(Sort rule) expands to the variations of math italic Greek tau. 577
(Sort rule) expands to the variations of math italic Greek theta. 577
Expands to the second set of math italic uppercase Greek sort rules. 576
Expands to the first set of math italic uppercase Greek sort rules. 576
(Sort rule) expands to the variations of math italic Greek upsilon. 577
(Sort rule) expands to the variations of math italic Greek xi. 577
(Sort rule) expands to the variations of math italic Greek zeta. 577
Expands to the second set of math upright Greek sort rules. 576
Expands to the first set of math upright Greek sort rules. 576
Used on the first instance of
If
Issues the given warning message with
As
As
As
Used by compound-adjust-name. §7.14; 374
Used by
Used by
Used by
Used by
Used by
Used by
Used by
Used by
Separator used by
Separator used by
Separator used by
Expands to the index of the final non-main element in the given multi-entry or nothing if §7.13; 373
Expands to the list of element labels for the multi-entry identified by §7.13; 372
Expands to the main label for the multi-entry identified by §7.13; 372
Expands to the index of the main element in the given multi-entry or nothing if §7.13; 373
Used by
Expands to the total number of elements in the given multi-entry or nothing if §7.13; 373
Create an external location hyperlink using the prefix and counter. §11.5.6; 584
Used by
Hook provided to adjust initialisation within
Defines the command
Defines the command
Like
Like
Defines the command
Defines a new glossary entry with the given label, type set to
Like
Like
Like
Defines a new glossary entry with the given label, type set to
Issues a warning with
Advisory message when automake has been used. §15; 619
Advisory message to check the file contents. §15; 618
Produces the boilerplate text if the probably empty glossary is the
Produces the boilerplate text if the probably empty glossary is not the
Produces the boilerplate text if a glossary is probably empty. §15; 617
Produces the header boilerplate text if a glossary file is missing. §15; 617
Advisory message on mis-matching
Advisory if no output file was created. §15; 618
Final paragraph of missing glossary boilerplate text. §15; 618
Makes the group titling mechanism used with the “unsrt” family of commands use the same method as for
Expands to non-printable character sort rules. 566
When placed at the end of the description, this switches off the post-description punctuation (inserted automatically via options such as postdot) but doesn’t suppress the post-description hook. Does nothing outside of the glossary. §8.6.2; 426
Expands to the name value for styles like long-only-short-only-desc. 155
Expands to the name value for styles like long-only-short-only-desc. 155
Expands to the name value for styles like long-only-short-only. 155
The plural suffix used by the “only” abbreviation styles (such as long-only-short-only). 154
Expands to the original option list as it was supplied to
Expands to the original short form as it was supplied to
Expands to the original long form as it was supplied to
As
As
For use in headings and captions (instead of the
As
Used to encapsulate 132
Does
Hook implemented at the start of
As
As
Command used in the post-link hook for styles like short-postfootnote. §4.5.2; 160
The default post-description hook for the abbreviation category. §8.6.2; 426
The default post-description hook for the acronym category. §8.6.2; 426
The post-description hook associated with the category identified by the label . §8.6.2; 425
The default post-description hook for the general category. §8.6.2; 425
The default post-description hook for the index category. §2.1; 12
The default post-description hook for the number category. §2.1; 11
An additional hook used within
The default post-description hook for the symbol category. §2.1; 10
The default post-description hook for the term category (which isn’t used by glossaries-extra). §8.6.2; 426
Used in the footnote text to format the long form for styles like short-postfootnote. 146
As
Used within the post-link hook to format the long form according to the short-hyphen-postlong-hyphen style on first use. 153
As
As
As
Used within the post-link hook to format the short form according to the long-hyphen-postshort-hyphen style on first use. 151
As
As
As
Used within the post-link hook to format the insert according to the long-hyphen-postshort-hyphen style on subsequent use. 151
A post-link hook that does
May be used within a post-link hook to display the description in parentheses on first use. §5.5.4; 251
May be used within a post-link hook to display the symbol and description in parentheses on first use. §5.5.4; 251
May be used within a post-link hook to display the symbol in parentheses on first use. §5.5.4; 251
The post-link hook associated with the category identified by the label .
A post-link hook that’s used if a full stop is discarded in order to adjust the space factor (to denote the end of a sentence). If the category post-link hook exists, and will be applied and the full stop will be restored. §5.5.4; 248
A post-link hook that checks if a following full stop needs to be discarded, in which case it does
Used by
Hook performed by
Hook performed by
Hook added to the end of the description field by the unstarred version of
The post-name hook associated with the category identified by the label . §8.6.1; 424
A hook that’s performed within
A hook that’s performed after the entry has been defined. §4.5.3.1; 165
Hook performed by
Hook performed by
Formats the long form in parentheses (with
Formats the short form in parentheses (with
Sets the
Sets the
Hook performed by
Used before the location list in the predefined styles provided by glossaries-extra or modified by glossaries-extra-stylemods. §8.6.5; 431
Locally prepend
Defines
Provides the standard BibTeX fields as glossary entry keys (using
Just uses
Like
Defined by
Expands to the entry’s record count for the given counter (stored in the recordcount. field) or to 0 if not set. §11.4; 546
Activates recording for the given counter. §8.4.3.2; 411
Expands to the trigger value used by
Incorrect use of
Used by
If local unset for repeat entries has been enabled with
A count register that is incremented on each use of
For use with bib2gls, this both sets up the options for the resource set (which bib2gls can detect from the aux file) and inputs the file .glstex file created by bib2gls. §11; 533
May be defined to temporarily change command definitions before information is written to the aux file by the protected write used by
May be added to the definition of
Counteracts
Used in the description to counteract the use of
Style-sensitive abbreviation command designed to counteract any font change applied by the style. 171
Restores
Restores
Implemented at the start of all the
Maintained for backwards-compatibility used to typeset
Expands to the name value for styles like long-only-short-sc-only-desc. 156
Expands to the sort value for styles like long-only-short-sc-only-desc. 156
Expands to the name value for styles like long-only-short-sc-only. 155
The definition of
The plural suffix used by the “sc-only” abbreviation styles (such as long-only-short-sc-only). 155
The definition of
The plural suffix used by the small caps (“sc”) abbreviation styles. This switches off the small caps font to prevent the suffix from also appearing in small caps. 157
The definition of
The plural suffix used by styles like long-postshort-sc-user. 137
Expands to the value of the seealso field for the entry identified by . If the field isn’t set, this will expand to nothing. If the entry isn’t defined, this will expand to
Fully expands
If the entry given by see, seealso or alias fields set, this will display the cross reference according to
Used by
Used by
Hook used by
Sets the “actual character” for the auto-indexing feature. §12; 600
Hook used to switch off indexing for aliases. §5.9.3; 280
Sets
As the bibglsaux option. §2.4; 26
Globally sets the category field to the fully expanded for each entry listed in . §10; 515
Globally sets the category field to the fully expanded for each entry belonging to the glossaries listed in . §10; 515
Indicates that the entry given by
Locally set the default options for the
Sets the default format to (without the leading backslash). §5.1.1; 187
Sets the default format to (without the leading backslash) for
Sets the “encap character” for the auto-indexing feature. §12; 600
Sets the “escape character” for the auto-indexing feature. §12; 600
Assigns internal label for the entry identified by . An error (or warning with undefaction=warn) occurs if the entry hasn’t been defined. §3.5; 39
Used by commands like
Globally assigns the given title group identified by . §8.6.4; 430
Sets the label to add (using
Sets the “level character” for the auto-indexing feature. §12; 600
Implemented by the
Overrides the options that should be implemented by the plus (
Sets the options that
Sets the punctuation list used by
Sets the recordcount attribute to for each of the listed categories. §11.4; 547
Overrides the options that should be implemented by the star (
Hook used by
Written to the glstex by the set-widest option. §11.5.3; 577
Written to the glstex by the set-widest option if bib2gls can’t determine the widest name. §11.5.3; 578
As
As
References the entry identified by short value, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
Expands to the name value for styles like short-nolong-desc. 147
As
As
Encapsulates the short field for the given entry with . The argument is the insertion material supplied in the final optional argument of the
As
As
As
Formats the short form according to the short-hyphen-postlong-hyphen style. 152
As
Formats the short and long form according to the short-hyphen-long-hyphen style. 152
Expands to the sort value for the short-hyphen-long-hyphen styles. 148
Expands to the name value for short-long-desc styles. 134
Expands to the sort value for short-long-desc styles. 134
As
As
Formats the short form with
Expands to the name value for short-long styles. 134
As
As
As
Expands to the value for the name key for styles like short-long-user-desc. 139
Expands to the name value for short-nolong styles. 146
As
As
References the entry identified by shortplural value, formatted according to the abbreviation style associated with the entry’s category. The argument will be inserted at the end of the link text. This command does not alter or depend on the first use flag. For the first optional argument, see
As
As
As
As
As
As
Used in inner mode for debugging, this defaults to
Used in outer mode for debugging, this defaults to
The left marker debugging symbol (◁). §2.5; 30
The right marker debugging symbol (▷). §2.5; 30
Maintained for backwards-compatibility used to typeset
The definition of
The plural suffix used by the smaller (“sm”) abbreviation styles (such as short-sm-long). 158
Expands to space character sort rules. 566
Used by
Used by
Used to display the standalone entry name and create the associated hypertarget, if supported. §8.5; 419
As
Used by
Used by
Expands to the glossary type for standalone entries. §8.5; 418
Used to display standalone entries that have the parent field set. §8.5; 418
Issues a warning with
Enables unset buffering. The starred version doesn’t check for duplicates. §5.10.1; 286
Stops buffering. The starred version performs a global unset. §5.10.1; 287
Expands to the 0–9 subscript digit character sort rules. 569
Used by
Used by
Used by
Used by
Used by
Used by
Expands to the 0–9 superscript digit character sort rules. 569
Used to hyperlink to a location in an external document if the externallocation attribute has been set. This will define
Defined by
Used by the tagging command defined with
Similar to
Separator used by
Like
Expands to the field label used by
Expands to the value of the link counter associated with the given entry or 0 if it hasn’t been defined. §6.2; 320
Used by
Used to display the all caps entry’s first field in the section title and table of contents. §5.3.3; 225
Used to display the sentence case entry’s first field in the section title and table of contents. §5.3.3; 224
Used to display the entry’s first field in the section title and table of contents. §5.3.3; 224
Used to display the all caps entry’s firstplural field in the section title and table of contents. §5.3.3; 225
Used to display the sentence case entry’s firstplural field in the section title and table of contents. §5.3.3; 225
Used to display the entry’s firstplural field in the section title and table of contents. §5.3.3; 225
Used to display the entry’s all caps full form in the section title and table of contents. §5.3.3; 221
Used to display the entry’s sentence case full form in the section title and table of contents. §5.3.3; 221
Used to display the entry’s full form in the section title and table of contents. §5.3.3; 220
Used to display the entry’s all caps full plural form in the section title and table of contents. §5.3.3; 222
Used to display the entry’s sentence case full plural form in the section title and table of contents. §5.3.3; 221
Used to display the entry’s full plural form in the section title and table of contents. §5.3.3; 221
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
Used to display the all caps entry’s name in the section title and table of contents. §5.3.3; 222
Used to display the sentence case entry’s name in the section title and table of contents. §5.3.3; 222
Used to display the entry’s name in the section title and table of contents. §5.3.3; 222
Expands to the options that commands like
Does the applicable argument depending on whether the command occurs within a title/caption or PDF bookmark or heading. §5.3.3; 214
Used to display the all caps entry’s plural field in the section title and table of contents. §5.3.3; 224
Used to display the sentence case entry’s plural field in the section title and table of contents. §5.3.3; 224
Used to display the entry’s plural field in the section title and table of contents. §5.3.3; 223
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
Used to display the all caps entry’s text field in the section title and table of contents. §5.3.3; 223
Used to display the sentence case entry’s text field in the section title and table of contents. §5.3.3; 223
Used to display the entry’s text field in the section title and table of contents. §5.3.3; 223
Expands to the entry’s total record count (stored in the recordcount field) or to 0 if not set. §11.4; 546
Inserted before the child descriptions for the tree styles.
Inserted before the top-level descriptions for the tree styles.
Will either produce an error or a warning, depending on the undefaction setting. In the document environment this will also generate the unknown marker (
Expands to the unknown marker (
Issues a warning with
Disables GlsXtrUnsetBufferEnableRepeatLocal. §5.10.1; 288
Allows repeat entries within the buffering code to be locally unset before the link text. §5.10.1; 287
Used by the “unsrt” family of commands, this displays the glossary entry according to the current glossary style (taking the hierarchical level into account, which may have been adjusted by leveloffset or flatten). §8.4.3; 406
The format used by
(Sort rule) expands to the variations of math Greek upright alpha. 577
(Sort rule) expands to the variations of math Greek upright beta. 577
(Sort rule) expands to the variations of math Greek upright chi. 577
(Sort rule) expands to the variations of math Greek upright delta. 577
(Sort rule) expands to the variations of math Greek upright digamma. 577
(Sort rule) expands to the variations of math Greek upright epsilon. 577
(Sort rule) expands to the variations of math Greek upright eta. 577
(Sort rule) expands to the variations of math Greek upright gamma. 577
(Sort rule) expands to the variations of math Greek upright iota. 577
(Sort rule) expands to the variations of math Greek upright kappa. 577
(Sort rule) expands to the variations of math Greek upright lambda. 577
(Sort rule) expands to the variations of math Greek upright mu. 577
(Sort rule) expands to the variations of math Greek upright nu. 577
(Sort rule) expands to the variations of math Greek upright omega. 577
(Sort rule) expands to the variations of math Greek upright omicron. 577
(Sort rule) expands to the variations of math Greek upright phi. 577
(Sort rule) expands to the variations of math Greek upright pi. 577
(Sort rule) expands to the variations of math Greek upright psi. 577
(Sort rule) expands to the variations of math Greek upright rho. 577
(Sort rule) expands to the variations of math Greek upright sigma. 577
(Sort rule) expands to the variations of math Greek upright tau. 577
(Sort rule) expands to the variations of math Greek upright theta. 577
(Sort rule) expands to the variations of math Greek upright upsilon. 577
(Sort rule) expands to the variations of math Greek upright xi. 577
(Sort rule) expands to the variations of math Greek upright zeta. 577
If the entry given by alias field set, this will display the cross reference according to
As
As
Expands to the value of the given field (identified by its internal label ) for the entry given by . Expands to
Expands to the internal label of the field used to store additional information for the “user” abbreviation styles, such as long-short-user. 135
Used to format the value of the field given by
As
Formats the singular long form in parentheses (with
As
Formats the plural long form in parentheses (with
As
As
Used by styles like long-short-user to format the long and short form. 139
As
As
Used by styles like long-short-user to format the plural long and plural short form. 140
As
Used by the “user” abbreviation styles, such as long-short-user, to insert the space separator (
The separator used in the parenthetical content of
As
Formats the singular short form in parentheses (with
As
As
Used by styles like short-long-user to format the short and long form. 140
As
As
Used by styles like short-long-user to format the plural short and plural long form. 141
As
Formats the plural short form in parentheses (with
The plural suffix used by styles like short-long-user. 136
If the entry given by see field set, this will display the cross reference according to
If the entry given by seealso field set, this will display the cross reference according to
Formats the comma-separated list of entry labels as a “see also” cross-reference. §5.9.2; 280
Format used by
Issues a warning with
Issues a warning with
Used to mark each word by the markwords and markshortwords attributes. §10.2.1.1; 519
Used to mark word separator space by the markwords and markshortwords attributes. §10.2.1.1; 519
Used to mark compound word separator hyphen by the markwords and markshortwords attributes.
Hook implemented everytime an entry is indexed.
Used by
Used to mark where the wrglossary counter is incrememented with debug=showwrgloss. §2.5; 29
Marker (·) used to mark write operations with debug=showwrgloss. §2.5; 29
If hyperlinks are supported this does
If the glossary given by exists, this does , otherwise it does . The unstarred form treats ignored glossaries as non-existent. The starred form (v4.46+) will do if matches an ignored glossary.
Does
Tests if the value of the given field is equal to the replacement text of the command given by the control sequence name etoolbox’s
Tests if the value of the given field is equal to the replacement text of the given command etoolbox’s
Tests if the value of the given field is equal to the given string using etoolbox’s
An expandable test to determine if the entry is undefined or the field is undefined or empty. The internal label.
Does glossary to find one that has the entry identified in its parent field. A more efficient approach can be achieved with bib2gls and the save-child-count resource option.
Does description field is set otherwise does .
Does description field is just
If the field identified by either its key or its internal field label for the entry identified by is set and non-empty, this sets
Does long field is set otherwise does .
Does parent field is set otherwise does .
Does short field is set otherwise does .
Does symbol field is set otherwise does .
A conditional that corresponds to the indexonlyfirst option. §5.8; 267
Conditional that determines whether or not to use tabular instead of longtable. If this conditional is changed, it must be changed before the style is set. §8.7.2; 449
Conditional set by the nogroupskip option.
Conditional that determines whether or not to reset the entry counter to 0 when the first use flag is reset. §6.1; 310
Does used, does if the entry is marked as unused, and does neither if the entry hasn’t been defined (but will generate an error or warning according to undefaction).
A conditional that indicates whether or not wrgloss=before is set. §5.1.2; 193
A conditional used by the predefined abbreviation styles to determine whether the 131
Conditional that determines whether or not to use the last label prefix as the default. §11.5.7; 587
Conditional set by the flatten option. §8.4.3; 406
If true, subsequent multi-entry definitions will be global. §7; 327
Defined by glossaries-extra-bib2gls to but defined by bib2gls’s interpreter to expand to . §11.5.8; 595
Defined by
Expands to the index title.
Defined by
Defined with
Defined with
Defined by
Defined by
Defined by
Defined by
Defines a synonym for an existing abbreviation style. §4.5.3; 161
Locally assigns
Defines a new glossary entry with the given label. The second argument is a comma-separated list of glossary entry keys. The third argument is the description, which may include paragraph breaks. §3.1; 32
Like the unstarred
Counteracts
Robust command that converts the first character of uppercase unless starts with a command, in which case it will attempt to apply the case change to the first character of the first argument following the command, if the command is followed by a group. As from mfirstuc v2.08, this command internally uses
Opens the associated glossary files that need to be processed by makeindex or xindy. The optional argument is only available with glossaries-extra and is used for a hybrid approach. All glossaries (or each glossary identified in ) should be displayed with
Sets up all non-ignored glossaries so that they can be displayed with
This command was used by
Identifies a mapping from the command
Locally identifies
Locally identifies
Saves the list of exclusions, blockers and mappings to the aux file (if required by some external tool, such as bib2gls). This command sets itself to
Saves the list of exclusions, blockers and mappings to the aux file (if required by some external tool, such as bib2gls) at the end of the document. This command sets itself to
Fully expands uppercase. Unlike
Defined by
As
As
As
References a multi-entry identified by the given §7; 325
Locally appends to the options associated with the given multi-entry. §7; 327
Placeholder command for use in multi-entry hooks, this expands to the multi-entry category current in effect. §7.5; 350
Placeholder command for use in multi-entry hooks, this expands to the current element label. §7.5; 350
Placeholder command for use in multi-entry hooks, this expands to the complete comma-separated list of elements. §7.5; 349
Placeholder command for use in multi-entry hooks, this expands to the label of the main element. §7.5; 349
Placeholder command for use in multi-entry hooks, this expands to the multi-entry label. §7.5; 349
Placeholder command for use in multi-entry hooks, this expands to the options used when the multi-entry was defined. §7.5; 349
Placeholder command for use in multi-entry hooks, this expands to the current prefix. §7.5; 350
Placeholder command for use in multi-entry hooks, this expands to the current suffix. §7.5; 350
Hook used with the mpostlinkelement=custom option. §7.6; 351
Defines the prefix for the given multi-entry category. §7.3; 343
Defines the suffix for the given multi-entry category. §7.3; 344
A count register used in multi-entry hooks, this is set to the element index. §7.5; 350
Hook performed after each (non-skipped) element in a multi-entry set. §7.5; 349
Hook performed before each (non-skipped) element in a multi-entry set. §7.5; 349
Used by options such as resetall to reset an element’s first use flag (taking the presetlocal option into account). §7.10; 364
Used by options such as unsetall to unset an element’s first use flag (taking the presetlocal option into account). §7.10; 364
Expands to the internal field label required by
Iterates over the list of element labels for the multi-entry identified by §7.13; 372
As
As
As
For use in multi-entry hooks, this expands to §7.5; 350
For use in multi-entry suffix and post-link hooks, this expands to the sentence case applied or to if the last element had all caps applied. §7.6.1; 353
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.1; 352
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.1; 352
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.1; 352
For use in multi-entry suffix and post-link hooks, this expands to the sentence case applied or to if the last element had all caps applied. §7.6.2; 354
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.2; 353
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.2; 353
For use in multi-entry suffix and post-link hooks, this expands to the §7.6.2; 353
For use in multi-entry hooks, this expands to §7.5; 350
For use in multi-entry suffix and post-link hooks, this expands to the multi-entry category or nothing, if no category assigned. §7.6; 352
For use in multi-entry suffix and post-link hooks, this expands to the label of the last non-skipped element. §7.6.1; 352
Hook used with the mpostlinkelement=last option. §7.6; 351
For use in multi-entry suffix and post-link hooks, this expands to the label of the main element that was just referenced. §7.6.2; 353
Hook used with the mpostlinkelement=main option. §7.6; 351
For use in multi-entry suffix and post-link hooks, this expands to the multi-entry label. §7.6; 351
Locally resets the first use flag for the given multi-entry. §7.7; 354
Locally unsets the first use flag for the given multi-entry. §7.7; 354
Locally unsets the first use flag for the other (not main) elements of the given multi-entry. §7.10; 364
As
As
As
As
As
As
As
As
As
As
As
As
As
Code used to typeset the multi-entry prefix. §7.3; 342
Globally resets the first use flag for the given multi-entry. §7.7; 354
Resets the first use flag for all multi-entries. §7.7; 355
Formatting command used by cross-reference lists for the first item if the item is a multi-entry. §7.12; 371
Formatting command used by cross-reference lists for subsequent items if the item is a multi-entry. §7.12; 371
Locally changes the main element for the given multi-entry.
Locally sets the options associated with the given multi-entry. §7; 327
As
As
Code used to typeset the multi-entry suffix. §7.3; 343
As
As
As
Globally unsets the first use flag for the given multi-entry. §7.7; 354
Unsets the first use flag for all multi-entries. §7.7; 355
Globally unsets the first use flag for the other (not main) elements of the given multi-entry. §7.10; 364
Expands to the prefix assigned to the given multi-entry category or does nothing if no prefix assigned. §7.3; 344
Expands to the suffix assigned to the given multi-entry category or does nothing if no suffix assigned. §7.3; 344
As
As
As
For use in multi-entry suffix and post-link hooks, this expands to the §7.6; 352
As
As
As
As
As
As
As
As
As
As
As
Issues a warning with
Defined with
Defines a multi-entry set with the label §7; 325
Sets
Sets
Specifies a general set of options to apply to all multi-entries. §7.9; 356
A synonym for
Defines a new entry that represents an abbreviation. This internally uses
Hook provided within
Defines an abbreviation style, which can be set with
This command is provided by the base glossaries package but is redefined by glossaries-extra to use
Defines an acronym style for use with the base glossaries package’s acronym mechanism. These styles are not compatible with glossaries-extra. Use
Defines the command
Similar to
A synonym for
Defines a glossary identified by (which can be referenced by the type key when defining an entry). The will be used when displaying the glossary (using commands like
A shortcut that supplies file extensions based on the glossary label:
Defines a new glossary entry with the given label. The second argument is a comma-separated list of glossary entry keys.
Defines a glossary that should be ignored by iterative commands, such as
This is like the unstarred
A synonym for
A synonym for
Defines a new glossary entry with the given label, type set to
Defined by
When placed at the end of the description, this switches off the post-description hook (including the post-description punctuation). Does nothing outside of the glossary.
Defined by
Defined by
Defined with
Defined by
Defined with
Defined with
Expands to the title of the location list column for headed tabular-like styles.
As
Similar to
As
As
As
As
As
As
As
As
As
As
As
As
As
Similar to
As
As
As
As
As
As
As
As
As
As
As
As
The normal behaviour of
The normal behaviour of
The normal behaviour of
The normal behaviour of
Defined by
Prepends (locally)
Shortcut for
Shortcut for
Iterates over all non-ignored glossaries and does
Displays the glossary by inputting a file created by makeindex or xindy. Must be used with
Shortcut provided by the index package option that simply does
Iterates over all non-ignored glossaries and does
Displays the glossary by obtaining the indexing information from the aux file and using TeX to sort and collate. Must be used with
Shortcut for
Shortcut for
Shortcut for
Shortcut for
Iterates over all non-ignored glossaries and does
Displays the glossary by iterating over all entries associated with the given glossary (in the order in which they were added to the glossary). Group headers will only be inserted if the group key has been defined and has been set (typically with the record option and bib2gls). Location lists will only be shown if the location or loclist fields have been set (typically by bib2gls). §8.4; 385
Does
Hook used within the “unsrt” family of commands while the glossary is being constructed. §8.4.3; 404
Hook used within the “unsrt” family of commands while the group header is being constructed. §8.4.1; 395
Used within the “unsrt” family of commands to process the current entry. §8.4.3; 406
Hook used within the “unsrt” family of commands while the glossary is being constructed just after
Hook used within the “unsrt” family of commands while the glossary is being constructed after the entry line has been added. §8.4.3; 405
Hook performed by the “unsrt” family of commands just before the glossary body is displayed. §8.4.3; 405
Hook used within the “unsrt” family of commands while the glossary is being constructed just before
Hook used within the “unsrt” family of commands while the glossary is being constructed before the entry line has been added. §8.4.3; 404
May be used within
Provided for use with
The vertical space at the end of the glossary appended by
Sets up the filtering used by
Shortcut provided by the index package option combined with glossaries-extra-bib2gls that simply does
Similar to
Shortcut provided by the numbers package option combined with glossaries-extra-bib2gls that simply does
Shortcut for
Internally uses
As
As
Should be placed at the start of a glossaries-extra ldf file. §15; 616
Redefines an abbreviation style. §4.5.3; 161
Indicates that a glossaries-extra ldf file should be input, if it hasn’t already been input.
Restores
Like
Like
Like
Format used by
Format used by
Format used by
Like
Like
Like
Format used by
Format used by
Format used by
Defined with
Used as a cross-reference tag. The default value is
Used as a cross-reference tag (provided by glossaries if not already defined).
Sets the current abbreviation style to for the category identified by . If the optional argument is omitted, abbreviation is assumed. §4.5; 59
Sets the style for the base glossaries package’s acronym mechanism. These styles are not compatible with glossaries-extra, which redefines
Used to set the location counter and prefix required for
Globally sets the preamble for the glossary identified by
Set the current glossary style to . Redefined by glossaries-extra to include
Change allowed options that are defined by the base glossaries package. Note that some options can only be passed as package options. To change options defined or modified by the glossaries-extra package, use
Set the default options for
Set the default
Used to format a child entry. This command should be redefined by the glossary style.
Defined by
Expands to the title of the symbol column for headed tabular-like styles.
Defined with
The value of the glossaryentry counter.
Defined by
Defined by
Recognised by bib2gls within some resource options as identifying the Unicode character given by . Since
Defined by
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Defined with
Writes multi-entry information to the aux file. §7.13; 373
Passes the argument to
As
As
As
As
Expands to the footnote code required for styles like short-postfootnote. §4.5.2; 160
Used within the post-link hook for the short-hyphen-postlong-hyphen style on first use. This expands the placeholder commands and uses either
Used within the post-link hook for the long-hyphen-postshort-hyphen style on first use. This expands the placeholder commands and uses either
Used within the post-link hook for the long-hyphen-postshort-hyphen style on subsequent use. This expands the placeholder commands and uses either
Defined with
Encapsulates the child list. §8.7.4.1; 485
Sets up the start and end of the glossary (including beginning and ending the theglossary environment). Use
Redefined by glossary styles to set up the way the glossary is displayed. For example, to start and end the description environment for the list styles.
Modifies the glossary styles supplied with the base glossaries package to make them more flexible and to integrate support for features provided by glossaries-extra or bib2gls.
Load all predefined styles.
Load package glossary-.
Extension package that loads glossaries, provides additional commands, and modifies some of the base glossaries commands to integrate them with the new commands or to make them more flexible. §2; 8
Provides a new glossary with the label
Loads glossaries-accsupp. §2.3; 14
Indicates whether or not to enable automatic indexing of see and seealso fields. §2.4; 21
Disables automatic indexing of see and seealso fields. 22
Enables automatic indexing of see and seealso fields. 22
If set, an additional aux file called .aux will be created in which to store the bib2gls records. This file will be skipped by LaTeX when the main aux file is input but will be read by bib2gls. §2.4; 26
Provides debugging information. Some options are also available with just the base glossaries package. §2.5; 28
Implements all debugging options. 29
Disable debugging actions. 28
Implements debug=true and also shows accessibility information in the document. 28
Implements debug=true and also shows target markers in the document. 29
Implements debug=true and also shows a marker in the document whenever the entry is indexed and (if used with indexcounter) will mark where the wrglossary counter is incremented. 29
Writes
Determines whether or not
As restricted but creates the glsdefs file for atom’s autocomplete support. 17
Don’t allow
Allow
Allow
Automatically switch the location counter to equation when inside a numbered equation environment. §2.4; 26
Automatically switch the location counter to the corresponding counter when inside a floating environment. §2.4; 27
Defines the index counter wrglossary and implements counter=wrglossary. §2.4; 27
Indicates whether or not to enable automatic indexing of cross-referenced entries. §2.4; 20
Disables automatic indexing of cross-referenced entries. 21
Enables automatic indexing of cross-referenced entries. 21
Determines whether or not to display warning text if the external glossary file hasn’t been generated due to an incomplete build. §2.1; 9
A shortcut for nopostdot=false. §2.2; 12
An alternative to postdot, this can be used to insert a different punctuation character after the description. §2.2; 12
Inserts a comma after the description. 13
Equivalent to postdot or nopostdot=false. 13
Switches off automatic post-description punctuation insertion. 13
Inserts
Loads glossaries-prefix. §2.3; 14
Indicates whether or not bib2gls is being used (in which case entry indexing is performed by adding bib2gls records in the aux file). §2.4; 23
Performs a mixture of bib2gls records in the aux file (to select entries from a bib file) and makeindex/xindy indexing in their associated files. The actual sorting and collation is performed by the indexing application, so sort=none and save-locations=false should be used in
Entry indexing is performed by adding bib2gls nameref records in the aux file. Glossaries should be displayed with the “unsrt” family of commands. 24
Entry indexing is performed as per the base glossaries package, using either
Entry indexing is performed by adding bib2gls records in the aux file. Glossaries should be displayed with the “unsrt” family of commands. 24
Defines various shortcut commands (boolean only with just the base glossaries package). §2.4; 17
Implements the abbreviation shortcuts. 18, 18
Implements shortcuts=abbreviations and shortcuts=other. 19
Implements the acronym shortcuts that are compatible with
Implements shortcuts=ac and shortcuts=other. 19
Implements the acronym shortcuts. Don’t use this option unless you have reverted
Implements shortcuts=ac, shortcuts=abbreviations, shortcuts=other. 19, 19, 20
Don’t define any shortcut commands.
Implements the shortcuts
Implements debug=showtargets. §2.5; 29
Markers are placed on either side of the link/target with the annotation on the left in all modes. 31
Markers are placed on either side of the link/target with the annotation on the right in all modes. 31
A marker and annotation are placed to the left of the link/target in all modes. 31
A marker and annotation are placed to the left of the link/target in all modes. 31
A marker is placed to the left of the link/target and a marginal note is used in outer mode. 30
A marker is placed to the right of the link/target and a marginal note is used in outer mode. 30
Loads glossaries-extra-stylemods with the given options. If stylemods=default then no options are passed to glossaries-extra-stylemods. §2.2; 13
Load glossaries-extra-stylemods with all predefined styles. 13
Load glossaries-extra-stylemods with no options (patches any predefined styles that have been loaded). 13
Load glossaries-extra-stylemods with all the listed styles. 14
Indicates whether to trigger an error or warning if an unknown entry label is referenced. §2.4; 15
Trigger an error if an unknown entry label is referenced. 15
Trigger a warning if an unknown entry label is referenced. 15
Base package. When loaded implicitly with glossaries-extra, any relevant options will be passed to the base glossaries package.
If true, provides a new glossary with the label
Identifies the glossaries that contain acronyms (defined with the base glossaries packages acronym mechanism).
Provides a new glossary with the label
Indicates whether or not to attempt to use TeX’s shell escape to run an indexing application.
Sets the default location counter.
Adds markers to the document for debugging purposes.
Enables the entry counter for top-level entries.
Indicates whether or not to use hyperlinks on first use (if hyperlinks are supported).
Provides a new glossary with the label
Indicates whether or not to only index the first use.
Indicates that the indexing should be performed by makeindex (default).
Implements the expanded and unexpanded options provided by mfirstuc.
If true, suppress the gap between letter groups in the glossaries by default.
Don’t load glossary-list, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.
Don’t load glossary-long, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.
Prevents the definition of the
Set no location lists as the default for all glossaries. May be overridden for individual glossaries with nonumberlist=true.
If true, suppresses the automatic insertion of a full stop after each entry’s description in the glossary (for styles that support this). The default is nopostdot=true for glossaries-extra and nopostdot=false for just glossaries. §2.2; 12
Suppresses a warning if theglossary or
Don’t load the default set of predefined styles. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.
Don’t load glossary-super, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.
Equivalent to translate=false.
Don’t load glossary-tree, which is normally loaded automatically. Note that if glossaries is loaded before glossaries-extra, then this option should be passed directly to glossaries not glossaries-extra otherwise it will be too late to implement.
Suppresses warnings.
Indicates whether or not glossary section headers will be numbered and also if they should automatically be labelled.
Provides a new glossary with the label
Indicates whether the default sort value should be sanitized (only applicable with sort=standard).
If true, patches the location list encapsulator to save the location list. With bib2gls, use the save-locations resource option.
Indicates which section heading command to use for the glossary. The value may be one of the standard sectioning command’s control sequence name (without the leading backslash), such as
Indicates what to do if the see key is used before the associated indexing files have been opened by
Triggers an error if the see key is used before
Does nothing if the see key is used before
Triggers a warning if the see key is used before
Indicates how the sort key should automatically be assigned if not explicitly provided (for
Sets the sort key to an empty value. Use this option if no indexing is required for a slightly faster build.
Use the (zero-padded) order of definition as the default for the sort key.
Don’t process the sort key. Use this option if no indexing is required for a slightly faster build.
Use the value of the name key as the default for the sort key and implement the
Use the (zero-padded) order of use as the default for the sort key.
Sets the default glossary style to .
Enables the entry counter for level 1 entries.
Provides a new glossary with the label
If true, each glossary will be automatically added to the table of contents. The default is toc=false with glossaries and toc=true with glossaries-extra.
Indicates how multilingual support should be provided, if applicable.
Uses babel’s language hooks to implement multilingual support (default for glossaries-extra if babel has been detected).
Don’t implement multilingual support (default if no language package has been detected).
Uses translator’s language hooks to implement multilingual support (default for glossaries if a language package has been detected).
Creates a file called
Creates a file called
Indicates that the indexing should be performed by xindy.
List of Examples
1. Introduction
1.1. Package Defaults
\printglossary
are redefined while glossaries is loading). Note that this won’t have any effect if the glossaries package has already been loaded before you load the glossaries-extra package.\newacronym
is short-nolong. (That is, the long form is not shown on first use.) To revert back to “ on ( )”first use do:
In the above example, long-short refers to the glossaries-extra abbreviation style not the glossaries acronym style of the same name. See §4 for further details.\setabbreviationstyle
[acronym]{long-short}
1.2. Example Differences Between glossaries and glossaries-extra
1.2.1. Basic defaults
This is like: \documentclass
{article}
\usepackage
{glossaries-extra}
\documentclass
{article}
\usepackage
[toc,nopostdot]{glossaries}
\usepackage
{glossaries-extra}
1.2.2. Language defaults
This is like: \documentclass
[british]{article}
\usepackage
{babel}
\usepackage
{glossaries-extra}
\documentclass
[british]{article}
\usepackage
{babel}
\usepackage
[toc,nopostdot,translate=babel]{glossaries}
\usepackage
{glossaries-extra}
1.2.3. Combined with memoir
This is like: \documentclass
{memoir}
\usepackage
{glossaries-extra}
However \documentclass
{memoir}
\usepackage
[toc,nopostdot,noredefwarn]{glossaries}
\usepackage
{glossaries-extra}
This is like: \documentclass
{memoir}
\usepackage
{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.\documentclass
{memoir}
\usepackage
[toc=false,nopostdot=false]{glossaries}
\usepackage
{glossaries-extra}
1.2.4. Abbreviations
\newabbreviation
:
This is the closest match to: \usepackage
{glossaries-extra}
\newabbreviation
{svm}{SVM}{support vector machine}
\begin{document}
First use: \gls
{svm}. Explicit full form: \glsxtrfull
{svm}.
\end{document}
If you want to continue using \usepackage
{glossaries}
\newacronym
{svm}{SVM}{support vector machine}
\begin{document}
First use: \gls
{svm}. Explicit full form: \acrfull
{svm}.
\end{document}
\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}
1.2.5. Glossary Mid-Build Placeholder (
\printglossary
)\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.\printglossaries
command instead of \printglossary
. For example, consider the following:
The above document will only display the list of acronyms at the place where \documentclass
{article}
\usepackage
[acronym]{glossaries}
\makeglossaries
\newacronym
{laser}{laser}{light amplification by stimulated
emission of radiation}
\begin{document}
\gls
{laser}
\printglossaries
\end{document}
\printglossaries
occurs. However it will also attempt to input the gls file associated with the main
glossary.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
.\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}
\setabbreviationstyle
before \newacronym
. See §4 for further details. 1.3. Further Reading
texdoc glossaries-extra-code
2. Package Options
you can simply do: \usepackage
[nonumberlist]{glossaries}
\usepackage
[abbreviations]{glossaries-extra}
\usepackage
[abbreviations,nonumberlist]{glossaries-extra}
2.1. Glossary Lists
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:
which is equivalent to:
If glossaries-extra-bib2gls is also loaded then this option will additionally provide \printglossary
[type=\glsxtrabbrvtype
, ]
\printunsrtabbreviations
which uses \printunsrtglossary
instead.\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.)\abbreviationsname
command won’t be defined (unless it’s defined by an included language file). \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 the sort key is set to the not the 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.\newglossaryentry
{ }{name={,
}sort={, }type={symbols},category={symbol},
}
true
for the symbol category and provides the category post-description hook: \printunsrtsymbols
which uses \printunsrtglossary
.
Note that the sort key is set to the . If this isn’t appropriate, you can override it by using the sort key in the optional argument.\newglossaryentry
{ }{name={,
}sort={, }type={numbers},category={number},
}
true
for the number category and provides the category post-description hook: \printunsrtnumbers
which uses \printunsrtglossary
.\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
.\acronymtype
to acronym
. Note that this option doesn’t change \glsxtrabbrvtype
.\printunsrtindex
which uses \printunsrtglossary
.\nopostdesc
) but retain \glsxtrpostdescription
so that the category post-description hook can still be applied.true
for the index category and defines an associated category post-description hook: 2.2. Glossary Style Options
\glspostdescription
to determine whether or not to insert a full stop.\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.\glspostdescription
. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.) \glspostdescription
to display the required punctuation. Note that this means the hook will no longer check for the nopostdot conditional.\glspostdescription
. (Use stylemods to ensure that all the predefined styles that show the description have this hook added.) \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.\glspostdescription
to a comma.\glspostdescription
to do nothing. This isn’t exactly the same as nopostdot=true since it removes the conditional from \glspostdescription
.\glspostdescription
. Extra hooks are also provided to make them easier to customize. The value may be one of the following:
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.\usepackage
[nostyles,stylemods={bookindex,longextra},
style=bookindex]{glossaries-extra}
2.3. Loading Other Packages
\glossariesextrasetup
) as glossaries-extra needs to know whether or not to provide accessibility support while it’s loading.\glsaccess
type of commands instead of \glsentry
(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
commands will add the accessibility information. See §9 for further details.2.4. Entry Definitions, References and Indexing
\forglsentries
and \glsaddall
. ??
(as with undefined labels or citations). The unknown marker is produced with:
This defaults to two question marks.\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.\glsxtrundefaction
will either create an error with the given and or will create a warning with the given .\newglossaryentry
can be used (preamble-only or anywhere before the first glossary or anywhere within the document).\newabbreviation
and \glsxtrnewsymbol
that internally use \newglossaryentry
are also governed by this option. Other commands, such as \longnewglossaryentry
are always preamble-only.\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.\longnewglossaryentry
and \newabbreviation
) are written to the glstex files that are input in the preamble. \newglossaryentry
within the document environment. All entries must be defined in the preamble.\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.\newglossaryentry
in the document environment provided the entry definitions all occur before the first glossary is displayed.\newglossaryentry
to be used in the document with \makenoidxglossaries
, but note that \longnewglossaryentry
remains a preamble-only command.\glsxtr@resource
(listed in the src option or \jobname
.bib if src is missing).\glossariesextrasetup
. \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.\newglossaryentry
.\glsxtrnewsymbol
(provided that the symbols package option is also used).\glsxtrnewnumber
(provided that the numbers package option is also used).\ac
). See the glossaries package documentation for further details.\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.\newacronym
back to the base glossaries package’s acronym mechanism. See §4.6 for further details.
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 \newglossaryentry
{courgette}{name={courgette},
description={small vegetable marrow}}
\newglossaryentry
{marrow}{name={marrow},
description={long gourd with green skin},
seealso={courgette}}
\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
.\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.\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.\glssee
. For example:
is equivalent to: \newglossaryentry
{courgette}{name={courgette},
description={small vegetable marrow}}
\newglossaryentry
{zucchini}{name={zucchini},
description={},
see={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.\newglossaryentry
{courgette}{name={courgette},
description={small vegetable marrow}}
\newglossaryentry
{zucchini}{name={zucchini},
description={}}
\glssee
{zucchini}{courgette}
\glssee
if autoseeindex=true. Similarly for the seealso key.\glssee
for the see key (as per the base glossaries package) and \glsxtrindexseealso
for the seealso key.
then, with autoseeindex=true and the default indexcrossrefs setting, this is equivalent to \newglossaryentry
{foo}{name={foo},
description={},see={bar,baz}}
\newglossaryentry
{foo}{name={foo},description={}}
\glssee
{foo}{bar,baz}
\glossariesextrasetup
{indexcrossrefs=true}
\GlsXtrSetField
{foo}{see}{bar,baz}
\glsxtrusesee
and \glsxtruseseealso
) but the cross-reference won’t be automatically indexed.
then, with autoseeindex=false and the default indexcrossrefs setting, this is equivalent to \newglossaryentry
{foo}{name={foo},
description={},see={bar,baz}}
\newglossaryentry
{foo}{name={foo},
description={}}
\GlsXtrSetField
{foo}{see}{bar,baz}
\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.\GlsXtrLoadResources
or \glsxtrresourcefile
. \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.\makeglossaries
or \makenoidxglossaries
. This setting implements undefaction=error.\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
.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
\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. \@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 format, which can’t be used with other indexing options.\@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.\printglossary
). Note that this requires a slower and more complicated build process (see below).\makeglossaries
but not with its optional argument. Each glossary should be displayed using \printglossary
(or \printglossaries
for all of them).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.\glslink
option.\glslink
option.\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}
\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
??
marker.
\documentclass
{article}
\usepackage
[debug]
{glossaries-extra}
\begin{document}
\gls
{example}
\end{document}
\glsshowtargetfonttext
for the annotation, which is provided by glossaries. \glsxtrwrglossarylocfmt
.\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.\glsshowtargetouter
).\glsshowtargetouter
to match debug=showtargets.\glsshowtargetinner
to match debug=showtargets.3. Defining Entries
\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.\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
\leavevmode
\unskip
\nopostdesc
at the end of the description. The glossaries-extra package replaces this with a single command:
which has the same effect, but can be redefined if required.\glsxtrnewsymbol
, and the numbers package option provides \glsxtrnewnumber
. See §2.1 for further details.3.2. Glossary Entry Keys
\seealsoname
. The value 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.)\glsxtrindexseealso
or \glssee
. \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.
You would write the following in a bib file: \newglossaryentry
{duck}{name={duck},
description={a waterbird with webbed feet}}
\newabbreviation
{svm}{SVM}{support vector machine}
@entry
{duck,
name={duck},
description={a waterbird with webbed feet}
}
@abbreviation
{svm,
short={SVM},
long={support vector machine},
}
\GlsXtrLoadResources
, but they should not be used in the bib files.\glsxtrsetgrouptitle
. You will need to invoke bib2gls with the --group (or -g) switch to ensure that this key is set, when required.\printnoidxglossary
.\printnoidxglossary
to display the locations. If you don’t want locations with bib2gls, either use nonumberlist or use the save-locations=false resource option.\glsaddkey
and \glsaddstoragekey
to allow custom keys to be defined. The glossaries-extra package additionally provides:\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).3.3. Plurals
\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.
\glspluralsuffix
is appended to the first field, if that field has been supplied. If the first field hasn’t been supplied but the plural field has been supplied, then the firstplural field defaults to the plural field. If the plural field hasn’t been supplied, then both the plural and firstplural fields default to the text field (or name, if no text field) with \glspluralsuffix
appended.\glspluralsuffix
is appended to the long field, if the long field has been supplied.\acrpluralsuffix
is appended to the short field.\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
.\glsxtralias
{ }
\glssee
{ }{ }
will link to ’s target. (Unless the targeturl attribute has been set for ’s category.)\gls
{ }\gls
or \glstext
. This prevents from having a location list (aside from the cross-reference added with \glssee
) unless it’s been explicitly indexed with \glsadd
or if the indexing has been explicitly set using noindex=false. See §5.9.3 for adjusting the indexing hook.\glsxtralias
(see §5.9.2).3.5. Setting or Updating Fields
\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).\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. ??
unknown marker. For example:
On the first LaTeX run, this produces:
At this point the \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}
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.\csdef
command to locally set the field given by its internal label to for the entry identified by . No existence check is performed.\glsxtrdeffield
but (protected) fully expands the value before assigning it to the field.\glsxtrdeffield
otherwise it will append a comma followed by (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.\listcsadd
. The field value can later be iterated over using \glsxtrfielddolistloop
or \glsxtrfieldforlistloop
.\listcsgadd
to make a global change.\listcseadd
to expand the value.\listcsxadd
to make a global change.\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).\csdef
command to locally set the field given by its internal label to for the entry identified by .\GlsXtrSetField
but uses a global assignment.\GlsXtrSetField
but (protected) fully expands the value first.\eGlsXtrSetField
but uses a global assignment.\cslet
command to locally set the field given by its internal label to for the entry identified by .\csletcs
command to locally set the field given by its internal label to the control sequence given by for the entry identified by .4. Abbreviations
4.1. Defining Abbreviations
\gls
), is the short form (the abbreviation) and is the long form (what the abbreviation is short for). The optional argument may be used to set additional keys (as per the options list in \newglossaryentry
), such as type or category.\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).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}
dr
entry above, which uses the long-short-sc style because no style has been associated with its custom title
category.
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).\setabbreviationstyle
{long-short}
\setabbreviationstyle
[acronym]{short}
\newacronym
, the glossaries-extra package redefines \newacronym
to do:
Note that this sets the category to acronym, which means that any abbreviations defined with \newabbreviation
[type=\acronymtype
,category=acronym, ]{ }{ }{ }
\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:
This must be placed before the first instance of \setabbreviationstyle
[acronym]{long-short}
\newacronym
.\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.\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.\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 final optional argument or with innertextformat). Instead, use commands like \gls
, \glsxtrshort
, \glsxtrlong
and \glsxtrfull
. 4.1.1. Abbreviation Fields: long and short
\gls
-like and \glstext
-like commands within and .4.1.2. Abbreviation Fields: longplural and shortplural
\glspluralsuffix
and the shortplural key defaults to \abbrvpluralsuffix
. The aposplural attribute will instead set the shortplural to
and the 'noshortplural attribute will set shortplural to just (see §10). If these values are not appropriate, you will need to explicitly set the longplural and shortplural keys in .\abbrvpluralsuffix
\abbrvpluralsuffix
is redefined by the abbreviation style. Some styles, such as the long-short style, simply redefine \abbrvpluralsuffix
to just: \glspluralsuffix
.\abbrvpluralsuffix
to include code to counteract the formatting of the abbreviation.\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
4.1.4. Abbreviation Fields: type
\newabbreviation
is: \glsdefaulttype
(the default glossary), but the abbreviations package option will redefine it to abbreviations
.\newacronym
is: \glsdefaulttype
, but the acronyms package option will redefine it to acronym
.4.1.5. General Hooks
\newabbreviation
. Note that there are additional hooks that are used by the abbreviation styles (see §4.5.3.1).\glsxtrorgshort
.4.2. Examples: makeindex vs bib2gls
Note that the long form of NASA isn’t displayed on the first use of \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}
. This is because the acronym category uses the short style by default.\gls
{nasa}@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}
4.3. Referencing (Using) Abbreviations
\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).\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
.\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.\glsfmtshort
and \glsfmtlong
(see §5.3.2). Commands like \glsentryname
are likely to contain non-expandable content.
In the above example, compare the first section heading (which references an abbreviation with \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}
\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.\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.\acrshort
. These aren’t compatible with \newabbreviation
. \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. \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}
\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”.\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.\glsxtrifwasfirstuse
to do its first argument. This is done via the command:
which is defined as:
This command takes the entry label as the argument, which is ignored by default.\newcommand
{\glsxtrsetlongfirstuse
}[1]{%
\let
\glsxtrifwasfirstuse
\@firstoftwo
%
}
This command is also used by the case-changing and plural variants listed below.\renewcommand
{\glsxtrsetlongfirstuse
}[1]{%
\letcs
\glsxtrifwasfirstuse
{@secondoftwo}%
}
\gls
.\glspl
.\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.\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
\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
.\glsxtrshort
but inserts the prefix field and separator, if the prefix value is set and non-empty.\pglsxtrshort
but sentence case. Note the initial “P” in the command name, which matches \Pgls
(similarly for the other prefix sentence case commands).\pglsxtrshort
but all caps.\glsxtrshortpl
but inserts the prefixplural field and separator, if the prefixplural value is set and non-empty.\pglsxtrshortpl
but sentence case.\pglsxtrshortpl
but all caps.\glsxtrlong
but inserts the prefixfirst field and separator, if the prefixfirst value is set and non-empty.\pglsxtrlong
but sentence case.\pglsxtrlong
but all caps.\glsxtrlongpl
but inserts the prefixfirstplural field and separator, if the prefixfirstplural value is set and non-empty.\pglsxtrlongpl
but sentence case.\pglsxtrlongpl
but all caps.4.3.2. Abbreviation Shortcut Commands
\glsxtrenablerecordcount
will switch the shortcuts that use the \cgls
-like commands to the corresponding \rgls
-like command.
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
but may be redefined as required.\underline
{ }\GlsXtrEnableInitialTagging
for safety reasons. The starred version will overwrite any previous definition of . As with redefining any commands, ensure that you don’t redefine something important.\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.\itag
is defined as the tagging command.
The underlining of the tagged letters only occurs in the glossary and then only for entries with the tagging attribute set.\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}
4.5. Abbreviation Styles
\newacronym
sets the category to acronym so with \newacronym
you need to change the style with: \setabbreviationstyle
[acronym]{ }
\GlsXtrLoadResources
. 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}
4.5.1. Predefined Abbreviation Styles
\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.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).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.\gls
may not match the text produced by \glsfirst
(and likewise for the plural and case-changing versions).\glsxtrshort
and \glsxtrlong
. These may appear slightly differently to the way the short or long form is displayed within \gls
, depending on the style.\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.
\setacronymstyle
{ } Verses New Abbreviation Styles \setabbreviationstyle
[ ]{ }Base Style Name
New Style Name
long-sc-short
long-short-sc
long-sm-short
long-short-sm
long-sp-short
long-short
with \renewcommand{
\glsxtrfullsep
}{\glsabspace
}short-long
short-long
sc-short-long
short-sc-long
sm-short-long
short-sm-long
long-short-desc
long-short-desc
long-sc-short-desc
long-short-sc-desc
long-sm-short-desc
long-short-sm-desc
long-sp-short-desc
long-short-desc
with \renewcommand{
\glsxtrfullsep
}{\glsabspace
}short-long-desc
short-long-desc
sc-short-long-desc
short-sc-long-desc
sm-short-long-desc
short-sm-long-desc
dua
long-noshort
dua-desc
long-noshort-desc
footnote
short-footnote
footnote-sc
short-sc-footnote
footnote-sm
short-sm-footnote
footnote-desc
short-footnote-desc
footnote-sc-desc
short-sc-footnote-desc
footnote-sm-desc
short-sm-footnote-desc
where is the name of the abbreviation style, 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 otherwise the optional argument of \documentclass
{article}
\usepackage
[T1]{fontenc}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\setabbreviationstyle
{ }
\newabbreviation
[ ]{ex}{ }{long form}
\begin{document}
First: \gls
{ex}[-insert]. Next: \gls
{ex}[-insert].
Full: \glsxtrfull
{ex}[-insert].
\printunsrtglossaries
\end{document}
\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.
-
]-
[post] [-
][-user
]-
parts may be omitted. These styles display followed by in parentheses. If or starts with “no” then that element is omitted from the display style (no parenthetical part) but is included in the inline style.post
is present then is placed after the link text using the post-link hook. Note that this will use the singular form of by default, even if \glspl
is used. The corresponding non-post style will use the matching form for .-
part is present and is one of sc
, sm
or em
, then the field has a font changing command applied to it.-only
indicates that field is only present according to whether or not the entry has been used.-hyphen
indicates the style will substitute inter-word spaces (that have been marked up with the markwords or markshortwords attributes) will be changed to spaces if the inserted material starts with a hyphen (but not for the set of \glsxtrshort
and \glsxtrlong
commands).-user
part is present, then the value of the field given by \glsxtruserfield
(user1), if set, is inserted into the parenthetical material.
\gls
) is moved to the post-link hook. The long form is formatted according to \glslonghyphenfont
(or \glsfirstlonghyphenfont
on first use). The short form is formatted according to \glsabbrvhyphenfont
(or \glsfirstabbrvhyphenfont
on first use).
-noreg
false
.-
]-
[post
]footnote
post
is present then the footnote is placed after the link text using the post-link hook. The inline style does followed by the other field in parentheses.-
is present, has a font-changing command applied to it.
\footnote
doesn’t work. -desc
4.5.1.1. Regular Styles
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
\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}
\glslongdefaultfont
for the \glsxtrlong
set of commands.\glsfirstabbrvdefaultfont
within the full form and with \glsabbrvdefaultfont
for subsequent use and for the \glsxtrshort
set of commands.\glsxtrshortnolongname
) and the description is set to the unencapsulated long form.\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}
\glsxtrshortdescname
), and the sort is set to just the short form.\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
4.5.1.1.2. Long Styles
\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}
\glsfirstlongdefaultfont
on first use and \glslongdefaultfont
for subsequent use and for the \glsxtrlong
set of commands.\glsfirstabbrvdefaultfont
within the inline full form and with \glsabbrvdefaultfont
for the \glsxtrshort
set of commands.\glsxtrlongnoshortdescname
) and the description must be supplied.\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
4.5.1.2. Non-Regular Styles
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.\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. \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
\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}
\glsfirstlongdefaultfont
within the full form and with \glslongdefaultfont
for the \glsxtrlong
set of commands.\glsfirstabbrvdefaultfont
within the full form and with \glsabbrvdefaultfont
for subsequent use and for the \glsxtrshort
set of commands.\glsxtrlongshortname
) and the description is set to the unencapsulated long form.\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}
\glsxtrlongshortdescname
and \glsxtrlongshortdescsort
).\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
4.5.1.2.2. Long (Short, User) Styles
\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.\glsxtrusersuffix
, \glsabbrvuserfont
, \glsfirstabbrvuserfont
, \glslonguserfont
and \glsfirstlonguserfont
(except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.\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}
\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}
\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
})%
}
\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}
\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}
\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.\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}
\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}
\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
\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}
\glsfirstlongdefaultfont
within the full form and with \glslongdefaultfont
for the \glsxtrlong
set of commands.\glsfirstabbrvdefaultfont
within the full form and with \glsabbrvdefaultfont
for subsequent use and for the \glsxtrshort
set of commands.\glsxtrlongshortname
) and the description is set to the unencapsulated long form.\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}
\glsxtrshortlongdescname
), and the sort is set to just the short form (\glsxtrshortlongdescsort
).\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
4.5.1.2.4. Short (Long, User) Styles
\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.\glsxtrusersuffix
, \glsabbrvuserfont
, \glsfirstabbrvuserfont
, \glslonguserfont
and \glsfirstlonguserfont
(except where noted). See §4.5.1.3.1 and §4.5.1.3.3 for style commands.\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}
\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}
\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
})%
}
\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}
\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}
\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
\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.\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}
\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}
\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}}
\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}
\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}
\glsxtrfullsaveinsert
.\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}
\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}
\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}
\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}
\glsxtrfullsaveinsert
(as described above, for the long-hyphen-postshort-hyphen style).\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}
\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}
\glsxtrfullsaveinsert
(as described above, for the long-hyphen-postshort-hyphen style).4.5.1.2.6. Only Styles
\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}
\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}
\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}
\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}
4.5.1.2.7. Footnote Styles
\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.\glsxtrshortlongformat
). Font variations are available with short-sc-footnote, short-sm-footnote and short-em-footnote.\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}
\glsfirstlongfootnotefont
within the full form and with \glslongfootnotefont
for the \glsxtrlong
set of commands.\glsfirstabbrvdefaultfont
within the full form and with \glsabbrvdefaultfont
for subsequent use and for the \glsxtrshort
set of commands.\glsxtrfootnotename
) and the description is set to the unencapsulated long form.true
for the entry’s category.\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}
\glsxtrfootnotedescname
), and the sort is set to just the short form (\glsxtrfootnotedescsort
).
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
\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}
4.5.1.2.8. Short Styles
false
.4.5.1.2.9. Long Styles
false
.4.5.1.3. Formatting Commands and Hooks
4.5.1.3.1. General
\newcommand
*{\glsxtrparen
}[1]{%
\glsxtrgenentrytextfmt
{(}#1\glsxtrgenentrytextfmt
{)}}
\glsxtrparen
. This is a space by default, but it includes the inner formatting. The argument (the entry label) is ignored by default:
You can redefine this to use \newcommand
*{\glsxtrfullsep
}[1]{\glsxtrgenentrytextfmt
{ }}
\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
.\glsxtrrevert
used by styles that don’t have specific font markup. If you redefine \glsabbrvdefaultfont
, you will need to redefine \glsxtrdefaultrevert
as applicable.\glslongdefaultfont
.4.5.1.3.2. Parenthetical Styles
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}
Note that this uses the original and values supplied to \expandonce
\glsxtrorglong
\space
(\expandonce
\glsxtrorgshort
)
\newabbreviation
.
This essentially expands to ( ) but includes the style font changing commands, the inner text formatting, and accessibility support.\glsxplongfont
{\the
\glslongtok
}{\glscategorylabel
}%
\protect
\glsxtrfullsep
{\the
\glslabeltok
}%
\protect
\glsxtrparen
{\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}}
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}
.\expandonce
\glsxtrorgshort
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}%
\protect
\glsxtrfullsep
{\the
\glslabeltok
}%
\protect
\glsxtrparen
\glsxplongfont
{\the
\glslongtok
}{\glscategorylabel
}
4.5.1.3.3. User Styles
useri
, which corresponds to the user1 key.\glsxtruserfield
within \glsxtruserparen
and \GLSxtruserparen
. This simply does its argument by default.\glsxtruserparen
and \GLSxtruserparen
, and the case-change with the latter, will be included in the argument of \glsxtruserfieldfmt
.\renewcommand
{\glsxtruserparensep
}{; }
\renewcommand
{\glsxtruserfieldfmt
}[1]{\emph
{#1}}
\glsabbrvdefaultfont
.\glsabbrvuserfont
.\glsxtrabbrvpluralsuffix
.\glsabbrvdefaultfont
.\glslonguserfont
.\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. \glsabbrvscuserfont
.\glsabbrvscuserfont
. The default is \glsxtrscrevert
. If you redefine \glsabbrvscuserfont
, you will need to redefine \glsxtrscuserrevert
as applicable.\glsxtrscsuffix
.
If you want to include the information contained in the field identified by \newcommand
*{\glsuserdescription
}[2]{\glslonguserfont
{#1}}
\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
}%
{}%
}
\glsxtruserfield
has been set, this essentially does:
otherwise it does: \glsxtrfullsep
{ }\glsxtrparen
{ , }
It’s a little more complicated than this as the definition includes the inner formatting around the comma and the field value ( ). The comma separator is given by \glsxtrfullsep
{ }\glsxtrparen
{ }
\glsxtruserparensep
, and the field value is encapsulated with \glsxtruserfieldfmt
(with the inner formatting inside).\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.\protect
\glslonguserfont
{\the
\glslongtok
}%
\protect
\glsxtruserparen
{\protect
\glsabbrvuserfont
{\the
\glsshorttok
}}{\the
\glslabeltok
}
\protect
\glsabbrvscuserfont
{\the
\glsshorttok
}
\protect
\glslonguserfont
{\the
\glslongtok
}%
\protect
\glsxtruserparen
{\protect
\glsabbrvscuserfont
{\the
\glsshorttok
}}{\the
\glslabeltok
}
\protect
\glsabbrvuserfont
{\the
\glsshorttok
}%
\protect
\glsxtruserparen
{\protect
\glslonguserfont
{\the
\glslongpltok
}}%
{\the
\glslabeltok
}
\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}%
}
\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}%
}
\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}%
}
\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}%
}
\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}%
}
\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
but is used with the all caps \GLS
or \GLSxtrfull
. This uses \GLSxtruserparen
instead of \glsxtruserparen
.\glsxtrusershortplformat
but is used with the all caps \GLSpl
or \GLSxtrfullpl
. This uses \GLSxtruserparen
instead of \glsxtruserparen
.
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 \newcommand
*{\glsxtrpostusershortformat
}[2]{%
\glsxtrifallcaps
{\GLSxtrusershortformat
{#1}{#2}}%
{\glsxtrusershortformat
{#1}{#2}}%
}
\glsifplural
: \renewcommand
*{\glsxtrpostusershortformat
}[2]{%
\glsifplural
{%
\glsxtrifallcaps
{\GLSxtrusershortplformat
{#1}{#2}}%
{\glsxtrusershortplformat
{#1}{#2}}%
}%
{%
\glsxtrifallcaps
{\GLSxtrusershortformat
{#1}{#2}}%
{\glsxtrusershortformat
{#1}{#2}}%
}%
}
\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
but all caps. This uses \GLSxtruserparen
instead of \glsxtruserparen
.\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
but all caps. This uses \GLSxtruserparen
instead of \glsxtruserparen
.
Note that, as with \newcommand
*{\glsxtrpostuserlongformat
}[2]{%
\glsxtrifallcaps
{\GLSxtruserlongformat
{#1}{#2}}%
{\glsxtruserlongformat
{#1}{#2}}%
}
\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
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}%
\protect
\glsxtrfullsep
{\the
\glslabeltok
}%
\protect
\glsxtrparen
{\glsxplongfont
{\the
\glslongtok
}{\glscategorylabel
}}%
\the
.\glsshorttok
\glslongdefaultfont
.\glslongfootnotefont
.\newcommand
*{\glsxtrabbrvfootnote
}[2]{\footnote
{#2}}
\gls
, \Gls
and \GLS
. The default definition is simply:
For example, if the footnote should start with an uppercase letter then simply redefine this to use \newcommand
*{\glsxtrfootnotelongformat
}[2]{%
\glsxtrlongformat
{#1}{}{#2}%
}
\Glsxtrlongformat
instead: \renewcommand
*{\glsxtrfootnotelongformat
}[2]{%
\Glsxtrlongformat
{#1}{}{#2}%
}
\glspl
, \Glspl
and \GLSpl
. The default definition is simply: \newcommand
*{\glsxtrfootnotelongplformat
}[2]{%
\glsxtrlongplformat
{#1}{}{#2}%
}
\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
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}%
\protect
\glsxtrfullsep
{\the
\glslabeltok
}%
\protect
\glsxtrparen
{\glsxplongfont
{\the
\glslongtok
}{\glscategorylabel
}}%
4.5.1.3.6. No-Short Styles
\glsxplongfont
{\the
\glslongtok
}{\glscategorylabel
}
\glsxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}
4.5.1.3.7. Hyphen Styles
\glsabbrvdefaultfont
.\glsabbrvhyphenfont
.\glslongdefaultfont
.\glslonghyphenfont
.\glsxtrabbrvpluralsuffix
.\glsxtrorgshort
). This command is irrelevant with the “unsrt” family of commands.\glsxtrorgshort
). This command is irrelevant with the “unsrt” family of commands.\glsxtrorgshort
). This command is irrelevant with the “unsrt” family of commands.\glsxtrorglong
). This command is irrelevant with the “unsrt” family of commands.\glsxtrifhyphenstart
to test if the 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 is placed after both the long and the short form.\glsxtrlonghyphenshort
with
as the argument as this will interfere with the check to determine if starts with a hyphen.\MakeUppercase
{ }\glsxtrifhyphenstart
to test if the starts with a hyphen. If it does, \glsxtrwordsep
is locally set to \glsxtrwordsephyphen
to replace the inter-word spaces with hyphens. The is placed after the long form.\glsxtrlonghyphennoshort
with
as the argument as this will interfere with the check to determine if starts with a hyphen.\MakeUppercase
{ }\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
}%
}%
}%
}
\glsxtrwordsep
is locally set to \glsxtrwordsephyphen
to replace the inter-word spaces with hyphens. The 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 is placed in parentheses (with \glsxtrparen
preceded by \glsxtrfullsep
).\glsxtrposthyphenshort
but plural.\glslabel
and \glsinsert
) and uses \GLSxtrposthyphensubsequent
for all caps or \glsxtrposthyphensubsequent
otherwise.\glsxtrlonghyphenshort
but the short and long forms are swapped.\glsxtrshorthyphenlong
with
as the argument as this will interfere with the check to determine if starts with a hyphen.\MakeUppercase
{ }\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
}%
}%
}%
}
\glsxtrposthyphenshort
but shows the long form instead of the short form.\glsxtrposthyphenlong
but plural.4.5.1.3.8. Only Styles
\glsabbrvdefaultfont
.\glsabbrvonlyfont
.\glslongdefaultfont
.\glslongonlyfont
.\glsxtrabbrvpluralsuffix
.\glsabbrvscfont
.\glsabbrvsconlyfont
.\glsabbrvsconlyfont
. The default is \glsxtrscrevert
. If you redefine \glsabbrvsconlyfont
, you will need to redefine \glsxtrsconlyrevert
as applicable.\glsxtrscsuffix
.\protect
\glsabbrvonlyfont
{\the
\glsshorttok
}
\protect
\glslongfont
{\the
\glslongtok
}
\the
.\glslongtok
\protect
\glsabbrvsconlyfont
{\the
\glsshorttok
}
\glsxtronlydescname
.\glsxtronlydescsort
.4.5.1.3.9. Fonts
\textsc
), “sm” (\textsmaller
) or “em” (\emph
).\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. \glsabbrvscfont
.\glsabbrvscfont
. This defaults to \glstextup
. If you redefine \glsabbrvscfont
, you will need to redefine \glsxtrscrevert
as applicable.\protect
\glstextup
\glsxtrabbrvpluralsuffix
\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. \glsabbrvsmfont
.\glsabbrvsmfont
. This defaults to \textlarger
. If you redefine \glsabbrvsmfont
, you will need to redefine \glsxtrsmrevert
as applicable.\glsxtrabbrvpluralsuffix
.\emph
.\glsabbrvemfont
.\glsabbrvemfont
. This defaults to \textup
. If you redefine \glsabbrvemfont
, you will need to redefine \glsxtremrevert
as applicable.\glsxtrabbrvpluralsuffix
.\emph
.\glslongemfont
.4.5.2. Advanced Style Commands
\newabbreviationstyle
are applied.
\glsentryfmt
if the current entry has the short field set. This ensures that the \gls
-like commands use the appropriate formatting.\glsxtrassignfieldfont
if the current entry has the short field set. This ensures that the \gls
-like commands use the appropriate formatting (where possible).\glsxtrshort
, \glsxtrlong
, \glsxtrfull
and their plural and case-changing variants.\glossentryname
, \glossentrynameother
, \glossentrydesc
, \Glossentrydesc
, \glossentrysymbol
and \Glossentrysymbol
.
\newabbreviationstyle
to inherit the setup code of a related style.\newabbreviationstyle
to inherit the formatting of a related style.\glsxtrpostabbrvfootnote
, otherwise they may lose their definitions before the footnote text is typeset.
The second argument will be the expansion of \newrobustcmd
*{\glsxtrpostabbrvfootnote
}[2]{%
\glsxtrabbrvfootnote
{#1}%
{#2\glsxtrpostfootnotelongformat
{#1}{\glsfirstlongfootnotefont
}}%
}
\glsxtrassignlinktextfmt
, to allow the inner formatting to be picked up, if required.\GlossariesExtraWarning
) if a deprecated abbreviation style is used.4.5.3. Defining New Abbreviation Styles
\gls
) and the inline style (\glsxtrfull
) are formatted. The relevant commands for this argument are listed in §4.5.3.2.4.5.3.1. Style Initialisation Hooks
\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.\renewcommand
*{\GlsXtrPostNewAbbreviation
}{}
\newabbreviation
, the following steps are performed:
\newabbreviation
: \glskeylisttok
, \glslabeltok
, \glsshorttok
and \glslongtok
.\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.)\ExtraCustomAbbreviationFields
is initialised to do nothing.\ExtraCustomAbbreviationFields
to set the accessibility fields.\glscategorylabel
is defined to abbreviation
.\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 and provided when the style was defined with \newabbreviationstyle
.\glspluralsuffix
).\glsexclapplyinnerfmtfield
).\glsshorttok
is updated to reflect any changes.\glsxtrnewabbrevpresetkeyhook
hook is performed.\glskeylisttok
token is updated to only include the remaining keys that haven’t yet been processed.\glsshortpltok
and \glslongpltok
registers are set.\newabbreviationhook
performed.\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
\GlsXtrPostNewAbbreviation
performed.
\newabbreviation
. These can be accessed in the hooks using the following (but make sure they are fully expanded): \newabbreviation
with pre-processed options removed. Use \the
to expand it.\glskeylisttok
\newabbreviation
, can be obtained with: \the
to expand it.\glslabeltok
\newabbreviation
). Use \the
to expand it.\glsshorttok
\newabbreviation
, can be obtained with: \newabbreviation
). Use \the
to expand it.\glsshortpltok
\newabbreviation
). Use \the
to expand it.\glslongtok
\newabbreviation
, can be obtained with: \newabbreviation
). Use \the
to expand it.\glslongpltok
\appto
) or prepend (\preto
) additional information, if required, to this hook., including the last one. ={value}
. ={value}
\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
).
Note that in the above, the commands within the definition of \renewcommand
*{\GlsXtrPostNewAbbreviation
}{%
\glsxtrsetcomplexstyle
{\the
\glslabeltok
}{3}%
\glshasattribute
{\the
\glslabeltok
}{regular}%
{%
\glssetattribute
{\the
\glslabeltok
}{regular}{false}%
}%
{}%
}
\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.\glslabel
to reference the current label. Don’t use \glslabeltok
as that will contain the label of the last abbreviation to be defined.
In the above, \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}%
}%
{}%
}
\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.)\GlsXtrPostNewAbbreviation
to indicate that the entry given by has an abbreviation style that is complex. The second argument 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).\glsfirstabbrvfont
and the inner formatting command \glsxtrgenentrytextfmt
. This is used by the following command.\protect
otherwise it does \glsfirstabbrvfont
{ }
.\glsfirstinnerfmtabbrvfont
{ }\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={
This will be expanded before being passed to \glsfirstxpabbrvfont
{\the
\glsshorttok
}{\glscategorylabel
}},%
firstplural={\glsfirstxpabbrvfont
{\the
\glsshortpltok
}{\glscategorylabel
}},
\newglossaryentry
. If the markshortwords attribute is true, this will end up as: first={
otherwise it will end up as: \protect
\glsfirstabbrvfont
{ }},%
firstplural={\protect
\glsfirstabbrvfont
{ }}
first={
where and are, respectively, the values in the \glsfirstinnerfmtabbrvfont
{ }},%
firstplural={\glsfirstinnerfmtabbrvfont
{ }},%
\glsshorttok
and \glsshortpltok
registers.\glsshorttok
and \glscategorylabel
) must be expanded before being passed to \newglossaryentry
as their values are unreliable outside of \newabbreviation
. \glsabbrvfont
and the inner formatting command \glsxtrgenentrytextfmt
. This is used by the following command.\protect
otherwise it does \glsabbrvfont
{ }
. This command is designed for the name, text and plural keys within \glsinnerfmtabbrvfont
{ }\CustomAbbreviationFields
.\glsfirstlongfont
and the inner formatting command \glsxtrgenentrytextfmt
. This is used by the following command.\protect
otherwise it does \glsfirstlongfont
{ }
. This command is designed for the first and firstplural keys within \glsfirstinnerfmtlongfont
{ }\CustomAbbreviationFields
.\glslongfont
and the inner formatting command \glsxtrgenentrytextfmt
. This is used by the following command.\protect
otherwise it does \glslongfont
{ }
. This command is designed for the name, text and plural keys within \glsinnerfmtlongfont
{ }\CustomAbbreviationFields
(if they should include the long form in their value, such as the long-noshort-desc style).\glsxtrprovideaccsuppcmd
). The nameshortaccess, firstshortaccess and textshortaccess attributes are set to true
. (Does nothing if accessibility support has not been enabled.)\glsxtrprovideaccsuppcmd
). The firstshortaccess and textshortaccess attributes are set to true
. (Does nothing if accessibility support has not been enabled.)\glsxtrprovideaccsuppcmd
). The nameshortaccess and textshortaccess attributes are set to true
. (Does nothing if accessibility support has not been enabled.)\glsxtrprovideaccsuppcmd
). The textshortaccess attribute is set to true
. (Does nothing if accessibility support has not been enabled.)\glsxtrprovideaccsuppcmd
). The nameshortaccess attribute is set to true
. (Does nothing if accessibility support has not been enabled.)4.5.3.2. Style Formatting Commands
\newabbreviationstyle
should contain the redefinitions of the style commands listed here that are used to format abbreviations.\setabbreviationstyle
, \newabbreviation
or \glssetabbrvfmt
, are implemented.
In the event that any styles omit defining the newer \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
\GLSxtrfullformat
or \GLSxtrfullplformat
, these are also initialised to defaults but ideally they should have their definitions provided.\abbrvpluralsuffix
) the display full forms: \glsxtrfullformat
, \glsxtrfullplformat
and their case-changing variants.##
instead of #
to reference command parameters. 4.5.3.2.1. Suffix and Fonts
\glsxtrabbrvpluralsuffix
, but the smallcaps styles, such as long-short-sc define this to \glsxtrscsuffix
in order to counteract the small caps font.\renewcommand
*\glsfirstabbrvfont
[1]{\glsfirstabbrvscfont
{##1}}
\renewcommand
*\glsabbrvfont
[1]{\glsabbrvscfont
{##1}}
\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.\renewcommand
*{\glsfirstlongfont
}[1]{\glsfirstlongdefaultfont
{##1}}
\renewcommand
*{\glslongfont
}[1]{\glslongdefaultfont
{##1}}
4.5.3.2.2. First Use Display Format
\gls
.\glspl
.\Gls
.\Glspl
.\GLS
.\GLSpl
.4.5.3.2.3. Subsequent Use Display Format
\gls
-like commands don’t simply show the short form.\gls
.\glspl
.\Gls
.\Glspl
.\GLS
.\GLSpl
.\glsxtrgenentrytextfmt
and \glsabbrvfont
. The purpose of the inner formatting is to get it as close as possible to the actual text so \glsabbrvfont
is placed outside of \glsxtrgenentrytextfmt
.\glsxtrword
and \glsxtrwordsep
into the actual field value. In that case, the inner formatting is within \glsxtrword
and \glsxtrwordsep
, so only the insert material needs to be formatted.\ifglsxtrinsertinside
, it can reduce the complexity by omitting the inner formatting and conditionals, but this lack of support should be documented if the style is made generally available.\gls
.\glspl
.\Gls
.\Glspl
.\GLS
.\GLSpl
.4.5.3.2.4. Inline Full Format
\glsxtrfull
.\glsxtrfullpl
.\Glsxtrfull
.\Glsxtrfullpl
.\GLSxtrfull
.\GLSxtrfullpl
.4.5.3.2.5. Wrapper Commands
\glsxtrlong
in some of the predefined abbreviation styles to format the long value of the entry identified by with the command , which should take one argument.\glsaccesslong
if the markwords attribute is true otherwise with \glsaccessfmtlong
using \glsxtrgenentrytextfmt
for the inner formatting.\ifglsxtrinsertinside
) with . If the content needs to be placed outside of , it will be individually encapsulated with the inner formatting.\glsxtrlongformat
, but for the longplural field.\glsxtrlongformat
, but adds grouping around (with the inner formatting inside the group).\glsxtrlongplformat
, but adds grouping around (with the inner formatting inside the group).\glsxtrshort
and in some of the predefined abbreviation styles to format the short value of the entry identified by with the command , which should take one argument.\glsaccessshort
if the markshortwords attribute is true otherwise with \glsaccessfmtshort
using \glsxtrgenentrytextfmt
for the inner formatting.\ifglsxtrinsertinside
) with . If the content needs to be placed outside of , it will be individually encapsulated with the inner formatting.\glsxtrshortformat
, but for the shortplural field.\glsxtrshortformat
, but adds grouping around (with the inner formatting inside the group).\glsxtrshortplformat
, but adds grouping around (with the inner formatting inside the group).
Note that the is only placed after the long form.\glsxtrlongformat
{ }{ }{ }\glsxtrfullsep
{ }\glsxtrparen
{ }\glsxtrlongshortformat
but uses the plural versions \glsxtrlongplformat
and \glsxtrshortplformat
.
Note that the is only placed after the short form.\glsxtrshortformat
{ }{ }{ }\glsxtrfullsep
{ }\glsxtrparen
{ }\glsxtrlongshortformat
even though \glsxtrlongformat
and \glsxtrshortformat
are flipped within the definition.\glsxtrshortlongformat
but uses the plural versions \glsxtrshortplformat
and \glsxtrlongplformat
.4.6. Restoring Base Acronym Mechanism
\newacronym
back to the definition provided by the base glossaries package. However, if you do this, you will lose all the abbreviation features provided by glossaries-extra.\newacronym
, set the abbreviation style using: \setabbreviationstyle
[acronym]{long-short}
\printunsrtglossary
, but you have a custom acronym style that you can’t implement using the glossaries-extra abbreviation mechanism. This is a rare edge case for unusual formats, as it should be possible to implement most common abbreviation formats using the predefined styles.\RestoreAcronyms
or \MakeAcronymsAbbreviations
are used after abbreviations or acronyms have been defined. \newacronym
back to the original base glossaries interface. Note that this doesn’t affect \newabbreviation
. It also sets the regular attribute for the acronym category to false
and sets the acronym style to long-short
(which is the default for the base package).\RestoreAcronyms
.5. Referencing (Using) Entries
\gls
-like and \glstext
-like commands, as described in the base glossaries manual. There are some additional commands provided by glossaries-extra:
Additionally, the entry counting commands, such as \glsxtrshort
(see §4); \glsfmttext
(see §5.3.2); \glsxtrp
, designed for use within fields to help mitigate the problems of nesting (see §5.4); \mgls
, that are designed for referencing multi (or compound) entries (see §7); \glsaccessname
, used to incorporate accessibility support (see §9.2); \dgls
, that are designed for bib2gls’s dual entries (see §11.5.7); \rgls
, that depend on the number of entry records (see §11.4).
\cgls
, provided by the base glossaries package are modified by glossaries-extra (see §6.1).\gls
-like commands are designed to produce text at that point in the document (the link text, §5.5), index the entry (to ensure that it appears in the glossary, §5.8) and unset the first use flag (which can alter the link text, §5.10). Additional information can be appended automatically with the post-link hook (§5.5.4). The link text is given by the entry style (see §5.5.5) or by the final argument of \glsdisp
.\glstext
-like commands are designed to produce text at that point in the document (the link text, §5.5) and index the entry (to ensure that it appears in the glossary, §5.8). Additional information can be appended automatically with the post-link hook (§5.5.4). The link text is determined by the calling command. For example, the corresponding field value (possibly encapsulated with \glsxtrregularfont
and the inner formatting) for commands like \glstext
or the final argument of \glslink
.\gls
-like and \glstext
-like commands can all be used with a star (*
) or plus (+
) modifier. The star modifier automatically implements hyper=false (disables the hyperlink) and the plus modifier automatically implements hyper=true (forces the hyperlink on, if supported).
means that \GlsXtrSetAltModifier
{!}{format=glsignore}
will be equivalent to \gls
!{ }
.\gls
[format=glsignore]{ }
means that the star modifier will now suppress indexing instead of switching on the hyperlink.\GlsXtrSetPlusModifier
{noindex}
\gls
-like and \glstext
-like commands have a complicated internal structure, which can be viewed as a series of layers. The outermost common layer is: % save settings
% initialise options, see §5.1
The consists of the indexing (see §5.8) and the (possibly hyperlinked) formatted text, see §5.5. The code is encapsulated with:
In v1.48, this was added to scope the link text and indexing code, which helped to prevent unwanted spacing caused by the whatsit and also helped to prevent some setting leakage, in the event of nesting (see §5.4), but this caused spacing issues when used in math mode, so from v1.49 this command now simply does its argument. The whatsit is now scoped with \glslinkwrcontent
{ }
% restore settings
% post-link hook, see §5.5.4
\glsencapwrcontent
instead.\glsxtrp
command, designed for nested use, deals with the problem by suppressing the post-link hook and adding an outer group. For example,
behaves like: \glsxtrp
{short}{html}{
Note that the code to suppress the post-link hook has been moved to \let
\glspostlinkhook
\relax
\glsxtrshort
[noindex,nohyper]{html}}
\glsxtrpInit
, so it is now possible to allow the post-link hook but it won’t be able to lookahead beyond the added outer group.
or after the text: \glslinkwrcontent
{ }
or may be suppressed with noindex: \glslinkwrcontent
{ }
The part is described in §5.5. The part is the actual indexing (see §5.8) but also increments the index count, if applicable. Both the associated whatsit and increment are encapsulated with \glslinkwrcontent
{ }
\glsencapwrcontent
.\glstext
, \glsplural
, \glsfirst
and \glsfirstplural
(and their case-changing variants) with entries that have been defined with \newabbreviation
. Some of the abbreviation styles are too complicated to work with those commands. Instead, use commands like \glsxtrshort
, \glsxtrfull
or use \gls
with the prereset or preunset options. \gls
-like commands according to the glossary type with \defglsentryfmt
. The glossaries-extra package changes the default entry formatting (§5.5.5) and provides additional ways of modifying the displayed content (§5.5).\glsxtrp
which can be used instead of \gls
in field values to overcome some of the associated problems. See §5.4 for further details.\glsadd
(see §5.8) and \glssee
(see §5.9) are designed to only index (to ensure the entry appears in the glossary) without producing any text or changing the first use flag.\gls
-like, \glstext
-like and \glsadd
commands all have an initial optional argument that can be used to override the default actions. Some options are only applicable for particular subsets of referencing commands. For example, noindex is pointless for \glsadd
since the sole purpose of that command is to index. Whereas types is only available with \glsaddall
.5.1. Options
\gls
).
\glsinitreunsets
; \glsxtrchecknohyperfirst
(\glsfirst
-like only); \glsxtrinitwrgloss
(not implemented by \glsadd
or \glsxtrfmt
); \glsxtrinithyperoutside
(not implemented by \glsadd
or \glsxtrfmt
); \glsadd
); \GlsXtrSetDefaultGlsOpts
, \GlsXtrAppToDefaultGlsOpts
or \GlsXtrPreToDefaultGlsOpts
(not implemented by \glsadd
); \glsxtrfmt
only) options provided in \GlsXtrFmtDefaultOptions
; \gls
-like only) the hyperfirst package option, nohyperfirst attribute and nohypernext attributes are checked to determine if the hyper option should be switched off (tests followed by \glslinkcheckfirsthyperhook
); \glslinkpresetkeys
(not implemented by \glsadd
or \glsxtrfmt
); \glsadd
only) \glsaddpresetkeys
; \glslinkpostsetkeys
(provided by the base glossaries package, not implemented by \glsadd
or \glsxtrfmt
); \glsadd
only) \glsaddpostsetkeys
.
5.1.1. Setting Up Defaults
\gls
-like and \glstext
-like commands using: \glsxtrfmt
but not to \glsadd
.
Note that noindex=false is now set before the options given in \frontmatter
\GlsXtrSetDefaultGlsOpts
{noindex}
…\mainmatter
\GlsXtrSetDefaultGlsOpts
{}
…\backmatter
\GlsXtrSetDefaultGlsOpts
{noindex}
\GlsXtrSetDefaultGlsOpts
to ensure that the setting is correctly initialised, so as from v1.49 you can simply set an empty options list to reset the default. Prior to v1.49, it was necessary to ensure that the noindex key was always present in the options list to avoid instability. So for pre v1.49, the line after \mainmatter
in the above would need to be: \GlsXtrSetDefaultGlsOpts
{noindex=false}
\glsxtrfmt
only are given by: \GlsXtrSetDefaultGlsOpts
and before .\GlsXtrSetDefaultGlsOpts
but before . This hook also applies to \glsxtrfmt
but not to \glsadd
.\glslinkpostsetkeys
, provided by the base glossaries package, is performed after is processed. \glsadd
, is performed before .\glsadd
, is performed after .\GlsXtrUnsetBufferEnableRepeatLocal
.\glsfirst
, \glsfirstplural
and their case-changing variants. The hook will implement hyper=false if the nohyperfirst attribute is set to true
. after
then this implements wrgloss=after otherwise it implements wrgloss=before. This setting can subsequently be overridden by \GlsXtrSetDefaultGlsOpts
, \glslinkpresetkeys
, the argument or \glslinkpostsetkeys
. This hook also applies to \glsxtrfmt
but not to \glsadd
.\renewcommand
*{\glsxtrinitwrgloss
}{%
\glsifattribute
{\glslabel
}{wrgloss}{before}%
%
\glsxtrinitwrglossbeforetrue
%
%
\glsxtrinitwrglossbeforefalse
%
}
false
then this implements hyperoutside=false otherwise it implements hyperoutside=true. This setting can subsequently be overridden by \GlsXtrSetDefaultGlsOpts
, \glslinkpresetkeys
, the argument or \glslinkpostsetkeys
. This hook also applies to \glsxtrfmt
but not to \glsadd
.\gls
-like, \glstext
-like or \glsxtrfmt
commands, you can set options using: \glsadd
, you can set options with: 5.1.2. Additional Options
\gls
-like and \glstext
-like commands that are provided by the base glossaries package also apply to new commands like \glsxtrfmt
and \glsfmttext
. In addition, the options below are provided by glossaries-extra. Note that some options, such as postunset, only apply to the \gls
-like commands. Options that relate to the hyperlink, formatting, first use flag or whether/where (noindex/wrgloss) to perform indexing aren’t available for \glsadd
.\glstextformat
(see §5.5.1). If true, the link text is encapsulated as: { }{
otherwise it’s encapsulated as: \glstextformat
{ }}
where is the command that generates the hyperlink (if enabled).\glstextformat
{ { }{ }}
\glstextformat
to encapsulate the link text. Note that this control sequence should take a single argument (the link text). See §5.5.1 for further details.\glsxtrgenentrytextfmt
(which shouldn’t be redefined) is assigned to this control sequence at the start of the \gls
-like and \glstext
-like commands. This command is used within the predefined abbreviation styles and within \glsgenentryfmt
to encapsulate the entry field values.\glsxtrgenentrytextfmt
won’t support this key. See §5.5.3 for further details. \gls
-like commands and indicates whether or not to unset the first use flag after the link text. It may take one of three values: global (behaves like local=false), local (behaves like local=true) or none (doesn’t unset the first use flag after the first use). See §5.10.\glsxtrifwasfirstuse
so that it indicates that this was the first use of the entry. See §5.10.\glslocalreset
or \glsreset
before the \glstext
-like commands. Normally \glstext
and \glsplural
will define \glsxtrifwasfirstuse
so that it indicates that this was not the first use of the entry (regardless of whether or not the entry has actually been used).
Note that \glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},
first={sample first use},description={an example}}
\begin{document}
Text field: \glstext
{sample}.
First use: \gls
{sample}. Next use: \gls
{sample}.
Force reset: \gls
[prereset]{sample}.
Used? \ifglsused
{sample}{Yes}{No}.
Force reset: \glstext
[prereset]{sample}.
Used? \ifglsused
{sample}{Yes}{No}.
\end{document}
\gls
unsets the first use flag (unless postunset=none), so the sample entry is marked as used afterwards, but \glstext
doesn’t alter the first use flag, after the link text so the sample entry is still marked as unused afterwards.\glsxtrifwasfirstuse
so that it indicates that this wasn’t the first use of the entry. See §5.10.
Remember that \glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},
first={sample first use},description={an example}}
\begin{document}
\gls
{sample}. Used? \ifglsused
{sample}{Yes}{No}.
{\glsfirst
[preunset=local,prereset=global]{sample}.
Used? \ifglsused
{sample}{Yes}{No}.
}
Used? \ifglsused
{sample}{Yes}{No}.
{\gls
[preunset=local,prereset=global]{sample}.
Used? \ifglsused
{sample}{Yes}{No}.
}
Used? \ifglsused
{sample}{Yes}{No}.
\end{document}
\gls
globally unsets the first use flag (unless changed with postunset), which counteracts prereset=global.
Note that if you are using auto-indexing (see §12), noindex=false will also suppress the auto-indexing.\frontmatter
\GlsXtrSetDefaultGlsOpts
{noindex}
…\mainmatter
\GlsXtrSetDefaultGlsOpts
{noindex=false}
…\backmatter
\GlsXtrSetDefaultGlsOpts
{noindex}
\glsxtrinitwrgloss
sets this conditional according to whether or not the wrgloss attribute has been set to after
: \newcommand
*{\glsxtrinitwrgloss
}{%
\glsifattribute
{\glslabel
}{wrgloss}{after}%
{\glsxtrinitwrglossbeforefalse
}%
{\glsxtrinitwrglossbeforetrue
}%
}
This will add “Suppl. 2.45” to the location list for the “sample” entry.\glsadd
[thevalue={Suppl.\
2.45}]{sample}
Roman
, roman
, arabic
, alph
and Alph
. With xindy, the location syntax must be defined in the xindy module (standard location syntaxes are supplied by default). There’s no restriction on the location syntax for bib2gls, although if it can’t deduce a numerical value it won’t be able to form a range.
The path to the external file needs to be set in the externallocation category attribute.\glsadd
[thevalue=S.2,format=glsxtrsupphypernumber]{sample}
\glsadd
.\the
that provides the hypertarget for a reference to \the
.\glolinkprefix
to . If you are using \printunsrtglossary
to redisplay a list (possibly in a different order) then you will need some way of changing the entry targets to avoid duplicate hyperlink targets. One way of achieving this is to redefine \glolinkprefix
for the subsequent lists. You will then need to use the prefix option in commands like \gls
to ensure that the hyperlink for the link text points to the desired list.\glsxtrcopytoglossary
(which is used by bib2gls). The other indexing methods don’t support repeated lists. 5.2. Case Changing
\Gls
and \GLS
, perform the conversion using commands provided by mfirstuc. The underlying commands provided by mfirstuc were redesigned in v2.08 to use the newer, better case-changing commands available with the LaTeX3 kernel. The base glossaries package v4.50 and glossaries-extra v1.49 were developed concurrently with mfirstuc v2.08 to take advantage of the new features. Version 1.49 of glossaries-extra was also developed concurrently with bib2gls v3.0 which, in turn, was developed alongside version 0.9.2.7b of the TeX parser library.5.2.1. Sentence Case Commands
firstuc
.\makefirstuc
, which is provided by the mfirstuc package. This was originally part of the base glossaries package, but was split into a separately distributed package in 2015. Back then, there was no expandable sentence-case command. There was also a problem with referencing entries where link text was encapsulated with a text-block command (which occurs, in particular, with acronym and abbreviation styles). The first letter of the text-block command’s argument needed to be obtained, which resulted in some trickery that proved problematic with UTF-8.\MFUsentencecase
that directly interfaces with it. If an older version of mfirstuc is installed, glossaries v4.50+ and glossaries-extra v1.49+ will provide \MFUsentencecase
. You can use this in expandable contents. For example:
However, in the above example, it’s simpler to do: \section
{\MFUsentencecase
{\glsentrytext
{label}}}
If hyperref has been loaded, \section
{\Glsfmttext
{label}}
will now expand to: \Glsfmttext
{label}
in the PDF bookmark.\MFUsentencecase
{\glsentrytext
{label}}
\makefirstuc
now uses \MFUsentencecase
to perform the case conversion, but it still parses its argument to determine if it starts with . This means that with { }mfirstuc v2.08+, you now don’t have to worry about UTF-8 characters occurring at the start of the text.
in order for \newglossaryentry
{elite}{name={{é}lite},
description={...}}
to work. Whereas with mfirstuc v2.08, you can now simply do: \Gls
{elite}
(As from glossaries v4.47, it should be possible to use UTF-8 characters in the label as well.)\newglossaryentry
{elite}{name={élite},
description={...}}
\glssentencecase
to use \MFUsentencecase
directly (without using \makefirstuc
as an intermediary), this may result in content being expanded that wouldn’t have been expanded previously. In particularly, if isn’t robust and expands to content that includes labels then the case-change can fail. You also won’t be able to take advantage of the blockers and mappings that are only recognised as such by \makefirstuc
. If you use \MFUsentencecase
instead, blockers and mappings will be treated as exclusions, which are likely to result in unwanted side-effects.\makefirstuc
and \MFUsentencecase
recognise exclusions. These are text-block commands which take a single mandatory argument that needs to be skipped. For example, in the following
needs to be skipped: \glsadd
{example}
Exclusions are identified with \MFUsentencecase
{\glsadd
{example}some text}
\MFUexcl
. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
This will use \MFUexcl
with mfirstuc v2.08+. With older versions, a definition will be provided that works with \MFUsentencecase
, but exclusions won’t be recognised by \makefirstuc
.\glsadd
will be identified as an exclusion (via \glsmfuexcl
), but the optional argument will cause a problem if present. See the mfirstuc v2.08+ manual for a workaround. Note that commands such as \glsaddall
and \glsaddeach
aren’t identified as exclusions as they aren’t expected to occur in text that may require a case-change.
In this situation, there shouldn’t be any case-change as \makefirstuc
{\GLS
{example} something}
\GLS
already implements a case-change. This type of command is referred to as a blocker in the mfirstuc manual, as it indicates a command that should prevent any case-change if it’s encountered at the start of the text. Blockers are identified with \MFUblocker
. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
This will use \MFUblocker
with mfirstuc v2.08+. With older versions, it will simply use \glsmfuexcl
which will instead identify the command as an exclusion and won’t be recognised by \makefirstuc
. See the mfirstuc v2.08+ manual for further information about blockers.\GLS
will be identified as blockers using \glsmfublocker
, and glossaries-extra now identifies similar commands, such as \rGLS
as blockers.
This shouldn’t skip or block \makefirstuc
{\gls
{example} something}
\gls
but instead should convert the text to:
This is implemented by adding a mapping from \Gls
{example} something
\gls
to \Gls
. Mappings are added using \MFUaddmap
. If you have an older version of mfirstuc, this won’t be defined, so glossaries v4.50+ and glossaries-extra v1.49+ provide:
This will use \MFUaddmap
with mfirstuc v2.08+. With older versions, it will simply use \glsmfuexcl
which will instead identify the command as an exclusion and won’t be recognised by \makefirstuc
. See the mfirstuc v2.08+ manual for further information about mappings.\gls
will be mapped to the appropriate sentence case command using \glsmfuaddmap
, and glossaries-extra now identifies similar mappings, such as \rgls
mapped to \rGls
.5.2.2. Lower Case
\MakeTextLowercase
instead. This command is primarily provided for use with small caps styles to convert an abbreviation to lowercase, but isn’t actually used anywhere by default.5.2.3. Upper Case
\mfirstucMakeUppercase
, which is provided by mfirstuc. This command is used by all caps commands such as \GLSxtrusefield
.5.2.4. Title Case
\capitalisewords
to convert to title case. If you experience any errors with title case commands, such as \glsentrytitlecase
, or attributes such as glossdesc then try redefining this command to use
instead. See the mfirstuc manual for further details.\capitalisefmtwords
*5.3. Entries in Sectioning Titles, Headers, Captions and Contents
\gls
in chapter or section titles. The principle problems are:
Similar problems can also occur with captions (except for the page header and bookmark issues).\gls
etc) will be converted to uppercase and the entry won’t be recognised;\gls
can’t be expanded to a simple string and only the label will appear in the PDF bookmark (with a warning from hyperref);\markright
, \markboth
and \@starttoc
. If this causes unwanted side-effects, you can restore their former definitions using: \markright
, \markboth
and \@starttoc
back to the definitions in effect when glossaries-extra was loaded. Alternatively, you can use:
This will only revert \@starttoc
.\glsxtrRevertMarks
or \glsxtrRevertTocMarks
, you will need to employ the simplistic approach, described in §5.3.1, which is the method recommended by the glossaries user manual. Otherwise, you can use the commands described in §5.3.2, which provide a better solution.5.3.1. Simplistic Approach
\glsentrytext
(for regular entries) or \glsentryshort
(for abbreviations). This is the simplest solution, but doesn’t allow for special formatting that’s applied to the entry through commands like \glstext
or \glsxtrshort
.
This solves some problems: it avoids nested links in the table of contents, the first use flag isn’t prematurely unset and the PDF bookmarks has a reasonable substitution, but it still isn’t a complete solution as the above document will fail if the page style is changed to \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},
description={an example}}
\newglossaryentry
{alpha}{name={\ensuremath
{\alpha
}},description={alpha}}
\begin{document}
\tableofcontents
\section
{\texorpdfstring
{\Glsentrytext
{sample}
and \glsentrytext
{alpha}}{Sample and alpha}}
First use: \gls
{sample} and \gls
{alpha}.
Next use: \gls
{sample} and \gls
{alpha}.
\printunsrtglossary
\end{document}
headings
and a page break is inserted before the section (after \tableofcontents
), which will lead to the error: Glossary entry `SAMPLE' has not been defined.
This is because the case-change applied to the header converts the label “sample” to “SAMPLE”, which doesn’t correspond to a defined entry. (This can now be avoided with mfirstuc v2.08+.)\NoCaseChange
, but this ends up quite complicated. This is actually what the commands describe in §5.3.2 do when they are in a heading. This allows for older versions of mfirstuc that don’t recognise exclusions. See §5.2 for further details.\NoCaseChange
command was originally provided by the textcase package to prevent \MakeTextUppercase
from applying a case-change. The functionality of the textcase package has now been absorbed into the LaTeX kernel, which means that as from 2022, textcase is deprecated and \NoCaseChange
is defined by the kernel. 5.3.2. New Commands Designed for Chapter/Section Headings or Captions
\glsxtrRevertMarks
to restore the definitions of \markright
, \markboth
and \@starttoc
. If you use \glsxtrRevertTocMarks
, then this section is only applicable to \markright
and \markboth
.\markright
or \markboth
, and “contents” refers to the table of contents or any other “list of” that uses \@starttoc
, such as the list of figures.\glsfmt
(such as \glsfmttext
or \glsfmtshort
) behaves like an analogous \gls
or \glsxtr
command (such as \glstext
or \glsxtrshort
) but with the options noindex and hyper=false and no insert. When they occur within a header, they are protected from having any case-change applied (which will interfere with the entry label). Since this means they won’t appear in all caps in the header, the headuc attribute may be set to use the all caps \GLS
or \GLSxtr
instead (such as \GLStext
or \GLSxtrshort
).
Note that this still results in “Token not allowed in a PDF string” warnings from hyperref. This is due to the maths shift and \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},description={an example}}
\newglossaryentry
{alpha}{name={\ensuremath
{\alpha
}},
description={alpha}}
\begin{document}
\tableofcontents
\section
{\Glsfmttext
{sample} and \glsfmttext
{alpha}}
First use: \gls
{sample} and \gls
{alpha}.
Next use: \gls
{sample} and \gls
{alpha}.
\printunsrtglossary
\end{document}
\alpha
, and is something that would also occur if the section title explicitly contained $\alpha$
. If this is likely to happen, the issue can be solved by placing \texorpdfstring
within the field value. For example:
Note the need to prevent field expansion with \glsnoexpandfields
\newglossaryentry
{alpha}{description={alpha},
name={\texorpdfstring
{\ensuremath
{\alpha
}}{alpha}}}
\glsnoexpandfields
, otherwise \texorpdfstring
will be prematurely expanded while the entry is being defined.\glsfmtshort
, occur in the header or contents, but within the actual section title or caption in the document text, those options are obtained from: \glsxtrtitleopts
to do nothing: \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\pagestyle
{headings}
\glssetcategoryattribute
{general}{headuc}{true}
\glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},description={an example}}
\renewcommand
{\glsxtrtitleopts
}{}
\begin{document}
\section
{\Glsfmttext
{sample}}
First use: \gls
{sample}.
Next use: \gls
{sample}.
\printunsrtglossary
\end{document}
\glsxtrshort
but expands to just \glsentryshort
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrshort
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryshort
{ }}
\GLSxtrshort
but expands to just \glsentryshort
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfmtshort
but inserts the prefix field and separator, if the prefix value is set and non-empty. Provided for use with glossaries-prefix.\pglsfmtshort
but sentence case. Note the initial “P” in the command name, which matches \Pgls
(similarly for the other prefix sentence case commands).\pglsfmtshort
but all caps.\glsxtrshortpl
but expands to just \glsentryshortpl
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrshortpl
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryshortpl
{ }}
\GLSxtrshortpl
but expands to just \glsentryshortpl
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfmtshortpl
but inserts the prefixplural field and separator, if the prefixplural value is set and non-empty. Provided for use with glossaries-prefix.\pglsfmtshortpl
but sentence case.\pglsfmtshortpl
but all caps.\glsxtrlong
but expands to just \glsentrylong
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrlong
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentrylong
{ }}
\GLSxtrlong
but expands to just \glsentrylong
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfmtlong
but inserts the prefixfirst field and separator, if the prefixfirst value is set and non-empty. Provided for use with glossaries-prefix.\pglsfmtlong
but sentence case.\pglsfmtlong
but all caps.\glsxtrlongpl
but expands to just \glsentrylongpl
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrlongpl
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentrylongpl
{ }}
\GLSxtrlongpl
but expands to just \glsentrylongpl
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfmtlongpl
but inserts the prefixfirstplural field and separator, if the prefixfirstplural value is set and non-empty. Provided for use with glossaries-prefix.\pglsfmtlongpl
but sentence case.\pglsfmtlongpl
but all caps.
You will need to redefine this if you require the short form first. There is an analogous command for the plural:
This has a similar definition to \newcommand
*{\glspdffmtfull
}[1]{\glsentrylong
{#1}
(\glsentryshort
{#1})}
\glspdffmtfull
but uses \glsentrylongpl
and \glsentryshortpl
.\glsxtrfull
but expands to just \glspdffmtfull
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrfull
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glspdffmtfull
{ }}
\GLSxtrfull
but expands to just \glspdffmtfull
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsxtrfullpl
but expands to just \glspdffmtfullpl
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsxtrfullpl
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glspdffmtfullpl
{ }}
\GLSxtrfull
but expands to just \glspdffmtfull
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsname
but expands to just \glsentryname
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsname
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryname
{ }}
\GLSname
but expands to just \glsentryname
in PDF bookmarks and is adjusted when appearing in the header or contents.\glstext
but expands to just \glsentrytext
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glstext
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentrytext
{ }}
\GLStext
but expands to just \glsentrytext
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsplural
but expands to just \glsentryplural
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsplural
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryplural
{ }}
\GLSplural
but expands to just \glsentryplural
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfirst
but expands to just \glsentryfirst
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsfirst
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryfirst
{ }}
\GLSfirst
but expands to just \glsentryfirst
in PDF bookmarks and is adjusted when appearing in the header or contents.\glsfirstplural
but expands to just \glsentryfirstplural
in PDF bookmarks and is adjusted when appearing in the header or contents.\Glsfirstplural
but expands to:
in PDF bookmarks and is adjusted when appearing in the header or contents.\MFUsentencecase
{\glsentryfirstplural
{ }}
\GLSfirstplural
but expands to just \glsentryfirstplural
in PDF bookmarks and is adjusted when appearing in the header or contents.5.3.3. Advanced Commands
\glsxtrRevertMarks
to restore the definitions of \markright
, \markboth
and \@starttoc
. If you use \glsxtrRevertTocMarks
, then this section is only applicable to \markright
and \markboth
.\markright
, \markboth
or \@starttoc
otherwise does .\@starttoc
otherwise it does . (The modified definition of \@starttoc
sets \glsxtrifintoc
to \@firstoftwo
at the start and to \@secondoftwo
at the end.)\glsxtrtitleorpdforheading
expands while it’s being written to the toc file, then it will expand to . This can be illustrated in the following document:
In the first case, \documentclass
{report}
\usepackage
{lipsum}
\usepackage
{hyperref}
\usepackage
{glossaries-extra}
\pagestyle
{headings}
\begin{document}
\tableofcontents
\chapter
{\glsxtrtitleorpdforheading
{Title}{PDF}{Heading}
\glsxtrifinmark
{in mark}{not in mark}}
\lipsum
\chapter
{\protect
\glsxtrtitleorpdforheading
{Title}{PDF}{Heading}
\protect
\glsxtrifinmark
{in mark}{not in mark}}
\lipsum
\end{document}
\glsxtrtitleorpdforheading
expands as it’s being written to the toc file, so it expands to “Title”. In the second case, \glsxtrtitleorpdforheading
is protected so that command is written to the toc file. On the next LaTeX, when the table of contents is displayed, this command will expand to “Heading”, because it’s in the toc file. Similarly, in the first case, \glsxtrifinmark
will expand to “not in mark” as it’s written to the toc file, but in the second case it’s expansion is prevented, so it will expand to “in mark” in the table of contents.\nameref
) then adjustments for both \glsxtrtitleorpdforheading
and \glsxtrifinmark
will be added to \GetTitleStringDisableCommands
, but bear in mind that you will need to use the following for it to have an effect: \GetTitleStringSetup
{expand}
\glsfmtshort
, are essentially defined as:
If \texorpdfstring
{\glsxtrtitle
{ }}% title
{\glsentry
{ }}% bookmark
\texorpdfstring
isn’t defined, then the definition is:
For example, \glsxtrtitle
{ }
\glsfmtshort
is defined as (with hyperref):
This ensures that \newcommand
*{\glsfmtshort
}[1]{%
\texorpdfstring
{\glsxtrtitleshort
{#1}}{\glsentryshort
{#1}}%
}
\glsfmtshort
expands to just \glsentryshort
within the PDF bookmarks. Provided the field value doesn’t contain any problematic commands, this allows the actual value to be added to the bookmarks.\Glsfmtshort
is defined as: \newcommand
*{\Glsfmtshort
}[1]{%
\texorpdfstring
{\Glsxtrtitleshort
{#1}}{\glsentryshort
{#1}}%
}
\glsxtrtitle
set of commands all default to the corresponding \glstext
-like command with the options given by \glsxtrtitleopts
and an empty insert final argument. These title commands are redefined by \glsxtrmarkhook
to the corresponding \glsxtrhead
command. These “head” commands use \NoCaseChange
to prevent interference from page headers that convert to all caps (which can inappropriately convert the entry label to all caps). Instead, the headuc attribute needs to be set to true
to use the appropriate all caps command. A shortcut command is provided to test for this attribute:
Since the header commands also end up in the contents, where the all caps conversion should not be applied, the definition includes \newcommand
*{\glsxtrifheaduc
}[3]{%
\glsxtrifintoc
{#3}{\glsifattribute
{#1}{headuc}{true}{#2}{#3}}%
}
\glsxtrifintoc
to skip the check in the contents.\glsfmtshort
. This is redefined by \glsxtrmarkhook
to \glsxtrheadshort
. The default is:
(This is performed indirectly via an internal command that ensures that \glsxtrshort
[noindex,hyper=false]{ }[]
\glsxtrtitleopts
is expanded before being passed in the optional argument.)
The sentence case commands also check the headuc attribute.\newcommand
*{\glsxtrheadshort
}[1]{%
\protect
\NoCaseChange
{%
\glsifattribute
{#1}{headuc}{true}%
{%
\GLSxtrshort
[noindex,hyper=false]{#1}[]%
}%
{%
\glsxtrshort
[noindex,hyper=false]{#1}[]%
}%
}%
}
\Glsfmtshort
. This is redefined by \glsxtrmarkhook
to \Glsxtrheadshort
. The default is:
(Again, this is performed indirectly via an internal command that ensures that \Glsxtrshort
[noindex,hyper=false]{ }[]
\glsxtrtitleopts
is expanded before being passed in the optional argument.)\newcommand
*{\Glsxtrheadshort
}[1]{%
\protect
\NoCaseChange
{%
\glsifattribute
{#1}{headuc}{true}%
{%
\GLSxtrshort
[noindex,hyper=false]{#1}[]%
}%
{%
\Glsxtrshort
[noindex,hyper=false]{#1}[]%
}%
}%
}
\GLSfmtshort
. This is redefined by \glsxtrmarkhook
to \GLSxtrheadshort
. The default uses \GLSxtrshort
in a similar way to \glsxtrtitleshort
and \Glsxtrtitleshort
.\newcommand
*{\GLSxtrheadshort
}[1]{%
\protect
\NoCaseChange
{%
\GLSxtrshort
[noindex,hyper=false]{#1}[]%
}%
}
\Pglsfmtshort
have to determine whether or not to use \glsfmtshort
or \Glsfmtshort
depending on whether or not the prefix has been set. Whereas commands like \pglsfmtshort
simply need to insert the prefix and separator if set and then use the corresponding \glsfmtshort
. \Pglsfmtshort
.\Pglsfmtshortpl
.\Pglsfmtlong
.\Pglsfmtlongpl
.\glsfmtshortpl
.)\glsfmtshortpl
when it occurs in a header.)\Glsfmtshortpl
.)\Glsfmtshortpl
when it occurs in a header.)\GLSfmtshortpl
.)\GLSfmtshortpl
when it occurs in a header.)\glsfmtlong
.)\glsfmtlong
when it occurs in a header.)\Glsfmtlong
.)\Glsfmtlong
when it occurs in a header.)\GLSfmtlong
.)\GLSfmtlong
when it occurs in a header.)\glsfmtlongpl
.)\glsfmtlongpl
when it occurs in a header.)\Glsfmtlongpl
.)\Glsfmtlongpl
when it occurs in a header.)\GLSfmtlongpl
.)\GLSfmtlongpl
when it occurs in a header.)\glsfmtfull
.)\glsfmtfull
when it occurs in a header.)\Glsfmtfull
.)\Glsfmtfull
when it occurs in a header.)\GLSfmtfull
.)\GLSfmtfull
when it occurs in a header.)\glsfmtfullpl
.)\glsfmtfullpl
when it occurs in a header.)\Glsfmtfullpl
.)\Glsfmtfullpl
when it occurs in a header.)\GLSfmtfullpl
.)\GLSfmtfullpl
when it occurs in a header.)\glsfmtname
.)\glsfmtname
when it occurs in a header.)\Glsfmtname
.)\Glsfmtname
when it occurs in a header.)\GLSfmtname
.)\GLSfmtname
when it occurs in a header.)\glsfmttext
.)\glsfmttext
when it occurs in a header.)\Glsfmttext
.)\Glsfmttext
when it occurs in a header.)\GLSfmttext
.)\GLSfmttext
when it occurs in a header.)\glsfmtplural
.)\glsfmtplural
when it occurs in a header.)\Glsfmtplural
.)\Glsfmtplural
when it occurs in a header.)\GLSfmtplural
.)\GLSfmtplural
when it occurs in a header.)\glsfmtfirst
.)\glsfmtfirst
when it occurs in a header.)\Glsfmtfirst
.)\Glsfmtfirst
when it occurs in a header.)\GLSfmtfirst
.)\GLSfmtfirst
when it occurs in a header.)\glsfmtfirstpl
.)\glsfmtfirstpl
when it occurs in a header.)\Glsfmtfirstpl
.)\Glsfmtfirstpl
when it occurs in a header.)\GLSfmtfirstpl
.)\GLSfmtfirstpl
when it occurs in a header.)\markright
, \markboth
and \@starttoc
are saved (using \let
) when glossaries-extra loads. \markright
.\markboth
.\@starttoc
.\markright
, \markboth
and \@starttoc
all start and end with hooks that redefine commands that are sensitive to being in the header or contents. \MakeUppercase
which is \let
to \MakeTextUppercase
.\glsxtrifinmark
to just do its first argument ( ).
This redefines \glsxtrifinmark
to just do its second argument ( ).
This restores the sensitive commands to the saved definitions. (For use where grouping will cause interference.) For example, \markboth
is redefined as: \renewcommand
*{\markboth
}[2]{%
\glsxtrmarkhook
\@glsxtr@org@markboth
{\@glsxtrinmark
#1\@glsxtrnotinmark
}%
{\@glsxtrinmark
#2\@glsxtrnotinmark
}%
\glsxtrrestoremarkhook
}
5.4. Nested Links
\gls
-like commands in the value of the name field (or text or first fields, if set). This tends to occur with abbreviations that extend other abbreviations. For example, SHTML is an abbreviation for SSI enabled HTML, where SSI is an abbreviation for Server Side Includes and HTML is an abbreviation for Hypertext Markup Language.\newacronym
{ssi}{SSI}{Server Side Includes}
\newacronym
{html}{HTML}{Hypertext Markup Language}
\newacronym
{shtml}{S\gls
{html}}{\gls
{ssi} enabled \gls
{html}}
\Gls
, won’t work for the shtml
entry on first use if the long form is displayed before the short form (which is the default abbreviation style). This will attempt to do
which just doesn’t work. Grouping the \gls
{\uppercase
ssi} enabled \gls
{html}
doesn’t work either as this will effectively try to do: \gls
{ssi}
This will upper case the label \uppercase
{\gls
{ssi}} enabled \gls
{html}
ssi
so the entry won’t be recognised. This problem will also occur if you use the all caps version, such as
.\GLS
{shtml}
will be mapped to \gls
{ssi}
within \Gls
{ssi}
. The all caps command \Gls
{shtml}
will treat \GLS
{shtml}\gls
as an exclusion and so won’t perform a case-change. See §5.2 for further details.\glsentrylong
and \glsentryshort
are no longer expandable and so can’t be used be used in contexts that require this, such as PDF bookmarks.shtml
entry produces inconsistent results depending on whether the ssi
or html
entries have been used. Suppose both ssi
and html
are used before shtml
. For example:
This section discusses
\gls
{ssi}, \gls
{html} and
\gls
{shtml}.
shtml
entry produces “SSI enabled HTML (SHTML)”.html
entry is used before the shtml
but the ssi
entry is used after the shtml
entry, for example:
The sample files are
either
\gls
{html} or
\gls
{shtml}, but let's
first discuss \gls
{ssi}.
shtml
entry now produces “server side includes (SSI) enabled HTML (SHTML)”, which looks a bit cumbersome.shtml
entry is used before (or without) the other two entries:
This article is an introduction
to
\gls
{shtml}.
shtml
entry produces “server side includes (SSI) enabled hypertext markup language (HTML) (SHTML)”, which looks strange.\setacronymstyle
. For example:
as this references the label through the use of \setacronymstyle
{long-short}
\glslabel
when displaying the long and short forms, but this value changes with each use of \gls
, so instead of displaying “(SHTML)” at the end of the first use, it now displays “(HTML)”, since \glslabel
has been changed to html
by
.\gls
{html}\glslinkwrcontent
, which scoped the link text. Unfortunately this grouping caused problems in math mode and had to be removed in v1.49. You can redefine \glslinkwrcontent
to put the grouping back, but it still won’t scope the definitions of the placeholder commands, such as \glslabel
, which need to be outside of this scope for the benefit of the post-link hook. html
entry between uses of the shtml
entry. For example:
The next use of \gls
{shtml} ... \glsreset
{html}\gls
{shtml}
shtml
produces “Shypertext markup language (HTML)”, which is downright weird. (This is a result of the short form being set to S
, but \gls
{html}
is showing the full form.)\gls
{html}
. This may not be a problem for some styles, but if you use one of the “sm” styles (that use \acronymfont
{S\acronymfont
{HTML}}\textsmaller
), this will produce an odd result.shtml
entry is used, the html
entry will also be indexed and marked as used, and on first use this will happen to both the ssi
and html
entries. This kind of duplication in the location list isn’t usually particularly helpful to the reader.\glsentrytext
or \glsentryshort
in the definition of other entries.
\glsxtrp
, described below.
\gls
or \glsxtr
, which means that it may be confused if the argument is set to something that isn’t a field but happens to match either of those command names (such as full
).
It is possible to redefine this command to allow the \newcommand
\glsxtrpInit
[2]{\let
\glspostlinkhook
\relax
}
\glspostlinkhook
to be used, but any look-ahead (such as checking for a following punctuation character) won’t work because of the added grouping. The arguments are ignored by default. If you want to redefine \glsxtrpInit
the first argument is the name of the control sequence that will be used, without the leading backslash (for example, glstext
or glsxtrshort
) and the second argument is the entry’s label.\glsfmtshort
, there’s no optional argument. The default settings are noindex and hyper=false. You can change this with:
This allows hyperlinks for any instance of \newcommand
*{\glossxtrsetpopts
}{%
\glsxtrsetpopts
{noindex}%
}
\glsxtrp
that occurs in the name or description, where it shouldn’t be problematic.\Gls
or \Glsxtr
.\GLS
or \GLSxtr
.
, and
which is equivalent to \glsxtrp
{short}{ }
. As well as sentence case and all caps versions:
which is equivalent to \glsxtrp
{text}{ }
,
which is equivalent to \Glsxtrp
{short}{ }
,
which is equivalent to \Glsxtrp
{text}{ }
, and
which is equivalent to \GLSxtrp
{short}{ }
.\GLSxtrp
{text}{ }\documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\setabbreviationstyle
{long-em-short-em}
\newabbreviation
{html}{HTML}{hypertext markup language}
\newabbreviation
{ssi}{SSI}{server-side includes}
\newabbreviation
{shtml}{SHTML}{\glsps
{html} enabled
\glsps
{ssi}}
\begin{document}
\tableofcontents
\section
{\glsfmtlong
{shtml}}
First use: \gls
{shtml}, \gls
{html}, \gls
{ssi}.
Next use: \gls
{shtml}, \gls
{html}, \gls
{ssi}.
\printunsrtglossaries
\end{document}
expands to \glsfmtlong
{shtml}
within the PDF bookmarks, which expands to the value of the long field: \glsentrylong
{shtml}
This means that \glsps
{html} enabled \glsps
{ssi}
\glsps
(within the PDF bookmarks) in turn expands to \glsentryshort
. So the bookmark text (which can’t contain any formatting commands) ends up as “HTML enabled SSI”.
essentially behaves like \glsfmtlong
{shtml}\glsxtrlong
, but with the indexing and hyperlink suppressed. The link text is the value of the long field encapsulated with the abbreviation style’s formatting command (\glslongemfont
in this case):
This then becomes: \glslongemfont
{\glsps
{html} enabled \glsps
{ssi}}
Note the grouping and localised suppression of the post-link hook.
\glslongemfont
{{\let
\glspostlinkhook
\relax
\glsxtrshort
{html}} enabled
{\let
\glspostlinkhook
\relax
\glsxtrshort
{ssi}}}
or similar. The problem here is that it will attempt to do: \Glsxtrlong
{shtml}
This will essentially end up as: \makefirstuc
{\glsps
{html} enabled \glsps
{ssi}}
which doesn’t work. If you want to protect against automated case-changes, such as using the glossdesc attribute, insert an empty brace at the start: \glsps
{\uppercase
html} enabled \glsps
{ssi}
Alternatively, upgrade to mfirstuc v2.08+ and glossaries v4.50+. See §5.2.\newabbreviation
{shtml}{SHTML}{{}\glsps
{html} enabled
\glsps
{ssi}}
5.5. Adjusting the Text Style
\gls
-like and \glstext
-like commands produce text that’s essentially formatted either as (hyperoutside=true): or ( { }{ { }}
hyperoutside=false):
If hyperlinks are enabled then { { }{ }}
creates the hyperlink based on with the hyperlink text given by the second argument. If hyperlinks aren’t enabled then ignores the argument and simply does the second argument.
\gls
or \glstext
). The \gls
-like commands all use the entry display style associated with the entry’s glossary type, (see §5.5.5). The \glstext
-like commands set the to the corresponding field value with the insert appended, all encapsulated with the inner formatting (see §5.5.3), with appropriate case-changing, if required.\glsxtrshort
, \glsxtrlong
, \glsxtrfull
etc) are considered part of the set of \glstext
-like commands, but the content is set according to the abbreviation style (see §4.5).\glsdisp
and \glslink
both have the content part explicitly set in their final argument. There’s no insert optional argument as it can simply be included in the content part. The difference between them is that \glsdisp
is considered a \gls
-like command (it unsets the first use flag, §5.10, and uses the entry display style, §5.5.5), whereas \glslink
is considered a \glstext
-like command.\gls
-like and \glstext
-like command (including the final optional argument, if present, and following punctuation, if the post-link hook looks ahead for punctuation).
This produces:
Note that the hyperlink, outer and middle formatting aren’t applied to the post-link hook. The acronym category has the short-nolong abbreviation style, which sets the regular attribute to true. This means that the NASA entry uses the regular middle format (\usepackage
{courier}
\usepackage
[T1]{fontenc}
\usepackage
{xcolor}
\usepackage
{soul}
\usepackage
[colorlinks]{hyperref}
\usepackage
[nogroupskip]{glossaries-extra}
% outer formatting:
\renewcommand
{\glstextformat
}[1]{\texttt
{#1}}
% middle formatting:
\renewcommand
{\glsxtrregularfont
}[1]{\textbf
{#1}}
\renewcommand
{\glsxtrabbreviationfont
}[1]{\textit
{#1}}
% inner formatting:
\renewcommand
{\glsxtrdefaultentrytextfmt
}[1]{\hl
{#1}}
% post-link hook for 'general' category:
\glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
% define entries:
\newglossaryentry
{sample}{name={sample},description={an example}}
\newabbreviation
{html}{HTML}{hypertext markup language}
\newacronym
{nasa}{NASA}{National Aeronautics and Space Administration}
\begin{document}
First use: \gls
{sample}, \gls
{html}, \gls
{nasa}.
Next use: \gls
{sample}, \gls
{html}, \gls
{nasa}.
\printunsrtglossaries
\end{document}
\glsxtrregularfont
) not the abbreviation middle format (\glsxtrabbreviationfont
)., where { } is a command that takes a single argument. For example, to use soul’s underlining command
\ul
:
(See Example 117.) This isn’t guaranteed to work as the link text may contain fragile content.\renewcommand
{\glsxtrregularfont
}[1]{\GlsXtrExpandedFmt
{#1}}
\glsxtrpostlinkAddDescOnFirstUse
is designed to include it. If the category post-link hook was simply defined as:
then the inner formatting won’t be applied, since it’s not included in the hook. This is demonstrated in a slightly modified version of the above document (initial part of preamble that deals with loading packages and redefining formatting commands as before): \glsdefpostlink
{general}{%
\glsxtrifwasfirstuse
{ (\glsentrydesc
{\glslabel
})}{}}
% post-link hook for 'general' category:
This produces: \glsdefpostlink
{general}{%
\glsxtrifwasfirstuse
{ (\glsentrydesc
{\glslabel
})}{}}
% this style sets the post-link hook for 'abbreviation' category:
\setabbreviationstyle
{long-postshort-user}
% this style sets the post-link hook for 'acronym' category:
\setabbreviationstyle
[acronym]{short-postfootnote}
% define entries:
\newglossaryentry
{sample}{name={sample},description={an example}}
\newabbreviation
{html}{HTML}{hypertext markup language}
\newacronym
{nasa}{NASA}{National Aeronautics and Space Administration}
\begin{document}
First use: \gls
{sample}, \gls
{html}, \gls
{nasa}.
Next use: \gls
{sample}, \gls
{html}, \gls
{nasa}.
\printunsrtglossaries
\end{document}
5.5.1. Outer Formatting
\glstextformat
, which is defined by the base glossaries package. However it can be replaced by the textformat category attribute or by the textformat option. The order of precedence (not cumulative) is: the option supplied to the \gls
-like or \glstext
-like command, the category attribute, \glstextformat
.
The red text colour is from the hyperlink (red is the default with hyperref’s colorlinks option). The green from the custom \usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\glsdefpostlink
{general}{ (\glsentrydesc
{\glslabel
})}
\newglossaryentry
{sample}{name={sample},description={an example}}
\newcommand
{\strong
}[1]{\textbf
{\color
{green}#1}}
\renewcommand
{\glstextformat
}[1]{\emph
{#1}}
\begin{document}
\gls
{sample}[-insert]. \strong
{\gls
{sample}[-insert]}.
\glssetcategoryattribute
{general}{textformat}{strong}
\gls
{sample}[-insert].
\gls
[hyperoutside=false]{sample}[-insert].
\gls
[textformat=textsf]{sample}[-insert].
\end{document}
\strong
command is cancelled by the hyperlink colour change when the hyperlink is inside \strong
.\glstextformat
command isn’t used, which is why the remaining lines don’t have any italic. The final line uses the textformat option, which overrides the textformat attribute, so neither \glstextformat
nor the custom \strong
are used.\gls
command has been encapsulated.5.5.2. Middle Formatting
\gls
-like commands or is initialised by \glsxtrassignfieldfont
for the \glstext
-like commands.
Note that even though radar is an abbreviation, it’s considered a regular entry because it uses a regular style.\newglossaryentry
{sample}{name={sample},description={an example}}
\newabbreviation
{html}{HTML}{hypertext markup language}
\newacronym
{radar}{radar}{radio detection and ranging}
\renewcommand
{\glsxtrregularfont
}[1]{\emph
{#1}}
\renewcommand
{\glsxtrabbreviationfont
}[1]{\textbf
{#1}}
\begin{document}
\gls
{sample}, \gls
{html}, \gls
{radar}.
\end{document}
\glstext
-like commands to initialise the internal command used to encapsulate the field value. This will either be set to \glsxtrregularfont
(for regular entries) or \@firstofone
otherwise.\glsxtrabbreviationfont
as non-regular abbreviations are too complicated to work with \glstext
, \glsfirst
, \glsplural
, \glsfirstplural
or their case-changing variants. Instead, use the \gls
-like commands or the abbreviation commands, such as \glsxtrshort
.5.5.3. Inner Formatting
\gls
-like or \glstext
-like command, as described in §5.5.1. However, there are some sensitive commands that don’t work if the command argument doesn’t simply contain text.\gls
doesn’t like boolean variables being changed (which occurs when the first use flag is unset). If this is the case, you may want to consider buffering as an alternative (see §5.10.1).
then the document build will fail with the error: \gls
[textformat=hl]{sample}
! Package soul Error: Reconstruction failed.
Once solution is to do the following instead:
This will now work, but the box will prevent hyphenation, so it’s only useful if the link text is short, such as a symbol. If the link text is long (such as a phrase or the first use of an abbreviation), this method can produce undesirable results with overfull or underfull lines.\hl
{\mbox
{\gls
{sample}}}
\MFUsentencecase
instead of \makefirstuc
if any of the sentence case commands are required:
Although there’s no guarantee that this will work for some particularly problematic formatting commands.\renewcommand
{\glssentencecase
}[1]{\MFUsentencecase
{#1}}
\gls
[innertextformat=hl]{sample}
\fbox
(which draws a frame around its argument) and soul’s \so
(which spaces out the letters): % requires glossaries.sty v4.50+ and mfirstuc v2.08+
Note the fragmentation of the inner formatting. The use of \renewcommand
{\glssentencecase
}[1]{\MFUsentencecase
{#1}}
\newacronym
{radar}{radar}{radio detection and ranging}
\begin{document}
\Gls
[innertextformat=fbox]{radar}['s] system\ldots
\Gls
[innertextformat=so]{radar}['s] system\ldots
\fbox
{\Gls
{radar}['s]} system\ldots
\so
{\mbox
{\Gls
{radar}['s]}} system\ldots
\end{document}
\mbox
in the final line prevents an error but the letters aren’t spaced out. The only way to deal with this case is to use \glsdisp
or \glslink
with the text explicitly written: \glslink
{radar}{\so
{Radar's}} system\ldots
\gls
-like and \glstext
-like commands. It’s used within \glsgenentryfmt
and included in the helper commands used by the predefined abbreviation styles.\glsxtrgenentrytextfmt
within the actual field value to ensure that it’s as close as possible to the text. This is performed automatically when an entry is defined if the encapinnerfmt or encapnocaseinnerfmt attributes are set. Note that even in this case, fragmentation will occur with sentence case commands like \Gls
or with the insert optional argument, as in the above example with \fbox
and \so
.\glsxtrgenentrytextfmt
will be \let
to within the \gls
-like and \glstext
-like commands before their options are processed. This simply does its argument but may be redefined. (See Example 117.)\glsxtrdefaultentrytextfmt
to use \glsxtrattrentrytextfmt
: \renewcommand
{\glsxtrdefaultentrytextfmt
}{\glsxtrattrentrytextfmt
}
\glslabel
(from which it obtains the category label). \gls
-like commands use \glsxtrgenentrytextfmt
within \glsgenentryfmt
for regular entries or within the abbreviation style commands for non-regular abbreviations (see §5.5.5).\glstext
-like commands all essentially perform the following steps:
\glsxtrassignfieldfont
(see §5.5.2).\glsifapplyinnerfmtfield
indicates that the field value should be encapsulated by \glsxtrgenentrytextfmt
, then this essentially does (or appropriate case-change equivalent): {
otherwise it does: \glsaccessfmt
{ }{\glsxtrgenentrytextfmt
}{ }{ }}
{
(See §9 for the “access” commands.)
\glsaccess
{ }\glsxtrgenentrytextfmt
{ }}
\glstext
is:
The \glsifapplyinnerfmtfield
{ }{text}%
{%
{\glsaccessfmttext
{ }{\glsxtrgenentrytextfmt
}{ }}%
}%
{%
{\glsaccesstext
{ }\glsxtrgenentrytextfmt
{ }}%
}
\glsaccessfmt
commands internally use \glsfmtfield
to apply the inner formatting.5.5.4. Post Link Hook
\gls
-like and \glstext
-like commands. The simplest method of implementing this is with the category post-link hook, which is only applied to entries that have the given category. For example, the following will place an asterisk (*) after all entries with the default general category:
Typically, the category post-link hook is more likely to include some conditional, such as to only insert text on first use. For example, \glsdefpostlink
{general}{*}
\newglossaryentry
{sample}{name={sample},symbol={X},
description={an example}}
\begin{document}
\Gls
{sample}, \glstext
{sample}, \glsdesc
{sample}
and \glssymbol
{sample}.
\end{document}
\glsxtrpostlinkAddDescOnFirstUse
can be used to insert the description in parentheses after the first use.\glslabel
(see §5.5.5), but note that you can’t use \ifglsused
to determine whether or not the entry has been used, since the post-link hook comes after the entry has been unset. Instead, use \glsxtrifwasfirstuse
. Additional commands provided for use within the post-link hooks are described in this section.\glspostlinkhook
, which is defined by the base glossaries package. It’s used at the end of the \gls
-like and \glstext
-like commands. The original base definition does nothing, but glossaries-extra redefines this:
This uses:
which is the main glossaries-extra post-link hook.\renewcommand
*{\glspostlinkhook
}{%
\ifglsentryexists
{\glslabel
}{\glsxtrpostlinkhook
}{}%
}
\glspostlinkhook
, consider moving your modifications to the category post-link hook or prepend to \glsxtrpostlink
, as some attributes and abbreviation styles rely on the features provided by \glsxtrpostlinkhook
.
This checks if a following full stop needs to be discarded and does the inner post-link hook \newcommand
*{\glsxtrpostlinkhook
}{%
\glsxtrdiscardperiod
{\glslabel
}%
{\glsxtrpostlinkendsentence
}%
{\glsxtrifcustomdiscardperiod
{\glsxtrifperiod
{\glsxtrpostlinkendsentence
}{\glsxtrpostlink
}}%
{\glsxtrpostlink
}%
}%
}
\glsxtrpostlink
. Note that \glsxtrdiscardperiod
and \glsxtrifperiod
look ahead for a following token, so if you need to modify this command, insert your custom code at the start or add it to the category post-link hook instead.
This will only discard the full stop if it follows the subsequent use of a \newcommand
*{\glsxtrdiscardperiodretainfirstuse
}[3]{%
\glsxtrifwassubsequentorshort
{\glsxtrifperiod
{#2}{#3}}{#3}%
}
\gls
-like command or if it follows one of the \glsxtrshort
set of commands. Note that this has a different effect from pre v1.49 with the \glstext
-like commands, but it’s more appropriate since it’s typically only the short form that requires the period to be discarded. To restore the original behaviour: \renewcommand
*{\glsxtrdiscardperiodretainfirstuse
}[3]{%
\glsxtrifwasfirstuse
{#3}{\glsxtrifperiod
{#2}{#3}}%
}
\glsxtrpostlink
not \glsxtrpostlink
) and the full stop is put back followed by a space factor adjustment. Otherwise, just the space factor adjustment is done..,:;?!
(full stop, comma, colon, semi-colon, question mark, and exclamation mark).
Note that the asterisk isn’t moved after the closing parenthesis. This is because that character isn’t included in the default list.\glsdefpostlink
{general}{\glsxtrdopostpunc
{*}}
\newglossaryentry
{sample}{name={sample},symbol={X},
description={an example}}
\begin{document}
\Gls
{sample}, \glstext
{sample},
(\glsdesc
{sample}) and \glssymbol
{sample}.
\end{document}
This adds three extra punctuation marks (hyphen, apostrophe and slash). Note that this doesn’t allow for closing double-quotes and will break \glsxtraddpunctuationmark
{-'/}
''
(double apostrophe sequence for a closing double-quote) if found. The following will only work with XeLaTeX or LuaLaTeX: \usepackage
{fontspec}
\usepackage
{glossaries-extra}
\glsxtraddpunctuationmark
{”}
This sets the list to just three punctuation characters (so comma, colon, and semi-colon are no longer recognised).\glsxtrsetpunctuationmarks
{.?!}
Customisation is best performed within the category post-link hook, which can be defined (or redefined) with:
The first argument is the category label and the second is the code to perform. Note that this doesn’t check if the hook has already been defined for the category. The hook is a command in the form \newcommand
*{\glsxtrpostlink
}{%
\csuse
{glsxtrpostlink\glscategory
{\glslabel
}}%
}
\glsxtrpostlink
. If the category label only consists of letters, you can also use \newcommand
or \renewcommand
instead.endsentence
and hook
will conflict with the commands \glsxtrpostlinkendsentence
and \glsxtrpostlinkhook
. \glsxtrpostlink
or \glsxtrpostlinkhook
. Don’t append it to \glsxtrpostlinkhook
otherwise it will interfere with the punctuation lookahead.
This produces:
\glsdefpostlink
{general}{\glsxtrpostlinkAddDescOnFirstUse
}
\glsdefpostlink
{symbol}{\glsxtrpostlinkAddSymbolOnFirstUse
}
\glsdefpostlink
{number}{\glsxtrpostlinkAddSymbolDescOnFirstUse
}
\newglossaryentry
{sample}{name={sample},description={an example}}
\newglossaryentry
{alpha}{name={alpha},symbol={\ensuremath
{\alpha
}},
description={a symbol},category={symbol}}
\newglossaryentry
{pi}{name={pi},symbol={\ensuremath
{\pi
}},
description={a constant},category={number}}
\begin{document}
First use: \gls
{sample}, \gls
{alpha}, \gls
{pi}.
Next use: \gls
{sample}, \gls
{alpha}, \gls
{pi}.
\end{document}
\glslink
, the \gls
-like commands, the inline full form commands) otherwise it will expand to the name of the key associated with the singular form of the command. For example, this command will expand to text
for both \glstext
and \glsplural
, to description
for both \glsdesc
and \glsdescplural
, and to short
for both \glsxtrshort
and \glsxtrshortpl
. Whereas it will expand to nothing for both \gls
and \glsxtrfull
.\gls
-like command and to otherwise.\gls
-like command and was the first use otherwise it expands to . This is simply a shortcut command that uses both \glsxtrifwasglslike
and \glsxtrifwasfirstuse
.\gls
-like command and was the subsequent use otherwise it expands to . This is simply a shortcut command that uses both \glsxtrifwasglslike
and \glsxtrifwasfirstuse
.\gls
-like command and was the subsequent use or if the calling command set \glsxtrcurrentfield
to short
. Otherwise it expands to .
It’s not usually necessary for the post-link hook to differentiate between no case-change and sentence case, so this provides a convenient shortcut if only the all caps case needs to be different.\glscapscase
{ }{ }{ }
\gls
-like commands, this can be obtained with the placeholder \glsinsert
, but it’s not normally set by the \glstext
-like commands, which don’t use the entry format style (§5.5.5) and instead incorporate the inserted material at the end of the link text. If you want the post-link hook to be able to access the inserted material for the \glstext
-like commands, you must first save it, by redefining the following:\glstext
-like commands to initialise \glsinsert
. The default is:
For example, to always save the insert: \newcommand
*{\glsxtrsaveinsert
}[2]{\def
\glsinsert
{}}
The first argument can be used to conditionally assign the insert. For example, the following will only save it for entries with the general category: \renewcommand
*{\glsxtrsaveinsert
}[2]{\def
\glsinsert
{#2}}
\renewcommand
*{\glsxtrsaveinsert
}[2]{%
\glsifcategory
{#1}{general}{\def
\glsinsert
{#2}}{\def
\glsinsert
{}}%
}
\glsxtrfull
set of commands, you can redefine \glsxtrfullsaveinsert
instead (see §4.3).\glslabel
, \glstextformat
and \glsxtrgenentrytextfmt
have the definitions they had within the link text. They would ordinarily still have those definitions within the post-link hook, but if, for example, the hook contains content that may be deferred, such as a footnote, then judicious use and expansion of \glsxtrassignlinktextfmt
can allow the deferred code to pick up the label, outer and inner formatting.\expandafter
\footnote
\expandafter
{\glsxtrassignlinktextfmt
\glstextformat
{%
\Glsaccessfmtdesc
{}{\glsxtrgenentrytextfmt
}{\glslabel
}}.}
5.5.5. Entry Format Style
\gls
-like commands have the link text set to the entry format style corresponding to the entry’s glossary type. This can be changed with \defglsentryfmt
, but the default style is given by \glsentryfmt
, which is defined by the base glossaries package. This uses the placeholder commands to determine the appropriate text. These are described in the glossaries manual, but to recap they are: \glslabel
(the entry’s label), \glscustomtext
(text provided by \glsdisp
or empty otherwise), \glsinsert
(supplied in the final optional argument except for \glsdisp
, empty by default), \glsifplural
, and \glscapscase
.\glsentryfmt
to test whether or not the entry is an abbreviation and, if so, whether or not the entry should be treated as a regular entry:
This uses \renewcommand
*{\glsentryfmt
}{%
\ifglshasshort
{\glslabel
}
{\glssetabbrvfmt
{\glscategory
{\glslabel
}}}{}%
\glsifregular
{\glslabel
}%
{\glsxtrregularfont
{\glsgenentryfmt
}}%
{%
\ifglshasshort
{\glslabel
}%
{\glsxtrabbreviationfont
{\glsxtrgenabbrvfmt
}}%
{\glsxtrregularfont
{\glsgenentryfmt
}}%
}%
}
\ifglshasshort
to determine whether or not the entry is an abbreviation. If it is, then \glssetabbrvfmt
is used to setup the abbreviation style commands for the entry’s category.\glsifregular
) to determine whether or not the entry should be treated as a regular entry. Note that if the regular attribute hasn’t been set to true
, the entry will still be treated as a regular entry if it doesn’t have the short field set.\glsxtrregularfont
, but note that if the entry is an abbreviation, it will still use the abbreviation style formatting commands, which are contained within the first, firstplural, text and plural field values.\glsgenentryfmt
is provided by the base glossaries package, but is redefined by glossaries-extra to support inner formatting (§5.5.3) and accessibility (§9), if required.\glsxtrabbreviationfont
. Unlike \glsgenentryfmt
this doesn’t reference the first, firstplural, text or plural fields, but instead uses the abbreviation formatting commands \glsxtrfullformat
, \glsxtrsubsequentfmt
and their plural and case-changing variants.texdoc glossaries-extra-code
5.6. Hyperlinks
\gls
-like and \glstext
-like commands will automatically create a hyperlink by default, if hyperref has been loaded (before glossaries/glossaries-extra). The hyperlink can be switched off with hyper=false but will also be switched off if the entry was assigned to an ignored glossary that was defined with the unstarred \newignoredglossary
.\glstarget
which is used by all the predefined glossary styles by the standalone commands, such as \GlsXtrStandaloneEntryName
. This can result in duplicate targets if you have multiple glossaries or both standalone entries and a glossary. There are ways of getting around this, such as changing the target prefix or using target=false when displaying the glossary. However, the simplest method is to redefine \glstarget
to use: \glstarget
but first tests the field obtained by expanding:
By default, this expands to target
. If this field is undefined (according to \GlsXtrIfFieldUndef
) the target will be created in the way that \glstarget
would ordinarily create it (if hyperlinks are enabled). The field will then be set to the target. If the field has been defined then the target won’t be created and the is simply displayed. In order to use this feature just redefine \glstarget
: \renewcommand
{\glstarget
}{\glsxtrtarget
}
\glolinkprefix
but may be changed with the prefix option when displaying the glossary.5.7. Label Prefixes
\makeglossaries
command and the makeglossaries Perl script. They are both defined as glossary entries, but they can’t both have the label makeglossaries
. This manual uses bib2gls and is quite complicated, but a simplified version is as follows:
So the label \newcommand
{\csfmt
}[1]{\texttt
{\#1}}
\newcommand
{\appfmt
}[1]{\texttt
{#1}}
\newglossaryentry
{cs.makeglossaries}{name={\csfmt
{makeglossaries}},
description={}}
\newglossaryentry
{app.makeglossaries}{name={\appfmt
{makeglossaries}},
description={}}
cs.makeglossaries
refers to \makeglossaries
and app.makeglossaries
refers to makeglossaries. If you have a lot of prefixes like this, you may prefer to have a command that automatically adds the prefix. For example,
The problem with this is that the custom command \newcommand
*{\cs
}[2][]{\gls
[#1]{cs.#2}}
\cs
doesn’t allow for the *, + and modifiers (such as
or \gls
*
). Instead you can use:
which defines the command \gls
+ that behaves like [ ]{ }[ ]
For example: \gls
[ , ]{ }[ ]
or (to default to no hyperlinks) \glsxtrnewgls
{cs.}{\cs
}
now you can use \glsxtrnewgls
[hyper=false]{sym.}{\cs
}
\cs+{M}
to behave like
.\gls
+{cs.M}
For the all caps versions:
For example: \glsxtrnewglslike
[hyper=false]{idx.}{\idx
}{\idxpl
}{\Idx
}{\Idxpl
}
\glsxtrnewGLSlike
[hyper=false]{idx.}{\IDX
}{\IDXpl
}
to behave like [ ]{ }{ }
, or
which defines \glslink
[ , ]{ }{ } to behave like [ ]{ }{ }
.\glsdisp
[ , ]{ }{ }\newcommand
that has syntax that starts with [ ]{ }, then you can notify bib2gls using: \glsxtrnewgls
for \rgls
: \rgls
, \rglspl
, \rGls
and \rGlspl
:
and for all caps:
\newcommand
) also allows the command to be identified as a sentence case blocker to prevent the label from being converted or, in the case of \glsxtrnewglslike
and \glsxtrnewrglslike
, as a mapping. See §5.2 for further details.5.8. Indexing
\gls
-like and \glstext
-like commands, but this action can be prevented, such as by using the option noindex=true. These commands also generate text (the link text, §5.5). If you want to simply index an entry (to ensure that an entry is shown in the glossary) without producing any text then you can use \glsadd
. Indexing is also performed by cross-referencing commands, such as \glssee
. In the case of makeindex, \glssee
simply behaves like \glsadd
with a special format and the location set to Z (which pushes it to the end of the location list). Entries in ignored glossaries can only be indexed with bib2gls.\glsaddall
or \glsaddallunused
(both provided by the base glossaries package). These both iterate over all entries (in all non-ignored glossaries). In the first case (\glsaddall
), every entry is indexed with the \glsadd
options provided in the optional argument of \glsaddall
. In the second case (\glsaddallunused
), only those entries that haven’t been marked as used so far will be indexed using
. See the glossaries manual for further details of those commands.\glsadd
[format=glsignore]{ }\glsaddallunused
but indexes all entries that haven’t been indexed so far (again using the option format=glsignore). This is preferable to \glsaddallunused
if you have to reset the first use flag for any entries. As with \glsaddallunused
, if this command is required, it should be placed near the end of the document. Indexing any entries after either of these commands are used will cause spurious commas in the location lists.\glsaddall
, \glsaddallunused
and \glsaddallunindexed
should not be used with bib2gls. Use the selection=all option instead.
for each entry in the comma-separated . This command may be used with bib2gls, although it may be simpler to adjust the selection criteria or use filtering.\glsadd
[ ]{ }(
(range start) and )
(range end) at the start of the format value. For example:
(See the glossaries manual for further details.) However, the isolated open and close parentheses can upset syntax highlighting. So the glossaries-extra package provides the following commands, which automatically add \glsadd
[format=(
]{example}
…
\glsadd
[format=)
]{example}
(
and )
.\glsaddeach
[ ,format=(
]{ }
The default value of will be the same as the default number format (which can be changed with \glsaddeach
[ ,format=)
]{ }
\GlsXtrSetDefaultNumberFormat
). If you want a different default for ranges, use:
This sets the default format for \glsstartrange
and \glsendrange
. Note that this format won’t be applied if you explicitly create a range with \glsadd
or \glsaddeach
.\glsstartrange
and \glsendrange
. For example:
This is the same as: \glsstartrange
[format=hyperbf]{example}
…
\glsendrange
[format=hyperbf]{example}
which is the same as: \GlsXtrSetDefaultRangeFormat
{hyperbf}
\glsstartrange
{example}
…
\glsendrange
{example}
\glsadd
[format=(
hyperbf]{example}
…
\glsadd
[format=)
hyperbf]{example}
\glsstartrange
and \glsendrange
may be a comma-separated list of entry labels. For example:
This is essentially the same as: \glsstartrange
{duck,goose}
…
\glsendrange
{duck,goose}
\glsadd
[format=(
]{duck}%
\glsadd
[format=(
]{goose}
…
\glsadd
[format=)
]{duck}%
\glsadd
[format=)
]{goose}
\gls
-like and \glstext
-like commands automatically use
whenever a \glsadd
[ ]{ }\gls
-like or \glstext
-like command is used for the entry given by when the format matches one of the formats in the comma-separated \glslabel
(which will match that was used with \gls
etc) and indicates the entry label to use in \glsadd
and so needs to be expandable. The is a comma-separated list of format values that will trigger the automated adding. The are the options to pass to \glsadd
with format={format} prepended to the list.
then \GlsXtrAutoAddOnFormat
{hyperbf}{counter=chapter}
will be equivalent to: \gls
[format=hyperbf]{sample}
Note that the explicit range markers will prevent a match unless you include them in (in which case, be sure to add both the start and end formats).\glsadd
[format=hyperbf,counter=chapter]{sample}\gls
[format=hyperbf]{sample}
In this case \GlsXtrAutoAddOnFormat
[dual.\glslabel
]{hyperbf}{}
will now be equivalent to: \gls
[format=hyperbf]{sample}\glsadd
[format=hyperbf]{dual.sample}\gls
[format=hyperbf]{sample}
\index
, see §12.) This includes any entries that simply cross-reference another entry. The default is to use makeindex, which is a general purpose indexing application. Each time an entry is indexed, a line is added to an associated file that contains the indexing information, which includes the sort value, the hierarchical information (if the entry has a parent) and an associated location (the page number, by default). This information is used to sort the entries and collate the locations into a compact location list. The xindy package option switches to using xindy syntax, but the process is much the same.\glsignore
command is used for this purpose (format=glsignore). However, it’s important to remember that even though the location isn’t shown, it’s still present in the location list. This means that you will end up with spurious commas if there’s more than one item in the location list.\glsignore
as a special “ignored location” is bib2gls, where this format will trigger the entry’s selection but won’t add the ignored location to the location list. This avoids the problem of spurious commas caused by invisible locations.\newglossary
, the counter key when defining an entry, or the counter option when indexing an entry.\gls
before the first \part
. An empty location will trigger an error with makeindex and xindy.\arabic
), lowercase Roman numerals (\roman
), uppercase Roman numerals (\Roman
), lowercase Basic Latin (\alph
) and uppercase Basic Latin (\Alph
), with optionally a separator (hyphen by default). With xindy, the syntax must be defined (see the glossaries manual for further details).\makeglossaries
\newglossaryentry
{sample}{name={sample},description={an example}}
\begin{document}
\gls
[thevalue=Z]{sample} (Z), \gls
[thevalue=4]{sample} (4),
\gls
[thevalue=xi]{sample} (xi), \gls
[thevalue=2]{sample} (2),
\gls
[thevalue=iii]{sample} (iii), \gls
[thevalue=A]{sample} (A).
\printglossaries
\end{document}
\roman
, \arabic
and \Alph
), with each group ordered numerically. The same result can be produced with xindy by adding the xindy package option to the above example.
This example is contrived. For most documents, the order of indexing will likely match the desired location list order.\begin{filecontents*}
{\jobname
.bib}
@entry
{sample,name={sample},description={an example}}
\end{filecontents*}
\usepackage
[record]{glossaries-extra}
\GlsXtrLoadResources
\begin{document}
\gls
[thevalue=Z]{sample} (Z), \gls
[thevalue=4]{sample} (4),
\gls
[thevalue=xi]{sample} (xi), \gls
[thevalue=2]{sample} (2),
\gls
[thevalue=iii]{sample} (iii), \gls
[thevalue=A]{sample} (A).
\printunsrtglossaries
\end{document}
\gls
-like and \glstext
-like commands. This means that if a page break occurs in the middle of the link text, the location will refer to the page number at the start of the link text (assuming the default page location counter). With glossaries-extra, you can use the option wrgloss=after to have the indexing occur after the link text. The wrgloss attribute can also be used. The default setting is initialised with \glsxtrinitwrgloss
(see §5.1.1).\GlsXtrIfUnusedOrUndefined
rather than \ifglsused
. The indexonlyfirst attribute is also tested. If the “index only first” setting is on and the entry has been used, isn’t performed but auto-indexing via \glsxtrdoautoindexname
is still performed (see §12).5.9. Cross-Referencing
\glssee
. The value of this key isn’t saved and can’t be accessed later. (The key was simply provided as a shortcut.) The indexing ensures that the cross-reference is shown in the location list.
When the \newglossaryentry
{pumpkin}{name={pumpkin},description={}}
\newglossaryentry
{cucumber}{name={cucumber},description={}}
\newglossaryentry
{melon}{name={melon},description={}}
\newglossaryentry
{gourd}{name={gourd},description={},
see={pumpkin,cucumber,melon}}
\newglossaryentry
{courgette}{name={courgette},description={}}
\newglossaryentry
{marrow}{name={marrow},description={},
seealso={courgette}}
gourd
entry is defined, the cross-reference will automatically be indexed using \glssee
. This means that the gourd
entry will appear in the glossary, regardless of whether or not it is used in the document, with “see pumpkin, cucumber & melon” in the location list. If gourd
is also indexed in the document, then those locations will also be added to the gourd’s location list.marrow
entry functions in much the same way, but it is indexed with \glsxtrindexseealso
. This means that the marrow
entry will have “see also courgette” in its location list.\seename
tag with . The seealso key doesn’t permit this. For example, the following is permitted:
but you can’t replace see with seealso in the above as it would assume that the first label in the list is \newglossaryentry
{gourd}{name={gourd},description={},
see={[related topics]pumpkin,cucumber,melon}}
[related topics]pumpkin
which is incorrect. The tag would have to be removed:
(You could then redefine \newglossaryentry
{gourd}{name={gourd},description={},
seealso={pumpkin,cucumber,melon}}
\seealsoname
to related topics
, if required or redefine \glsxtruseseealsoformat
as applicable.)
When the \newglossaryentry
{zucchini}{name={zucchini},description={},
alias={courgette}}
zucchini
entry is defined, the alias key will automatically index zucchini with
. This means that the \glssee
{zucchini}{courgette}zucchini
entry will be present in the glossary with “see courgette” in the location list. If the zucchini
entry is referenced in the document using a command like \gls
, then the hyperlink (if enabled) will go to the courgette
entry (not the zucchini
entry) but the zucchini
entry won’t be indexed.zucchini
entry locations added to the courgette
entry, you can redefine \glsxtrsetaliasnoindex
(see §5.9.3) or, with bib2gls, use the alias-loc=transfer setting.5.9.1. Entries that may not be required
Some of these entries have a cross-reference key set, but not all of these entries are required in the document: \newglossaryentry
{pumpkin}{name={pumpkin},description={}}
\newglossaryentry
{cucumber}{name={cucumber},description={}}
\newglossaryentry
{melon}{name={melon},description={}}
\newglossaryentry
{gourd}{name={gourd},description={},
see={pumpkin,cucumber,melon}}
\newglossaryentry
{cucurbit}{name={cucurbit},description={},
see={gourd}}
\newglossaryentry
{courgette}{name={courgette},description={}}
\newglossaryentry
{marrow}{name={marrow},description={},
seealso={courgette}}
\newglossaryentry
{zucchini}{name={zucchini},description={},
alias={courgette}}
\newglossaryentry
{broccoli}{name={broccoli},description={}}
\newglossaryentry
{cauliflower}{name={cauliflower},description={},
seealso={broccoli}}
Note that the glossary includes cucurbit and gourd, which aren’t referenced in the document. They could be useful as a redirect for the reader, but the gourd entry cross-references the cucumber entry, which isn’t included in the glossary, so the hyperlink target is undefined. The cauliflower entry has also been included in the glossary, but in this case it’s not useful for the reader as neither cauliflower nor broccoli (which it cross-references) are mentioned in the document. As with the cucumber cross-reference, the broccoli cross-reference hyperlink target is undefined.\usepackage
[colorlinks]{hyperref}
\usepackage
[nostyles,stylemods=bookindex,style=bookindex]
{glossaries-extra}
\makeglossaries
\loadglsentries
{myentries}
\begin{document}
This document is only discussing \glspl
{courgette} (baby
\glspl
{marrow}, also called a \gls
{zucchini}),
\glspl
{pumpkin} and \glspl
{melon}.
\printglossaries
\end{document}
This doesn’t show the zucchini entry or any of the cross-references in the glossary because the information hasn’t been added to the indexing files. One way around this is to insert the cross-reference in a post-description hook.\usepackage
[colorlinks]{hyperref}
\usepackage
[autoseeindex=false,nostyles,stylemods=bookindex,
style=bookindex]{glossaries-extra}
\makeglossaries
\loadglsentries
{myentries}
\begin{document}
This document is only discussing \glspl
{courgette} (baby
\glspl
{marrow}, also called a \gls
{zucchini}),
\glspl
{pumpkin} and \glspl
{melon}.
\printglossaries
\end{document}
\usepackage
[colorlinks]{hyperref}
\usepackage
[autoseeindex=false,nostyles,stylemods=bookindex,
style=bookindex]{glossaries-extra}
\makeglossaries
\loadglsentries
{myentries}
\glsdefpostdesc
{general}{%
\glsxtrseelists
{\glscurrententrylabel
}%
}
\begin{document}
This document is only discussing
\glspl
{courgette} (baby \glspl
{marrow},
also called a \gls
{zucchini}),
\glspl
{pumpkin} and \glspl
{melon}.
\printglossaries
\end{document}
\gls
-like and \glstext
-like commands. This doesn’t cause a problem for the zucchini hyperlink, since the target is courgette (obtained from the alias key).\glssee
or \glsxtrindexseealso
within the document. For example, the file myentries.tex now contains:
The document: \newglossaryentry
{pumpkin}{name={pumpkin},description={}}
\newglossaryentry
{cucumber}{name={cucumber},description={}}
\newglossaryentry
{melon}{name={melon},description={}}
\newglossaryentry
{gourd}{name={gourd},description={}}
\newglossaryentry
{cucurbit}{name={cucurbit},description={}}
\newglossaryentry
{courgette}{name={courgette},description={}}
\newglossaryentry
{marrow}{name={marrow},description={}}
\newglossaryentry
{zucchini}{name={zucchini},description={}}
\newglossaryentry
{broccoli}{name={broccoli},description={}}
\newglossaryentry
{cauliflower}{name={cauliflower},description={}}
Note that aliases require the alias field to be set. In this case, I’ve set it with \usepackage
[colorlinks]{hyperref}
\usepackage
[nostyles,stylemods=bookindex,style=bookindex]
{glossaries-extra}
\makeglossaries
\loadglsentries
{myentries}
\glssee
{gourd}{pumpkin,melon,courgette}
\glssee
{zucchini}{courgette}
\GlsXtrSetField
{zucchini}{alias}{courgette}
\begin{document}
This document is only discussing \glspl
{courgette} (baby
\glspl
{marrow}, also called a \gls
{zucchini}),
\glspl
{pumpkin} and \glspl
{melon}.
\printglossaries
\end{document}
\GlsXtrSetField
. The gourd and zucchini entries have been included in the glossary because they were added with \glssee
. The other entries are in the glossary because they were indexed when referenced with \gls
or \glspl
.\glsxtrindexseealso
{pumpkin}{courgette,melon}
\glsxtrindexseealso
{melon}{pumpkin,courgette}
\glsxtrindexseealso
{courgette}{pumpkin,melon}
convertgls2bib --index-conversion myentries.tex myentries.bib
I’ve used the option --index-conversion (or -i) which will use @index
instead of @entry
for entries that have an empty description (which is the case in this example). This creates the file myentries.bib, which contains the following (space compacted): % Encoding: UTF-8
@index{pumpkin, name={pumpkin}}
@index{cucumber, name={cucumber}}
@index{melon, name={melon}}
@index{gourd, see={pumpkin,cucumber,melon}, name={gourd}}
@index{cucurbit, see={gourd}, name={cucurbit}}
@index{courgette, name={courgette}}
@index{marrow, name={marrow}, seealso={courgette}}
@index{zucchini, name={zucchini}, alias={courgette}}
@index{broccoli, name={broccoli}}
@index{cauliflower, name={cauliflower}, seealso={broccoli}}
The earlier example 106 on page 271 can be rewritten as:
In order to support letter groups, bib2gls needs to be invoked with the --group switch. The result is:
This uses the default selection={recorded and deps}, which selects entries that have records, and their dependencies. Records correspond to the usual indexing performed by the \usepackage
[colorlinks]{hyperref}
\usepackage
[record,nostyles,stylemods=bookindex,style=bookindex]
{glossaries-extra}
\GlsXtrLoadResources
[src=myentries]
\begin{document}
This document is only discussing \glspl
{courgette} (baby
\glspl
{marrow}, also called a \gls
{zucchini}),
\glspl
{pumpkin} and \glspl
{melon}.
\printunsrtglossaries
\end{document}
\gls
-like, \glstext
-like or \glsadd
commands. With bib2gls, the cross-referencing fields don’t trigger an index but identify dependencies.
results in:
This now includes the gourd entry because it cross-references pumpkin and melon, which have been recorded in the document. The cucurbit entry is also included because it cross-references the (now selected) gourd entry. Note that the cucumber entry has been selected because the gourd entry depends on it. This means there are no broken links in the glossary, but it looks a bit odd as the cucumber entry has no location list. As from bib2gls v3.0, this can be removed with one of the cross-reference pruning options, such as prune-xr. For example: \GlsXtrLoadResources
[src=myentries,
selection={recorded and deps and see}]
results in:
This has removed the unnecessary cucumber from the gourd’s see list, and so cucumber doesn’t get selected.\GlsXtrLoadResources
[src=myentries,
selection={recorded and deps and see},prune-xr]
5.9.2. Accessing the Cross-Referencing Fields
\glsxtruseseeformat
(for see and alias) or \glsxtruseseealsoformat
(for seealso). If any of these fields are set, the list is encapsulated with:
This simply does a space followed by . If more than one of the fields are set (not recommended), then they will be displayed in the order: see, seealso and alias. The entire set will be encapsulated with \glsxtrseelistsencap
and each sub-list will be separated with:
which defaults to a comma followed by a space.\glsxtruseseeformat
, otherwise this does nothing. An error (or warning with undefaction=warn) will occur if the entry hasn’t been defined.\glsxtrusesee
but for the alias field.\glsxtruseseealsoformat
, otherwise this does nothing. An error (or warning with undefaction=warn) will occur if the entry hasn’t been defined.\relax
(without any error or warning). If you want to first test if the field is set, you can use \glsxtrifhasfield
.\relax
(without any error or warning). If you want to first test if the field is set, you can use \glsxtrifhasfield
.\glsseeformat
[\seealsoname
]{ }{ }
5.9.3. Cross-Reference Indexing
\glssee
. As with \glssee
, this can also be used explicitly.\glsxtrindexseealso
simply does:
With xindy, \glssee
[\seealsoname
]{ }{ }
\glsxtrindexseealso
behaves in an analogous way, using the appropriate cross-referencing markup.\gls
-like and \glstext
-like commands to automatically switch off the indexing for aliases. (The hook is performed after the options set by \GlsXtrSetDefaultGlsOpts
.)
Note that this needs noindex=false to ensure the indexing takes place so don’t simply append \renewcommand
{\glsxtrsetaliasnoindex
}{\glsxtrindexaliased
}
\glsxtrindexaliased
to the definition of \glsxtrsetaliasnoindex
.\glsxtraddallcrossrefs
explicitly, but you may want to redefine it to only iterate over specific glossaries. The unused entries are indexed using the glsxtrunusedformat format.\unskip
.5.10. First Use Flag
\gls
-like commands (which are the principle method of referencing an entry) all mark the entry as used after the link text is displayed but before the post-link hook is used.\gls
-like commands (which are robust) are used in section headings or captions, they can end up in the table of contents or corresponding “list of …” (such as the list of figures). This can cause the first use flag to be unset too soon. For these situations, use the commands described in §5.3 instead.\glsunset
(global unset), \glslocalunset
(local unset), \glsreset
(global reset) and \glslocalreset
(local reset).\glsenableentrycount
and \glsenableentryunitcount
to perform the count increment or reset (see §6.1).\glsunset
.\glslocalunset
.\glsreset
.\glslocalreset
.\glsunsetall
and \glsresetall
. For example, if you don’t want the first use in the front matter, you can unset all entries at the start of the front matter and reset them at the start of the main matter. \frontmatter
\glsunsetall
…\mainmatter
\glsresetall
\ifglsused
(but take care if you are using bib2gls or the undefaction=warn option, see below). This command allows the entry display style to vary the link text according to whether or not the entry has been marked as used. However, it can’t be used within the post-link hook as by that time, the first use flag will have already been unset.
In the above example, an alternative is to use \newabbreviation
{html}{HTML}{hypertext markup language}
\begin{document}
\begin{abstract}
This abstract mentions \gls
{html}.
\end{abstract}
Some casual reference to \gls
{html}.
\section
{Web Pages}
\glsreset
{html}This section is all about \gls
{html}.
\end{document}
\glsxtrfull
where you particularly want the full form, but some abbreviation styles have a different expansion with the inline \glsxtrfull
form compared with the first use of \gls
.
can be replaced with: \glsreset
{html}This section is all about \gls
{html}.
This section is all about
\gls
[prereset]{html}.
\ifglsused
isn’t helpful in the post-link hook. Instead, you can use: \gls
-like commands according to the value of the first use flag before the link text. It’s also initialised by the \glstext
-like commands: not according to the value of the first use flag but according to whether or not the \glstext
-like command emulates first use. \gls
will define \glsxtrifwasfirstuse
to do its first argument if the first use flag indicates the entry hasn’t yet been used, otherwise it will define \glsxtrifwasfirstuse
to do its second argument. Whereas \glsfirst
will always define \glsxtrifwasfirstuse
to do its first argument (unless used with preunset) and \glstext
will always define \glsxtrifwasfirstuse
to do its second argument (unless used with prereset), regardless of the state of the first use flag.\glsxtrifwasfirstuse
to match the option. See §5.5.4 for further details about the post-link hook.\gls
-like command, you can use: \glsxtrifwasglslikeandfirstuse
.\gls
-like commands before the post-link hook uses the global \glsunset
by default. If you want \glslocalunset
instead, you can use the local option (provided by the base glossaries package) or postunset=local. To prevent the first use flag from being unset after the link text, use postunset=none.\newabbreviation
{html}{HTML}{hypertext markup language}
\begin{document}
{% local scope
\gls
[local]{html}. Used? \ifglsused
{html}{Yes}{No}.
}% end scope
Used? \ifglsused
{html}{Yes}{No}.
\gls
[postunset=none]{html}. Used? \ifglsused
{html}{Yes}{No}.
\end{document}
\ifglsused
will trigger an error or warning and do neither. In this situation, you may need to use the following command instead.\ifglsused
with bib2gls where the entries are never defined on the first LaTeX run.5.10.1. Buffering Unsets
\gls
are used in a context where changing a boolean variable can cause things to go wrong. The outer, middle and inner formatting (see §5.5) can be used to change the font for the link text, but it may be that the \gls
-like command occurs within a block of text that needs to be encapsulated by such a command.\gls
in one of the commands provided with the soul package. For example:
This causes the confusing error: \ul
{Some text about \gls
{html}.}
Glossary entry `{html}' has not been defined.
The simplest workaround is to put
inside the argument of \gls
{html}\mbox
. For example:
This can work provided it’s not the first use of this entry. It if is, then unsetting the first use flag causes a problem and results in the error: \ul
{Some text about \mbox
{\gls
{html}}.}
! Package soul Error: Reconstruction failed.
The glossaries-extra package provides a way of temporarily switching off \glsunset
so that it just makes a note of the entry’s label but doesn’t actually perform the change.
This starts the buffering. The unstarred version doesn’t check for duplicates, so the internal list may end up with multiple occurrences of the same label. The starred version only adds a label to the internal list if it’s not already in it. If you are using entry counting (see §6.1) the unstarred version is preferable to ensure the entry count is correct.\glsunset
, the buffering must be stopped or discarded. \glsunset
, and unsets all the buffered labels. The starred form uses \glslocalunset
to unset the buffered labels.
for each label, where is a control sequence that takes a single argument. This is best used with the starred version of \
{ }\GlsXtrStartUnsetBuffering
* to avoid duplicates.\glsunset
to its normal behaviour.\GlsXtrStartUnsetBuffering
but the locally collected list of unused entries will be cleared at the start of each instance of \GlsXtrStartUnsetBuffering
. It will also be cleared by \GlsXtrClearUnsetBuffer
. All entries that have been marked as unused can be reset with:
This will perform a local reset on all the entries in the “not used” list and do \GlsXtrClearUnsetBuffer
.
Note that this approach can’t be used for situations where the change in conditional causes a problem, but it can be used in situations where the content of an environment or command is repeatedly processed, which upsets the first use flag.\gls
-like command, the \glsinitreunsets
hook checks if the current entry (identified by \glslabel
) has been added to the buffer. (Bear in mind that the label is added to the buffer after the link text when \glsunset
is used.)
\GlsXtrClearUnsetBuffer
.
The first page isn’t a problem as the frame doesn’t have overlays. The first reference of the “html” entry shows the full form and the next shows just the short form. The second page (which is the first of the overlays of the second frame) correctly shows the full form of the “svm” entry for the first reference and the short form for the second reference, but on the third page (the second of the overlays) now has all instances of “svm” showing as subsequent use (just the short form).\documentclass
{beamer}
\usepackage
{glossaries-extra}
\newabbreviation
{svm}{SVM}{support vector machine}
\newabbreviation
{html}{HTML}{hypertext markup language}
\begin{document}
\begin{frame}
\frametitle
{Frame 1}
\begin{itemize}
\item
\gls
{html} and \gls
{html}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle
{Frame 2}
\begin{itemize}
\item
<+-> \gls
{svm} and \gls
{svm}
\item
<+-> \gls
{svm} and \gls
{html}
\end{itemize}
\end{frame}
\frame
{\printunsrtglossaries
}
\end{document}
\glslocalresetall
at the start of the frame, but that would reset the “html” entry as well. Another workaround is to locally reset the first “svm” entry with preresetlocal, but that defeats the point of the first use flag, which is intended to keep track of whether or not you have used an entry so that you don’t have to.
This ensures that the first use flag isn’t reset until after the frame, but it means that all references to the “svm” entry on both the second and third page show the full form.\GlsXtrStartUnsetBuffering
\begin{frame}
\frametitle
{Frame 2}
\begin{itemize}
\item
<+-> \gls
{svm} and \gls
{svm}
\item
<+-> \gls
{svm} and \gls
{html}
\end{itemize}
\end{frame}
\GlsXtrStopUnsetBuffering
\GlsXtrUnsetBufferEnableRepeatLocal
which fixes the second page, but not the third page, which shows all references to “svm” as the short form. What’s needed is to locally reset and entries that are in the frame but haven’t yet been used (“svm”, in this case) at the start of the frame with \GlsXtrResetLocalBuffer
:
Note that on the first overlay, the buffer and “not used” list are both empty. On the second overlay, the buffer contains the “svm” and “html” labels and the “not used” list just contains the “svm” label. The reset performed by \GlsXtrStartUnsetBuffering
\GlsXtrUnsetBufferEnableRepeatLocal
\begin{frame}
\GlsXtrResetLocalBuffer
\frametitle
{Frame 2}
\begin{itemize}
\item
<+-> \gls
{svm} and \gls
{svm}
\item
<+-> \gls
{svm} and \gls
{html}
\end{itemize}
\end{frame}
\GlsXtrStopUnsetBuffering
\GlsXtrResetLocalBuffer
will reset “svm” and then clear both the buffer and the “not used” list. This means that the first “svm” reference is once again considered first use and it will once again be added to the “not used” list (so that it would be reset again if there was a third overlay).
This is quite cumbersome, but these commands could potentially be added to hooks at the start and end of problematic environments (but the buffering needs to be started and ended outside of the repeated content).\mbox
to protect \gls
within the buffer zone:
This produces:
Note that the use of \documentclass
{article}
\usepackage
[T1]{fontenc}
\usepackage
{soul}
\usepackage
{glossaries-extra}
\newabbreviation
{html}{HTML}{hypertext markup language}
\begin{document}
\GlsXtrStartUnsetBuffering
\ul
{Some text about \mbox
{\gls
{html}}.
Next use: \mbox
{\gls
{html}}.}
\GlsXtrStopUnsetBuffering
Next use: \gls
{html}.
\end{document}
\mbox
prevents line-breaking and the second instance of
is treated as first use. \gls
{html}\GlsXtrStopUnsetBuffering
, multiple references of the same term within the buffering zone will always be treated as first use (if the term wasn’t used before the buffering started). \protect
and inner formatting (see §5.5.3 for limitations) or middle formatting (see §5.5.2) with \GlsXtrExpandedFmt
(which can’t be used with fragile link text). Both approaches are demonstrated in the following example:
This produces:
\documentclass
{article}
\usepackage
[T1]{fontenc}
\usepackage
{soul}
\usepackage
{glossaries-extra}
\newabbreviation
{html}{HTML}{hypertext markup language}
% custom command to expand content before using \ul
:
\newrobustcmd
{\xpul
}[1]{\GlsXtrExpandedFmt
{\ul
}{#1}}
\begin{document}
First approach (inner formatting):
{% scope
\renewcommand
{\glsxtrdefaultentrytextfmt
}[1]{\ul
{#1}}%
\ul
{Some text about \protect
\gls
{html}.
Next use: \protect
\gls
{html}}
}
Next use: \gls
{html}.
Second approach (middle formatting with expanded link text):
\glsresetall
{% scope
\renewcommand
{\glsxtrabbreviationfont
}[1]{\xpul
{#1}}%
\renewcommand
{\glsxtrregularfont
}[1]{\xpul
{#1}}%
\ul
{Some text about \protect
\gls
{html}.
Next use: \gls
{html}.}
}
Next use: \gls
{html}.
\end{document}
\gls
-like commands that can cause a problem. The whatsit caused by indexing can also be problematic. Buffering can also be used to help with that situation. Indexing can be switched off at the start of the buffering and \GlsXtrForUnsetBufferedList
can be used to perform the indexing outside of the problematic content. Note that this can cause a problem if the location changes (for example, if a page break occurs within the buffering zone).\gls
-like command in order to, for example, display a mini-glossary at the end of the block. See for example, Gallery: Mini-Glossary.5.11. Accessing Fields
\glsentryname
and \glsletentryfield
.\relax
if the field or entry are undefined.\glsxtrusefield
but converts the first character to uppercase using \makefirstuc
(provided by mfirstuc) which is robust. If hyperref is loaded,
will use the expandable: \Glsxtrusefield
{ }
in a PDF bookmark.\MFUsentencecase
{\glsxtrusefield
{ }}
\glsxtrusefield
but converts the field value to uppercase. See §5.2.3.\glsxtrusefield
but converts the field value to title case. This internally uses:
This converts to title case (expanding the first token once). If \glscapitalisewords
has been defined, that will be used, otherwise \capitalisewords
will be used.\glsentryparent
or, to first test if the entry has a parent, either use \ifglshasparent
or use \glsxtrifhasfield
with the field label set to parent
.\glsseeitemformat
may be redefined to use this command to show the hierarchy, if required.
for the entry’s parent and will then do the separator \glsxtrhiername
{ }\glsxtrhiernamesep
.
, if the entry is an abbreviation (see §1.2.4), or \glsfmttext
{ }
otherwise. \glsfmtname
{ }\glsxtrhiername
.\glsxtrhiername
but the first name in the list has its first character converted to uppercase using \Glsfmttext
or \Glsfmtname
(sentence case). If hyperref is loaded, \Glsxtrhiername
will expand to:
in a PDF bookmark. The \MFUsentencecase
{\glsentryname
{ }}
\makefirstuc
mapping from \glsxtrhiername
to \Glsxtrhiername
is set with \glsmfuaddmap
, if supported.\glsxtrhiername
but each name in the list has its first character converted to uppercase using \Glsfmttext
or \Glsfmtname
.\glsxtrhiername
but the first name in the list is converted to uppercase using \GLSfmttext
or \GLSfmtname
.\glsxtrhiername
but each name in the list is converted to uppercase using \GLSfmttext
or \GLSfmtname
(all caps).5.12. Encapsulation (Formatting) Based on Field Values
5.12.1. Foreign Language Field
en-GB
or de-CH-1996
). The default value is userii
(which corresponds to the user2 key).\GlsXtrForeignTextField
set, then this command will encapsulate according to the language tag stored in that field.\foreignlanguage
otherwise just is done.\foreignlanguage
isn’t defined (that is, there’s no language support for the document), this command simply does . If an old version of tracklang is used, this command issues a warning and just does .\foreignlanguage
, then a warning is issued with:
This produces:
\usepackage
[main=british,brazilian,ngerman]{babel}
\usepackage
{glossaries-extra}
\setabbreviationstyle
{long-short-user}
\newabbreviation
[user1={Associação Brasileria de Normas Técnicas},
user2={pt-BR}
]
{abnt}{ABNT}{Brazilian National Standards Organization}
\newabbreviation
[user1={Deutsches Institut für Normung e.V.},
user2={de-DE-1996}]
{din}{DIN}{German Institute for Standardization}
\newabbreviation
{tug}{TUG}{\TeX
\
User Group}
\renewcommand
*{\glsxtruserparen
}[2]{%
\glsxtrfullsep
{#2}%
\glsxtrparen
{#1%
\ifglshasfield
{\glsxtruserfield
}{#2}%
{, \emph
{\GlsXtrForeignText
{#2}{\glscurrentfieldvalue
}}}%
{}%
}%
}
\begin{document}
\gls
{abnt}, \gls
{din}, \gls
{tug}.
\printunsrtglossaries
\end{document}
5.12.2. Associated Entry Format
useri
(which corresponds to the user1 key).
where the link text is formatted according to:
The default definition simply does \glslink
[ ]{ }{ }
\{ }
where the control sequence name is obtained from the field given by \GlsXtrFmtField
. If the field hasn’t been set, \@firstofone
is used (which simply does its argument). The unstarred version assumes an empty . The default \glslink
options are given by \GlsXtrFmtDefaultOptions
.\glslink
, a partially expandable command is provided that may be used in section headings: \glsxtrentryfmt
will format according to the control sequence name identified in the field given by \GlsXtrFmtField
(or @firstofone
, if not set). For example:
This produces:
Note the difference between using \documentclass
{article}
\usepackage
[T1]{fontenc}
\usepackage
{amsmath}
\usepackage
[colorlinks]{hyperref}
\usepackage
[postdot,style=index]{glossaries-extra}
\makeglossaries
\newcommand
*{\mtx
}[1]{\boldsymbol
{#1}}
\newcommand
*{\mtxinv
}[1]{\mtx
{#1}\sp
{-1}}
\newglossaryentry
{matrix}{%
name={matrix},
symbol={\ensuremath
{\mtx
{M}}},
plural={matrices},
user1={mtx},% corresponds to \mtx
description={rectangular array of values}
}
\newglossaryentry
{identitymatrix}{%
name={identity matrix},
symbol={\ensuremath
{\mtx
{I}}},
plural={identity matrices},
description={a diagonal matrix with all diagonal elements equal to 1 and all other elements equal to 0}
}
\newglossaryentry
{matrixinv}{%
name={matrix inverse},
symbol={\ensuremath
{\mtxinv
{M}}},
user1={mtxinv},% corresponds to \mtxinv
description={a square \gls
{matrix} such that $\mtx
{M}\mtxinv
{M}=\glssymbol
{identitymatrix}$}
}
\begin{document}
A \gls
{matrix} is denoted \glssymbol
{matrix}.
The inverse is denoted \glssymbol
{matrixinv}.
\[
\glsxtrfmt
{matrix}{A} \glsxtrfmt
{matrixinv}{A}
= \glssymbol
{identitymatrix}
\]
Compare $\glsxtrfmt
{matrix}{A}[_0]$
with $\glsxtrfmt*
{matrix}{A}[_0]$.
\printglossaries
\end{document}
\glsxtrfmt*
vs \glsxtrfmt
.
Similarly for the starred form:
which is a shortcut for: \glsxtrfmt
[ ]{ }{\glssentencecase
{ }}
\glsxtrfmt*
[ ]{ }{\glssentencecase
{ }}[ ]
but uses:
for the PDF bookmarks. This uses \glsxtrentryfmt
{ }{\glssentencecase
{ }}
\MFUsentencecase
to perform the case-change, which is expandable.\glsxtrfmt
or \glsxtrentryfmt
explicitly in the document text, you can, of course, enter the appropriate case in directly. The purpose of providing the sentence case commands is to enable a mapping to be setup with \MFUaddmap
in the event that \glsxtrfmt
or \glsxtrentryfmt
occur at the start of content, such as another entry’s description, that will have sentence case automatically applied. This will require mfirstuc v2.08+ to support the mapping. See the mfirstuc manual for further details.5.13. Comma-Separated Lists
\glsxtrapptocsvfield
) or for testing if field values are contained within comma-separated lists.\glsseeformat
, which adds the see prefix.) It may also be used for any comma-separated list of entry labels. Note that the argument isn’t expanded. If expansion is required, use:
This fully expands its argument and passes the result to \glsseelist
. With just the base glossaries package, each item is encapsulated with \glsseeitem
. The glossaries-extra package redefines \glsseelist
to make it more flexible and provides additional commands to further customize the formatting.\glsseelist
(see below). If the list is empty, nothing is displayed. The is inserted before the current item in the list to form the entry label.\glsentryname
or \glsentrytext
in this command. The glossaries-extra package redefines this so that it does:
Note that the use of \ifglshasshort
{ }{\glsfmttext
{ }}
{\glsfmtname
{ }}
\glsfmttext
rather than \glsentrytext
allows the abbreviation style to be used.\glsseelist
will be encapsulated with:
but can be redefined, for example to convert the first character to uppercase if sentence case is required.\glsseeitem
{ }\mglsseefirstitem
will be used instead (see §7.12). Similarly, \mglsseeitem
will be used instead of \glsseeitem
for a multi-entry label.
(\space
\andname
\space
\andname
is provided by glossaries, if not already defined, and simply expands to \&
but it may be defined to expand to something else by another package before glossaries is loaded.)\glsseelastsep
but may be redefined to include a comma, if preferred. for each element of the list. This command uses { }
\glsxtrifhasfield
so the complete list can be obtained with \glscurrentfieldvalue
. Does nothing if the field hasn’t been set or the entry hasn’t been defined. The unstarred version adds implicit grouping. The starred version doesn’t.\@for
, use the unstarred version to localise the break. This command is simply set to \@endfortrue
, which is provided by the xfor package.\DTLformatlist
. This command uses \glsxtrifhasfield
so the complete list can be obtained with \glscurrentfieldvalue
. This adds implicit grouping. There is no starred version.\glsseelist
(which specifically requires a list of labels) and \glsxtrfieldformatcsvlist
(which formats an arbitrary list):
There’s no indexing in this document so I’ve used autoseeindex=false to avoid an error. This means there’s no cross-reference list in the glossary but, as demonstrated, the “see” list can be reproduced in the document. The result is:
This first constructs a comma-separated list in a custom internal field with the label \usepackage
[colorlinks]{hyperref}
\usepackage
[autoseeindex=false]{glossaries-extra}
\newglossaryentry
{example}{name={example},description={},
see={another1,another2}}
\newglossaryentry
{another1}{name={another one},description={}}
\newglossaryentry
{another2}{name={another two},description={}}
\begin{document}
\glsxtrapptocsvfield
{example}{animals}{duck}
\glsxtrapptocsvfield
{example}{animals}{albatross}
\glsxtrapptocsvfield
{example}{animals}{arara}
Animal list: \glsxtrfieldformatcsvlist
{example}{animals}
See list: \glsxtrifhasfield
{see}{example}
{\glsxtrseelist
{\glscurrentfieldvalue
}}{not set}.
\printunsrtglossaries
\end{document}
animals
. There’s no associated key that can be used in \newglossaryentry
. In this case, the field could simply be set in one command. For example:
The main reason for providing \glsxtrdeffield
{example}{animals}{duck,albatross,arara}
\glsxtrapptocsvfield
is for the benefit of bib2gls, as it sometimes has to construct a field value list while it’s writing the glstex file, but there may be other uses in complex documents that construct field values through some custom function.\DTLifinlist
provided by datatool-base) or if the value isn’t in the list or if the field hasn’t been set or the entry hasn’t been defined. The unstarred version adds implicit grouping. The starred version doesn’t. \glsxtrifhasfield
, so take care if it’s nested. Within , you can test if \glscurrentfieldvalue
is empty or undefined. If it’s defined but not empty, then the field has been set but doesn’t contain .\glsxtrifhasfield
, so you can test \glscurrentfieldvalue
in to determine whether or not the field has been set.\GlsXtrIfValueInFieldCsvList
but fully expands first.5.14. List Fields
\glsxtrfieldlistadd
, described in §3.5. The commands listed below provide an easy interface to iterate over the field values. See the etoolbox documentation for further details about internal lists.\DTLformatlist
. This internally uses etoolbox’s \forlistcsloop
with the same handler macro as used with \DTLformatlist
.\dolistcsloop
, which uses the command \do
as the handler.\forlistcsloop
, which uses the as the handler.\ifinlistcs
to test if is in the list.\xifinlistcs
to test if is in the list.5.15. Field Conditionals
\glsxtrifhasfield
there is no grouping or starred version and no assignment of \glscurrentfieldvalue
. This is simply a shortcut that internally uses etoolbox’s \ifcsundef
. The base glossaries package provides a similar command \ifglsfieldvoid
, which uses etoolbox’s \ifcsvoid
instead.\ifglshasfield
but doesn’t produce a warning if the entry or field doesn’t exist. \glscurrentfieldvalue
to the field value. If this is defined and not empty, is done otherwise is done. You can test \glscurrentfieldvalue
within to find out whether it’s undefined or empty using etoolbox’s commands, such as \ifundef
or \ifdefempty
.\glsxtrifhasfield
(the starred or unstarred version, to match the starred or unstarred version of \GlsXtrIfFieldEqStr
) and tests if \glscurrentfieldvalue
is equal to ( is =
), less than ( is <
) or greater than ( is >
) the given number . If the field is empty or undefined, \glscurrentfieldvalue
will be set to 0
. Remember that the unstarred version adds implicit grouping.\GlsXtrIfFieldCmpNum
with set to =
. The unstarred version adds implicit grouping.\GlsXtrIfFieldCmpNum
with set to =
and the final two arguments swapped. (So it’s true if the field value is not zero.) The unstarred version adds implicit grouping.\glsxtrifhasfield
(the starred or unstarred version, to match the starred or unstarred version of \GlsXtrIfFieldEqStr
) and tests if \glscurrentfieldvalue
is equal to . Remember that the unstarred version adds implicit grouping.\GlsXtrIfFieldEqStr
but expands the string before the comparison. This also has an starred version that doesn’t add implicit grouping.\GlsXtrIfFieldEqStr
but expands both the field value and the string before the comparison. This also has an starred version that doesn’t add implicit grouping.6. Counting References
\glsunset
is used (\glsreset
resets the count unless \glsresetcurrcountfalse
and is best avoided). This is provided by the base glossaries package and is intended for documents where the term should be displayed differently if it’s only been used a certain number of times. The information has to be written to the aux file so that it’s available on the next LaTeX run.\gls
-like commands and is inappropriate with bib2gls.\gls
-like or \glstext
-like commands are used. Unlike the other two methods, this just provides a running total rather than the total from the previous LaTeX run. This method is intended to make it more convenient to work with hooks like \glslinkcheckfirsthyperhook
, \glslinkpostsetkeys
or \glslinkpresetkeys
. See §6.2 for further details.
6.1. Entry Counting (First Use Flag)
\glsenableentrycount
. This keeps a count of the number of times an entry is marked as used, which is done by hooking into the unset and reset commands (see §5.10). The current running total can be obtained with \glsentrycurrcount
. The total from the end of the previous LaTeX run can be obtained with \glsentryprevcount
.\glstext
-like commands into account. \glsenableentrycount
to allow for the entrycount attribute. This means that you not only need to enable entry counting with \glsenableentrycount
, but you also need to set the entrycount attribute (see below).\cgls
, are only available when entry counting has been activated with \glsenableentrycount
. Whereas with glossaries-extra, those commands are always available but behave in the same way as the corresponding \gls
-like commands if entry counting hasn’t been activated. The commands provided by the shortcuts options, such as \ac
are defined to use \cgls
instead of \gls
etc so you can use them either with or without entry counting.\glsenableentrycount
but also need to specify the trigger value.
If you want to have different trigger values for different categories, you can set the entrycount attribute afterwards for the other category. For example: \glsenableentrycount
; \gls
-like commands to do the equivalent \cgls
commands (so you don’t need to keep track of which entries have entry counting enabled);
If you use \GlsXtrEnableEntryCounting
{abbreviation,acronym}{1}
\glssetcategoryattribute
{general}{2}
\GlsXtrEnableEntryCounting
multiple times, the repeated instances will simply set the entrycount attribute for the listed categories. So the above can also be written as: \GlsXtrEnableEntryCounting
{abbreviation,acronym}{1}
\GlsXtrEnableEntryCounting
{general}{2}
\cgls
behave like the corresponding \gls
-like command if the entry count at the end of the previous run was more than a trigger value. With just the base glossaries package, this trigger value is 1. With glossaries-extra you can specify a different value.\gls
-like commands, the \cgls
set of commands may also be used with the star (*
) or plus (+
) modifiers or the modifier given by \GlsXtrSetAltModifier
.\cgls
will use \cglsformat
. The complete set of commands are: \gls
otherwise it uses:
This is redefined by glossaries-extra to test whether or not the entry has the regular attribute set or is an abbreviation:
This show the first use value if the entry is regular otherwise it will show the long form. The insert is appended at the end.\renewcommand
*{\cglsformat
}[2]{%
\glsifregular
{#1}{\glsentryfirst
{#1}}%
{\ifglshaslong
{#1}{\glsentrylong
{#1}}{\glsentryfirst
{#1}}}#2%
}
\glspl
otherwise it uses:
This is like \cglsformat
but uses the plural commands.\Gls
otherwise it uses:
This is like \cglsformat
but uses the sentence case commands.\Glspl
otherwise it uses:
This is like \cglsformat
but uses the plural sentence case commands.\GLS
otherwise it uses:
This simply uses \cglsformat
converted to uppercase.\GLSpl
otherwise it uses:
This simply uses \cglsplformat
converted to uppercase.
If the document is saved in a file called myDoc.tex then the build process is: \usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\makeglossaries
\GlsXtrEnableEntryCounting
{abbreviation}{1}
\newabbreviation
{css}{CSS}{cascading style sheet}
\newabbreviation
{html}{HTML}{hypertext markup language}
\newglossaryentry
{sample}{name={sample},description={an example}}
\begin{document}
First use: \gls
{css}, \gls
{html} and \gls
{sample}.
Next use: \gls
{html}.
\printglossaries
\end{document}
pdflatex myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
Note the second LaTeX call before makeglossaries. The result is shown below:
Note that the CSS entry only shows the long form, doesn’t appear in the glossary and doesn’t have a hyperlink. This is because the total count from the previous LaTeX run doesn’t exceed the value (1, in this case) that triggers the normal behaviour of \gls
. The HTML entry has a total count of 2 from the previous LaTeX run, so it’s displayed as normal with the full form on first use and has a hyperlink to its entry in the glossary.\glsenableentrycount
) and unit entry counting (\glsenableentryunitcount
).
If you use \glsenableentryunitcount
; \gls
-like commands to do the equivalent \cgls
commands (so you don’t need to keep track of which entries have entry counting enabled); \GlsXtrEnableEntryUnitCounting
multiple times, the repeated instances will simply set the entrycount and unitcount attributes for the listed categories.\the
needs to be expandable. Since hyperref also has a similar requirement and provides \the
as an expandable alternative, glossaries-extra will use \the
if it exists otherwise it will use \the
.\glsentrycurrcount
and \glsentryprevcount
have different definitions with unit entry counting and will expand to the total for the current unit. The overall totals can be obtained with additional commands:
As before, if the document is in a file called myDoc.tex then the build process is: \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\GlsXtrEnableEntryUnitCounting
{abbreviation}{2}{section}
\makeglossaries
% category={abbreviation}:
\newabbreviation
{html}{HTML}{hypertext markup language}
\newabbreviation
{css}{CSS}{cascading style sheet}
% category={general}:
\newglossaryentry
{sample}{name={sample},description={sample}}
\begin{document}
\section
{Sample}
Used once: \gls
{html}.
Used three times: \gls
{css} and \gls
{css} and \gls
{css}.
Used once: \gls
{sample}.
\section
{Another Sample}
Used once: \gls
{css}.
Used twice: \gls
{html} and \gls
{html}.
\printglossaries
\end{document}
pdflatex myDoc
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
The result is:
In this document, the CSS entry is used three times in the first section. This is more than the trigger value of 2, so
is expanded on first use with the short form used on subsequent use, and the CSS entries in that section are added to the glossary. In the second section, the CSS entry is only used once, which trips the suppression trigger, so in that section, the long form is used and \gls
{css}
doesn’t get a line added to the glossary file.\gls
{css}\GlsXtrEnableEntryUnitCounting
.\gls
by modifying the \glslinkcheckfirsthyperhook
which is used at the end of the macro the determines whether or not to suppress the hyperlink.
This only produces a hyperlink for the first instance of \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\makeglossaries
\GlsXtrEnableEntryUnitCounting
{general}{0}{page}
\newglossaryentry
{sample}{name={sample},description={an example}}
\renewcommand
*{\glslinkcheckfirsthyperhook
}{%
\ifnum
\glsentrycurrcount
\glslabel
>0
\setupglslink
{hyper=false}%
\fi
}
\begin{document}
A \gls
{sample} entry. Next use: \gls
{sample}.
\newpage
Next page: \gls
{sample}. Again: \gls
{sample}.
\printglossaries
\end{document}
on each page.
\gls
{sample}\gls
occurs at the top of the page within a paragraph that started on the previous page, then the count will continue from the previous page.6.2. Link Counting
\gls
-like or \glstext
-like commands are used. (The “link” in this method’s name refers to the use of the internal command \@gls@link
not to \hyperlink
although \@gls@link
may use \hyperlink
when displaying the link text.)\gls
-like and \glstext
-like commands will increment the associated counter using
by default but if you need \stepcounter
{ }\refstepcounter
instead, just redefine this command: \renewcommand
*{\glsxtrinclinkcounter
}[1]{\refstepcounter
{#1}}
\the
) using \the
) using etoolbox: \csdef
{the\GlsXtrLinkCounterName
{duck}}%
{\Roman
{\GlsXtrLinkCounterName
{duck}}}
\GlsXtrTheLinkCounter
. For example:
In both cases, the redefinition should be implemented after \renewcommand
*{\GlsXtrTheLinkCounter
}[1]{%
\GlsXtrIfLinkCounterDef
{#1}%
{\Roman
{\GlsXtrLinkCounterName
{#1}}}%
{0}%
}
\GlsXtrEnableLinkCounting
.\glslinkpresetkeys
(which is used by both \gls
and \glstext
) instead of \glslinkcheckfirsthyperhook
(which is used by \gls
but not by \glstext
).
The use of \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
{glossaries-extra}
\makeglossaries
\renewcommand
*{\glslinkpresetkeys
}{%
\ifnum
\GlsXtrLinkCounterValue
{\glslabel
}>1
\setupglslink
{hyper=false}%
\fi
}
\GlsXtrEnableLinkCounting
{general}
\newglossaryentry
{sample1}{name={sample1},description={an example}}
\newglossaryentry
{sample2}{name={sample2},description={another example}}
\newabbreviation
{ex}{ex}{example}
\begin{document}
\section
{Sample Section}
\Gls
{sample1}, \gls
{sample2} and \gls
{ex}.
\Glstext
{sample1} and \gls
{ex} again.
\section
{Another Sample Section}
\Gls
{sample1}, \gls
{sample2} and \gls
{ex}.
\printglossaries
\end{document}
\glslinkpresetkeys
means that the options can override this. For example
(or simply \gls
[hyper=true]{sample1}
) will override the hyper=false setting in \gls
+{sample1}\glslinkpresetkeys
. If \glslinkpostsetkeys
is used instead, the hyper=false setting will override the setting provided in the optional argument. The resulting document is shown below:
\GlsXtrEnableLinkCounting
). This means that \GlsXtrLinkCounterValue
always expands to 0 for the abbreviation (ex
), so the inequality test:
will always be false. This means that the abbreviation won’t have hyper=false applied. If the test is changed to \ifnum
\GlsXtrLinkCounterValue
{\glslabel
}>1
Then the abbreviation will always have hyper=false applied.\ifnum
\GlsXtrLinkCounterValue
{\glslabel
}=1
\else
\setupglslink
{hyper=false}%
\fi
\GlsXtrEnableLinkCounting
[section]{general}
7. Multi (or Compound) Entries
The result is: \documentclass
{article}
\usepackage
{glossaries-extra}
\setabbreviationstyle
{long-only-short-only}
\newabbreviation
{cbot}{C. botulinum}{Clostridium botulinum}
\newabbreviation
{cperf}{C. perfringens}{Clostridium perfringens}
\begin{document}
\gls
{cbot}, \gls
{cbot}, \gls
{cperf}.
\end{document}
\documentclass
{article}
\usepackage
{glossaries-extra}
\setabbreviationstyle
{long-only-short-only}
\newabbreviation
{clostridium}{C.}{Clostridium}
\newglossaryentry
{botulinum}{name={botulinum},description={}}
\newglossaryentry
{perfringens}{name={perfringens},description={}}
\begin{document}
\gls
{clostridium} \gls
{botulinum},
\gls
{clostridium} \gls
{botulinum},
\gls
{clostridium} \gls
{perfringens}.
\end{document}
These commands must come after the \multiglossaryentry
{cbot}{clostridium,botulinum}
\multiglossaryentry
{cperf}{clostridium,perfringens}
clostridium
, botulinum
and perfringens
definitions.
for each item in the (with separators, see §7.4). If the final optional argument is provided, it will be applied to the final (non-skipped) element in the list. So the document body in the above example, can be rewritten as: \gls
{ }\mgls
{cbot}, \mgls
{cbot}, \mgls
{cperf}.
\mgls
listed in §7.11. The available are listed in §7.10. They are applied after the \multiglossaryentry
options and will override settings for the individual entries.\gls
as this label represents a set of entry labels not a single entry. \multiglossaryentry
command will generate an error if the label has already been defined as a multi-entry.\multiglossaryentry
. Notes and associated commands applying to \multiglossaryentry
also apply to \providemultiglossaryentry
unless otherwise stated.\multiglossaryentry
may be placed anywhere after the entries listed in have been defined. A multi-entry label can’t be referenced (with commands like \mgls
) before it has been defined. \mglsSetMain
won’t be carried over to the next run.\multiglossaryentry
will be localised to the current scope. If you want to globally define a multi-entry you need to first switch on global definitions with: \multiglossaryentry
doesn’t make any adjustments to the component entries. You will need to use the parent key when you define the entries if you want a hierarchical structure in your glossary. (See the example in §7.1.1.)\newignoredglossary
{common}
\newabbreviation
[type={common}]{clostridium}{C.}{Clostridium}
\gls
since the label refers to a set of entry labels not to an individual entry. Similarly, an individual entry label can’t be used in commands like \mgls
. It is possible (although potentially confusing) to use the same label for a multi-entry as for an individual entry (see the example in §7.1.6). Context will determine which is meant, except in the case of the cross-referencing fields (see, seealso and alias) where the cross-referenced label will first be tested if it’s a known multi-entry label.\mgls
-like command to use if has been defined as a multi-entry and is the \gls
-like or \glstext
-like command to use otherwise. The may be omitted, otherwise it’s the modifier that may be used with \mgls
or \gls
(asterisk *
, plus +
or the token identified with \GlsXtrSetAltModifier
). The modifier and remaining options are passed to the relevant command ( or ).\newcommand
{\ac
}{\GlsXtrMglsOrGls
{\mgls
}{\gls
}}
\newcommand
{\acp
}{\GlsXtrMglsOrGls
{\mglsmainpl
}{\glspl
}}
\newcommand
{\Ac
}{\GlsXtrMglsOrGls
{\Mgls
}{\Gls
}}
\newcommand
{\Acp
}{\GlsXtrMglsOrGls
{\Mglsmainpl
}{\Glspl
}}
7.1. Examples
7.1.1. Example: Hierarchical
This suppresses the indexing of the non-main elements (in this case, the genus). However the genus is included in the glossary (without a location list) because it’s the parent of the species (which are indexed).
\documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
[stylemods=bookindex,style=bookindex]{glossaries-extra}
\makeglossaries
\newcommand
{\latinname
}[1]{\emph
{#1}}
\glssetcategoriesattributes
{genus,species}{textformat,glossnamefont}{latinname}
\setabbreviationstyle
[genus]{long-only-short-only-desc}
\newabbreviation
[category={genus},description={}]
{clostridium}{C.}{Clostridium}
\newglossaryentry
{botulinum}{name={botulinum},category={species},
description={},parent={clostridium}}
\newglossaryentry
{perfringens}{name={perfringens},
category={species},description={},parent={clostridium}}
\newglossaryentry
{tetani}{name={tetani},category={species},
description={},parent={clostridium}}
\multiglossaryentry
{cbot}{clostridium,botulinum}
\multiglossaryentry
{cperf}{clostridium,perfringens}
\multiglossaryentry
{ctet}{clostridium,tetani}
\multiglossaryentrysetup
{indexothers=false,hyper=allmain}
\begin{document}
First use: \mgls
{cbot}, \mgls
{cperf}, \mgls
{ctet}.
Next use: \mgls
{cbot}, \mgls
{cperf}, \mgls
{ctet}.
\printglossaries
\end{document}
\mgls
a hyperlink to the main entry in the glossary.7.1.2. Example: Suffix
The rest of the document is as in §7.1.1.
\multiglossaryentry
[firstsuffix=botulism]{cbot}{clostridium,botulinum}
\multiglossaryentry
[firstsuffix=gas gangrene]{cperf}{clostridium,perfringens}
\multiglossaryentry
[firstsuffix=tetanus]{ctet}{clostridium,tetani}
7.1.3. Example: Category Suffix
The result is the same as the previous example.
\newglossaryentry
{botulinum}{name={botulinum},category={species},
user1={botulism},
description={},parent={clostridium}}
\newglossaryentry
{perfringens}{name={perfringens},category={species},
user1={gas gangrene},
description={},parent={clostridium}}
\newglossaryentry
{tetani}{name={tetani},category={species},
user1={tetanus},
description={},parent={clostridium}}
\mglsdefcategorysuffix
{bacteria}{%
\mglsisfirstuse
{\glsxtrifhasfield
{useri}{\mglslastelementlabel
}{ (\glscurrentfieldvalue
)}}%
{}%
}
\multiglossaryentry
[category=bacteria]{cbot}{clostridium,botulinum}
\multiglossaryentry
[category=bacteria]{cperf}{clostridium,perfringens}
\multiglossaryentry
[category=bacteria]{ctet}{clostridium,tetani}
7.1.4. Example: Separators
\relax
) if both the genus and species are abbreviated, or to use a non-breaking space (~
) between the genus short form (shown on subsequent use) and the species long form (shown on first use). If the genus is showing the long form (first use) then a normal space is used.
This will cause a double dot at the end of the second sentence, which can be suppressed using the discardperiod and retainfirstuseperiod attributes. \glssetcategoryattribute
{genus}{combinedfirstsepfirst}{\space
}
\glssetcategoryattribute
{genus}{combinedfirstsep}{\space
}
\glssetcategoryattribute
{genus}{combinedsepfirst}{~
}
\glssetcategoryattribute
{genus}{combinedsep}{\relax
}
\setabbreviationstyle
[species]{long-only-short-only-desc}
\newabbreviation
[category={species},
description={},parent={clostridium}]{botulinum}{bot.}{botulinum}
\newabbreviation
[category={species},
description={},parent={clostridium}]{perfringens}{per.}{perfringens}
\newabbreviation
[category={species},
description={},parent={clostridium}]{tetani}{tet.}{tetani}
This works because the final element’s post-link hook is transferred to the multi-entry post-link hook, which can detect the sentence terminating period. If the post-link hook settings are changed, for example, to \glssetcategoriesattributes
{species}{discardperiod,retainfirstuseperiod}{true}
postlinks=all,mpostlink=false
then the feature won’t work as the final element’s post-link hook can’t detect the period (because \gls
is embedded too deeply inside the internal workings of \mgls
).
7.1.5. Example: Skipping Elements (Fragment Element)
\documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
[stylemods,style=long]{glossaries-extra}
\makeglossaries
\setabbreviationstyle
{long-short-sc}
\newabbreviation
{ssi}{ssi}{server-side includes}
\newabbreviation
{html}{html}{hypertext markup language}
\setabbreviationstyle
[combinedabbrv]{long-only-short-sc-only}
\newabbreviation
[category={combinedabbrv},
description={\glsxtrshort
{ssi} enabled \glsxtrshort
{html}}]
{shtml-frag}{shtml}{enabled}
\glssetcategoryattribute
{combinedabbrv}{multioptions}
{usedskipothers=,firstsuffix={\glsxtrshort
{\mglslastmainlabel
}}}
\multiglossaryentry
[category=combinedabbrv]
{shtml}[shtml-frag]{ssi,shtml-frag,html}
\begin{document}
Individual elements first use: \gls
{ssi} and \gls
html.
Individual elements next use: \gls
{ssi} and \gls
{html}.
Multi-entry first use: \mgls
{shtml}.
Multi-entry next use: \mgls
{shtml}.
Resetting all\glsresetall
\mglsreset
{shtml}:
Multi-entry first use: \mgls
{shtml}.
Multi-entry next use: \mgls
{shtml}.
Individual elements: \gls
{ssi} and \gls
{html}.
\printglossaries
\end{document}
\glsps
at the end of §5.4 is that the individual elements hyperlink to their respective entries in the glossary on first use of \mgls
.\mgls
is used before the individual elements are used, which leads to their full expansion with a confusing amount of parentheses. A simple solution is to use the option mglsopts=unsetothers, which will unset the other (not-main) elements first. This can be localised with presetlocal but \gls
will then unset the first use flag globally, which means that the other elements won’t show the full form when they are first used on their on after \mgls
. This can be switched to a local unset with others=local.\glssetcategoryattribute
{combinedabbrv}{multioptions}
{%
hyper=notmainfirst,
mglsopts=presetlocal,unsetothers,others=local,
usedskipothers,
firstsuffix=\glsxtrshort
{\mglslastmainlabel
}
}
\glsxtrlong
. The next example provides an alternative approach.7.1.6. Example: Skipping Elements (Prefix and Post-Link Hooks)
references the multi-entry label and \mgls
{shtml}
references the individual entry.)\gls
{shtml}\newrobustcmd
{\combinedpre
}[1]{\glsps
{#1}}
\newrobustcmd
{\combinedpost
}[1]{\glsps
{#1}}
\newabbreviation
{shtml}{shtml}
{{}\combinedpre
{ssi} enabled \combinedpost
{html}}
. Note that it is necessary to define the custom commands robustly otherwise they will need to be protected against premature expansion: \glsxtrshort
{shtml}
In both cases, an initial empty group is added to guard against any sentence case commands, such as \newcommand
{\combinedpre
}[1]{\glsps
{#1}}
\newcommand
{\combinedpost
}[1]{\glsps
{#1}}
\newabbreviation
{shtml}{shtml}
{{}\protect
\combinedpre
{ssi} enabled \protect
\combinedpost
{html}}
\Glsxtrlong
.\gls
post-link hook for the main element can be transferred to the \mgls
post-link using: mpostlinkelement=main
All elements have their individual post-link hooks suppressed by default. As in the previous example, the other elements can be skipped on subsequent use: usedskipothers
\mgls
, the nested content needs to be suppressed, which can be done by redefining the custom commands. This can be done in the multi-entry prefix. Since the entire content of \mgls
(except for the final multi-entry post-link hook) occurs inside a group, this redefinition will be localised.
This now produces:
Note the last two paragraphs, which highlights what happens if \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
[stylemods,style=long]{glossaries-extra}
\makeglossaries
\setabbreviationstyle
{long-postshort-sc-user}
\newabbreviation
{ssi}{ssi}{server-side includes}
\newabbreviation
{html}{html}{hypertext markup language}
\newrobustcmd
{\combinedpre
}[1]{\glsps
{#1}}
\newrobustcmd
{\combinedpost
}[1]{\glsps
{#1}}
\newabbreviation
{shtml}{shtml}
{{}\combinedpre
{ssi} enabled \combinedpost
{html}}
\glssetcategoryattribute
{combinedabbrv}{multioptions}
{%
mpostlinkelement=main,
usedskipothers
}
\multiglossaryentry
[category=combinedabbrv]
{shtml}[shtml]{ssi,shtml,html}
\mglsdefcategoryprefix
{combinedabbrv}{%
\renewcommand
{\combinedpre
}[1]{\ignorespaces
}%
\renewcommand
{\combinedpost
}[1]{\unskip
}%
}
\begin{document}
Individual elements first use: \gls
{ssi} and \gls
{html}.
Individual elements next use: \gls
{ssi} and \gls
{html}.
Multi-entry first use: \mgls
{shtml}.
Multi-entry next use: \mgls
{shtml}.
Individual entry first use: \gls
{shtml}.
Resetting all\glsresetall
\mglsresetall
:
Multi-entry first use: \mgls
{shtml}.
Multi-entry next use: \mgls
{shtml}.
Individual elements: \gls
{ssi} and \gls
{html}.
Resetting all\glsresetall
\mglsresetall
:
Individual entry first use: \gls
{shtml}.
Multi-entry first use: \mgls
{shtml}. (Wrong!)
\printglossaries
\end{document}
is used before \gls
{shtml}
when neither of the other elements (\mgls
{shtml}ssi
and html
) have been used. The final instance of \mgls
has produced the wrong result. This is because it’s the first use of the multi-entry shtml
but not the first use of the individual entry shtml
.\mglsdefcategoryprefix
{combinedabbrv}{%
\renewcommand
{\combinedpre
}[1]{\ignorespaces
}%
\renewcommand
{\combinedpost
}[1]{\unskip
}%
\mglsisfirstuse
{\glslocalreset
{\mglscurrentmainlabel
}}%
{\glslocalunset
{\mglscurrentmainlabel
}}%
}
will show as: \mgls
{shtml}hyper=notmainfirst
(as in the previous example), and adjusting the abbreviation style so that the parenthetical content in the post-link hook has a hyperlink: \renewcommand
*{\glsxtruserparen
}[2]{%
\glsxtrfullsep
{#2}%
\glsxtrparen
{\glshyperlink
[#1]{#2}%
\ifglshasfield
{\glsxtruserfield
}{#2}{, \glscurrentfieldvalue
}{}%
}%
}
may come before the first use of the other elements. For example: \mgls
{shtml}Multi-entry first use:
This leads to: \mgls
{shtml}.
Individual elements: \gls
ssi and \gls
{html}.
With the above setting, the following: \glssetcategoryattribute
{combinedabbrv}{multioptions}
{%
hyper=notmainfirst,
mpostlinkelement=main,
usedskipothers=,
mglsopts=others=local
}
will now produce: \glsresetall
\mglsresetall
Multi-entry first use: \mgls
{shtml}.
Multi-entry next use: \mgls
{shtml}.
Individual elements: \gls
{ssi} and \gls
{html}.
7.2. Main and Other Elements
\multiglossaryentry
consists of a main element and all the other elements. If the main element isn’t identified in the optional argument, it’s assumed to be the final element in the list.\mgls
to be a single hyperlink. You can also use the settings described in §7.9 to only index the main element.\mglsSetMain
The new main label provided in the second argument must be in the list corresponding to . This change is locally applied to the current scope. Note that if you are using bib2gls, this change in the document can’t be detected.\mglsmainpl
. For example:
In the above, two multi-entries are defined: \newglossaryentry
{great}{name={great},description={}}
\newglossaryentry
{little}{name={little},description={}}
\newglossaryentry
{grebe}{name={grebe},description={}}
\multiglossaryentry
{greatgrebe}{great,grebe}
\multiglossaryentry
{littlegrebe}{little,grebe}
greatgrebe
and littlegrebe
. In both cases the main element is grebe
(the last element). Using \mglspl
will show the plural for all elements, but using \mglsmainpl
will only use the plural for the main element (grebe). For example: Plural all:
produces: \mglspl
{greatgrebe}, \mglspl
{littlegrebe}.
Plural main: \mglsmainpl
{greatgrebe}, \mglsmainpl
{littlegrebe}.
7.3. Prefixes and Suffixes
\Mgls
. If you want a prefix to obey case-changing, use the \mpgls
-like commands instead (§7.11.4).
This will insert the current prefix unless there is prefix command associated with the current category.\newcommand
*{\mglsprefix
}{%
\ifdefempty
\mglscurrentcategory
{\mglscurrentprefix
}%
{%
\mglshascategoryprefix
{\mglscurrentcategory
}%
{\mglsusecategoryprefix
{\mglscurrentcategory
}}%
{\mglscurrentprefix
}%
}%
}
If there is a suffix associated with the current category, that will be used, otherwise if the current suffix isn’t empty this inserts a space followed by the current suffix in parentheses. You can access the label of the last (non-skipped) element with \newcommand
*{\mglssuffix
}{%
\ifdefempty
\mglscurrentcategory
{\ifdefempty
\mglscurrentsuffix
{}{\space
(\mglscurrentsuffix
)}}%
{%
\mglshascategorysuffix
{\mglscurrentcategory
}%
{\mglsusecategorysuffix
{\mglscurrentcategory
}}%
{\ifdefempty
{\mglscurrentsuffix
}{}{\space
(\mglscurrentsuffix
)}}%
}%
}
\mglslastelementlabel
.\mglscurrentprefix
within .\mglscurrentsuffix
within .\mglsprefix
tests if there is a category prefix using: \mglssuffix
tests if there is a category suffix using: \mglscurrentprefix
and \mglscurrentsuffix
are obtained as follows:
\Mgls
or \MGLS
.
On first use, this produces (assuming the “clostridum” element hasn’t been used previously): \setabbreviationstyle
{long-only-short-only}
\newabbreviation
{clostridium}{C.}{Clostridium}
\newglossaryentry
{botulinum}{name={botulinum},description={}}
\multiglossaryentry
[firstsuffix=botulism]
{cbot}{clostridium,botulinum}
7.4. Separators
\gls
are given by the following commands, which all take two arguments. The first argument is the label of the previous element. The second argument is the label of the following element.
This will use the combinedsep attribute for the ’s category, if set. Otherwise this just does a space. Note that this ignores the second argument.\newcommand
*{\glscombinedsep
}[2]{%
\glshasattribute
{#1}{combinedsep}%
{\glsgetattribute
{#1}{combinedsep}}%
{ }}
This will use the combinedfirstsep attribute for ’s category, if set. If that attribute isn’t set, \newcommand
*{\glscombinedfirstsep
}[2]{%
\glshasattribute
{#1}{combinedfirstsep}%
{\glsgetattribute
{#1}{combinedfirstsep}}%
{\glscombinedsep
{#1}{#2}}%
}
\glscombinedsep
is used.
This will use the combinedsepfirst attribute for ’s category, if set. If that attribute isn’t set, \newcommand
*{\glscombinedsepfirst
}[2]{%
\glshasattribute
{#1}{combinedsepfirst}%
{\glsgetattribute
{#1}{combinedsepfirst}}%
{\glscombinedsep
{#1}{#2}}%
}
\glscombinedsep
is used.
This will use the combinedfirstsepfirst attribute for ’s category, if set. If that attribute isn’t set, \newcommand
*{\glscombinedfirstsepfirst
}[2]{%
\glshasattribute
{#1}{combinedfirstsepfirst}%
{\glsgetattribute
{#1}{combinedfirstsepfirst}}%
{\glscombinedsep
{#1}{#2}}%
}
\glscombinedsep
is used.\renewcommand
*{\glscombinedfirstsepfirst
}[2]{%
\ifglshasshort
{#1}{\ifglshasshort
{#2}{}{\space
}}{\space
}%
}
This uses a non-breaking space (\renewcommand
*{\glscombinedsep
}[2]{%
\glshasattribute
{#1}{combinedsep}%
{\glsgetattribute
{#1}{combinedsep}}%
{\ifglshasshort
{#1}{~
}{ }}%
}%
\renewcommand
*{\glscombinedsepfirst
}[2]{%
\glshasattribute
{#1}{combinedsepfirst}%
{\glsgetattribute
{#1}{combinedsepfirst}}%
{\ifglshasshort
{#1}{~
}{ }}%
}%
\renewcommand
*{\glscombinedfirstsep
}[2]{%
\glshasattribute
{#1}{combinedfirstsep}%
{\glsgetattribute
{#1}{combinedfirstsep}}%
{ }%
}%
\renewcommand
*{\glscombinedfirstsepfirst
}[2]{%
\glshasattribute
{#1}{combinedfirstsepfirst}%
{\glsgetattribute
{#1}{combinedfirstsepfirst}}%
{ }%
}
~
) following an abbreviation (that has already been marked as used). Note that if the associated attributes are set the commands will behave according to the attribute.
This does nothing if either element are abbreviations that have already been used. Note that if the associated attributes are set the commands will behave according to the attribute.\renewcommand
*{\glscombinedsep
}[2]{%
\glshasattribute
{#1}{combinedsep}%
{\glsgetattribute
{#1}{combinedsep}}%
{\ifglshasshort
{#1}{}{\ifglshasshort
{#2}{}{ }}}%
}%
\renewcommand
*{\glscombinedsepfirst
}[2]{%
\glshasattribute
{#1}{combinedsepfirst}%
{\glsgetattribute
{#1}{combinedsepfirst}}%
{\ifglshasshort
{#1}{}{ }}%
}%
\renewcommand
*{\glscombinedfirstsep
}[2]{%
\glshasattribute
{#1}{combinedfirstsep}%
{\glsgetattribute
{#1}{combinedfirstsep}}%
{\ifglshasshort
{#2}{}{ }}%
}%
\renewcommand
*{\glscombinedfirstsepfirst
}[2]{%
\glshasattribute
{#1}{combinedfirstsepfirst}%
{\glsgetattribute
{#1}{combinedfirstsepfirst}}%
{ }%
}
\mglspl
) or other field references (e.g. \mglsname
). If the associated attributes are set the commands will behave according to the attribute.7.5.
\mgls
Element Hooks\mgls
-like commands use the following hooks: \glspostlinkhook
. If the individual entry post-link hook is enabled (see the postlinks key in §7.9), this will go before \mglselementposthook
.\mgls
-like commands so they can’t be accessed elsewhere (including in the post-link hook, see §7.6). They may be used in the above hooks or in the separator commands (described in §7.4) or in the command used to encapsulate the entire content. They can also be used in the post-link hook (see §5.5) to determine if an entry is being used within a \mgls
-like command.\multiglossaryentrysetup
or those passed to \mgls
(or whichever variant is being used).mgls
or mglspl
).\mglselementprehook
or in hooks used by the underlying \gls
etc commands. For example, if \mglscurrentlabel
is defined then \gls
is being used inside \mgls
.7.6. Post-Link Hook
\mgls
-like commands according to the mpostlink setting (see §7.9). The hook used depends on the mpostlinkelement option. These hooks can’t access the commands described in §7.5 as the hook occurs outside of the scope in which they are defined.postlinks=none,
mpostlink=true, mpostlinkelement=last
will suppress the individual element post-link hooks (\glspostlinkhook
) and do the multi-entry post-link hook for the last element (\mglslastelementpostlinkhook
).postlinks=all, mpostlink=true,
mpostlinkelement=last
), the final element’s post-link hook will be done twice. Similarly for the main element with postlinks=all, mpostlink=true,
mpostlinkelement=main
.\mglssuffix
.7.6.1. Last Element
\glsxtrifwasfirstuse
.) If all elements were skipped or if the multi-entry wasn’t defined, this will do .\glsifplural
.) If all elements were skipped or if the multi-entry wasn’t defined, this will do .\glscapscase
of the last non-skipped element. If all elements were skipped or if the multi-entry wasn’t defined, this will do .7.6.2. Main Element
\mglslastelementlabel
then the main element was the last element.\glsxtrifwasfirstuse
.) If the main element was skipped or if the multi-entry wasn’t defined, this will do .\glsifplural
.) If the main element was skipped or if the multi-entry wasn’t defined, this will do .\glscapscase
of the main element from the multi-entry that was just referenced. If the main element was skipped or if the multi-entry wasn’t defined, this will do .7.7. Multi-Entry First Use
\gls
-like commands, \mgls
unsets this flag. Unlike the \glstext
-like commands, all the commands described in §7.11 (including commands like \mglsname
) unset this flag, even if the elements use commands like \glsname
that don’t unset the entry’s first use flag.7.8. Multi-Entry Category
\mgls
:\multiglossaryentry
or by the setup key in the first optional argument of commands like \mgls
.\glscombinedfirstsep
.\glscombinedfirstsepfirst
.\glscombinedsepfirst
.\glscombinedsep
.\glshasattribute
). If you need to access the current multi-entry’s category within any of the \mgls
-like hooks (§7.5), you can obtain the category with \mglscurrentcategory
and use commands like \glshascategoryattribute
.7.9. Multi-Entry Settings
\multiglossaryentry
.\mgls
-like commands are used, options are applied in the following order:
\multiglossaryentrysetup
;\multiglossaryentry
or setup key;\multiglossaryentry
;\mgls
-like command.
7.9.1. Indexing
false don’t index the main entry; true index the main entry; first only index the main entry if it’s the first use (of the main entry).
false don’t index the other entries; true index the other entries; first only index the other entries if it’s the first use (of the non-main entry).
7.9.2. Location Formats (Encaps)
7.9.3. Post-Link Hooks
none suppress the post-link hook for all elements; all don’t suppress the post-link hook for all elements; notlast only suppress the post-link hook for the last element; mainnotlast suppress the post-link hook for all “other” (not main) elements and for the last element (so only the main element will have its post-link hook as long as it’s not the last element); mainonly suppress the post-link hook for all “other” (not main) elements; othernotlast suppress the post-link hook for the main element and for the last element (so only the other elements will have their post-link hook as long as the element isn’t the last one); otheronly suppress the post-link hook for the main element.
false suppress the multi-entry post-link hook; true enable the multi-entry post-link hook; firstonly enable the multi-entry post-link hook only for the first use of the multi-entry; usedonly enable the multi-entry post-link hook only for the subsequent use of the multi-entry.
last use
\mglslastelementpostlinkhook
(that is, use the post-link hook for the last element); main use \mglslastmainpostlinkhook
(that is, use the post-link hook for the main element); custom use \mglscustompostlinkhook
.
7.9.4. Prefixes and Suffixes
\Mgls
or \MGLS
. If you want a prefix to obey case-changing, use the \mpgls
-like commands instead (see §7.11.4).7.9.5. Skipping Elements
\mglscurrentlabel
, won’t be defined.7.9.6. General
none no hyperlinks; allmain encapsulate the entire content with a single hyperlink to the main entry’s target; mainonly only hyperlink the main entry; individual hyperlink each entry individually; otheronly only hyperlink the other entries; notmainfirst don’t hyperlink the main entry on multi-entry first use; nototherfirst don’t hyperlink the other entries on multi-entry first use; notfirst don’t hyperlink any entries on multi-entry first use.
\mgls
. Note that setup can’t be used within this value.7.10.
\mgls
Options\mgls
(and similar commands) are listed below. Any additional options provided will be appended to the all value. For example:
is equivalent to: \mgls
[counter=chapter]{cbot}
Whereas: \mgls
[all=counter=chapter]{cbot}
is treated as: \mgls
[counter=chapter,all=counter=section]{cbot}
which has the same effect as: \mgls
[all=counter=section,counter=chapter]{cbot}
\mgls
[all=counter=chapter]{cbot}
\gls
which is used internally by \mgls
. Replace this with \glspl
etc as applicable for the variants, such as \mglspl
. \multiglossaryentrysetup
. These options will override any conflicting options that were supplied to \multiglossaryentry
or \multiglossaryentrysetup
. Note that mglsopts can’t be used within this value.\gls
. These options will be passed to each instance of \gls
and will override any conflicting setting in setup.\gls
. These options will be passed to the instance of \gls
used for the main label and will override any conflicting setting in all.\gls
. These options will be passed to each instance of \gls
used for the other (not main) labels and will override any conflicting setting in all.\mgls
to switch off all hyperlinks.
global globally unset the flag; local locally unset the flag; none don’t unset the flag.
\gls
. This option refers to the individual entry’s first use flag not the multi-entry first use flag. (This is similar to passing prereset to each \gls
but it’s also applied to any skipped elements.)\gls
.\gls
.\gls
. This option refers to the individual entry’s first use flag not the multi-entry first use flag. (This is similar to passing preunset to each \gls
but it’s also applied to any skipped elements.)\gls
.\gls
.7.11. Variants of
\mgls
\mgls
. These (including \mgls
itself) are collectively referred to as the \mgls
-like commands. All commands unset the multi-entry first use flag (unless the multiunset=none option is applied). Only those commands that use the \gls
-like commands (such as \gls
or \glspl
) will unset the individual entry’s first use flag.7.11.1.
\gls
-like\glspl
instead of \gls
for each entry.\glspl
instead of \gls
for the main entry and \gls
for all the other entries.\Gls
for the first entry and \gls
for the other entries.\Gls
for all entries.\Glspl
for the first entry and \glspl
for the remaining entries.\Glspl
is used, otherwise \Gls
is used. For the remaining entries, \glspl
will be used if the entry is the main one, otherwise \gls
will be used.\Glspl
for all entries.\Glspl
for the main entry and \Gls
for the other entries.\GLS
for all entries.\GLSpl
instead of \gls
for each entry.\GLSpl
for the main entry and \GLS
for the others.7.11.2. Abbreviations
\glsxtrshort
for any entries that have the short field set and will use \glstext
otherwise.\glsxtrlong
for any entries that have the long field set and will use \glstext
otherwise.\glsxtrfull
for any entries that have the short field set and will use \glsfirst
otherwise.\mglsshort
but sentence case for the first entry.\mglslong
but sentence case for the first entry.\mglsfull
but sentence case for the first entry.7.11.3. Other Fields
\glsname
for each entry.\Glsname
for the first entry and \glsname
for the remaining entries.\Glsname
for each entry.\glssymbol
for each entry if the symbol field has been set, otherwise it uses \gls
.\glssymbol
if the symbol field has been set otherwise it uses \Gls
for each element. (Note that no case change is applied to the symbol as this usually isn’t appropriate.)\MGlssymbol
, but \Gls
is only used for the first element (if it doesn’t have the symbol field set).\mglsfield
exists for an element, \glsdisp
will be used for that element, with the link text obtained from the field value (followed by the ), otherwise \gls
will be used.\mglsusefield
. The default value is useri
, which corresponds to the user1 key.\mglsusefield
but sentence case for the first element.\mglsusefield
but sentence case for each element.\mglselementprehook
to locally redefine \mglsfield
. Examples:
\renewcommand
{\mglselementprehook
}{%
\ifdefstring
{\mglscurrentcategory
}{sample}%
{\renewcommand
{\mglsfield
}{userii}}%
{\renewcommand
{\mglsfield
}{useri}}%
}
\renewcommand
{\mglselementprehook
}{%
\glsifcategory
{\mglscurrentlabel
}{sample}%
{\renewcommand
{\mglsfield
}{userii}}%
{\renewcommand
{\mglsfield
}{useri}}%
}
\renewcommand
{\mglselementprehook
}{%
\glshascategoryattribute
{\mglscurrentcategory
}{mglsfield}%
{\renewcommand
{\mglsfield
}{\glsgetcategoryattribute
{\mglscurrentcategory
}{mglsfield}}}%
{%
\glshasattribute
{\mglscurrentlabel
}{mglsfield}%
{\renewcommand
{\mglsfield
}{\glsgetattribute
{\mglscurrentlabel
}{mglsfield}}}%
{\renewcommand
{\mglsfield
}{useri}}%
}%
}
7.11.4. Support for glossaries-prefix (
\pgls
)\pgls
-like commands provided by that package. (See the glossaries user manual for further details.)\gls
(or analogous case-changing variant) will be used instead and a warning is issued with: \pgls
for the first element and \gls
for the remaining elements.\pglspl
for the first element and \glspl
for the remaining elements.\pgls
or \pglspl
, depending on whether the first element is the main element).\Pgls
for the first element and \gls
for the remaining elements.\Pgls
or \Pglspl
, depending on whether the first element is the main element).\Pgls
for the first element and \Gls
for the remaining elements.\Pglspl
for the first element and \Glspl
for the remaining elements.\Pgls
or \Pglspl
, depending on whether the first element is the main element). All elements are use sentence case.\PGLS
for the first element and \GLS
for the remaining elements.\PGLSpl
for the first element and \GLSpl
for the remaining elements.\PGLS
or \PGLSpl
, depending on whether the first element is the main element).7.12. Cross-References
\mglsseeitem
is:
This switches off indexing, sets the hyperlink to encompass the entire multi-entry content and uses the name field. The default definition of \newcommand
*{\mglsseeitem
}[1]{%
\mglsname
[all=noindex,setup={hyper=allmain}]{#1}%
}
\mglsseefirstitem
is simply \mglsseeitem
.\renewcommand
*{\mglsseeitem
}[1]{%
\mglsshort
[all=noindex,setup={hyper=allmain}]{#1}%
}
In this case \multiglossaryentry
{cbot}{clostridium,botulinum}
\newglossaryentry
{botox}{name={botox},description={},alias={cbot}}
will hyperlink to the \gls
{botox}botulinum
target.7.13. Additional Commands
\@for
(patched by the xfor package, which allows the loop to be broken).\mglsforelements
but skips the main entry label.\multiglossaryentry
command will write the label information to the aux file using: \writemultiglossentry
to do nothing.7.14. bib2gls
@dualentry
).\mgls
-like commands is written to the aux file and so can be picked up by bib2gls (at least version 2.9). The resource option can be used to determine whether or not to consider the other (non-main) elements to be dependent on the main element.\multiglossaryentry
(or \providemultiglossaryentry
) or you can use the @compoundset
entry type in a bib file. Whichever method you use, remember that the entries that form the elements of the set must be defined first. See the bib2gls manual (v2.9+) for further details.\glsxtrmultientryadjustedname
.\glsxtrmultientryadjustedname
.\glsxtrmultientryadjustedname
.\glscombinedfirstsepfirst
.\glsxtrmultientryadjustednamesep
.\makefirstuc
{text} by default. For the title case version, the name is encapsulated with:
This uses \glscapitalisewords
, if defined, or \capitalisewords
otherwise. The all caps version uses:
This uses \mfirstucMakeUppercase
by default.
by default. For the sentence case version (where isn’t empty), then the element label is encapsulated with:
This does \glsentryname
{ }
by default. The title case version uses:
This does \Glsentryname
{ }
by default. The all caps version uses:
This is defined as: \glsentrytitlecase
{ }{name}\newcommand
*{\GLSxtrmultientryadjustednameother
}[1]{%
\mfirstucMakeUppercase
{\glsentryname
{#1}}}
8. Defining and Displaying Glossaries
\print
command. For example, to use the glossary“noidx” method you need \makenoidxglossaries
in the preamble and \printnoidxglossary
in the document. Whereas if you want to use makeindex or xindy, you need \makeglossaries
in the preamble and \printglossary
in the document. The glossaries-extra package provides a hybrid approach: \makeglossaries
. Any non-ignored glossaries that are not listed in should be treated as though \makenoidxglossaries
was used. This means that the glossaries listed in should be displayed using \printglossary
and the other (non-ignored glossaries) should be displayed with \printnoidxglossary
. See sample-mixedsort.tex for an example.\makeglossaries
provided by the base glossaries package. If the optional argument is present, \glsindexingsetting
will be set to makeindex-noidx
or xindy-noidx
, depending on whether makeindex or xindy should be used.\makeglossaries
. This ensures that all the required indexing files are opened. If you’re not using \makeglossaries
, glossaries need to be defined before any entries that should belong to them are defined. \newignoredglossary
to define an ignored glossary that doesn’t have any associated indexing files. This will automatically switch off hyperlinks for any entries assigned to the glossary (since there will be no target). With glossaries-extra, it’s possible to have targets without using the indexing methods provided by the base package. For example, it’s possible to have standalone entries (see §8.5) or targets can be created with \printunsrtglossary
, so glossaries-extra provides a starred version. \printunsrtglossaries
, and can’t be used with \printglossary
or \printnoidxglossary
. If you use an ignored glossary with \printunsrtglossary
, you will need to use the title option to override the default title, if required.\newignoredglossary
but does nothing if the glossary has already been defined.\printunsrtglossary
iterate over. The unstarred version locally adds the label. The starred version performs a global change.\printglossary
or \printnoidxglossary
, the entry will only be indexed for its primary glossary. It won’t show up in the other glossaries, but will be found when using an iterative command, such as \glsaddall
, over the target glossary.\ifglossaryexists
and \doifglossarynoexistsordo
, which are documented in the “Conditionals” section of the glossaries user manual.\forallglossaries
to iterate over a list of glossaries labels (all non-ignored glossaries by default). This can also be used with glossaries-extra but \forallacronyms
is only for glossaries that have been declared as lists of acronyms, so it’s inappropriate with the glossaries-extra package. Instead, you can use the analogous command: \newabbreviation
will add the abbreviation’s associated glossary (identified by the type key) to the internal list of labels (if not already added). Note that this won’t take into account any glossaries that had abbreviations copied or moved to it.8.1. Entry Page Reference
\glsrefentry
, which uses \ref
to reference the entry’s associated counter (enabled with entrycounter or subentrycounter, not the location counter). The glossaries-extra package additionally provides: \pageref
instead of \ref
. As with \glsrefentry
, if the corresponding counter has not been enabled, this just does
.\gls
{ }8.2. Glossary Preamble
\glossarypreamble
, which is used at the start of the glossary. By default, this will use the preamble associated with the current glossary. If you redefine \glossarypreamble
, this will set the preamble for all glossaries. To set the preamble for a particular glossary, you can use \setglossarypreamble
. With glossaries-extra, you can additionally append to an existing preamble using: \glsdefaulttype
is assumed.\glsdefaulttype
is assumed.8.3. Options
\printglossary
, the following options are also provided. Some of these listed here are specific to \printunsrtglossary
and printunsrtglossarywrap. Options provided by the base package that aren’t available for the “unsrt” family of commands are identified below.\printnoidxglossary
. The \printunsrtglossary
and \printunsrtinnerglossary
commands simply iterate over the glossary’s internal list in the order in which the entries have been added to that glossary. If you are using bib2gls, use the sort resource option instead.\printunsrtglossary
and printunsrtglossarywrap but not for \printunsrtinnerglossary
.\printunsrtglossary
and printunsrtglossarywrap but not for \printunsrtinnerglossary
.
). The numberedsection package option will change the default setting to match. This option is not available for \label
{\glsautoprefix
}\printunsrtinnerglossary
.\printunsrtinnerglossary
.
after the section header. This is essentially like numberedsection=nameref but you supply the label. This option is not available for \label
{ }\printunsrtinnerglossary
. Alternatively, you can use:
This will need to be scoped or changed between glossaries or use a command in that expands differently for each glossary to avoid duplicate labels.++
then the current offset is incremented by the given amount otherwise the current offset is set to . For example, an entry with a normal hierarchical level of 1 will be treated as though it has hierarchical level 1+ . Note that the glossary style may not support the resulting hierarchical level. This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. See §8.4.3.1 for an example.\glolinkprefix
to expand to . If hyperlinks are supported and the glossary style uses \glstarget
to create the entry’s hypertarget, the target name is obtained from
. If you are displaying multiple glossaries with shared entries (for example, using the secondary resource option with bib2gls), then changing the prefix can avoid duplicate targets. Alternatively, you can redefine \glolinkprefix
\glstarget
to use \glsxtrtarget
.\gls
-like and \glstext
-like commands. This means that if you have, for example, \gls
in the description of an entry, then its hyperlink will go to that entry’s item in the current glossary. Whereas referencing that entry outside of the glossary will hyperlink to the glossary that uses the prefix matching the setting at that point in the document. For example:
This uses the showtargets package option to show the target names to the left of the hyperlink or hypertarget. The result is:
Within the main part of the document, the first reference to “sample” has a hyperlink to the first glossary (with the target \usepackage
[colorlinks]{hyperref}
\usepackage
[showtargets=annoteleft,style=tree]{glossaries-extra}
\newglossaryentry
{sample}{name={sample},
description={an example description that references \gls
{another}}}
\newglossaryentry
{another}{name={another},
description={some other example description that references \gls
{sample}}}
\begin{document}
Link to glossary 1: \gls
{sample}.
Link to glossary 2: \gls
[prefix=other-]{sample}.
\printunsrtglossary
\printunsrtglossary
[prefix=other-]
\end{document}
glo:sample
, which uses the default prefix), and the second reference has a hyperlink to the second glossary (with the target other-sample
).\gls
references use the current glossary prefix, so the target is in the same glossary.Link to glossary 1:
Then the result will be:
\gls
{sample}.
Link to glossary 2: \gls
[prefix=other-glo:]{sample}.
\printunsrtglossary
\printunsrtglossary
[targetnameprefix=other-]
other-
to the existing glo:
prefix. This is why the prefix option in the second \gls
reference had to be changed to match the appropriate hypertarget name. The \gls
references in the second glossary now point to the relevant line in the first glossary.\gls
references within the glossary.\glossarypreamble
to .\glossarypostamble
to .8.4. Displaying a Glossary Without Sorting or Indexing
\printglossary
(used with \makeglossaries
) or \printnoidxglossary
(used with \makenoidxglossaries
).\printnoidxglossary
, but it always lists all the defined entries for the given glossary in the order in which they were added to the glossary. Unlike \printglossary
, you may use \printunsrtglossary
with an ignored glossary.\makeglossaries
and \makenoidxglossaries
. Mixing these different methods can result in unexpected behaviour.
There’s no significant difference between doing: \begingroup
\printunsrtglossary
[ ]
\endgroup
{
and \printunsrtglossary
[ ]}
Note that unlike \printunsrtglossary*
[ ]{ }
\glossarypreamble
, the supplied is done before the glossary header.\printunsrtglossary
, make sure you load glossaries-extra-stylemods which modifies the definition of \glsgroupskip
to avoid the “Incomplete \iftrue
” error that may otherwise occur. \printglossary
and \printnoidxglossary
, there is also a command to print all non-ignored glossaries in the order in which they were defined: \printunsrtglossary
. \printunsrtglossary
basically works is to iterate over every label in the glossary’s internal label list and format each entry according to the way the glossary style would normally format the entry’s hierarchical level (described in more detail in §8.4.3). If a change in letter group is detected, the letter group heading and group skip will be inserted.\glsxtrcopytoglossary
, which can be used to provide a different order. A simple example:
The document build only requires one LaTeX call in this case.
Note the difference if the stylemods option is used: \documentclass
{article}
\usepackage
[style=treegroup]{glossaries-extra}
\newglossaryentry
{ant}{name={ant},description={}}
\newglossaryentry
{gazelle}{name={gazelle},description={}}
\begin{document}
\printunsrtglossary
\end{document}
In this case, the group headings are now numbers instead of letters. The styles provided with glossaries-extra and those modified by glossaries-extra-stylemods are designed to assist integration with bib2gls. Without these modifications, \usepackage
[stylemods,style=treegroup]{glossaries-extra}
\printunsrtglossary
behaves like the less sophisticated \printnoidxglossary
which checks if the label is an integer less than 256 and uses \char
to create the title (if no title has been provided).\printunsrtglossary
without bib2gls and you want letter groups with stylemods without having to define all the titles, you can use: \printnoidxglossary
(which only supports ASCII). This command is only available with record=off and can’t be used with \makeglossaries
.
This repeats the same glossary. The first is the same as the previous example. The second is the same as the example that didn’t use stylemods. The final two glossaries have the groups suppressed. Using groups=false (Glossary 3) is more efficient than using nogroupskip and switching to a style that doesn’t show the header (Glossary 4).\printunsrtglossary
[title={Glossary 1}]
\glsxtrnoidxgroups
\printunsrtglossary
[title={Glossary 2}]
\printunsrtglossary
[groups=false,title={Glossary 3}]
\printunsrtglossary
[style=tree,nogroupskip,title={Glossary 4}]
\longnewglossaryentry*
or \newabbreviation
) in the glstex in the desired order, which is then input by \GlsXtrLoadResources
. This means that \printunsrtglossary
will display the entries in that order since, from glossaries-extra’s point of view, that’s the order of definition.\printunsrtglossary
without bib2gls, as in the above example, for long or complex glossaries it’s better to use bib2gls which can automatically assign appropriate titles to the groups.\printunsrtglossary
works are covered in §8.4.3.8.4.1. Groups and Hierarchy
Unlike the previous examples that defined the entries in alphabetical order, this example hasn’t used any logical order. Note, in particular, that the child entries “duck” and “mallard” (which have the parent key set) have not been defined immediately after their parent.\documentclass
{article}
\usepackage
[stylemods=bookindex,style=bookindex]{glossaries-extra}
\newglossaryentry
{waterfowl}{name={waterfowl},description={}}
\newglossaryentry
{ant}{name={ant},description={}}
\newglossaryentry
{adder}{name={adder},description={}}
\newglossaryentry
{duck}{name={duck},parent={waterfowl},
description={}}
\newglossaryentry
{zebra}{name={zebra},description={}}
\newglossaryentry
{aardvark}{name={aardvark},description={}}
\newglossaryentry
{gazelle}{name={gazelle},description={}}
\newglossaryentry
{mallard}{name={mallard},parent={duck},
description={}}
\newglossary*
{another}{Another Glossary}
\glsxtrcopytoglossary
{mallard}{another}
\glsxtrcopytoglossary
{aardvark}{another}
\glsxtrcopytoglossary
{zebra}{another}
\glsxtrcopytoglossary
{ant}{another}
\glsxtrcopytoglossary
{duck}{another}
\begin{document}
\printunsrtglossary
\printunsrtglossary
[type=another]
\end{document}
\printunsrtglossary
has the default type=main and lists all entries defined in the main
glossary, in the order in which they were defined. The second \printunsrtglossary
lists all entries in the custom another
glossary and is in the order in which the entries were copied to that glossary.\printunsrtglossary
iterates over each entry, it tries to determine which letter group the entry belongs to. If it’s different from the group for the previous entry (in the same hierarchical level), a group header is added (which may or may not be displayed, depending on the glossary style). This means than an unordered list of entries, such as in the above example, may contain repeated headers.glssymbols
(which corresponds to the symbol group). This is the same way that \printnoidxglossary
inserts groups.ant
. The first token is “a”, which is a letter. The group’s label is obtained from the letter’s uppercase character decimal code (65). There’s no associated title (which can be assigned with \glsxtrsetgrouptitle
), so the title is simply “65” (with stylemods, see earlier) or “A” (without stylemods or with \glsxtrnoidxgroups
). group
, by default. However it’s possible to use a different field in which to store the group label, in which case \glsxtrgroupfield
will need to be redefined. For example: {
or \renewcommand
{\glsxtrgroupfield
}{othergroup}\printunsrtglossary
}
(but this still requires the group key to be defined, even if it’s not being used to store the group label). With bib2gls, the secondary resource option (combined with --group) will store the group label obtained from the secondary sort in the secondarygroup field and adds the redefinition of \printunsrtglossary*
{\renewcommand
{\glsxtrgroupfield
}{othergroup}}
\glsxtrgroupfield
to the associated glossary preamble. This prevents it from clashing with the group field in the event that the secondary sort method has produced a different set of groups (which is likely).\GlsXtrSetField
.
This is essentially mimicking the way that the secondary resource option sets the secondarygroup field and adds the redefinition of \documentclass
{article}
\usepackage
[record,stylemods=bookindex,style=bookindex]{glossaries-extra}
\glsxtrsetgrouptitle
{group1label}{Group 1}\glsxtrsetgrouptitle
{group2label}{Group 2}\glsxtrsetgrouptitle
{group3label}{Group 3}\glsxtrsetgrouptitle
{group4label}{Group 4}
\newglossaryentry
{waterfowl}{name={waterfowl},description={},
group={group1label}}\newglossaryentry
{ant}{name={ant},description={},
group={group1label}}\GlsXtrSetField
{ant}{secondarygroup}{group4label}\newglossaryentry
{adder}{name={adder},description={},
group={group2label}}\newglossaryentry
{duck}{name={duck},parent={waterfowl},
description={},group={group4label}}\GlsXtrSetField
{duck}{secondarygroup}{group2label}\newglossaryentry
{zebra}{name={zebra},description={},
group={group2label}}\GlsXtrSetField
{zebra}{secondarygroup}{group3label}\newglossaryentry
{aardvark}{name={aardvark},description={},
group={group2label}}\GlsXtrSetField
{aardvark}{secondarygroup}{group1label}\newglossaryentry
{gazelle}{name={gazelle},description={},
group={group1label}}\newglossaryentry
{mallard}{name={mallard},parent={duck},
description={},group={group2label}}
\GlsXtrSetField
{mallard}{secondarygroup}{group3label}
\newglossary*
{another}{Another Glossary}\glsxtrcopytoglossary
{mallard}{another}\glsxtrcopytoglossary
{aardvark}{another}\glsxtrcopytoglossary
{zebra}{another}\glsxtrcopytoglossary
{ant}{another}\glsxtrcopytoglossary
{duck}{another}\setglossarypreamble
[another]{\renewcommand
{\glsxtrgroupfield
}{secondarygroup}}
\begin{document}
\printunsrtglossary
\printunsrtglossary
[type=another]
\end{document}
\glsxtrgroupfield
to the secondary glossary’s preamble. (Although in this case, there’s no logical order.) The result is shown in Example 138.
This means that only entries that don’t have a parent (with flatten=false) or any entry (with flatten=true) will have the group check performed. With bib2gls, the group-level will redefine \newcommand
*{\glsxtraddgroup
}[2]{%
\ifglsxtrprintglossflatten
#2%
\else
\ifglshasparent
{#1}{}{#2}%
\fi
}
\glsxtraddgroup
to always do , which means that all entries will have the group check performed.
if you want to insert before the header and \preto
#1{ }
if you want to insert after the header. (You can reference the entry label with \appto
#1{ }\glscurrententrylabel
and the current hierarchical level with \glscurrententrylevel
but make sure they are expanded if they occur in .) For example, \printunsrttable
redefines this hook to finish off the current row before the group header is added.
The result is shown in Example 139.
\renewcommand
*{\glsxtraddgroup
}[2]{#2}
\printunsrtglossary
\renewcommand
*{\glsxtraddgroup
}[2]{%
\ifnum
\glscurrententrylevel
<2 #2\fi
}
\printunsrtglossary
[type=another]
\glsxtraddgroup
restricts group formation to just level 0 and level 1).
is automatically initialised by \glsgroupheading
{ }\setglossarystyle
(via \glsxtrpreglossarystyle
) to allow for styles that don’t redefine this command. The first two arguments refer to the hierarchical level, where is the level of the previous group and is the level of this new sub-group. The is the label of the current entry’s parent, where the current entry is the first entry of the sub-group that immediately follows the heading.\glssubgroupheading
to use the style’s associated command \glsxtrbookindexformatsubheader
. This can be redefined as required. For example, the following uses the parent entry’s hierarchical information: \renewcommand
*{\glsxtrbookindexformatsubheader
}[5]{%
\ifnum
#2>1\relax
\glstreesubsubitem
\glstreegroupheaderfmt
{\GlsXtrhiername
{#3} / #5}%
\else
\glstreesubitem
\glstreegroupheaderfmt
{\GlsXtrhiername
{#3} / #5}%
\fi
}
\printunsrtglossary
. If you want to use this approach to display a glossary, you would need to make sure that you take care with the order that you define entries. This can be quite tedious for a large number of entries.
I’ve included some additional information stored in the user1 field that wasn’t in the earlier examples. The document needs to use the record option and @index
{waterfowl,user1={Anseriformes}}@index
{ant,user1={Formicidae}}@index
{adder,user1={Vipera berus}}@index
{duck,parent={waterfowl},user1={Anatidae}}@index
{zebra,user1={Hippotigris}}@index
{aardvark,user1={Orycteropus afer}}@index
{gazelle,user1={Gazella}}@index
{mallard,parent={duck},user1={Anas platyrhynchos}}
\GlsXtrLoadResources
in order for it to work properly with bib2gls:
If this code is saved in the file myDoc.tex then the build process is now: \usepackage
[record,stylemods=bookindex,style=bookindex]
{glossaries-extra}
\newglossary*
{another}{Another Glossary}
\GlsXtrLoadResources
[selection=all,% select all entries
src={animalfamilies},% identify bib file(s)
sort=en-GB,% sort method
secondary={la:user1:another}% sort again and copy to `another'
]
\glsdefpostname
{index}{
(\emph
{\glsentryuseri
{\glscurrententrylabel
}})}
\begin{document}
\printunsrtglossary
\printunsrtglossary
[type=another]
\end{document}
pdflatex myDoc
bib2gls --group myDoc
pdflatex myDoc
The --group (or -g) switch is important as it instructs bib2gls to set the group field for the primary sort and the secondarygroup for the secondary sort. The primary sort will sort entries according to en-GB
(British English). This can simply be set to en
without a region. The secondary sort will resort the entries, but this time according to la
(Latin) using the user1 key as the sort value. The entry labels will then be copied to the custom another
glossary.\GlsXtrLoadResources
on the subsequent LaTeX run) essentially contains the following code: \glsxtrsetgrouptitle
{6881280}{W}
\glsxtrsetgrouptitle
{5832704}{G}
\glsxtrsetgrouptitle
{5373952}{A}
\glsxtrsetgrouptitle
{7077888}{Z}
\glsxtrsetgrouptitle
{another5373952}{A}
\glsxtrsetgrouptitle
{another5767168}{F}
\glsxtrsetgrouptitle
{another6356992}{O}
\glsxtrsetgrouptitle
{another5898240}{H}
\glsxtrsetgrouptitle
{another6815744}{V}
\glsxtrsetgrouptitle
{another5832704}{G}
\longnewglossaryentry*
{aardvark}{name={aardvark},
user1={Orycteropus afer},group={5373952}}{}
\longnewglossaryentry*
{adder}{name={adder},
user1={Vipera berus},group={5373952}}{}
\longnewglossaryentry*
{ant}{name={ant},
user1={Formicidae},group={5373952}}{}
\longnewglossaryentry*
{gazelle}{name={gazelle},
user1={Gazella},group={5832704}}{}
\longnewglossaryentry*
{waterfowl}{name={waterfowl},
user1={Anseriformes},group={6881280}}{}
\longnewglossaryentry*
{duck}{name={duck},
parent={waterfowl},user1={Anatidae},group={}}{}
\longnewglossaryentry*
{mallard}{name={mallard},
parent={duck},user1={Anas platyrhynchos},group={}}{}
\longnewglossaryentry*
{zebra}{name={zebra},
user1={Hippotigris},group={7077888}}{}
\apptoglossarypreamble
[another]
{\renewcommand
{\glsxtrgroupfield
}{secondarygroup}}
\glsxtrcopytoglossary
{waterfowl}{another}
\GlsXtrSetField
{waterfowl}{secondarygroup}{another5373952}
\glsxtrcopytoglossary
{duck}{another}
\glsxtrcopytoglossary
{mallard}{another}
\glsxtrcopytoglossary
{ant}{another}
\GlsXtrSetField
{ant}{secondarygroup}{another5767168}
\glsxtrcopytoglossary
{gazelle}{another}
\GlsXtrSetField
{gazelle}{secondarygroup}{another5832704}
\glsxtrcopytoglossary
{zebra}{another}
\GlsXtrSetField
{zebra}{secondarygroup}{another5898240}
\glsxtrcopytoglossary
{aardvark}{another}
\GlsXtrSetField
{aardvark}{secondarygroup}{another6356992}
\glsxtrcopytoglossary
{adder}{another}
\GlsXtrSetField
{adder}{secondarygroup}{another6815744}
@index
, but this is basically like the preamble in the earlier examples, except that the ordering and groups are more logical. The result is shown in Example 140.\glsxtraddgroup
, sub-groups won’t be displayed. If you want those fields set for child entries, you need to use the group-level resource option. For example: \GlsXtrLoadResources
[selection=all,% select all entries
group-level={<=1},% level 0 and 1
src={animalfamilies},% identify bib file(s)
sort=en-GB,% sort method
secondary={la:user1:another}% sort again and copy
]
8.4.2. Location Lists
\makenoidxglossaries
but isn’t defined as a key.)\printnoidxglossary
to format, which doesn’t compact consecutive locations.\glossentry
or \subglossentry
) encapsulated with \glossaryentrynumbers
.\glossaryentrynumbers
encapsulator) is passed to the glossary style command. In this case, the nonumberlist option is redundant as there’s no location list to suppress.8.4.3. Advanced Commands
\printglossary
(used with makeindex and xindy) and \printunsrtglossary
(used with bib2gls).
where contains lines such as: \glossarysection
[\glossarytoctitle
]{\glossarytitle
}%
\glossarypreamble
\begin{theglossary}
\glossaryheader
\end{theglossary}
\glossarypostamble
\glsgroupheading
{ }\relax
\glsresetentrylist
\glossentry
{ }{ }%
\subglossentry
{ }{ }{ }%
\glsgroupheading
. Top-level entries are typeset with \glossentry
and child entries are typeset with \subglossentry
where indicates the hierarchical level. Both makeindex and xindy order the items so that the child entries are placed immediately after the corresponding parent entry.\printglossary
command essentially does:
\bgroup
\egroup
\glossaryheader
, \glsgroupheading
, \glossentry
and \subglossentry
), assigns the title (\glossarytitle
and \glossarytoctitle
) and defines \currentglossary
. (There is some other stuff done both before and after the file is input, but that’s not relevant here.)\GlsXtrLoadResources
). The entries are defined in the required order and use internal fields to store the indexing information (such as the group label and location lists). Now \printunsrtglossary
is used to display the glossary, which essentially does:
\bgroup
\glossarysection
[\glossarytoctitle
]{\glossarytitle
}%
\glossarypreamble
\glossarypostamble
\egroup
\printglossary
. The key difference here is that there’s no file containing the typeset glossary that can be simply input. Instead it’s necessary to iterate over the glossary’s internal label list. Some of the glossary styles use a tabular-like environment (such as longtable, which is used by the long styles). It’s always problematic having a loop inside a tabular context so \printunsrtglossary
by-passes the problem by moving the loop outside of the theglossary environment. The command iterates over all entry labels (in the order in which they were added to the glossary) and constructs an internal control sequence (\@glsxtr@doglossary
), which ends up containing: \begin{theglossary}
\glossaryheader
\end{theglossary}
\glsresetentrylist
has been removed in v1.50 since it’s generally unnecessary with bib2gls and causes interference with tabular styles.
by the command: \begin{theglossary}
\glsresetentrylist
at the start, you can redefine this hook as follows: \renewcommand
*{\printunsrtglossarypostbegin
}[1]{%
\appto
#1{\glsresetentrylist
}%
}
by the command: \end{theglossary}
\printunsrtglossary
not in by \printunsrtinnerglossary
or printunsrtglossarywrap.) For example, \printunsrttable
redefines the end hook to finish off the final row.\@glsxtr@doglossary
and, in both cases, you need to use \appto
within the definition in order to insert and in the correct place. If you use \preto
, the code will end up at the start, before \begin{theglossary}
\glossentry
and \subglossentry
but instead uses an internal handler that just takes the entry label as the argument. The
command is inserted whenever a top-level entry has the group field set to a label that’s different to the previous top-level entry’s group field (and, if supported, sub-groups are similarly inserted with \glsgroupheading
{ }\glssubgroupheading
, see §8.4.1). So the content is in the form: \glsgroupheading
{ }%
\
{ }%
\
{ }%
…\glsgroupheading
{ }%
\
{ }%
\
{ }%
…
\glscurrententrylabel
.\glscurrententrylabel
is empty, skip this iteration.\glscurrententrylevel
is 0 (that is, it expands to the most recent top-level entry, allowing for flatten and leveloffset);
This is set to the current entry label if flatten=true or if the current entry doesn’t have a parent (that is, it expands to the most recent top-level entry, allowing for flatten but not leveloffset).\glsxtraddgroup
(see §8.4.1) to append the top-level group heading (\glsgroupheading
) or the sub-group heading (\glssubgroupheading
) to \@glsxtr@doglossary
.\@glsxtr@doglossary
. This may be used to insert any additional content before the entry (use
). (The entry label can be referenced with \appto
#1{ }\glscurrententrylabel
but make sure it’s expanded if it occurs in .) For example, \printunsrttable
redefines this hook to insert and \tabularnewline
between blocks.\{ }
to \@glsxtr@doglossary
.\@glsxtr@doglossary
. This may be used to append any additional content after the entry (use
). (The entry label can be referenced with \appto
#1{ }\glscurrententrylabel
but make sure it’s expanded if it occurs in .) For example, \printunsrttable
redefines this hook to reset the block index if the end of a row has been reached.\glscurrenttoplevelentry
and \glscurrentrootentry
may not be an ancestor of the current entry. For example, if the glossary doesn’t have child entries immediately following their parent entry. \@glsxtr@doglossary
) has been completed, the following hook is performed: \@glsxtr@doglossary
for debugging purposes:
This will interrupt the LaTeX run and display the definition in the transcript.\renewcommand
{\printunsrtglossarypredoglossary
}{%
\csshow
{@glsxtr@doglossary}}
\
performs the following:
This stores the entry’s label in \protected@xdef
\glscurrententrylabel
{ }%
\printunsrtglossaryhandler
\glscurrententrylabel
\glscurrententrylabel
(which allows it to be referenced in style hooks, such as the post-name hook or post-description hook). Note that it uses a global definition to avoid scoping issues caused with tabular-like styles. The main handling of the entry is performed by:
This is simply defined to use:
This displays the entry according to the current glossary style, taking the hierarchical level into account (as given by \glscurrententrylevel
).\usepackage
[style=index]{glossaries-extra}
\newglossaryentry
{ant}{name={ant},description={}}
\newglossaryentry
{pi}{name={\ensuremath
{\pi
}},description={},
category={symbol}}
\newglossaryentry
{aardvark}{name={aardvark},description={}}
\newglossaryentry
{alpha}{name={\ensuremath
{\alpha
}},description={},
category={symbol}}
\begin{document}
\renewcommand
{\printunsrtglossaryentryprocesshook
}[1]{%
\glsifcategory
{#1}{symbol}%
{\printunsrtglossaryskipentry
}%
{}%
}
\printunsrtglossary
\end{document}
8.4.3.1. Inner Glossaries
\printunsrtglossary
can be created with: \printunsrtglossary
, \printunsrtinnerglossary
constructs an internal control sequence containing the content, but it adds scoping to localise the effects of any supplied options. So it essentially does: \begingroup
\endgroup
\printunsrtglossary
(see §8.3). Note that in this case the type key simply provides a title (if one has been assigned to that glossary). It doesn’t indicate the content. There’s no point using both type and title.
The end of this wrapper environment ends theglossary and does the postamble: \glossarysection
[\glossarytoctitle
]{\glossarytitle
}%
\glossarypreamble
\begin{theglossary}
\glossaryheader
\glsresetentrylist
Note that the \end{theglossary}
\glossarypostamble
\printunsrtglossarypostbegin
, \printunsrtglossarypreend
and \printunsrtglossarypredoglossary
hooks aren’t used.\newglossaryentry
{ant}{name={ant},description={}}
\newglossaryentry
{bee}{name={bee},description={}}
\newignoredglossary*
{other}
\newglossaryentry
{duck}{name={duck},description={}}
\newglossaryentry
{goose}{name={goose},description={}}
\begin{document}
\begin{printunsrtglossarywrap}
[style=index]
\glstreeitem
First Glossary
\printunsrtinnerglossary
[leveloffset=1]{}{}
\glstreeitem
Second Glossary
\printunsrtinnerglossary
[type=other,leveloffset=1]{}{}
\end{printunsrtglossarywrap}
\end{document}
\printunsrtinnerglossary
can be used is within \printunsrtglossary
. The handler function described in §8.4.3 that’s used to process each entry to be displayed in the glossary, is defined as: \newcommand
{\printunsrtglossaryhandler
}[1]{\glsxtrunsrtdo
{#1}}
main
glossary. Two ignored glossaries are created (which don’t require a title) where the glossary label matches an entry label in the main
glossary. \usepackage
{fontawesome}
\usepackage
[style=tree]{glossaries-extra}
\newglossaryentry
{pictograph}{name={pictograph},
description={picture or symbol representing a word or phrase}}
\newglossaryentry
{mathgreek}{name={Greek symbol},
description={mathematical constants or functions}}
\newignoredglossary*
{pictograph}
\newignoredglossary*
{mathgreek}
\newglossaryentry
{cut}{type={pictograph},
name={\faCut
},
description={cut}}
\newglossaryentry
paste{type={pictograph},
name={\faPaste
},
description={paste}}
\newglossaryentry
{alpha}{type={mathgreek},
name={\ensuremath
{\alpha
}},
description={alpha}}
\newglossaryentry
{beta}{type={mathgreek},
name={\ensuremath
{\beta
}},
description={beta}}
\begin{document}
\newcommand
{\nestedhandler
}[1]{%
\glsxtrunsrtdo
{#1}%
\ifglossaryexists
*{#1}%
{%
\printunsrtinnerglossary
[type={#1},leveloffset={++1},
groups=false]{}{}%
}%
%
}
\printunsrtglossary*
{\let
\printunsrtglossaryhandler
\nestedhandler
}
\end{document}
\nestedhandler
that can be used as the handler to create nested glossaries. After each item in the glossary, if the entry’s label matches the label of a defined glossary, that glossary is displayed with its hierarchical level incremented by 1, which creates the illusion of child entries. The resulting document is shown in Example 143.8.4.3.2. Per-Unit Glossaries
\the
. On the next LaTeX run, this information is picked up from the aux file and the information is added to the record. field (stored as an etoolbox internal list). This internal command is only used in the aux file and has a user-level hook:
This does nothing by default. If you want to redefined this, the redefinition must be placed in the document preamble before the aux file is input.\printunsrtglossaryentryprocesshook
to perform the test and use \printunsrtglossaryskipentry
to skip an unwanted entry (as illustrated earlier). The second is to perform the test in \printunsrtglossaryhandler
. The first method is the better option for large lists that may contain group headers. The example below uses the second method.
The document redefines the handler to only show entries in the current section: @symbol
{pi,name={\ensuremath
{\pi
}},
description={ratio of the length of the circumference of a circle to its diameter}}@symbol
{root2,name={\ensuremath
{\surd
2}},
description={Pythagoras' constant}}@symbol
{zeta3,name={\ensuremath
{\zeta
(3)}},
description={Ap\'
ery's constant}}@symbol
{zero,name={0},
description={nothing or nil}}@symbol
{one,name={1},
description={single entity, unity}}
If the document is saved in the file myDoc.tex then the build process is: \usepackage
[record,stylemods,style=index]{glossaries-extra}
\GlsXtrRecordCounter
{section}
\GlsXtrLoadResources
[src={myentries}]
\begin{document}
\renewcommand
{\printunsrtglossaryhandler
}[1]{%
\glsxtrfieldxifinlist
{#1}{record.section}{\thesection
}
{\glsxtrunsrtdo
{#1}}%
{}%
}
\section
{Sample}
\printunsrtglossary
This section discusses \gls
{pi}, \gls
{root2} and
\gls
{zeta3}.
\section
{Another Sample}
\printunsrtglossary
This section discusses \gls
{one}, \gls
{pi} and
\gls
{zero}.
\end{document}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
The first LaTeX run adds the records to the aux file for bib2gls to pick up, but also adds the \glsxtr@counterrecord
lines (which bib2gls ignores) that setup the record.section
list field for the given entry.\glsxtrfieldxifinlist
can be used to determine whether or not the current section number (\thesection
) is in the list. If it is, then the entry is displayed in the current glossary style using the default \glsxtrunsrtdo
. Otherwise nothing is displayed.
This initialises the hook via:
This is essentially does: \printunsrtglossary*
[type=\glsdefaulttype
,#1]{%
\printunsrtglossaryunitsetup
{#2}%
}% redefine handler to only show entries with a match:
This is more complicated than the original example as it also suppresses the glossary section header and modifies the target name prefix. Additionally, the following is appended to the end of the glossary:
This simply does: \renewcommand
{\printunsrtglossaryhandler
}[1]{%
\glsxtrfieldxifinlist
{#1}{record. }{\the
}
{\glsxtrunsrtdo
{#1}}%
{}%
}%
% suppress section header:
\renewcommand
*{\glossarysection
}[2][]{}%
% append vertical space after the glossary:
\appto
\glossarypostamble
{\printunsrtglossaryunitpostskip
}%
which creates a small vertical space. The target name prefix (targetnameprefix) is assigned as follows. If \glspar
\medskip
\glspar
\the
has been defined, the prefix is: record.
otherwise the prefix is: .\the
.\@gobble
record.
The use of .\the
.\@gobble
\@gobble
at the end discards \glolinkprefix
.\printunsrtglossaryunit
. I’ve added symbol-sort-fallback to sort by the description and a full glossary at the end of the document.
The build process is the same as before: \usepackage
[record,stylemods,style=index]{glossaries-extra}
\GlsXtrRecordCounter
{section}
\GlsXtrLoadResources
[src={myentries},
symbol-sort-fallback=description
]
\begin{document}
\section
{Sample}
\printunsrtglossaryunit
{section}
This section discusses \gls
{pi}, \gls
{root2} and
\gls
{zeta3}.
\section
{Another Sample}
\printunsrtglossaryunit
{section}
This section discusses \gls
{one}, \gls
{pi} and
\gls
{zero}.
\printunsrtglossaries
\end{document}
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
The resulting document is shown in Example 144. Note that all glossaries show the location lists, which all contain the page number 1, since the example document is only one page long.
This orders the secondary glossary according to use (the first record for the entire document not for the given unit). The mini-glossaries will then need the type option: \newignoredglossary*
{glossary2}
\GlsXtrLoadResources
[src={\jobname
},
symbol-sort-fallback=description,
secondary=use:glossary2
]
\printunsrtglossaryunit
[type=glossary2]{section}
\glsxtrAddCounterRecordHook
to create a glossary for each unit (instead of using a secondary glossary):
(Remember this needs to be done in the preamble, before the aux file is input.)\renewcommand
{\glsxtrAddCounterRecordHook
}[3]{%
\provideignoredglossary
{#2.#3}%
\glsxtrcopytoglossary
*{#1}{#2.#3}%
}
, if it’s not already defined, and adds the entry’s label to it. This means that this .glossary will only contain the entries for the matching and , and the entry labels are in the order they were added to the aux file.
There’s now no filtering required, but \printunsrtglossaryunit
[type=section.\thesection
]{section}
\printunsrtglossaryunit
is still useful as it automatically suppresses the section header, alters the hyperlink prefix and adds extra spacing after the glossary. However, if you prefer, you can simply do something like:
This is done in Example 145.\printunsrtglossary*
[type=section.\thesection
,
target=false]
\renewcommand
*{\glossarysection
}[2][]{}
\printunsrtglossaryunitpostskip
8.5. Standalone Entry Items
\glsentryname
followed by \glsentrydesc
. (Remember that if you don’t want a sorted list, use sort=none or sort=clear to skip the preprocessing of the sort field.) For example, in the preamble provide a custom command to display the entry’s name and description:
define your entries, for example: \newcommand
{\displayterm
}[1]{%
\par
\medskip
\par
\noindent
Definition: \glsentryname
{#1}.\par
\glsentrydesc
{#1}
\par
\medskip
}
and then later in the text: \newglossaryentry
{function}{name={function},
description={a relation or expression involving variables}
}
\displayterm
{function}
\gls
link back to the place where the term is described. Instead of using \glsentryname
use:
If you have used \glscurrententrylabel
to the entry’s label. This is usually done at the start of the glossary style commands \glossentry
and \subglossentry
and may be used by hooks, such as the post-name hook. Here the definition is localised so that it’s only available for use in \glossentryname
.\currentglossary
to the entry’s glossary type. This is usually done at the start of commands like \printglossary
and may be used by style hooks. Here the definition is localised so that it’s only available for use in \glsentryitem
and \glssubentryitem
. The value is obtained by fully expanding:
which defaults to the value of the type field for the current entry.
otherwise it does:
which defaults to \glsentryitem
{ }
if the entry has a parent but not a grandparent.\glssubentryitem
{ }\glsentryitem
for all child levels, which doesn’t match the hierarchical glossary styles. If you want to restore this behaviour, just do: \renewcommand
*{\GlsXtrStandaloneSubEntryItem
}[1]{%
\glssubentryitem
{#1}}
\glstarget
) and displays the entry name using:
which uses
by default. Remember that \glstarget
{ }{\glossentryname
{ }}\glossentryname
uses \glsnamefont
or picks up the style from category attributes such as glossnamefont. This can result in duplicate targets if you use both standalone commands and display the glossary. In which case, you can redefine \glstarget
to use \glsxtrtarget
, which will ensure that the first target will be the one that takes precedence.
\nopostdesc
or \glsxtrnopostpunc
in any of your description fields, you can use:
to make these commands behave as they normally do within a glossary. This needs to be placed before:
and scoped. Note that \glossentrydesc
{ }\glspostdescription
\glsnonextpages
and \glsnextpages
have no effect outside of the glossary and are not intended for use in a standalone context.\glsxtrtitleorpdforheading
. It may be left empty in which case the default is determined as follows:
The \glsxtrhead
is defined (see §5.3.3), then is \glsxtrhead
{entry-label}.\glsxtrglossentryother
command internally uses
instead of \GlsXtrStandaloneEntryName
, which uses
instead of \glossentrynameother
{ }{field-label}
.\glossentryname
{ }
(for example, \gls
{ accessdisplay }{ }
\glssymbolaccessdisplay
).
If I want numbered definitions, then I can use the package options entrycounter or subentrycounter and remove the colon: \newcommand
{\displayterm
}[1]{%
\par
\medskip
\par
\noindent
Definition: \glsxtrglossentry
{#1}.\par
\glsentrydesc
{#1}
\par
\medskip
}
The counter label uses a dot after the number by default but this can be changed to a colon: \newcommand
{\displayterm
}[1]{%
\par
\medskip
\par
\noindent
Definition \glsxtrglossentry
{#1}.\par
\glsentrydesc
{#1}
\par
\medskip
}
It’s now possible to not only use \renewcommand
*{\glsentrycounterlabel
}{\theglossaryentry
:\space
}
\gls
to link back to the definition but also use \glsrefentry
to reference the counter and \glsxtrpageref
to reference the page number.
(Note the grouping to localise \newcommand
{\displayterm
}[1]{%
\par
\medskip
\par
\noindent
Definition \glsxtrglossentry
{#1}.\par
\begingroup
\glsxtractivatenopost
\glossentrydesc
{#1}\glspostdescription
\endgroup
\par
\medskip
}
\glsxtractivatenopost
.)\glsxtrglossentry
within section headings. For example: \section
{\glsxtrglossentry
{function}}
\glsxtrglossentry
occurs in a section title and hyperref has been loaded, then \glsxtrglossentry
will expand in the PDF bookmark as:
The page headers and table of contents will use
which defaults to \glsentryname
{ }
. For example, to ensure that the name is displayed in sentence case in the title, PDF bookmarks and heading: \glsxtrheadname
{ }
Note that this requires glossaries v4.50+ to ensure that \glssetcategoryattribute
{general}{glossname}{firstuc}
\renewcommand
{\GlsXtrStandaloneEntryPdfName
}[1]{\Glsentryname
{#1}}
\renewcommand
{\GlsXtrStandaloneEntryHeadName
}[1]{\Glsentryname
{#1}}
\Glsentryname
expands. An alternative is to use \Glsxtrusefield
.\glsxtrglossentryother
occurs in a section title and hyperref has been loaded, then \glsxtrglossentryother
will expand in the PDF bookmark as: \glsxtrhead
, if it exists, or otherwise it just does the value of the given field (which can be obtained with \glsxtrusefield
).\markright
or \markboth
or \@starttoc
then you need to insert \glsxtrmarkhook
and \@glsxtrinmark
at the start of the header or table of contents either scoped or afterwards cancelled with \@glsxtrnotinmark
and \glsxtrrestoremarkhook
, see §5.3.3.8.6. Glossary Style Modifications
\setglossarystyle
, and it now includes a hook that’s performed before the style is set:
If you prefer a different default, you can redefine this command as appropriate.\newcommand
{\glsxtrpreglossarystyle
}{%
\renewcommand
*{\glssubgroupheading
}[4]{\glsgroupheading
{##4}}%
}
\glossentryname
and \glossentrydesc
are modified to take into account the glossname, glossnamefont, glossdesc and glossdescfont attributes (see §10). This means you can make simple font or case-changing modifications to the name and description without defining a new glossary style.\glossentrysymbol
is modified to take into account the glosssymbolfont attribute. Note that, unlike the above, there’s no corresponding attribute to change the case as it’s usually not appropriate to change the case of a symbol (and for some symbols, such as pictographs, there’s no concept of case). If \texorpdfstring
has been defined \glossentrysymbol
will be defined to do:
The part is robust and deals with the actual typesetting of the symbol. The part is simply:
which is defined to just do \texorpdfstring
{ }{ }
. The chances are that the code in the symbol key won’t be valid in the PDF bookmarks, so you can redefine \glsentrysymbol
{ }\glsentrypdfsymbol
to use a more appropriate field. (If you do redefine this command, remember that it needs to fully expand.)
Alternatively, if you are using bib2gls you can use the TeX parser library to interpret a copy of the symbol field and use that. For example, with the resource options: \renewcommand
{\glsentrypdfsymbol
}[1]{%
\glsentrysymbolaccess
{#1}}
replicate-fields={symbol=user1},
interpret-fields=user1
This copies the value of the symbol field to the user1 field (replicate-fields) and then replaces the value of the user1 field with its interpreted value (interpret-fields).
(You may need XeLaTeX or LuaLaTeX with this method.) This allows \renewcommand
{\glsentrypdfsymbol
}[1]{%
\glsentryuseri
{#1}}
\glossentrysymbol
to be used in a section heading with standalone definitions. See the bib2gls manual for further details about the TeX interpreter.\glossentryname
(that is, it obeys the glossname attribute, uses either the glossnamefont attribute or \glsnamefont
to format the text, and uses the post-name hook) but the text is obtained from the field given instead of name. The argument must be the internal field label (for example desc
rather than description
).8.6.1. Post-Name Hooks
\glossentryname
and \Glossentryname
(which is used in glossary styles to display the entry’s name): \glsxtrpostnamehook
checks the indexname attribute. If the attribute exists for the category to which the entry belongs, then the name is automatically indexed using:
See §12 for further details.\glsxtrdoautoindexname
{ }{indexname}
\glsxtrpostnamehook
will also use: \glscurrententrylabel
to obtain the entry label with the definition of this command. For example, suppose you are using a glossary style the doesn’t display the symbol, you can insert the symbol after the name for a particular category, say, the “symbol” category:
For convenience, you can use:
This is simply a shortcut for: \newcommand
*{\glsxtrpostnamesymbol
}{\space
(\glsentrysymbol
{\glscurrententrylabel
})}
Note that it doesn’t check if the command has already been defined.\csdef
{\glsxtrpostname
}{ }
\glsxtrpostname
) to allow for additional non-category related code. This does nothing by default.8.6.2. Post-Description Hooks
\glspostdescription
, which is placed after the description in some of the predefined styles. The glossaries-extra-stylemods package modifies the predefined styles to ensure that they all use this hook. This provides a convenient way to make slight adjustments, such as appending content after the description, without having to define a custom glossary style.\glspostdescription
so that it includes the following hook:\newcommand
*{\glsxtrpostdescription
}{%
\csuse
{glsxtrpostdesc\glscategory
{\glscurrententrylabel
}}%
}
\glsxtrpostdescription
, not before. \glsxtrpostdescription
. If you want to adjust this hook according to the entry’s category, then you can simply redefine the category post-description hook. \renewcommand
or use: \glsxtrpostdesc
. The package options symbols, numbers and index provide corresponding category post-description hooks.\glscurrententrylabel
, which is defined within the glossary (any of the \print…glossary
commands) and also within the standalone commands, such as \glsxtrglossentry
.\nopostdesc
, which may be used in the description to suppress the post-description hook for that entry. This suppresses both the post-description punctuation and the additional \glsxtrpostdescription
hook. If you only want to suppress to punctuation, then use \glsxtrnopostpunc
instead.\glspostdescription
within the glossary style. If this command isn’t used in the style, then the additional hooks won’t be available. \glsxtrpostdescription
or added to the category post-link hook, then it will counter-act any use of \glsxtrnopostpunc
to restore the post-description punctuation.\glsxtractivatenopost
and \glspostdescription
, see §8.5).8.6.3. Number (Location) List
\glossaryentrynumbers
. The nonumberlist option redefines \glossaryentrynumbers
so that it doesn’t display the number list, but it still saves the number list in case it’s required. The desired font formatting for the location list can now more easily be set by redefining \GlsXtrFormatLocationList
, without interfering with \glossaryentrynumbers
.\glossaryentrynumbers
to do nothing. \printnoidxglossary
because this is performed automatically (unlike \printglossary
where the trick with \glossaryentrynumbers
is required to capture the location list).
An extra run is required when using this command.\GlsXtrEnablePreLocationTag
{Page: }{Pages: }
\GlsXtrEnablePreLocationTag
. There is also a corresponding loc-suffix option to provide a suffix. \printnoidxglossary
internally use: \glsnoidxdisplayloc
This command is provided by glossaries, but is modified by glossaries-extra to check for the start and end range formation identifiers ( and ) which are discarded to obtain the actual control sequence name that forms the location formatting command.
(If the format is empty, it will be replaced with \glsxtrdisplaysingleloc
{ }{ }
glsnumberformat
.)
and then sets \glsxtrdisplaysingleloc
{ }{ }
\glsxtrlocrangefmt
to empty.
doesn’t display any differently from \glsnoidxdisplayloc
{}{page}{(textbf}{1},
\glsnoidxdisplayloc
{}{page}{textbf}{1},
\glsnoidxdisplayloc
{}{page}{)textbf}{1}.
but it does make it easier to define your own custom list handler that can accommodate the ranges.\glsnoidxdisplayloc
{}{page}{textbf}{1},
\glsnoidxdisplayloc
{}{page}{textbf}{1},
\glsnoidxdisplayloc
{}{page}{textbf}{1}.
8.6.4. Indexing Groups
glsnumbers
, otherwise the group is a symbol group with the label glssymbols
.\glssymbolsgroupname
and \glsnumbersgroupname
, which correspond to the glssymbols
and glsnumbers
groups. The more flexible groups that can be created with bib2gls require a better approach that is less likely to cause a conflict.\glsxtrgetgrouptitle
and then, for compatibility with the base glossaries package, it will test for the existence of \
if groupname is glssymbols
or glsnumbers
or a single character. If no title is obtained from any of these tests, then the title will be assumed to be the same as the label.\printnoidxglossary
command has a slightly different method, which uses the character code so it’s not suitable with UTF-8. In general, \printnoidxglossary
is best avoided, where possible, and is inappropriate for locale-sensitive sorting. 8.6.5. glossaries-extra-stylemods
is equivalent to: \usepackage
{glossaries-extra}
\usepackage
{glossary-longragged}
\usepackage
{glossary-mcols}
\usepackage
{glossaries-extra-stylemods}
\setglossarystyle
{mcolindex}
You may prefer to combine stylemods=with nostyles to reduce the overhead of loading unnecessary packages.\usepackage
[stylemods={longragged,mcols},style=mcolindex]{glossaries-extra}
\glspostdescription
and replaces any hard-coded space before the location list with \hfil
: \usepackage
[postpunc=comma,stylemods]{glossaries-extra}
\renewcommand
{\glsxtrprelocation
}{\hfil
}
\glsxtrprelocation
to do nothing and set the location prefixes with loc-prefix which will only apply if the entry has a location list. Alternatively, you could redefine \glsxtrprelocation
to check if the location field is set.8.6.5.1. Inline Style
\glspostdescription
at the end of the glossary (not after each entry description) within the definition of \glspostinline
. The style modification changes this so that \glspostinline
just does a full stop followed by space factor adjustment, and the description \glsinlinedescformat
and sub-entry description formats \glsinlinesubdescformat
are redefined to include \glsxtrpostdescription
(not \glspostdescription
). This means that the modified inline style isn’t affected by the nopostdot option, but the category post-description hook can still be used.8.6.5.2. Tabular Styles
\ifglsnogroupskip
conditional (set with nogroupskip) is moved outside of the definition of \glsgroupskip
to avoid problems that cause an “Incomplete \iftrue
” error with \printunsrtglossary
and \printnoidxglossary
. This means that if you want to change this conditional using \setupglossaries
or using the nogroupskip option in \printglossary
, \printnoidxglossary
or \printunsrtglossary
, you must also reset the glossary style.8.6.5.3. List Styles
\glsxtrprelocation
) for top-level items and:
(which defaults to \glslistprelocation
) for child items.
is replaced with: \item
[ ]\glslistitem
. The header item (for the list styles that should the group title, such as listgroup) is governed by:
This ignores the by default and simply places the second argument in the optional argument of \item
. The is the formatted group title, possibly including a hypertarget. The spacing after the group item is given by:
\glslistdottedwidth
is changed so that it’s set at the start of the document (if it hasn’t been changed in the preamble). This should take into account situations where \hsize
isn’t set until the start of the document.\indexspace
with penalties to deter page breaks. This command isn’t used if nogroupskip is set.8.6.5.4. Tree Styles
\glstreenamefmt
, since that was the command originally used for the group headings and navigation. This now allows these different elements to be defined independently, but the most common redefinition is for \glstreenamefmt
to remove the bold in the name. If the bold is still required for the group heading and navigation elements, then both other commands also need redefining. To simplify matters, all three commands have been defined to use:
This simply does
.\textbf
{ }\glstreedefaultnamefmt
, but if you only want to redefine \glstreenamefmt
without affecting the other two commands, then you now can.\indexspace
without penalties. This command isn’t used if nogroupskip is set. (The penalties introduced in v1.41 were moved to \glstreegroupheaderskip
in v1.42 as they are inappropriate when there’s no header.)\glstreegroupskip
with penalties to deter page breaks after the group heading.\chapter
then:
will insert section-level bookmarks. The use of \renewcommand
{\glstreePreHeader
}[2]{%
\pdfbookmark
[1]{#2}{\currentglossary
.#1}%
}
\currentglossary
helps to provide unique bookmark labels in the event of multiple glossaries.\glsxtrprelocation
) for top-level items and
(which defaults to \glstreeprelocation
) for child items.\glstreedesc
and \glstreechilddesc
that check for the description and symbol to determine what separator to use before the page list:
for top-level entries and
for sub-entries.\glstreeprelocation
or \glstreechildprelocation
, respectively. Otherwise, both will use: \glssetwidest
but performs a global assignment.\glssetwidest
but expands .\eglssetwidest
but performs a global assignment.\glsfindwidesttoplevelname
provided by glossary-tree has a CamelCase synonym: \glsFindWidestUsedTopLevelName
but also sets the first two sub-levels as well. Any entry that has a great-grandparent is ignored.\glsFindWidestUsedAnyName
but also measures the symbol. The length of the widest symbol is stored in .\glsFindWidestUsedAnyNameSymbol
but also measures the location list. This requires \glsentrynumberlist
. The length of the widest symbol is stored in and the length of the widest location list is stored in .\glsFindWidestUsedAnyNameSymbolLocation
but doesn’t measure the symbol. The length of the widest location list is stored in .8.7. New Glossary Styles
\usepackage
but it’s simpler to use the stylemods option. For example:
If you don’t require any of the base styles, use nostyles (but note that some style packages automatically load another style package if it the style builds on an existing one).\usepackage
[stylemods=bookindex,style=bookindex]{glossaries-extra}
8.7.1. glossary-bookindex package
. You can switch from multicols to multicols* by redefining:
For example: \begin{multicols}
{ }\renewcommand
{\glsxtrbookindexmulticolsenv
}{multicols*}
by default. For example, if you want the symbol to be included: \glossentryname
{ }
or if you want the description (if set): \renewcommand
*{\glsxtrbookindexname
}[1]{%
\glossentryname
{#1}%
\ifglshassymbol
{#1}{\space
(\glossentrysymbol
{#1})}{}%
}
(which picks up the post-description hook).\renewcommand
*{\glsxtrbookindexname
}[1]{%
\glossentryname
{#1}%
\ifglshasdesc
{#1}{\space
\glossentrydesc
{#1}\glspostdescription
}%
}
\glsxtrpostname
hook to append information after the name according to the entry’s category.
.\glsxtrbookindexname
{ },
otherwise it just does \glsxtrprelocation
\glsxtrprelocation
(which defaults to \space
) with no comma. If you’re using bib2gls with save-locations=false, the location field won’t be set.
.\glsxtrbookindexprelocation
{entry-label}\nopagebreak
.\glsxtrbookindexparentchildsep
.
This uses \renewcommand
{\glsxtrbookindexatendgroup
}[1]{%
\glsxtrifhasfield
{seealso}{#1}%
{\glstreesubitem
\glsxtruseseealso
{#1}}{}%
}
\renewcommand
{\glsxtrbookindexbetween
}[2]{%
\glsxtrbookindexatendgroup
{#1}%
}
\renewcommand
{\glsxtrbookindexsubatendgroup
}[1]{%
\glsxtrifhasfield
{seealso}{#1}%
{\glstreesubsubitem
\glsxtruseseealso
{#1}}{}%
}
\renewcommand
{\glsxtrbookindexsubbetween
}[2]{%
\glsxtrbookindexsubatendgroup
{#1}%
}
\renewcommand
{\glsxtrbookindexsubsubatendgroup
}[1]{%
\glsxtrifhasfield
{seealso}{#1}%
{\glstreeitem
\hspace
*{40pt}\glsxtruseseealso
{#1}}{}%
}
\renewcommand
{\glsxtrbookindexsubsubbetween
}[2]{%
\glsxtrbookindexsubsubatendgroup
{#1}%
}
\glstreesubitem
and \glstreesubsubitem
to indent the cross-reference according to the next level down, so the cross-reference for a top-level entry is aligned with the sub-entries, and a level 1 entry has its cross-reference aligned with sub-sub-entries. In the event that a level 2 entry has a cross-reference, this is indented a bit further (but it won’t be aligned with any deeper level as the bookindex style only supports a maximum of two sub-levels).\pdfbookmark
has been defined, this will use that command to bookmark the group title. If section=chapter is set (default if chapters are defined) then this uses level 1 otherwise it uses level 2. You can redefine this command if this isn’t appropriate. If \pdfbookmark
hasn’t been defined, this command does nothing.
where \newcommand
*{\glsxtrbookindexformatheader
}[1]{%
\par
{\centering
\glstreegroupheaderfmt
{#1}\par
}%
}
\glstreegroupheaderfmt
is provided by the glossary-tree package, which is automatically loaded. Note that the entry names aren’t encapsulated with \glstreenamefmt
.\print…glossary
commands. (That is, they should only be used in glossary styles or in hooks.) \glsxtrbookindexname
can be redefined to mark the current entry:
If you only want to mark the top-level entries, remember to redefine \renewcommand
{\glsxtrbookindexname
}[1]{%
\glsxtrbookindexmarkentry
{#1}%
\glossentryname
{#1}%
}
\glsxtrbookindexsubname
as it defaults to \glsxtrbookindexname
: \renewcommand
{\glsxtrbookindexsubname
}[1]{%
\glossentryname
{#1}%
}
\pagestyle
{fancy}%
\lhead
{\thepage
}%
\lfoot
{\glsxtrbookindexfirstmark
}%
\cfoot
{}%
\rfoot
{\glsxtrbookindexlastmark
}%
8.7.2. glossary-longextra package
\GlsLongExtraUseTabulartrue
). Again, the style must be set after this change to the conditional is implemented. You can test this setting with:
or \GlsLongExtraUseTabulartrue
\setglossarystyle
{long-name-desc}
If you switch to tabular, the default vertical alignment is obtained from:
This should expand to one of: \GlsLongExtraUseTabulartrue
\printunsrtglossary
[style=long-name-desc]
c
(centred), t
(top) or b
(bottom). The default is c
.\textbf{ }
by default. As with the long-like styles, the header text for the columns are given by the language-sensitive commands: \entryname
, \descriptionname
, \symbolname
and \pagelistname
.\glossentryname
, so it supports the post-name hook and associated attributes. Child entries are displayed with:
This includes the sub-entry item number (if subentrycounter is on) and the hypertarget anchor. The actual name isn’t shown by default.l
by default.\glossentrydesc
and the post-description hook, and
for child entries (which just uses \glslongextraDescFmt
).>{\raggedright}p{
by default. This means ragged-right paragraph style with width given by \glsdescwidth
}\glsdescwidth
. (See the documentation for the array package for information about this alignment syntax.) If a widest name has been set, \glsdescwidth
will be calculated according to the best fit for the given style.\glssetwidest
provided with the alttree style, the default widest name will be obtained from that, but note that only level 0 is supported for the glossary-longextra styles.\glslongextraSetWidest
but will only set the new value if it’s wider than the current widest name.\glslongextraSubNameFmt
is redefined to show the child name, then the above command will need to be redefined to use \glslongextraUpdateWidest
.>{\raggedright}p{
by default. This means ragged-right paragraph style with width given by \glspagelistwidth
}\glspagelistwidth
.\glossentrysymbol
. Child entries use:
which uses \glslongextraSymbolFmt
.c
by default.8.7.2.1. Name and Description Only
\glsdescwidth
according to the widest name, identified with \glslongextraSetWidest
. The column header text is also taken into account. If a widest name hasn’t been set and the column header is shorter than one or more names, the description column may be too wide. The value of \glsdescwidth
is calculated as \linewidth
-4\tabcolsep
-W, where W is the width of the widest name.\glsdescwidth
to a specific value, then redefine \glslongextraSetDescWidth
with the desired length assignment.8.7.2.2. Name, Symbol and Description Only
\glsdescwidth
according to the widest name, identified with \glslongextraSetWidest
. This starts by calculating \glsdescwidth
with \glslongextraSetDescWidth
and then subtracts the width of the symbol column header text (which is assumed to be the widest text in that column).\glsdescwidth
to a specific value, then redefine \glslongextraSymSetDescWidth
with the desired length assignment.8.7.2.3. Name, Description and Location Only
\glsdescwidth
according to the widest name, identified with \glslongextraSetWidest
. This starts by calculating \glsdescwidth
with \glslongextraSetDescWidth
and then subtracts 2\tabcolsep
-\glspagelistwidth
.\glsdescwidth
to a specific value, then redefine \glslongextraLocSetDescWidth
with the desired length assignment.8.7.2.4. Name, Description, Symbol and Location
\glsdescwidth
according to the widest name, identified with \glslongextraSetWidest
. This starts by calculating \glsdescwidth
with \glslongextraSymSetDescWidth
and then subtracts 2\tabcolsep
-\glspagelistwidth
.\glsdescwidth
to a specific value, then redefine \glslongextraSymLocSetDescWidth
with the desired length assignment.8.7.2.5. Symbol and Description Only
l
by default. Note that this is different from the alignment used for styles like long-name-sym-desc.\glslongextraSymbolFmt
. Child entries use:
Unlike \glslongextraSubNameFmt
this shows the field value (formatted with \glslongextraSymbolFmt
).\glslongextraSubSymbolTargetFmt
, if set, or the name otherwise, with the target.\glsdescwidth
as \linewidth
-4\tabcolsep
-W, where W is the width of the symbol column header. Note that this assumes the content of the symbol column isn’t wider than the column header.\glsdescwidth
to a specific value, then redefine \glslongextraSymNoNameSetDescWidth
with the desired length assignment. For example, if you have a mixture of entries with symbols and some without, which means that there will be a name shown that’s wider than the symbol column header, then set the widest name (for example, with the set-widest resource option) and add the following redefinition:
Note that, in this case, if you don’t set the widest name then the description column will end up even wider (and therefore cause the table to be even wider) if the name header is narrower than the symbol header.\renewcommand
{\glslongextraSymNoNameSetDescWidth
}{%
\glslongextraSetDescWidth
}
8.7.2.6. Abbreviations Only
\glslongextraNameAlign
). The column for the long form uses the same alignment as for the description columns (\glslongextraDescAlign
) and has the width set to \glsdescwidth
. However, the name and description formatting commands or attributes (such as \glsnamefont
, glossnamefont or glossname) aren’t used as the formatting is left to the abbreviation style. \newcommand
{\glslongextraShortHeader
}{\entryname
}
\newcommand
{\glslongextraLongHeader
}{\descriptionname
}
Note that the post-name hook is included.\newcommand
{\glslongextraShortTargetFmt
}[1]{%
\glsentryitem
{#1}\glstarget
{#1}{{\glsxtrshort
[noindex,hyper=false]{#1}}}%
\glsxtrpostnamehook
{#1}}
Note that the post-description hook is included.\newcommand
{\glslongextraLongFmt
}[1]{%
{\glsxtrlong
[noindex,hyperfalse]{#1}}\glspostdescription
}
\newcommand
{\glslongextraSubShortTargetFmt
}[2]{%
\glssubentryitem
{#2}\glstarget
{#2}{{\glsxtrshort
[noindex,hyper=false]{#2}}}%
\glsxtrpostnamehook
{#2}}
\newcommand
{\glslongextraSubLongFmt
}[2]{\glslongextraLongFmt
{#2}}
\glsdescwidth
and assumes that none of the short forms are wider than \glslongextraShortHeader
.8.7.2.7. Custom Fields
which means that it will be “Useri” by default, which is unlikely to be appropriate, but it may be suitable if you change the first custom field.\MFUsentencecase
{\glslongextraCustomIField
}
\glsxtrusefield
{ }{\glslongextraCustomIField
}
\glslongextraCustomIFmt
{ }
\glsxtrusefield
{ }{\glslongextraCustomIIField
}
\glslongextraCustomIIFmt
{ }
\glsxtrusefield
{ }{\glslongextraCustomIIIField
}
\glslongextraCustomIIIFmt
{ }
\bottomrule
.\glslongextraNameFmt
and the custom field is formatted with \glslongextraCustomIFmt
. Sub-entries use \glslongextraSubNameFmt
and \glslongextraSubCustomIFmt
.\glslongextraCustomIIFmt
for top-level entries and with \glslongextraSubCustomIIFmt
for child-entries.\glslongextraCustomIIIFmt
for top-level entries and with \glslongextraSubCustomIIIFmt
for child-entries.\glslongextraDescAlign
for the column alignment. These styles attempt to calculate an appropriate width for \glsdescwidth
.\glsdescwidth
for the long-name-custom1-desc style. This first uses \glslongextraSetDescWidth
to calculate the width W if there were only a name and description column. It then measures the width of the first custom column header w and sets \glsdescwidth
to w - 2\tabcolsep
- w. This assumes that the first custom column header is wider than the value of each entry’s first custom field. If this isn’t the case, then you will need to redefined this command as appropriate.\glsdescwidth
for the long-name-custom2-desc style. This first uses \glslongextraCustomISetDescWidth
to calculate the width W if there were only a name column, first custom column, and description column. It then measures the width of the second custom column header w and sets \glsdescwidth
to w - 2\tabcolsep
- w. This assumes that the second custom column header is wider than the value of each entry’s second custom field. If this isn’t the case, then you will need to redefined this command as appropriate.\glsdescwidth
for the long-name-custom3-desc style. This first uses \glslongextraCustomIISetDescWidth
to calculate the width W if there were only a name column, first custom column, second custom column, and description column. It then measures the width of the third custom column header w and sets \glsdescwidth
to w - 2\tabcolsep
- w. This assumes that the third custom column header is wider than the value of each entry’s third custom field. If this isn’t the case, then you will need to redefined this command as appropriate.8.7.3. glossary-topic package
\glssetwidest
can be used on these styles in much the same way as for the alttree style. If a widest value isn’t set then these styles behave more like the tree style.multicols
. You can change this to the starred form. For example:
The number of columns is given by the command:
This expands to 2, by default. This style is demonstrated in Example 148.\renewcommand
{\glstopicColsEnv
}{multicols*}
Note that this doesn’t change the indentation at the start of the level 2 items to match the width of the level 1 widest name.\glssetwidest
[1]{parameter}
\glssetwidest
[2]{\glsentryname
{cosine}}
\glstopicSubIndent
. The hanging indent depends on whether or not a widest name has been set for the level.\parindent
when glossary-topic is loaded.\glsxtrgetgrouptitle
. For example:
Remember that if you are using bib2gls, you will need the --group or -g switch to support groups (see §8.4.1).\renewcommand
*{\glstopicGroupHeading
}[1]{%
\glsxtrgetgrouptitle
{#1}{\thisgrptitle
}%
\section
*{\thisgrptitle
}%
}
\glstopicGroupHeading
this command does actually format the sub-group heading by default. This means that it you use group-level=all, the top-level groups won’t be displayed, but the sub-groups will be.\glstopicItem
, a vertical space is added with:
which defaults to \medskip
. There is then a hook:
which does nothing by default, but may be redefined. For example, to add a line to the table of contents. The name and symbol are set in the form of a title using:
This uses \Glossentryname
which uses sentence case. If there’s a symbol, this is added in parentheses. Both name and symbol (if present) are encapsulated by:
This uses a bold, large font by default.\ifglshasdesc
) then a paragraph break is inserted followed by: \smallskip
. This is followed by the description which is formatted according to:
This just does
followed by the post-description hook. There is then a paragraph break followed by:
regardless of whether or not the description was displayed. This defaults to \Glossentrydesc
{entry-label}\smallskip
. This is then followed by:
which may be used to display the location list, but does nothing by default.\textbf
. This is followed by:
which defaults to \quad
. The name and separator are passed in the argument of:
If a widest name was set for the given level, this will put inside a box of that width otherwise it just does .8.7.4. glossary-table package
\glspenaltygroupskip
for the group skip, you will need to also load glossary-longbooktabs.\setglossarystyle
or the style option, as it’s only intended for use within \printunsrttable
, which sets up the appropriate hooks to allow the style to work with \printunsrtglossary
(which is used implicitly).\glossarypreamble
and postamble \glossarypostamble
are outside of longtable.\glossarysection
, \glossarypreamble
and \glossarypostamble
are redefined by \printunsrttable
to do nothing so that they aren’t shown outside of the longtable by \printunsrtglossary
, otherwise there would be a duplication of the information in the header and footer of the table. The \printunsrtglossary
hooks are used to insert the inter-block tabulation (&
) character and new row command in the construction performed outside of longtable, which would otherwise cause issues if used directly in the table style.\glossentry
is defined to do the block according to the designated block style, which includes the child entries, if the childcount field has been set and is non-zero.\subglossentry
command is redefined to do nothing, but it won’t be used as the child entries are all filtered out. If you don’t use the save-child-count resource option, no child entries will be shown. There’s no recursive descent down the hierarchical levels. \printunsrtglossaryentryprocesshook
is assigned to within \printunsrttable
. This custom hook allows additional filtering to be employed with the command:
Note that if this command is redefined to do neither nor or does both, it will interfere with the width calculations if par isn’t set to the default par=false.\renewcommand
{\glstableiffilter
}[1]%
\glsifcategory
{#1}{general}
\printunsrttable
. For example: \printunsrttable
[init={% \renewcommand
{\glstableiffilter
}[1]% \glsifcategory
{##1}{general}% }]
\glstableNameFmt
to make the name appear in bold, to highlight it. I’ve used the par=ragged option, otherwise the table will be too wide to fit the page.
This creates a table with two entries per row.
Note that each row is as deep as the entry with the most children. So where a row has one column with two children and another with seven, the row is deep enough to accommodate the seven child entries, which leaves a gap below the smaller list of two children.\usepackage
[record,stylemods=table,subentrycounter]
{glossaries-extra}
\GlsXtrLoadResources
[
% entries in example-glossaries-childnoname.bib:
src=example-glossaries-childnoname,
selection=all,
save-child-count=]
\begin{document}
\printunsrttable
[
block-style=name,par=ragged,
preamble={Some preamble text},
postamble={Some postamble text},
init={% \let
\glstableNameFmt
\textbf
\def
\glstablenameheader
{Summary}% }
]
\end{document}
8.7.4.1. Child Entries
\glstableiffilter
filters top-level entries, and their child entries will also be filtered. Child entries for non-filtered top-level entries can be filtered by redefining:
where is the child entry label. This command should do if the child entry should be filtered and otherwise.\glstableChildEntries
command will display the non-filtered children in the form:
This consists of the following.
Occurs at the start. If par=justified or par=ragged, this will do \glstablePreChildren
\begin{glstablesubentries}
\glstableblocksubentry
{ }
\glstableblocksubentrysep
\glstableblocksubentry
{ }
…\glstableblocksubentrysep
\glstableblocksubentry
{ }
\end{glstablesubentries}
\par
otherwise it does nothing.
The argument is obtained by expanding:
which takes the par setting into account.\begin{tabular}
[t]{ }
\end{tabular}
\glstableblocksubentry
which is redefined by the block style.\glstablenewline
.8.7.4.2. Options
\printunsrttable
may have the options that can typically be passed to \printunsrtglossary
, except that the nonumberlist and style options won’t have an effect. If you want the location list, it can simply be obtained from the location field in the appropriate style hook.\glossarytitle
, which can be changed with the title option. The argument is the title for the list of tables and is actually what would normally be the title for the table of contents, which can be set with the toctitle option. The default definition simply does:
An empty (toctitle={}) will prevent the caption from being added to the list of tables.\caption
[ ]{ }
\glstablecaption
to use \caption*
.
This has an empty optional argument to prevent the caption from being repeatedly added to the list of tables. The title is followed by:
You can either redefine this command to adjust the content after the title or redefine \caption
[]{\glstablepostnextcaption
}
\glstablenextcaption
, as appropriate.\entryname
by default.\descriptionname
by default.\symbolname
by default.\MFUsentencecase
to the other field label.l
, r
or c
. The other values will use the p
specifier, in which case the column widths will be calculated.\printunsrtglossary
is called and any local changes will be scoped.8.7.4.3. Block Styles
8.7.4.4. Associated Commands
\tabularnewline
(not \\
which has a different action in paragraph columns).p{
, whereas with }par=ragged the paragraph will be ragged right or ragged left or have centring applied.l
or p{
or }>\protect\raggedrightp{ }
, depending on the par setting.r
or p{
or }>\protect\raggedleftp{ }
, depending on the par setting.c
or p{
or }>\protect\centeringp{ }
, depending on the par setting.\glstableleftalign
{\glstablenamewidth
}
\glstableleftalign
{\glstabledescwidth
}
\glstablecenteralign
{\glstablesymbolwidth
}
\glstableleftalign
{\glstableotherwidth
}
\tabcolsep
. The length registers below are initialise to 5pt, and can be redefined as appropriate.
, so any formatting applied by that command will also be in effect.\glossentryname
{ }
, so any formatting applied by that command will also be in effect.\glossentrysymbol
{ }\glstableSymbolFmt
by default.
so any formatting applied by \glossentrydesc
{ }\glspostdescription
\glossentrydesc
will also be in effect. Note that the post-description hook is included in the formatted.\glstableDescFmt
by default.\printunsrttable
if a default field is required.\glstableOtherFmt
{%
\glsxtrusefield
{ }{\glstableotherfield
}}
\glstableOther
{ }\ifglsfieldvoid
) otherwise it does . This will always do if \glstableotherfield
is void.\entryname
.\descriptionname
.\symbolname
.\MFUsentencecase
{\glstableotherfield
}
.\textbf
{ }9. Accessibility Support
9.1. Abbreviations
\newabbreviation
if they haven’t been set.\appto
. For example, the following eccentric example has some strange styling in the abbreviation:
If an accessibility field is being automatically assigned with text obtained from the short value, then the subscript and superscript commands will need to be stripped. These need to be locally redefined to just do their arguments: \newabbreviation
{foo}{f\textsuperscript
{o}\textsubscript
{o}}{furry old otters}
\appto
\glsxtrassignactualsetup
{%
\letcs
{\textsuperscript
}{@firstofone}%
\letcs
{\textsubscript
}{@firstofone}%
}
\glsxtrassignactualsetup
. The actual short value may then be modified by these attributes. Similarly, for the “actual long value”.
(with \glsdefaultshortaccess
{ }{ }
\glsdefaultshortaccess
expanded). This command is provided by glossaries-accsupp and is defined to do just { }. It was redefined by glossaries-extra v1.42 to do {
, but has been reverted back to its original definition in v1.49. } ({ })\glsxtrabbrvpluralsuffix
instead of \abbrvpluralsuffix
). Note that if this attribute hasn’t been set but aposplural is true (and the shortpluralaccess key hasn’t been set), then the actual short plural value will also have the apostrophe suffix.9.2. Accessibility Wrappers
\glossentryname
incorporate accessibility support by using the \glsaccess
commands instead of the corresponding \glsentry
commands.\glsentry
command.\glsnameaccessdisplay
or just \glsentryname
{ }.\glstextaccessdisplay
or just \glsentrytext
{ }.\glspluralaccessdisplay
or just \glsentryplural
{ }.\glsfirstaccessdisplay
or just \glsentryfirst
{ }.\glsfirstpluralaccessdisplay
or just \glsentryfirstplural
{ }.\glssymbolaccessdisplay
or just \glsentrysymbol
{ }.\glssymbolpluralaccessdisplay
or just \glsentrysymbolplural
{ }.\glsdescriptionaccessdisplay
or just \glsentrydesc
{ }.\glsdescriptionpluralaccessdisplay
or just \glsentrydescplural
{ }.\glsshortaccessdisplay
or just \glsentryshort
{ }.\glsshortpluralaccessdisplay
or just \glsentryshortpl
{ }.\glslongaccessdisplay
or just \glsentrylong
{ }.\glslongpluralaccessdisplay
or just \glsentrylongpl
{ }.\glsuseriaccessdisplay
or just \glsentryuseri
{ }.\glsuseriiaccessdisplay
or just \glsentryuserii
{ }.\glsuseriiiaccessdisplay
or just \glsentryuseriii
{ }.\glsuserivaccessdisplay
or just \glsentryuseriv
{ }.\glsuservaccessdisplay
or just \glsentryuserv
{ }.\glsuserviaccessdisplay
or just \glsentryuservi
{ }.9.3. Inner Formatting Wrappers
\glsaccessfmt
commands are similar to the corresponding \glsaccess
commands described above, but they format the field value using \glsfmtfield
, \Glsfmtfield
or \GLSfmtfield
with the supplied encapsulating command.\glsgenentryfmt
, and the predefined abbreviation styles all incorporate accessibility support by using these commands in order to support the inner formatting.\glsnameaccessdisplay
.\glstextaccessdisplay
.\glspluralaccessdisplay
.\glsfirstaccessdisplay
.\glsfirstpluralaccessdisplay
.\glssymbolaccessdisplay
.\glssymbolpluralaccessdisplay
.\glsdescriptionaccessdisplay
.\glsdescriptionpluralaccessdisplay
.\glsshortaccessdisplay
.\glsshortpluralaccessdisplay
.\glslongaccessdisplay
.\glslongpluralaccessdisplay
.\glsuseriaccessdisplay
.\glsuseriiaccessdisplay
.\glsuseriiiaccessdisplay
.\glsuserivaccessdisplay
.\glsuservaccessdisplay
.\glsuserviaccessdisplay
.10. Categories
\newglossaryentry
(or commands that internally use it such as \newabbreviation
) is assigned a category through the category key. You may add any category that you like, but since the category is a label used in the creation of some control sequences, avoid problematic characters within the category label. (So take care if you have babel shorthands on that make some characters active.)\glsentryname
).\GlsXtrSetField
(see §3.5). In addition, the following commands are provided to batch set the category for a collection of entries.\glsforeachincategory
.10.1. Known Categories
\newglossaryentry
.\newabbreviation
.\newacronym
.\newterm
.\glsxtrnewsymbol
.\glsxtrnewnumber
.10.2. Attributes
10.2.1. Known Attributes
true
, in which case any other value or a missing value will be interpreted as false. Conversely, the test may be to determine if the attribute has been set to false
, in which case any other value or a missing value will be interpreted as true.10.2.1.1. Abbreviation Attributes
\glsentryfmt
to determine whether to use \glsgenentryfmt
or \glsxtrgenabbrvfmt
.true
. Some abbreviation styles change this value.\gls
or \glstext
(see §5.5.4).
Here the short and long fields end with a full stop, but the user1 field doesn’t. The simplest solution in this situation is to put the sentence terminator in the final optional argument. For example: \newabbreviation
[user1={German Speaking \TeX
\
User Group}]
{dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung
\TeX
\
e.V.}
This will bring the punctuation character inside the link text and it won’t be discarded.\glsuseri
{dante}[.]
\glspl
or \glsplural
.\glsxtrdiscardperiodretainfirstuse
, regardless of the discardperiod or pluraldiscardperiod attributes. This is useful for ( ) abbreviation styles where only the short form has a trailing full stop.\newabbreviation
will automatically have spaces in the long form replaced with:
and each word is encapsulated with:
For example:
is essentially the same as \glssetcategoryattribute
{abbreviation}{markwords}{true}
\newabbreviation
{ip}{IP}{Internet Protocol}
The “hyphen” styles, such as long-hyphen-short-hyphen, take advantage of this markup. If the inserted material (provided in the final argument of \newabbreviation
{ip}{IP}
{\glsxtrword
{Internet}\glsxtrwordsep
\glsxtrword
{Protocol}}
\gls
-like commands) starts with a hyphen then \glsxtrwordsep
is locally redefined to a hyphen. (The default value is a space). Note that this only applies to commands like \gls
and not like \glsxtrlong
. You can provide your own localised switch, if required. For example: \newcommand
{\hyplong
}[2][]{%
{\def
\glsxtrwordsep
{-}\glsxtrlong
[#1]{#2}}}
\newabbreviation
(or \newacronym
if it’s using \newabbreviation
.)\glsxtrword
and \glsxtrwordsep
markup ending up in the sort field, depending on the style in use. \newabbreviation
(or \newacronym
if it’s using \newabbreviation
.)\glsxtrword
and \glsxtrwordsep
markup ending up in the sort field, depending on the style in use. \newabbreviation
will automatically have full stops inserted after each letter. The entry will be defined with those dots present as though they had been present in the argument of \newabbreviation
(rather than inserting them every time the entry is used). The short plural form defaults to the new dotted version of the original form with the plural suffix appended. This setting is incompatible with markshortwords. This attribute is only applicable to entries defined using \newabbreviation
(or \newacronym
if it’s using \newabbreviation
.)\newabbreviation
will insert an apostrophe (’) before the plural suffix for the short plural form (unless explicitly overridden with the shortplural key). The long plural form is unaffected by this setting. This setting overrides noshortplural. This attribute is only applicable to entries defined using \newabbreviation
(or \newacronym
if it’s using \newabbreviation
.) Check with your supervisor, publisher or editor if you want to use this attribute as this usage is controversial.\newabbreviation
won’t append the plural suffix for the short plural form. This means the short and shortplural values will be the same unless explicitly overridden. This setting is incompatible with aposplural. This attribute is only applicable to entries defined using \newabbreviation
(or \newacronym
if it’s using \newabbreviation
.)\GlsXtrEnableInitialTagging
will be activated to use \glsxtrtagfont
in the glossary (see §4.4)10.2.1.2. Attributes that Alter
\glslink
Options\gls
-like commands, if this attribute is set to true
, this will automatically suppress the hyperlink on first use.\gls
-like command. \glsfirst
, \Glsfirst
, \GLSfirst
and their plural versions (which should ideally behave in a similar way to the first use of \gls
or \glspl
) now honour this attribute (but not the package-wide hyperfirst=false option, which matches the behaviour of glossaries). If you want commands like \glsfirst
to ignore the nohyperfirst attribute then just redefine \glsxtrchecknohyperfirst
to do nothing.true
, this will automatically set hyper=false on subsequent use when using the \gls
-like commands.true
, this will automatically set hyper=false when using the \gls
-like or \glstext
-like commands.\gls
-like or \glstext
-like commands, this will automatically set wrgloss=after it this attribute is set to “after”.\gls
-like and \glstext
-like commands have the link text encapsulated in the argument of \glstextformat
by default (the outer formatting, see §5.5.1). If the textformat attribute is set, the control sequence given by the attribute value will be used instead. The attribute value should be the name (without the leading backslash) of a command that takes a single argument (the link text). Remember that the abbreviation styles may apply an additional font change.false
, true
or unset. If unset, true
is assumed. This indicates the default setting of the hyperoutside option, described in §5.1.10.2.1.3. Glossary Attributes
\glossentrydesc
to determine whether or not to apply any case change. The value may be one of:
Any other values of this attribute are ignored. Remember that there are design limitations for both the sentence case and the title case commands. See the mfirstuc user manual for further details.\Glsentrydesc
). \glscapitalisewords
, which defaults to \capitalisewords
(provided by mfirstuc). You can either redefine \glscapitalisewords
if you want the change to also affect \glsentrytitlecase
or if you only want the change to apply to the attribute case-changing then redefine \glsxtrfieldtitlecasecs
. For example:
(Note that the argument to \newcommand
*{\glsxtrfieldtitlecasecs
}[1]{\xcapitalisefmtwords
*{#1}}
\glsxtrfieldtitlecasecs
will be a control sequence whose replacement text is the entry’s description, which is why \xcapitalisefmtwords
is needed instead of \capitalisefmtwords
.)\glossentrydesc
to the description text. For example: \glssetcategoryattribute
{general}{glossdescfont}{emph}
\glossentryname
. Additionally, if this attribute is set to “uc” the name is converted to all caps.\index
. See §12 for further details.\glossentryname
. Note that this overrides \glsnamefont
which will only be used if this attribute hasn’t been set.\item
.\glossentrysymbol
.10.2.1.4. Other Attributes
\glsfmtshort
will use the upper case version in the page headers.\glsenableentrycount
(see §6.1). Leave blank or undefined for categories that shouldn’t have this facility enabled. The value of this attribute is used by \glsxtrifcounttrigger
to determine how commands such as \cgls
should behave.true
by \GlsXtrEnableLinkCounting
(see §6.2).\GlsXtrEnableLinkCounting
to the name of the counter that requires the link counter to be added to its reset list (see §6.2).\gls
and \glsadd
, a corresponding line will be written to the indexing file using \index
. The value may be true
to simply enable this feature or the value may be the encap to use with \index
. See §12 for further details.\gls
will be set to the URL provided by this attribute’s value. For example:
(See also the accompanying sample file sample-external.tex.) If the URL contains awkward characters (such as % or ~) remember that the base glossaries package provides commands like \glssetcategoryattribute
{general}{targeturl}{master-doc.pdf}
\glspercentchar
and \glstildechar
that expand to literal characters.#
to the URL), then you also need to set targetname to the anchor . You may use \glslabel
within which is set by commands like \gls
to the entry’s label.\glstarget
which sets the anchor to
, so if you want entries to link to glossaries in the URL given by targeturl, you can just do: \glolinkprefix
\glslabel
(If the target document changed \glssetcategoryattribute
{general}{targetname}{\glolinkprefix
\glslabel
}
\glolinkprefix
then you will need to adjust the above as appropriate.) then use .targetname for the part and targetcategory for the part.
will cause all link text for general entries to link to master-doc.pdf#page.7 (page 7 of that PDF).\glssetcategoryattribute
{general}{targeturl}{master-doc.pdf}
\glssetcategoryattribute
{general}{targetcategory}{page}
\glssetcategoryattribute
{general}{targetname}{7}
\newignoredglossary*
for the external list. For example: \newignoredglossary*
{external}
\glssetcategoryattribute
{external}{targeturl}{master-doc.pdf}
\glssetcategoryattribute
{general}{targetname}{\glolinkprefix
\glslabel
}
\newglossaryentry
{sample}{name={sample},description={local example}}
\newglossaryentry
{sample2}{name={sample2},
type={external},
category={external},
description={external example}}
10.2.2. Accessing and Setting Attributes
true
for the given category using \glssetcategoryattribute
.\ifcsvoid
and does if the attribute has been set and isn’t blank and isn’t \relax
otherwise it does . \glshascategoryattribute
but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.
This does “NO HYPER” if the general category has the nohyper attribute set to \glsifcategoryattribute
{general}{nohyper}{true}{NO HYPER}{HYPER}
true
otherwise if does “HYPER”.\glsifcategoryattribute
but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.true
.false
.\glsifregularcategory
and \glsifnotregularcategory
will do . The choice of command needs to be determined by what outcome should occur if the attribute hasn’t been set. \glsifregularcategory
but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.\glsifnotregularcategory
but the category is obtained from the given entry. This command can’t be used to test an attribute associated with a multi-entry category.true
and otherwise. Expands to if there’s no such attribute for the given category.\glsifcategoryattributetrue
but the category is obtained from the given entry. Expands to if the entry isn’t defined. This command can’t be used to test an attribute associated with a multi-entry category.\DTLifinlist
to perform the test.11. bib2gls: Managing Reference Databases
Instead of storing all your entry definitions in a tex and loading them using \input
or \loadglsentries
, the entries can instead be stored in a bib file and bib2gls can selectively write the appropriate commands to a glstex file which is loaded using \GlsXtrLoadResources
.texdoc bib2gls
The following provides some abbreviations in a file called, say, abbrvs.bib: @entry
{bird,
name={bird},
description={feathered animal},
see={[see also]duck,goose}
}
@entry
{duck,
name={duck},
description={a waterbird with short legs}
}
@entry
{goose,
name="goose",
plural="geese",
description={a waterbird with a long neck}
}
The above defines bib strings (with @string
{ssi={server-side includes}}@string
{html={hypertext markup language}}
@abbreviation
{shtml,
short="shtml",
long= ssi # " enabled " # html,
description={a combination of \gls
{html} and \gls
{ssi}}
}
@abbreviation
{html,
short ="html",
long = html,
description={a markup language for creating web pages}
}
@abbreviation
{ssi,
short="ssi",
long = ssi,
description={a simple interpreted server-side scripting language}
}
@abbreviation
{xml,
short={xml},
long={extensible markup language},
description={a simple text-base format for
representing structured information}
}@string
) and uses string concatenation (with #
), which is a BibTeX feature. Another supported bib feature is @preamble
, which may be used to provide command definitions.@preamble
{"\providecommand
{\mtx
}[1]{\boldsymbol
{#1}}"}
@symbol
{M,
name={\ensuremath
{\mtx
{M}}},
description={a matrix}
}
@symbol
{v,
name={\ensuremath
{\vec
{v}}},
description={a vector}
}
@symbol
{S,
name={\ensuremath
{\mathcal
{S}}},
description={a set}
}
If you are using hyperref, you may prefer to use record=nameref.\usepackage
[record]{glossaries-extra}
\glsindexingsetting
to bib2gls
(or bib2gls-xindy
or bib2gls-makeindex
if record=hybrid). There’s a shortcut version:
This internally uses \glsxtrresourcefile
and sets the to \jobname
in the first instance and to
on subsequent instances (where is incremented at the end of every \jobname
-\GlsXtrLoadResources
). For example:
is equivalent to: \usepackage
[record]{glossaries-extra}
\GlsXtrLoadResources
[src={terms,moreterms}]
\GlsXtrLoadResources
[src={symbols,constants}]
\GlsXtrLoadResources
[src={abbreviations}]
If required, the value of is stored in the count register:
although there should be little need to use this.\usepackage
[record]{glossaries-extra}
\glsxtrresourcefile
[src={terms,moreterms}]{\jobname
}
\glsxtrresourcefile
[src={symbols,constants}]{\jobname
-1}
\glsxtrresourcefile
[src={abbreviations}]{\jobname
-2}
\GlsXtrLoadResources
is more convenient to use than \glsxtrresourcefile
, all examples use \GlsXtrLoadResources
. \glsxtrresourcefile
command writes the following to the aux file: \jobname
. The glstex extension was enforced by version 1.11.)\glsxtr@resource
. For example, using arara: % arara: bib2gls if found("aux", "glsxtr@resource")
\gls
or \glstext
will produce ??
in the document, since the entries are undefined at this point. Once bib2gls has created the glstex file the references should be resolved. This may cause a shift in the locations if the actual text produced once the entry is defined is significantly larger than the placeholder ??
(as this can alter the page breaking).\glsxtrresourcefile
temporarily switches the category code of @
to 11 (letter) while it reads the file to allow for any internal commands.\GlsXtrLoadResources
is written to the aux file using:
where is the information to pass to bib2gls. The command in the second argument:
may be used to temporarily redefine commands before the information is written to the file. This does nothing by default, but may be redefined to allow the use of short commands for convenience. For example, with: \protected@write
\@auxout
{\glsxtrresourceinit
}{ }
you can just use, for example, \renewcommand
{\glsxtrresourceinit
}{\let
\u
\glshex
}
instead of \u
E6
in the custom rule. This redefinition of \string
\u
E6\u
is scoped so its original definition is restored after the write operation.\glsxtrresourceinit
to use \GlsXtrResourceInitEscSequences
.\glsxtrresourcefile
, and will add \MFUsave
to the begin document hook and then disable itself. This is provided to help bib2gls v3.0+ pick up any of mfirstuc’s exclusions, blockers and mappings to assist with its sentence case function. The assumption is that all exclusions, blockers and mappings will be set up in the preamble. If there are any within the document environment that you want bib2gls to be aware of, redefine this command to do nothing before the first instance of \glsxtrresourcefile
(or \GlsXtrLoadResources
) and use \MFUsaveatend
instead.
This should be done before the resource commands to which the options should apply.\renewcommand
{\GlsXtrDefaultResourceOptions
}{selection=all}
11.1. Indexing (Recording)
\gls
-like and \glstext
-like commands automatically index, but the underlying indexing mechanism is more like that used with \makenoidxglossaries
. Each indexing instance creates a record in the aux file, which bib2gls can then pick up when it parses the aux file. Each record has an associated format (the location encap) which can be set with the format key and an associated location counter (as with the other indexing methods).\makenoidxglossaries
). This may be used to pick out individual locations to avoid the complexity of parsing the formatted list.11.2. Selection
glsignore
format (for example,
) is recognised by bib2gls as a special ignored record. This means that it will match the selection criteria but the record won’t be added to the location list. This means that you won’t get spurious commas in the location list (as can happen with the other indexing methods), so you can do, for example, \gls
[format=glsignore]{duck}
at the start of the front matter and \GlsXtrSetDefaultNumberFormat
{glsignore}
at the start of the main matter to prevent any records in the front matter from occurring in the location lists.\GlsXtrSetDefaultNumberFormat
{glsnumberformat}
\glsaddall
and \glsaddallunused
don’t work with bib2gls as the command has to iterate over each glossary’s internal lists of defined entry labels, which will be empty on the first run and on subsequent runs will only contain those entries that have been selected by bib2gls. Use selection=all to select all entries instead. 11.3. Sorting and Displaying the Glossary
\printglossary
. With bib2gls, the entries supplied in the bib files are sorted and the entry definition code (\longnewglossaryentry
or \newabbreviation
) is written to the glstex file in the order obtained by sorting. This means that the glossary’s internal list is in the required order, so the glossary can be displayed with \printunsrtglossary
(see §8.4).\printunsrtglossary
, but it means that the information is also available for use elsewhere in the document (so the savenumberlist package option provided by glossaries is redundant).
The locale-sensitive sort methods usually ignore most punctuation so for lists of symbols you may find it more appropriate to use one of the letter-base sort methods that sort according to the Unicode value of each character. Alternatively you can provide a custom rule. See the bib2gls manual for full details of all the available sort methods.\GlsXtrLoadResources
[
src=terms, % data in terms.bib
sort=de-DE-1996 % sort according to this locale
]
The document build process (assuming the document is called mydoc) is: \documentclass
{article}
\usepackage
[record]{glossaries-extra}
\setabbreviationstyle
{long-short-sc-desc}
\GlsXtrLoadResources
[src=terms,abbrvs,symbols]
\begin{document}
\gls
{bird}
\gls
{shtml}
\gls
{M}
\gls
{printunsrtglossaries}
\end{document}
pdflatex mydoc
bib2gls mydoc
pdflatex mydoc
This creates a single glossary containing the entries: bird
, duck
, goose
, html
, M
, shtml
and ssi
(in that order). The bird
, shtml
and M
entries were added because bib2gls detected (from the aux file) that they had been used in the document. The other entries were added because bib2gls detected (from the bib files) that they are referenced by the used entries. In the case of duck
and goose
, they are in the see field for bird
. In the case of ssi
and html
, they are referenced in the description field of shtml
. These cross-referenced entries won’t have a location list when the glossary is first displayed, but depending on how they are referenced, they may pick up a location list on the next document build. The xml
entry isn’t required at all, and so hasn’t been defined (from LaTeX’s point of view).\usepackage
[record,abbreviations,symbols]{glossaries-extra}
\setabbreviationstyle
{long-short-sc-desc}
\GlsXtrLoadResources
[src=terms,sort=en-GB,type=main]
\GlsXtrLoadResources
[src=abbrvs,sort=letter-nocase,type=abbreviations]
\GlsXtrLoadResources
[src=symbols,sort=use,type=symbols]
\begin{document}
\gls
{bird}
\gls
{shtml}
\gls
{M}
\printunsrtglossaries
\end{document}
\GlsXtrLoadResources
with the same type, which will produce a glossary with ordered sub-blocks. For example:
This sets the group field for each resource set to the label given by the group resource option.\usepackage
[record,style=indexgroup]{glossaries-extra}
\setabbreviationstyle
{long-short-sc-desc}
\GlsXtrLoadResources
[src=abbrvs,sort=letter-nocase,type=main,
group=abbreviations]
\glsxtrsetgrouptitle
{abbreviations}{Abbreviations}
\GlsXtrLoadResources
[src=symbols,sort=use,type=main,
group=symbols]
\glsxtrsetgrouptitle
{symbols}{Abbreviations}
\GlsXtrLoadResources
[src=terms,sort=en-GB,type=main]
\begin{document}
\gls
{bird}
\gls
{shtml}
\gls
{M}
\printunsrtglossaries
\end{document}
abbreviations
and title “Abbreviations”, the second group has the label symbols
and title “Symbols” and then follow the usual letter groups. Note that for this example to work, you must run bib2gls with the --group (or -g) switch. For example, if the document is called myDoc.tex: pdflatex myDoc
bib2gls -g myDoc
pdflatex myDoc
glsxtrsetgrouptitle
(see §8.6). If no title is set then the label is used as the group title. \GlsXtrLoadResources
[
src={terms}, % entries in terms.bib
sort=custom, % custom sort rule
sort-rule={% required with sort=custom < æ;Æ < a;á;å;ä,Ä;Á;Å;Ä < b,B < c;ć,C;Ć < d,D < e;é,E;É < f,F < g,G < h,H < i;í,I;Í < j,J < l;ł,L;Ł < m,M < n,N < o;ö;ø,O;Ö;Ø < p,P < q,Q < r,R < s;ś,S;Ś < t,T < u;ú,U;Ú < v,V < w,W < x,X < y,Y < z;ż,Z;Ż }
]
\u
(or \u
). bib2gls will recognise this as the character given by the hexadecimal value .\GlsXtrLoadResources
will expand as they are written to the aux file (unless protected). This includes \u
, so with a non-Unicode aware engine or where the document source is required to be ASCII, the character æ needs to be written as
and so on. Alternatively, use the shortcut \string
\u
E6
. \string
\u
E6\GlsXtrLoadResources
[
src={terms}, % entries in terms.bib
sort=custom, % custom sort rule
sort-rule={% required with sort=custom < \glshex
E6;\glshex
C6 < a;\glshex
E1;\glshex
E5,\glshex
E4,A;\glshex
C1;\glshex
C5;\glshex
C4 < b,B < c;\glshex
0107,C;\glshex
0106 < d,D < e;\glshex
E9,E;\glshex
C9 < f,F < g,G < h,H < i;\glshex
ED,I;\glshex
CD < j,J < l;\glshex
0142,L;\glshex
0141 < m,M < n,N < o;\glshex
F6;\glshex
F8,O;\glshex
D6;\glshex
D8 < p,P < q,Q < r,R < s;\glshex
013F,S;\glshex
015A < t,T < u;\glshex
FA,U;\glshex
DA < v,V < w,W < x,X < y,Y < z;\glshex
017C,Z;\glshex
017B }
]
11.4. Record Counting
If --record-count-unit is used then additionally:
Only use the unit counting option if the locations don’t contain any special characters. With hyperref use \the
rather than \the
. Otherwise, if you really need unit counting with locations that may contain formatting commands, then you can try redefining:
so that it detokenizes but take care when using \GlsXtrLocationRecordCount
with commands like \thepage
as they can end up becoming detokenized too early.bird
that is recorded (indexed) as follows:
Page 1 two (2) instances of
; Page 2 one (1) instance of \gls
{bird}
; Page 3 four (4) instances of \gls
{bird}
; Section 3 one (1) instance of \gls
{bird}
.
\gls
[counter=section]{bird}
expands to 8.\GlsXtrTotalRecordCount
{bird}
expands to 7 and \GlsXtrRecordCount
{bird}{page}
expands to 1.\GlsXtrRecordCount
{bird}{section}
expands to 4. Be careful about using \GlsXtrLocationRecordCount
{bird}{page}{3}
\thepage
in the part. Remember that due to TeX’s asynchronous output routine, \thepage
may not be correct.\cgls
and \cglsformat
that are triggered by the record count. These are listed below. The test to determine if the entry’s record count exceeds the trigger value (which should be stored in the recordcount attribute) is obtained with:
This command may be redefined as appropriate. For example, it may be redefined to use \newcommand
*{\glsxtrrecordtriggervalue
}[1]{%
\GlsXtrTotalRecordCount
{#1}%
}
\GlsXtrRecordCount
for a particular location counter or to use \GlsXtrLocationRecordCount
for a particular location.\glssetcategoryattribute
or can be set for each listed category with: \rgls
behave slightly differently to \cgls
. It’s necessary for the command to add a record to the aux file in order for the entry to be selected and for the record count to be correct on the next bib2gls+LaTeX run (for the default selection={recorded and deps}). The trigger record is created with format=glstriggerrecordformat, which bib2gls v1.1+ recognises as a special type of ignored location format. This corresponds to the command: \glsignore
, this command does nothing and is considered an ignored record (so it won’t appear in the location list), but it indicates to bib2gls that the entry must be selected and, if the trigger-type option has been set, the entry will be assigned to the trigger-type glossary.
This ensures that the entry is defined but it won’t show up the normal glossary.\newignoredglossary
{ignored}
\GlsXtrLoadResources
[trigger-type=ignored]
\rglsformat
-like command is used instead of the \gls
-like command.) \gls
otherwise it creates a trigger record and uses:
This has the same definition as \cglsformat
.\glspl
otherwise it creates a trigger record and uses:
which uses the appropriate plural fields.\Gls
otherwise it creates a trigger record and uses:
which performs the appropriate case-change.\Glspl
otherwise it creates a trigger record and uses:
which uses the appropriate plural fields and case-change.\GLS
otherwise it creates a trigger record and uses:
which performs the appropriate case-change.\GLSpl
otherwise it creates a trigger record and uses:
which uses the appropriate plural fields and case-change.\gls
, \glspl
, \Gls
, \Glspl
, \GLS
, \GLSpl
to \rgls
, \rglspl
, \rGls
, \rGlspl
, \rGLS
, \rGLSpl
, respectively, for convenience. This command will also switch the shortcut commands such as \ac
or \ab
, if they have been enabled, from using the \cgls
-like commands to the corresponding \rgls
command.
If the document is called myDoc.tex, then the build process is: \documentclass
{article}
\usepackage
[colorlinks]{hyperref}
\usepackage
[record]{glossaries-extra}
\newignoredglossary
{ignored}
\setabbreviationstyle
{long-short-sc-desc}
\GlsXtrLoadResources
[
src={terms,abbrvs,symbols},
trigger-type=ignored,
category={same as entry}
]
\glsxtrenablerecordcount
\GlsXtrSetRecordCountAttribute
{general,abbreviation}{1}
\glsdefpostlink
{entry}{\glsxtrpostlinkAddDescOnFirstUse
}
\glsdefpostlink
{symbol}{\glsxtrpostlinkAddDescOnFirstUse
}
\begin{document}
\gls
{bird}, \gls
{ssi}, \gls
{bird}, \gls
{html},
\gls
{M}, \gls
{html}.
\printunsrtglossaries
\end{document}
pdflatex myDoc
bib2gls --record-count myDoc
pdflatex myDoc
The category={same as entry} resource option assigns the category field to the bib entry type (without the initial @
). This means that the entries defined in terms.bib (with @entry
) have their category set to entry
, the entries defined in abbrvs.bib (with @abbreviation
) have their category set to abbreviation
, and the entries defined in symbols.bib (with @symbol
) have their category set to symbol
.ssi
and bird
only have one record. However, they have been treated differently. The ssi
entry is using \rglsformat
whereas the bird
entry is using the normal \gls
behaviour. This is because the record counting hasn’t been applied to the custom entry category, whereas it has been applied to the abbreviation and symbol categories.11.4.1. Unit Record Counting
\glsxtrrecordtriggervalue
appropriately. For example, suppose you want to reset all abbreviations at the start of each chapter, so that the full form is shown again, but only if the abbreviation isn’t used elsewhere in the chapter.
However, this will have chapter numbers instead of page numbers in the location lists. If you don’t want location lists then this isn’t a problem. The list can simply be suppressed with nonumberlist.\usepackage
[record,counter=chapter]{glossaries-extra}
\gls
options are set:
Note that I’ve used the ignored location format to prevent the chapter number from being added to the location list. An alternative is to use the loc-counters=page resource option to only show the locations that use the page counter.\renewcommand
{\glslinkpresetkeys
}{%
\glsadd
[format=glsignore,counter=chapter]{\glslabel
}}
\glsxtrrecordtriggervalue
needs to be changed so that it uses the total for the given location. If hyperref is used, you will need \theHchapter
:
otherwise use \renewcommand
*{\glsxtrrecordtriggervalue
}[1]{%
\GlsXtrLocationRecordCount
{#1}{chapter}{\theHchapter
}%
}
\thechapter
.
Note that the \begin{document}
\chapter
{First}
\gls
{html}. \gls
{html}. \gls
{html}. \gls
{ssi}.
\chapter
{Second}
\gls
{html}. \gls
{ssi}. \gls
{ssi}.
\gls
{xml}.
\printunsrtglossaries
\end{document}
xml
entry is only used once in the entire document, but it will still be added to the glossary.ssi
entry is only used once in the first chapter (but is used twice in the second chapter), and the html
is only used once in the second chapter (but is used three times in the first chapter). So all three will have records in the aux file with the special glstriggerrecordformat format.
An alternative is to test the total record count, but remember that each entry is being recorded twice: once with the page counter and once with the chapter counter, so the total count for the \renewcommand
*{\printunsrtglossaryentryprocesshook
}[1]{%
\glsxtrifhasfield
*{location}{#1}
{}{\printunsrtglossaryskipentry
}%
}
\printunsrtglossaries
ssi
entry will be 2 not 1.
If the document is in a file called myDoc.tex then the document build is: \documentclass
{scrreport}
\usepackage
[T1]{fontenc}
\usepackage
[colorlinks]{hyperref}
\usepackage
[record,postdot]{glossaries-extra}
\setabbreviationstyle
{long-short-sc-desc}
\GlsXtrLoadResources
[src={abbrvs}]
\preto
{\chapter
}{\glsresetall
}
\glsxtrenablerecordcount
\GlsXtrSetRecordCountAttribute
{abbreviation}{1}
\renewcommand
{\glslinkpresetkeys
}{%
\glsadd
[format=glsignore,counter=chapter]{\glslabel
}}
\renewcommand
*{\glsxtrrecordtriggervalue
}[1]{%
\GlsXtrLocationRecordCount
{#1}{chapter}{\thechapter
}%
}
\begin{document}
\chapter
{First}
\gls
{html}. \gls
{html}. \gls
{html}. \gls
{ssi}.
\chapter
{Second}
\gls
{html}. \gls
{ssi}. \gls
{ssi}. \gls
{xml}.
\renewcommand
*{\printunsrtglossaryentryprocesshook
}[1]{%
\glsxtrifhasfield
*{location}{#1}
{}{\printunsrtglossaryskipentry
}%
}
\printunsrtglossaries
\end{document}
pdflatex myDoc
bib2gls --record-count-unit myDoc
pdflatex myDoc
11.4.2. Mini-Glossaries
\rgls
set of commands. When bib2gls writes the code to the glstex file to save the record counting information, it does it with helper commands that it provides in the glstex file:
This sets the total for the given counter and is defined as: \providecommand
*{\bibglssettotalrecordcount
}[2]{%
\GlsXtrSetField
{#1}{recordcount}{#2}%
}
The following is only available with --record-count-unit:
This sets the total for the given location and is defined as: \providecommand
*{\bibglssetrecordcount
}[3]{%
\GlsXtrSetField
{#1}{recordcount.#2}{#3}%
}
\providecommand
*{\bibglssetlocationrecordcount
}[4]{%
\GlsXtrSetField
{#1}{recordcount.#2.\glsxtrdetoklocation
{#3}}{#4}%
}
I’ve omitted \newcommand
*{\bibglssetlocationrecordcount
}[4]{%
\GlsXtrSetField
{#1}{recordcount.#2.#3}{#4}%
\provideignoredglossary
{minigloss.#2.#3}%
\glsxtrcopytoglossary
{#1}minigloss.#2.#3%
}
\glsxtrdetoklocation
for clarity and because I’m confident the locations won’t be problematic. The mini-glossary can then be displayed at the start of the chapter with: \printunsrtglossary
[type=minigloss.chapter.\theHchapter
]
\rgls
commands and instead add a mini-glossary at the start of each chapter (the redefinition of \glslinkpresetkeys
remains to ensure there are locations with the chapter counter). I’ve also provided a command to make it easier to display the mini-glossaries:
The document build is the same.\newcommand
{\minigloss
}{%
\printunsrtglossary*
[style=abbr-short-long,type=minigloss.chapter.\theHchapter
,groups=false,target=false]%
{\renewcommand
{\glossarysection
}[2][]{}%
\renewcommand
{\glslongextraShortLongTabularHeader
}{\toprule
}%
}}
11.5. The glossaries-extra-bib2gls package
Latn
).11.5.1. Displaying Glossaries
\printunsrtglossary
. However, they are only defined if a corresponding package option has been set before glossaries-extra-bib2gls is loaded. This means that the options must be passed as a package option, not using \glossariesextrasetup
, if the shortcut commands are required.\printunsrtglossary
[type=abbreviations, ]
\printunsrtglossary
[type=\acronymtype
, ]
\printunsrtglossary
[type=symbols, ]
\printunsrtglossary
[type=numbers, ]
\printunsrtglossary
[type=index, ]
11.5.2. Helper Commands for Resource Options
, which is used to identify the Unicode character in the value of some resource options.\string
\u
#
character (similar to \glsbackslash
).
which is used to indicate the th captured group in a regular expression replacement in the value of some resource options (requires bib2gls v1.5+), such as sort-replace. For example: \string
\$
sort-replace={{([a-zA-Z])
This removes a full stop that follows any of the characters a,…,z or A,…,Z.\string
\.
}{\glscapturedgroup
1}}
\glsxtrresourceinit
to use the following command: \GlsXtrResourceInitEscSequences
should not be used outside of the definition of \glsxtrresourceinit
as the definitions will likely cause interference and are only intended as resource option instructions for bib2gls. \string
or \protect
in front of them. The following commands are defined:
\u
(Unicode character); \cs
{ } (expands to detokenized \csname
when writing to the aux file); \.
\\
\/
\|
\&
\+
\<
\<
\*
\$
\^
\~
\(
\)
\[
\]
\"
\-
\?
\:
\#
\MGP
\LEN
\CAT
\TRIM
\CS
\INTERPRET
\LABELIFY
\LABELIFYLIST
\NULL
\IN
\NIN
\PREFIXOF
\NOTPREFIXOF
\SUFFIXOF
\NOTSUFFIXOF
\LC
\UC
\FIRSTLC
\FIRSTUC
\TITLE
.
then the earlier example can be written more compactly as: \renewcommand
{\glsxtrresourceinit
}{%
\GlsXtrResourceInitEscSequences
}
sort-replace={{([a-zA-Z])
\.
}{\$
1}}
@article
and @book
) to bib2gls’s @bibtexentry
entry type (requires bib2gls v1.4+).author
, as a glossary entry key:
This command should be placed before the first \glsaddstoragekey
{address}{}{\glsxtrbibaddress
}%
\glsaddstoragekey
{author}{}{\glsxtrbibauthor
}%
\glsaddstoragekey
{booktitle}{}{\glsxtrbibbooktitle
}%
\glsaddstoragekey
{chapter}{}{\glsxtrbibchapter
}%
\glsaddstoragekey
{edition}{}{\glsxtrbibedition
}%
\glsaddstoragekey
{howpublished}{}{\glsxtrbibhowpublished
}%
\glsaddstoragekey
{institution}{}{\glsxtrbibinstitution
}%
\glsaddstoragekey
{journal}{}{\glsxtrbibjournal
}%
\glsaddstoragekey
{month}{}{\glsxtrbibmonth
}%
\glsaddstoragekey
{note}{}{\glsxtrbibnote
}%
\glsaddstoragekey
{number}{}{\glsxtrbibnumber
}%
\glsaddstoragekey
{organization}{}{\glsxtrbiborganization
}%
\glsaddstoragekey
{pages}{}{\glsxtrbibpages
}%
\glsaddstoragekey
{publisher}{}{\glsxtrbibpublisher
}%
\glsaddstoragekey
{school}{}{\glsxtrbibschool
}%
\glsaddstoragekey
{series}{}{\glsxtrbibseries
}%
\glsaddstoragekey
{title}{}{\glsxtrbibtitle
}%
\glsaddstoragekey
{bibtextype}{}{\glsxtrbibtype
}%
\glsaddstoragekey
{volume}{}{\glsxtrbibvolume
}%
\GlsXtrLoadResources
.type
field clashes with the glossaries package’s type key, so this command provides the key bibtextype
instead. You can alias it with field-aliases={type=bibtextype
} in the resource options. 11.5.2.1. Custom Sort
Here’s a very limited rule that only recognises five letters: @index
{bee}@index
{lion}@index
{ant}@index
{cow}@index
{goose}@index
{zebu}@index
{egret}@index
{elk}@index
{llama}@index
{lynx}@index
{bat}
Any characters that aren’t included in the rule (such as “c” and “g”) are placed at the end. I’ve defined \usepackage
[record,nostyles,stylemods=bookindex,style=bookindex]
{glossaries-extra}
\newcommand
{\bibglssetlastgrouptitle
}[2]{%
\glsxtrsetgrouptitle
{#1#2}{Other}%
}
\GlsXtrLoadResources
[src=animals,selection=all,
sort=custom,sort-rule={ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}]
\begin{document}
\printunsrtglossaries
\end{document}
\bibglssetlastgrouptitle
to label that final group of characters “Other”. If the document is in a file called myDoc.tex, the build process is: pdflatex myDoc
bib2gls -g myDoc
pdflatex myDoc
The result is:
Note that “egret” has been placed after “elk”. This is because “l” is included in the rule but “g” isn’t. Whereas “lynx” comes before “llama” because there’s a separate “ll” group after the “l” group.\IfTrackedLanguageFileExists
in the tracklang documentation for further details. If this file is on TeX’s path and the tracklang package (automatically loaded by glossaries) detects that the document has requested that language or locale, then the file will automatically be loaded. For example, if you want to provide a rule block for Welsh, then create a file called glossariesxtr-welsh.ldf that contains:
(The use of \ProvidesGlossariesExtraLang
{welsh}[2018/02/23 v1.0]
\@ifpackageloaded
{glossaries-extra-bib2gls}
{
\newcommand
{\glsxtrWelshRules
}{%
\glsxtrLatinA
\string
<b,B
\string
<c,C
\string
<ch,CH
\string
<d,D
\string
<dd,DD
\string
<\glsxtrLatinE
\string
<f,F
\string
<ff,FF
\string
<g,G
\string
<ng,NG
\string
<\glsxtrLatinH
\string
<\glsxtrLatinI
\string
<j,J
\string
<\glsxtrLatinL
\string
<ll,Ll,LL
\string
<\glsxtrLatinM
\string
<\glsxtrLatinN
\string
<\glsxtrLatinO
\string
<\glsxtrLatinP
\string
<ph,PH
\string
<r,R
\string
<rh,RH
\string
<\glsxtrLatinS
\string
<\glsxtrLatinT
\string
<th,TH
\string
<u,U
\string
<w,W
\string
<y,Y
}
}
{}% glossaries-extra-bib2gls.sty not loaded
\string
is in case the <
character has been made active.) You can provide more than one rule-block per local, to allow for loanwords or foreign words. For example, you could provide \glsxtrWelshIRules
, \glsxtrWelshIIRules
etc.
Remember that the required document language scripts need to be tracked through the tracklang package, in order for these files to be automatically loaded. This essentially means ensuring you load the appropriate language package before tracklang is loaded by the base glossaries package or any other package that uses it. See the tracklang documentation for further details.\ProvidesGlossariesExtraLang
{Cyrl}[2018/02/23 v1.0]
\newcommand
*{\glsxtrGeneralCyrillicIRules
}{%
% Cyrillic rules
}
\newcommand
*{\glsxtrGeneralCyrillicIIRules
}{%
% an alternative set of Cyrillic rules
}
and the supplementary file mapsymbols.bib can provide the appropriate definitions for bib2gls: \ProvidesPackage
{mapsymbols}
% some package or font loading stuff here to provide
% the appropriate symbols
\newcommand
{\Stadium
}{...}
\newcommand
{\Battlefield
}{...}
\newcommand
{\Harbour
}{...}
% etc
% Provide a rule block:
\newcommand
{\MapSymbolOrder
}{%
\glshex
2694 % crossed-swords 0x2694
\string
< \glshex
2693 % anchor 0x2693
\string
< \glshex
26BD % football 0x26BD
}
Now both the preamble and rule block can be used in the resource set: @preamble
{"\glsxtrprovidecommand
{\Harbour
}{\char
"2693}
\glsxtrprovidecommand
{\Battlefield
}{\char
"2694}
\glsxtrprovidecommand
{\Stadium
}{\char
"26BD}"}
(As before, you may need to use \usepackage
{mapsymbols}% my custom package
\usepackage
[record]{glossaries-extra}
\GlsXtrLoadResources
[
src={mapsymbols,% <--- my custom mapsymbols.bib entries% data in entries.bib },
sort=custom,
sort-rule={\glsxtrcontrolrules
% control codes ;\glsxtrspacerules
% space characters ;\glsxtrnonprintablerules
% non-printable characters ;\glsxtrcombiningdiacriticrules
% combining diacritics ,\glsxtrhyphenrules
% hyphens <\glsxtrgeneralpuncrules
% general punctuation <\glsxtrdigitrules
% 0, ..., 9 <\glsxtrfractionrules
% fraction symbols <\MapSymbolOrder
% <--- custom map symbols <\glsxtrMathItalicGreekIrules
% math-greek symbols <\glsxtrGeneralLatinIrules
% Latin letters }
]
\string
in front of characters like <
if they have been made active.);
(semi-colon) or ,
(comma) or & (ampersand) or <
(less than). See Java’s RuleBasedCollator documentation for details of the rule syntax.\alpha
, \Alpha
, \beta
, \Beta
etc) in a block before Latin characters: sort-rule={
\glsxtrcontrolrules
;\glsxtrspacerules
;\glsxtrnonprintablerules
;\glsxtrcombiningdiacriticrules
,\glsxtrhyphenrules
<\glsxtrgeneralpuncrules
<\glsxtrdigitrules
<\glsxtrfractionrules
<\glsxtrMathItalicGreekIrules
<\glsxtrGeneralLatinIVrules
<\glsxtrLatinAA
<\glsxtrLatinOslash
}
11.5.2.1.1. Non-Letters
;
(semi-colon).;
(semi-colon). These characters aren’t checked for by bib2gls when it determines whether or not to use the interpreter, so a TAB or newline character may end up in the sort value if it wasn’t interpreted.
If you prefer, you can use the sub-blocks directly in your required ordered.\newcommand
*{\glsxtrcombiningdiacriticrules
}{%
\glsxtrcombiningdiacriticIrules
\string
;
\glsxtrcombiningdiacriticIIrules
\string
;
\glsxtrcombiningdiacriticIIIrules
\string
;
\glsxtrcombiningdiacriticIVrules
}
<
). As with the combining diacritics, this command is defined in terms of sub-blocks which may be used directly instead if a different order is required: \newcommand
*{\glsxtrgeneralpuncrules
}{%
\glsxtrgeneralpuncIrules
\string
<\glsxtrcurrencyrules
\string
<\glsxtrgeneralpuncIIrules
}
\newcommand
*{\glsxtrgeneralpuncIrules
}{%
\glsxtrgeneralpuncmarksrules
\string
<\glsxtrgeneralpuncaccentsrules
\string
<\glsxtrgeneralpuncquoterules
\string
<\glsxtrgeneralpuncbracketrules
\string
<\glsxtrgeneralpuncsignrules
}
<
).<
).\glsxtrcontrolrules
;\glsxtrspacerules
;\glsxtrnonprintablerules
Note that this includes the combining diacritic rules, which won’t be appropriate for languages with accented characters.\glsxtrIgnorableRules
;\glsxtrcombiningdiacriticrules
;\glsxtrhyphenrules
<\glsxtrgeneralpuncrules
<\glsxtrdigitrules
<\glsxtrfractionrules
11.5.2.1.2. Latin Letters
\glsxtrLatinA
etc to omit them.)\glsxtrGeneralLatinIrules
but it includes eth (Ð) between “D” and “E” and eszett (ß) treated as “ss”.\glsxtrGeneralLatinIrules
but it includes eth (Ð) between “D” and “E” and eszett (ß) treated as “sz”.\glsxtrGeneralLatinIrules
but it includes eth (Ð) between “D” and “E”, ae-ligature (æ) is treated as “ae”, oe-ligature (œ) is treated as “oe”, eszett (ß) treated as “ss” and thorn (þ) is treated as “th”.\glsxtrGeneralLatinIrules
but it includes eth (Ð) between “D” and “E”, eszett (ß) treated as “ss” and thorn (þ) treated as “th”.\glsxtrGeneralLatinIrules
but it includes eth (Ð) between “D” and “E”, eszett (ß) treated as “sz” and thorn (þ) treated as “th”.\glsxtrGeneralLatinIrules
but it includes ae-ligature (æ) between “A” and “B”, eth (Ð) between “D” and “E”, insular G (ᵹ) instead of “G”, oe-ligature (œ) between “O” and “P”, long s (ſ) equivalent to “s”, thorn (þ) between “T” and “U” and wynn (ƿ) instead of “W”.\glsxtrGeneralLatinIrules
but ae-ligature (æ) is treated as “ae”, oe-ligature (œ) is treated as “oe”, eszett (ß) treated as “ss”, thorn (þ) is treated as “th”, Ø is treated as “O” and “Ł” is treated as “L”.11.5.2.1.3. Math Greek
\alpha
, \beta
etc) and upright Greek (\upalpha
, etc, from the upgreek package) characters that includes digamma (\digamma
and \Digamma
) between epsilon and zeta. The upright and italic versions are gathered together into the same letter group.\glsxtrMathGreekIrules
but doesn’t include digamma.\upalpha
, etc, from the upgreek package) characters that includes digamma (\digamma
and \Digamma
) between epsilon and zeta.\upalpha
, etc, from the upgreek package) that doesn’t include digamma.\alpha
, \Alpha
, etc) characters that includes digamma (\digamma
and \Digamma
) between epsilon and zeta. Note that even though the uppercase \Delta
etc are actually rendered upright by LaTeX, bib2gls’s interpreter treats them as italic to help keep them close to the lowercase versions.\alpha
, \Alpha
, etc) characters that doesn’t include digamma.\Alpha
, \Beta
, etc) characters that includes digamma (\Digamma
) between epsilon and zeta.\Alpha
, \Beta
, etc) characters that doesn’t include digamma.\alpha
, \beta
, etc) characters that includes digamma (\digamma
) between epsilon and zeta.\alpha
, \beta
, etc) characters that doesn’t include digamma.\Upalpha
, \upalpha
etc and \Alpha
, \alpha
etc): \glsxtrUpAlpha
, \glsxtrMathItalicAlpha
, \glsxtrUpBeta
, \glsxtrMathItalicBeta
, \glsxtrUpGamma
, \glsxtrMathItalicGamma
, \glsxtrUpDelta
, \glsxtrMathItalicDelta
, \glsxtrUpEpsilon
, \glsxtrMathItalicEpsilon
, \glsxtrUpDigamma
, \glsxtrMathItalicDigamma
, \glsxtrUpZeta
, \glsxtrMathItalicZeta
, \glsxtrUpEta
, \glsxtrMathItalicEta
, \glsxtrUpTheta
, \glsxtrMathItalicTheta
, \glsxtrUpIota
, \glsxtrMathItalicIota
, \glsxtrUpKappa
, \glsxtrMathItalicKappa
, \glsxtrUpLambda
, \glsxtrMathItalicLambda
, \glsxtrUpMu
, \glsxtrMathItalicMu
, \glsxtrUpNu
, \glsxtrMathItalicNu
, \glsxtrUpXi
, \glsxtrMathItalicXi
, \glsxtrUpOmicron
, \glsxtrMathItalicOmicron
, \glsxtrUpPi
, \glsxtrMathItalicPi
, \glsxtrUpRho
, \glsxtrMathItalicRho
, \glsxtrUpSigma
, \glsxtrMathItalicSigma
, \glsxtrUpTau
, \glsxtrMathItalicTau
, \glsxtrUpUpsilon
, \glsxtrMathItalicUpsilon
, \glsxtrUpPhi
, \glsxtrMathItalicPhi
, \glsxtrUpChi
, \glsxtrMathItalicChi
, \glsxtrUpPsi
, \glsxtrMathItalicPsi
, \glsxtrUpOmega
, and \glsxtrMathItalicOmega
.\glsxtrMathItalicPartial
and nabla 𝛻 (0x1D6FB) \glsxtrMathItalicNabla
.11.5.3. Commands Used Within Resource Files
\glsnoexpandfields
, since supporting field expansion is only necessary where entry definitions may be programmatically performed within a loop or some other command. (This may be suppressed.)\glssetwidest
.\glsxtrprovidestoragekey
to provide new glossary entry keys or \provideignoredglossary
to provide glossaries to ensure they are defined.\bibgls…
commands provided by bib2gls are defined in the glstex files with \providecommand
. See the bib2gls manual for further details of those commands.11.5.4. Hierarchy
\ifglshasparent
or a command like \glsxtrifhasfield
).\ifglshaschildren
, which is very inefficient as it has to iterate over all entries in the entry’s glossary to determine which ones have a matching parent field.\GlsXtrIfFieldNonZero
to test if the value supplied in the childcount field is non-zero. The starred form uses the starred form of \GlsXtrIfFieldNonZero
.11.5.5. Supplemental Locations
\glsxtrsupphypernumber
with the externallocation attribute. This command sets up the location counter and prefix (used in the formation of hyperlinks) and then uses:
to format the actual location (with an external hyperlink, if supported). The (the original location encap) is ignored by default.11.5.6. Nameref Records
\makenoidxglossaries
and provides the same information about the location and how to form the hypertarget as is passed to makeindex and xindy. The record=nameref option, which requires at least bib2gls v1.8, instead uses:
where is obtained from \@currentlabelname
and is obtained from \@currentHref
. These commands require hyperref. If they are undefined, and will be left empty and bib2gls will treat it as a regular record.\refstepcounter
but won’t necessarily change. It can therefore cause unexpected behaviour. \theH
which provides the partial target name associated with the location counter. With the original makeindex/xindy approach, it’s not possible to include this information in the location, so the base glossaries package attempts to derive a prefix from which the value can be reconstituted by appending the prefix. Unfortunately, not all definitions of \theH
are in the form \the
(most notably the equation counter with chapters) so this can fail.\refstepcounter
. However, you may choose to switch to using the target, which will take you to the nearest target before the indexing took place.
Earlier versions of bib2gls only used this in the loclist field and explicitly used \setentrycounter
[ ]{ }\csuse
{ }{ }
\setentrycounter
in the location field followed by \
{location}, which follows the code that’s created with the default makeindex setting. The \setentrycounter
command sets up the prefix needed for \glshypernumber
to reform the target name from the given location.\glsxtr@record@nameref
are written by bib2gls to the location list using: \glsnoidxdisplayloc
, so it will simply encapsulate the location with the given formatting command.\glsxtrdisplaylocnameref
will try to work out the appropriate hyperlink anchor and text. The argument is redundant. It first defines the following commands: \@currentHref
value at the time the location was recorded. If this is used as the anchor, the link will go to the most recent anchor before the record was created. This is more likely to match the given title, but won’t necessarily match the corresponding counter.\glsxtrrecentanchor
and the title will correspond to the table caption. If you have defined \glsxtrsectionlocfmt
to show the section number (see below), then this may cause some confusion if clicking on the section number leads to a table caption. However, it will lead to the closest location to where the record was created, which may be preferred.\theHsection
when the record was created, so the constructed anchor will be section.
which corresponds to the anchor at the start of the section. However, if you haven’t defined \glsxtrsectionlocfmt
, then the title will correspond to the table caption, which may be a little confusing.\glsxtrlocationanchor
but may be changed by:
The argument is the counter name, which may be used to set choose an alternative anchor depending on the counter. This command does nothing by default, which means that \glsxtrlocationanchor
will be used.\glsxtrrecentanchor
if the counter is page: \renewcommand
{\glsxtrsetactualanchor
}[1]{%
\ifstrequal
{#1}{page}
\let
\glsxtractualanchor
\glsxtrrecentanchor
}
\glsxtrdisplaylocnameref
first checks for the existence of:
Note the above warning about the possible mismatch of the title with the anchor. For example, if the following is defined for the section counter: \glsxtrnamereflink
{ }\glsxtr
locfmt{ }{ }{ }{ }
then this could lead to the section number followed by the table caption. A more compact form that omits the title is better: \newcommand
{\glsxtrsectionlocfmt
}[2]{\S
#1 (#2)}
\newcommand
{\glsxtrsectionlocfmt
}[2]{\S
#1}
(
since equations typically don’t have a title, but are usually enclosed in parentheses. )\glsxtr
locfmt hasn’t been defined, \glsxtrdisplaylocnameref
will do one of the following:
\glsxtrnamereflink
with the title set to the location;\glsxtrnamereflink
with the given and \glsxtrrecentanchor
as the anchor. This has a better chance of matching the title with the anchor, but it’s not guaranteed as some anchors are created without a title. This is defined as:
This shows the formatted title with the recent anchor. The location isn’t shown. If you would prefer to just show the location and use the anchor corresponding to the location counter: \newcommand
{\glsxtrtitlednamereflink
}[4]{%
\glsxtrnamereflink
{#1}{#2}{\glsxtrrecentanchor
}{#4}%
}
\renewcommand
{\glsxtrtitlednamereflink
}[4]{%
\glsxtrnamereflink
{#1}{#2}{\glsxtrlocationanchor
}{#3}%
}
\glshypernumber
is first locally redefined to \@firstofone
to prevent a conflict with the usual location hyperlink formation. This means that if the is \hyperbf
then it will simply behave like \textbf
.hcounter
(merge on , default) href
(merge on ), title
(merge on ) and location
(merge on , as regular records). In all cases, the must also match.11.5.7. Dual Entry Commands
@dualentry
or @dualindexabbreviation
. A single entry definition within the bib file creates two dependent entries that may be referenced within the document and assigned to different glossaries. The default selection={recorded and deps} will ensure that dependent entries are selected, even if they don’t have any records. For example, the following bib entry:
is essentially like: @dualindexsymbol
{L,
name={Lagrangian function},
symbol={\ensuremath
{L}},
description={a function of generalized co-ordinates}
}
but additionally the two entries (the primary @index
{L,
name={Lagrangian function},
symbol={\ensuremath
{L}},
description={a function of generalized co-ordinates}
}
@symbol
{dual.L,
name={\ensuremath
{L}},
symbol={Lagrangian function},
description={a function of generalized co-ordinates}
}
L
and the dual dual.L
) are dependent. The following document only references the primary entry, but the dependency ensures that that the dual is also selected:
The dependency ensures that the dual entry \usepackage
[record,symbols,nostyles,
stylemods={tree,bookindex}]{glossaries-extra}
\GlsXtrLoadResources
[src=entries,dual-type=symbols]
\glsdefpostlink
{index}{\glsxtrpostlinkAddDescOnFirstUse
}
\glsdefpostname
{index}{%
\ifglshassymbol
{\glscurrententrylabel
}
{ (\glsentrysymbol
{\glscurrententrylabel
})}{}}
\begin{document}
Primary: \gls
{L}.
\printunsrtglossary
[type=symbols,style=tree]
\printunsrtglossary
[title=Index,style=bookindex]
\end{document}
dual.L
is selected, and the dual-type setting adds the dual entry to the symbols
glossary (which was defined with the symbols package option).dual
is assumed.
This obtains the field from:
This expands to \newcommand
*{\GlsXtrDualBackLink
}[2]{%
\glsxtrifhasfield
{\GlsXtrDualField
}{#2}%
{\glshyperlink
[#1]{\glscurrentfieldvalue
}}%
{#1}%
}
dual
, which is the default for dual-field if no value is supplied.
This checks if the symbol key has been set in both the category post-link hook and the category post-name hook to append the symbol in parentheses. In addition, the category post-name hook adds a link to the corresponding dual entry.\usepackage
[colorlinks]{hyperref}
\usepackage
[record,symbols,nostyles,stylemods={tree,bookindex}]{glossaries-extra}
\GlsXtrLoadResources
[src=entries, dual-type=symbols,dual-field]
\glsdefpostlink
{index}{\glsxtrpostlinkAddSymbolOnFirstUse
}
\glsdefpostname
{index}{%
\ifglshassymbol
{\glscurrententrylabel
}
{ (\GlsXtrDualBackLink
{\glsentrysymbol
{\glscurrententrylabel
}}{\glscurrententrylabel
})}{}}
\begin{document}
Primary: \gls
{L}.
\printunsrtglossary
[type=symbols,style=tree]
\printunsrtglossary
[title=Index,style=bookindex]
\end{document}
\glsxtrnewgls
to create \gls
-like commands that automatically insert a label prefix (such as dual.
for dual entries). The commands described in this section provide a similar set of \gls
-like commands that iterate over a set of possible prefixes until a match is found.
where is the first prefix in the list such that matches a defined entry. This requires bib2gls v3.0+ to work properly on the first LaTeX run (when no entries are defined).\gls
[ ]{ {entry-label}}[ ]
\glspl
),
(uses \Gls
),
(uses \Glspl
),
(uses \GLS
),
(uses \GLSpl
),
(uses \glslink
),
(uses \Glslink
),
(uses \glsdisp
) and
(uses \Glsdisp
).\relax
). The field should be identified by its internal field label. There are also case-changing versions:
which applies a sentence case change and
which applies all caps. Note that at least one of the potential labels must have the given field set in order for the reference to be correctly resolved. For example:
If you find this a bit long-winded to type and you want to provide a shorter command that recognises the modifiers, then you can use:
For example: \dglsfield
{pi}{symbol}
If you also want sentence case and all caps versions use:
where is the command without a case-change (which will use \newdglsfield
{symbol}{\sym
}
\sym
{pi}
\dglsfield
), is the sentence case command (which will use \dGlsfield
) and is the all caps command (which will use \dGLSfield
). This will also use \glsmfuaddmap
and \glsmfublocker
to establish the sentence case mapping from to and block the case change for .\GlossariesExtraInfo
if a fallback is considered. Note that this shouldn’t be considered a warning as the fallback might be desired, but if the wrong output is produced this information may explain the selection.\dglsfield
commands all define: \ifcsvoid
) then the fallback field will be tried instead.
and suppose the document code is: @index
{duck}
@dualindexabbreviation
{svm,
short={SVM},
long={support vector machine}
}
@dualindexsymbol
{pi,
symbol={\ensuremath
{\pi
}},
description=ratio of a circle's circumference to its diameter
}
This uses the default empty primary prefix and \documentclass
{article}
\usepackage
{hyperref}
\usepackage
[record,abbreviations,symbols]{glossaries-extra}
\newcommand
{\bibglsnewdualindexsymbolsecondary
}[5]{%
\longnewglossaryentry
*{#1}{name={#3},category={symbol},
type={symbols},symbol={#4},#2}{#5}%
}
\GlsXtrLoadResources
[src=entries]
\begin{document}
First use: \gls
{duck}, \gls
{svm}, \gls
{pi}.
Next use: \gls
{duck}, \gls
{svm}, \gls
{pi}.
\printunsrtglossaries
\end{document}
dual.
for the dual prefix, so
is referencing the primary entry, which is (essentially) an \gls
{svm}@index
type not an abbreviation. It therefore doesn’t follow the abbreviation style, and it also hyperlinks to the index not to the list of abbreviations. Similarly for
, which references the primary \gls
{pi}@index
entry rather than the symbol.
or use label-prefix and dual-prefix to set the label prefixes: \gls
{duck}, \gls
{dual.svm}, \gls
{dual.pi}.
then only the entries without a dual need a prefix: \GlsXtrLoadResources
[src=entries,
label-prefix={idx.},dual-prefix={}
]
Using \gls
{idx.duck}, \gls
{svm}, \gls
{pi}.
\glsxtrnewgls
or \glsxtrnewglslike
(see §5.7) to define the custom \idx
:
the entry references can be simplified to: \glsxtrnewgls
{idx.}{\idx
}
but this requires remembering which terms have duals.\idx
{duck}, \gls
svm, \gls
pi.
\dgls
instead: \GlsXtrLoadResources
[src=entries,
combine-dual-locations=primary]
\glsxtraddlabelprefix
{dual.}
\glsxtraddlabelprefix
{}
\begin{document}
First use: \dgls
{duck}, \dgls
{svm}, \dgls
{pi}.
Next use: \dgls
{duck}, \dgls
{svm}, \dgls
{pi}.
\printunsrtglossaries
\end{document}
dual.svm
nor svm
exists, so \dgls
uses the last prefix (which is empty in this case). This means that on the first LaTeX run,
behaves like \dgls
{svm}
, which adds a record for the primary \gls
{svm}svm
entry. The default primary-dual dependency means that this will cause both the primary (svm
) and dual (dual.svm
) entry to be selected. The location will be added to the primary entry’s location list, unless overridden by resource options, such as combine-dual-locations.dual.svm
exists. So
will again first try \dgls
{svm}dual.svm
(as dual.
is the first in the list of label prefixes). That now exists, so
now behaves like \dgls
{svm}
, which follows the abbreviation style and hyperlinks to the list of abbreviations. Similarly for the index-symbol combination \gls
{dual.svm}dual.pi
and pi
.
, which doesn’t have a dual, the label \dgls
{duck}dual.duck
never exists, so that’s never selected. However, when there’s no match, such as when the glstex file doesn’t exist, the duck entry will be recorded with both the dual.
prefix and the empty prefix. This allows bib2gls to test which prefix+label combination matches.
. If no prefixes have been added to the list (or if the list is cleared), just an empty prefix is assumed.\glsxtraddlabelprefix
{ }
These do nothing by default, but they can be defined before the resource file is loaded to set up the prefix list. For example: \bibglstertiaryprefixlabel
{ }
\bibglsdualprefixlabel
{ }
\bibglsprimaryprefixlabel
{ }
Remember that this will only have an effect once the glstex file has been created. The prefix list will be empty on the first run (which is treated as a single empty prefix). If this isn’t a suitable fallback, it may be necessary to add one after all the resource commands: \newcommand
{\bibglsprimaryprefixlabel
}[1]{%
\glsxtraddlabelprefix
{#1}}
\newcommand
{\bibglsdualprefixlabel
}[1]{%
\glsxtrprependlabelprefix
{#1}}
\GlsXtrLoadResources
[src=entries]
Although this rather defeats the purpose of using the hooks as you still have to keep track of the fallback prefix.\newcommand
{\bibglsprimaryprefixlabel
}[1]{%
\glsxtraddlabelprefix
{#1}}
\newcommand
{\bibglsdualprefixlabel
}[1]{%
\glsxtrprependlabelprefix
{#1}}
\GlsXtrLoadResources
[src=entries,label-prefix={idx.}]
\glsxtraddlabelprefix
{idx.}
11.5.8. Supplementary Commands
\glsxtrusefield
{#1}{location}
LaTeX code
, but is defined by the TeX parser library used by bib2gls’s to expand to TeX parser lib code
. May be used in the @preamble
or in field values to provide bib2gls with alternative content.@preamble
. It’s simply defined to \providecommand
in glossaries-extra-bib2gls but bib2gls’s interpreter treats it as \renewcommand
. This means that you can override bib2gls’s internal definition of a command without overriding the command definition in the document (if it’s already defined before the resource file is input). For example:
This will force bib2gls to treat @preamble
{"\glsxtrprovidecommand
{\int
}{integral}"}
\int
as the word “integral” to assist sorting but if this preamble code is written to the glstex file (as it is by default) then it won’t override the current definition (provided by the kernel or redefined by a package).\providecommand
. For many of them, if you want to provide an alternative definition then you need to define the command before the resource file is loaded. There are a few that may be redefined afterwards but if you use \renewcommand
then you will get an error on the first LaTeX run when the glstex file doesn’t exist. In this case, you may prefer to use: \renewcommand
but only generates a warning rather than an error if the command isn’t already defined so it won’t interrupt the document build.
, where is the value of the indexcounter field. If the field isn’t set or if \hyperref
[wrglossary. ]{ }\hyperref
hasn’t been defined, this just does . See the bib2gls manual (v1.4+) for further details. \Alpha
, \Beta
, \Epsilon
, \Zeta
, \Eta
, \Iota
, \Kappa
, \Mu
, \Nu
, \Omicron
, \Rho
, \Tau
, \Chi
, \Digamma
, \omicron
. These are all defined with \providecommand
, so they won’t override any definitions provided by any package loaded before glossaries-extra. Since bib2gls’s interpreter recognises these commands, using them instead of explicitly using the Latin characters with the same shape helps to keep the Greek symbols together when sorting. Similarly, if upgreek has been loaded, the missing upright Greek commands are also provided: \Upalpha
, \Upbeta
, \Upepsilon
, \Upzeta
, \Upeta
, \Upiota
, \Upkappa
, \Upmu
, \Upnu
, \Upomicron
, \Uprho
, \Uptau
, \Upchi
, \upomicron
.12. Auto-Indexing
\index
command used by the auto-indexing. Note also that texindy has a fixed set of special characters (corresponding to makeindex’s defaults) that can’t be customized. You may want to consider using bib2gls and its dual entries as an alternative approach. \glsxtrpostnamehook
macro, used at the end of \glossentryname
and \Glossentryname
, checks the indexname attribute for the category associated with that entry. Since \glossentryname
is used in the default glossary styles, this makes a convenient way of automatically indexing each entry name at its location in the glossary without fiddling around with the value of the name key.\index
command with the sort value taken from the entry’s sort key and the actual value set to
. There are user-level commands available to change the sort and actual value used by the automated index.\glsentryname
{ }
Note the use of \newcommand
*{\glsxtrautoindexentry
}[1]{\string
\glsentryname
{#1}}
\string
to prevent \glsentryname
from being expanded as it’s written to the index file.
After this macro is called, is then processed to escape any of makeindex’s special characters. Note that this escaping is only performed on the sort not on the actual value. The escaping of the sort value is performed by
You can redefine this to do nothing if you want to omit the escaping. You may want to consider providing another field to obtain the appropriate sort value if the one provided in the sort field isn’t suitable (because it may already have had special characters escaped or it may be a numeric value in the case of sort by use or definition).\newcommand
*{\glsxtrautoindexassignsort
}[2]{%
\glsletentryfield
{#1}{#2}{sort}%
}
by default.\index
{ }
and if the sort value also needs to be set to the long field, if present, otherwise the sort field: \renewcommand
*{\glsxtrautoindexentry
}[1]{\string
\glsentryfirst
{#1}}
\renewcommand
*{\glsxtrautoindexassignsort
}[2]{%
\ifglshaslong
{#2}%
{\glsletentryfield
{#1}{#2}{long}}%
{\glsletentryfield
{#1}{#2}{sort}}%
}
will set the encap to \glssetcategoryattribute
{general}{indexname}{textbf}
textbf
which will display the relevant page number in bold whereas
won’t apply any formatting to the page number in the index.\glssetcategoryattribute
{general}{dualindex}{true}
\index
to use some thing else.) \glshypernumber
to allow formats that use that command.\glsxtrdoautoindexname
command will attempt to escape any of makeindex’s special characters, but there may be special cases where it fails, so take care. This assumes the default makeindex actual, level, quote and encap values (unless any of the commands \actualchar
, \levelchar
, \quotechar
or \encapchar
have been defined before glossaries-extra is loaded).13. On-the-Fly Document Definitions
, but they behave rather differently. If you want to use \index
{ }\index
then just use \index
. \GlsXtrEnableOnTheFly
don’t use any commands in the , even if they expand to just text.
. If hasn’t been defined, this will define the entry using: \gls
[ ]{ }\newglossaryentry
{ }{name={entry-label},
category={\glsxtrcat
},
description={\nopostdesc
},
}
\glsxtr
below: \glsxtr
[][pluralgeese]{goose}
% ... later
\glsxtr
[][pluralgeese]{goose}
then don’t bother. It’s simpler and less problematic to just define the entries in the preamble with \newcommand
*{\goose
}{\glsxtr
[][plural={geese}]{goose}}
\renewcommand
*{\GlsXtrWarning
}[2]{}
% ... later
\goose
\
some more text here
\newglossaryentry
and then use \gls
in the document.\glsxtr
. \glsxtr
but uses \glspl
instead of \gls
.
This is like \glsxtr
but uses \Gls
instead of \gls
.
This is like \glsxtr
but uses \Glspl
instead of \gls
.general
.\glsxtr
, \glsxtrpl
, \Glsxtr
and \Glsxtrpl
can’t be used after the glossaries have been displayed (through \printglossary
etc). It’s best not to mix these commands with the standard glossary commands, such as \gls
or there may be unexpected results. 14. Supplementary Files
14.1. Dummy Files for Testing
14.2. Sample Files
pdflatex sample
makeglossaries sample
pdflatex sample
pdflatex sample
pdflatex sample-abbr-styles
makeglossaries sample-abbr-styles
pdflatex sample-abbr-styles
pdflatex sample-abbr-styles
Demonstrates all predefined abbreviation styles.pdflatex sample-mixture
makeglossaries sample-mixture
pdflatex sample-mixture
makeglossaries sample-mixture
pdflatex sample-mixture
General entries, acronyms and initialisms all treated differently.pdflatex sample-name-font
makeglossaries sample-name-font
pdflatex sample-name-font
pdflatex sample-name-font
Categories and attributes are used to customize the way different entries appear.pdflatex sample-abbrv
makeglossaries sample-abbrv
pdflatex sample-abbrv
pdflatex sample-abbrv
General abbreviations.pdflatex sample-acronym
makeglossaries sample-acronym
pdflatex sample-acronym
Acronyms aren’t initialisms and don’t expand on first use.pdflatex sample-acronym-desc
makeglossaries sample-acronym-desc
pdflatex sample-acronym-desc
makeglossaries sample-acronym-desc
pdflatex sample-acronym-desc
Acronyms that have a separate long form and description.pdflatex sample-crossref
makeglossaries sample-crossref
pdflatex sample-crossref
Unused entries that have been cross-referenced automatically are added at the end of the document.pdflatex sample-indexhook
makeglossaries sample-indexhook
pdflatex sample-indexhook
Use the index hook to track which entries have been indexed (and therefore find out which ones haven’t been indexed).pdflatex sample-footnote
makeglossaries sample-footnote
pdflatex sample-footnote
Footnote abbreviation style that moves the footnote marker outside of the hyperlink generated by \gls
and moves it after certain punctuation characters for neatness.pdflatex sample-undef
makeglossaries sample-undef
pdflatex sample-undef
pdflatex sample-undef
Warn on undefined entries instead of generating an error.pdflatex sample-mixed-abbrv-styles
makeglossaries sample-mixed-abbrv-styles
pdflatex sample-mixed-abbrv-styles
Different abbreviation styles for different entries.pdflatex sample-initialisms
makeglossaries sample-initialisms
pdflatex sample-initialisms
Automatically insert dots into initialisms.pdflatex sample-postdot
makeglossaries sample-postdot
pdflatex sample-postdot
Another initialisms example.pdflatex sample-postlink
makeglossaries sample-postlink
pdflatex sample-postlink
Automatically inserting text after the link text produced by commands like \gls
(outside of hyperlink, if present).pdflatex sample-header
makeglossaries sample-header
pdflatex sample-header
pdflatex sample-header
Using entries in section/chapter headings.pdflatex sample-autoindex
makeglossaries sample-autoindex
pdflatex sample-autoindex
makeindex sample-autoindex
pdflatex sample-autoindex
Using the dualindex and indexname attributes to automatically add glossary entries to the index (in addition to the glossary location list).pdflatex sample-autoindex-hyp
makeglossaries sample-autoindex-hyp
pdflatex sample-autoindex-hyp
makeindex sample-autoindex-hyp
pdflatex sample-autoindex-hyp
As previous but uses hyperref.pdflatex sample-nested
makeglossaries sample-nested
pdflatex sample-nested
Using \gls
within the value of the name key.pdflatex sample-entrycount
pdflatex sample-entrycount
makeglossaries sample-entrycount
pdflatex sample-entrycount
Enable entry-use counting (only index if used more than n times, see §6.1).pdflatex sample-unitentrycount
pdflatex sample-unitentrycount
makeglossaries sample-unitentrycount
pdflatex sample-unitentrycount
Enable use of per-unit entry-use counting (§6.1).pdflatex sample-onelink
makeglossaries sample-onelink
pdflatex sample-onelink
Using the per-unit entry counting (§6.1) to only have one hyperlink per entry per page.pdflatex sample-linkcount
makeglossaries sample-linkcount
pdflatex sample-linkcount
Using link counting (§6.2) to only have one hyperlink per entry.pdflatex sample-pages
makeglossaries sample-pages
pdflatex sample-pages
pdflatex sample-pages
Insert “page” or “pages” before the location list.pdflatex sample-altmodifier
makeglossaries sample-altmodifier
pdflatex sample-altmodifier
pdflatex sample-altmodifier
Set the default options for commands like \gls
and add an alternative modifier.pdflatex sample-mixedsort
pdflatex sample-mixedsort
Uses the optional argument of \makeglossaries
to allow a mixture of \printglossary
and \printnoidxglossary
.pdflatex sample-external
makeglossaries sample-external
pdflatex sample-external
Uses the targeturl attribute to allow for entries that should link to an external URL rather than to an internal glossary.pdflatex sample-fmt
makeglossaries sample-fmt
pdflatex sample-fmt
Provides text-block commands associated with entries in order to use \glsxtrfmt
.pdflatex sample-alias
makeglossaries sample-alias
pdflatex sample-alias
Uses the alias key (see §3.4).pdflatex sample-alttree
makeglossaries sample-alttree
pdflatex sample-alttree
Uses the glossaries-extra-stylemods package with the alttree style (see §8.6.5).pdflatex sample-alttree-sym
makeglossaries sample-alttree-sym
pdflatex sample-alttree-sym
Another alttree example that measures the symbol widths.pdflatex sample-alttree-marginpar
makeglossaries sample-alttree-marginpar
pdflatex sample-alttree-marginpar
Another alttree example that puts the location list in the margin.pdflatex sample-onthefly
makeglossaries sample-onthefly
pdflatex sample-onthefly
Using on-the-fly commands. Terms with accents must have the name key explicitly set.xelatex sample-onthefly-xetex
makeglossaries sample-onthefly-xetex
xelatex sample-onthefly-xetex
Using on-the-fly commands with XeLaTeX. Terms with UTF-8 characters don’t need to have the name key explicitly set. Terms that contain commands must have the name key explicitly set with the commands removed from the label.pdflatex sample-onthefly-utf8
makeglossaries sample-onthefly-utf8
pdflatex sample-onthefly-utf8
Tries to emulate the previous sample file for use with LaTeX through the starred version of \GlsXtrEnableOnTheFly
. This is a bit iffy and may not always work. Terms that contain commands must have the name key explicitly set with the commands removed from the label.pdflatex sample-accsupp
makeglossaries sample-accsupp
pdflatex sample-accsupp
Integrate glossaries-accsupp.pdflatex sample-prefix
makeglossaries sample-prefix
pdflatex sample-prefix
Integrate glossaries-prefix.pdflatex sample-suppl
pdflatex sample-suppl-main
makeglossaries sample-suppl-main
pdflatex sample-suppl-main
Uses thevalue to reference a location in the supplementary file sample-suppl.tex.pdflatex sample-suppl-hyp
makeglossaries sample-suppl-hyp
pdflatex sample-suppl-hyp
pdflatex sample-suppl-main-hyp
makeglossaries sample-suppl-main-hyp
pdflatex sample-suppl-main-hyp
A more complicated version to the above that uses the hyperref package to reference a location in the supplementary file sample-suppl-hyp.tex.15. Multi-Lingual Support
\abbreviationsname
if you use the abbreviations package option to automatically create the glossary labelled abbreviations
. If this command doesn’t already exist, it will be defined to “Abbreviations” if babel hasn’t been loaded, otherwise it will be defined as \acronymname
(provided by glossaries), which is language-sensitive.\abbreviationsname
in the usual way. For example:
Or using babel or polyglossia captions hook: \renewcommand
*{\abbreviationsname
}{List of Abbreviations}
\appto
\captionsenglish
{%
\renewcommand
*{\abbreviationsname
}{List of Abbreviations}%
}
or \printabbreviations
[title={List of Abbreviations}]
\printabbreviations
[typeabbreviations,title={List of Abbreviations}]
Latn
, associated with the given dialect. There’s no warning if the associated file isn’t found. The script file is loaded after the dialect file.\ProvidesGlossariesExtraLang
{french}[2015/12/09 v1.0]
\newcommand
*{\glossariesxtrcaptionsfrench
}{%
\def
\abbreviationsname
{Abr\'
eviations}%
}
\glossariesxtrcaptionsfrench
\ifcsdef
{captions\CurrentTrackedDialect
}
{%
\csappto
{captions\CurrentTrackedDialect
}%
{%
\glossariesxtrcaptionsfrench
}%
}%
{%
\ifcsdef
{captions\CurrentTrackedLanguage
}
{%
\csappto
{captions\CurrentTrackedLanguage
}%
{%
\glossariesxtrcaptionsfrench
}%
}%
{}%
}
french
and the translated text Abr\'eviations
as appropriate. You can also use the ldf file to provide rule blocks for a particular language for use with bib2gls’s custom sort rule. See §11.5 for further details. This document is incomplete. The external file associated with the glossary ‘
’ (which should be called ) hasn’t been created. This has probably happened because there are no entries defined in this glossary.
If you don't want this glossary, add nomain to your package option list when you load glossaries-extra.sty. For example:
Did you forget to use type=
when you defined your entries? If you tried to load entries into this glossary with \loadglsentries did you remember to use [ ] as the optional argument? If you did, check that the definitions in the file you loaded all had the type set to \glsdefaulttype Check the contents of the file
. If it’s empty, that means you haven’t indexed any of your entries in this glossary (using commands like \gls) or \glsadd) so this list can’t be generated. If the file isn’t empty, the document build process hasn’t been completed. You need to either replace \makenoidxglossaries with \makeglossaries or replace \printglossary (or \printglossaries) with \printnoidxglossary and then rebuild this document.
The file
doesn’t exist. This most likely means you haven’t used \makeglossaries or you have used \nofiles. If this is just a draft version of the document, you can suppress this message using the nomissingglstext ackage option. This message will be removed once the problem has been fixed.
Symbols
Terms
\glsxtrpostdesc
that is associated with a particular category.\glsxtrpostlink
that is associated with a particular category.\glsxtrpostname
that is associated with a particular category.\gls
or \glspl
(or case-changing variants). This may or may not produce the same result as the inline full form the corresponding \glsxtrfull
command, depending on the abbreviation style.\gls
-like, \glstext
-like or \glsadd
commands. An entry may have multiple locations that form a list.\GlsXtrSetField
, in which case there doesn’t need to be a corresponding key. Some fields are considered internal fields. If you are using bib2gls, it will only recognise fields in the bib file that have had a key defined in the document or that are special to bib2gls.\gls
-like commands (which can adjust their behaviour according to whether or not this flag is true). The conditional is true if the entry hasn’t been used by one of these commands (or if the flag has been reset) and false if it has been used (or if the flag has been unset). Note that multi-entries have their own flag that’s distinct from the first use flags of the individual elements.\gls
-like commands.\printglossary
or \printunsrtglossary
(which may or may not be ordered alphabetically) or a glossary is a set of entry labels where the set is identified by the glossary label or type.\Gls
-like\gls
and \glsdisp
that change the first use flag. These commands index the entry (if indexing is enabled), create a hyperlink to the entry’s glossary listing (if enabled) and unset the first use flag. These commands end with the post-link hook.\Glstext
-like\glstext
and \glslink
that don’t change the first use flag. These commands index the entry (if indexing is enabled) and create a hyperlink to the entry’s glossary listing (if enabled). These commands end with the post-link hook.\newignoredglossary
. These glossaries are omitted by iterative commands, such as \printglossaries
and \printunsrtglossaries
. An ignored glossary can only be displayed with \printunsrtglossary
or \printunsrtinnerglossary
.useri
which corresponds to the user1 key, or it may refer to a field that is only ever used internally that should not be explicitly modified, such as the field used to store the entry’s hierarchical level .Glossary Entry Keys Summary
These are options that can be passed to commands that define entries, such as \newglossaryentry
or \newabbreviation
.\newabbreviation
, if not provided and the nameshortaccess attribute is set. See §9.1.\seealsoname
] } but also sets up aliasing which makes the link text hyperlink to instead. §3.2; 33\glsdesc
(if indexing and hyperlinks are required) or \glsentrydesc
. Glossary styles should use \glossentrydesc
and \glspostdescription
to incorporate the post-description hook.\gls
-like commands. Note that using an abbreviation style or post-link hooks is a more flexible approach. If omitted, this value is assumed to be the same as the text key.\newabbreviation
, if not provided and the firstshortaccess attribute is set. See §9.1.\gls
-like commands, such as \glspl
. If this key is omitted, then the value will either be the same as the plural field, if the first key wasn’t used, or the value will be taken from the first key with \glspluralsuffix
appended.\newabbreviation
, if not provided and the firstshortaccess attribute is set. See §9.1.\glsxtrsetgrouptitle
, although this is more commonly done implicitly within the glstex file. §3.2; 34\newabbreviation
to the entry’s long (unabbreviated) form. It typically shouldn’t be used explicitly with \newglossaryentry
as \newabbreviation
makes other modifications to ensure that when the entry is referenced with the \gls
-like commands, it will obey the appropriate abbreviation style. If you are using bib2gls then this field should be used in the bib file when defining abbreviations.\glsname
(if indexing and hyperlinks are required) or \glsentryname
. Glossary styles should use \glossentryname
, which uses \glsentryname
and incorporates the post-name hooks and related attributes.\gls
-like commands, such as \glspl
. This should be the appropriate plural form of the value provided by the text key. If omitted, this value is assumed to be the value of the text key with \glspluralsuffix
appended.\newabbreviation
, if not provided and the textshortaccess attribute is set. See §9.1.\glssee
. The glossaries-extra package additionally saves the value. Use autoseeindex=false to prevent the automatic cross-reference. The defaults to \seename
and should be a comma-separated list of entries that have already been defined.\seealsoname
] }. §3.2; 33\newabbreviation
(and \newacronym
) to the entry’s short (abbreviated) form. It typically shouldn’t be used explicitly with \newglossaryentry
as \newabbreviation
makes other modifications to ensure that when the entry is referenced with the \gls
-like commands, it will obey the appropriate abbreviation style. If you are using bib2gls then this field should be used in the bib file when defining abbreviations.\newabbreviation
, if not provided. See §9.1.\newabbreviation
, if not provided. See §9.1.\glssymbol
(if indexing and hyperlinks are required) or with \glsentrysymbol
.\glssymbolplural
(if indexing and hyperlinks are required) or with \glsentrysymbolplural
. If omitted, this value is set to the same as the symbol key (since symbols usually don’t have a plural form).\gls
-like commands. If omitted, this value is assumed to be the same as the name key.\newabbreviation
, if not provided and the textshortaccess attribute is set. See §9.1.\glsuseri
(if indexing and hyperlinks are required) or with \glsentryuseri
.\glsuserii
(if indexing and hyperlinks are required) or with \glsentryuserii
.\glsuseriii
(if indexing and hyperlinks are required) or with \glsentryuseriii
.\glsuseriv
(if indexing and hyperlinks are required) or with \glsentryuseriv
.\glsuserv
(if indexing and hyperlinks are required) or with \glsentryuserv
.\glsuservi
(if indexing and hyperlinks are required) or with \glsentryuservi
.Glossary Entry Fields Summary
These are internal fields that don’t have a corresponding key.\printnoidxglossary
to provide the locations. The value is an etoolbox list of individual locations which are obtained from the aux file. This field will also be used by the “unsrt” family of commands if location isn’t set.\GlsXtrRecordCounter
to store an etoolbox internal list of locations (without encap) corresponding to the given counter.
Most (but not all) of these options can be used in the optional argument of all the \Gls
-Like and \Glstext
-Like Options Summary\gls
-like, \glstext
-like and \glsadd
commands.\glstextformat
. §5.1.2; 189\glslocalunset
to unset the first use flag, otherwise use \glsunset
(only applies to \gls
-like commands).global
, local
or none
(only applies to \gls
-like commands). §5.1.2; 190\glstextformat
to encapsulate the link text. §5.1.2; 190\theH
. §5.1.2; 195\glsaddall
, the value is the list of glossaries to iterate over.Multi-Entry Set Options Summary
\gls
-like command for each element. §7.10; 362\mgls
and can be set implicitly with the default behaviour of the * and + modifiers. §7.10; 362\gls
-like command for the main entry. §7.10; 362\mgls
. §7.9.6; 361\gls
-like command for the “other” elements. §7.10; 362\gls
. §7.10; 363\gls
. §7.10; 363\gls
. §7.10; 363\gls
. §7.10; 363\gls
. §7.10; 364\gls
. §7.10; 364Print [Unsrt|noidx] Glossary Options Summary
Most (but not all) of these options can be used in the optional argument of all the print glossary commands: \printglossary
, \printnoidxglossary
, \printunsrtglossary
and \printunsrtinnerglossary
. Some may be used in the optional argument of the printunsrtglossarywrap environment.
to the start of the glossary (after the title). Not available with \label
{ }\printunsrtinnerglossary
. §8.3; 381++
then the current offset is incremented by the given amount otherwise the current offset is set to . For example, an entry with a normal hierarchical level of 1 will be treated as though it has hierarchical level 1+ . This option is only available for the “unsrt” family of commands and the printunsrtglossarywrap environment. §8.3; 381\glossarypostamble
to . §8.3; 385\glossarypreamble
to . §8.3; 384\glolinkprefix
to . §8.3; 382\printnoidxglossary
, this indicates how the glossary should be ordered. §8.3; 380Abbreviation Styles Summary
Abbreviations defined using \newabbreviation
will follow the style associated with the entry’s category. If there is no style associated with the entry’s category, the style for the abbreviation category is used (the default is long-short). Note that glossaries-extra redefines \newacronym
to use \newabbreviation
with category=acronym
so any entry defined with \newacronym
will use the abbreviation style for the acronym category (the default is short-nolong).false
. 131\emph
). 80false
. 131\emph
). 79\emph
). 87\emph
). 86false
. 131\glsxtrshort
. The description key must be supplied. The full form will only be shown with commands like \glsxtrfull
. This style sets the regular attribute to true
. 73, 74\emph
). 78\emph
). 78false
. 131\textsc
). The short form should therefore be in lowercase. 76\textsc
). The short form should therefore be in lowercase. 75\textsmaller
). The relsize package is must be loaded. 77\textsmaller
). The relsize package is must be loaded. 76\glsxtrshort
. The full form will only be shown with commands like \glsxtrfull
. This style sets the regular attribute to true
. 74, 75\textsc
). The short form should therefore be in lowercase. 91\emph
). 86\emph
). 85\textsc
). The short form should therefore be in lowercase. 83\textsc
). The short form should therefore be in lowercase. 82\textsmaller
). The relsize package is must be loaded. 84\textsmaller
). The relsize package is must be loaded. 84\glsxtruserfield
(if set) in the parenthetical content. 88\gls
-like or \glstext
-like commands, it will be placed after the long form on first use. On subsequent use, only the short form is shown (followed by , if provided). This style sets the regular attribute to false
(which means that the \gls
-like commands won’t use the first/firstplural or text/plural values). 81\emph
). 73false
. 130\textsc
). The short form should therefore be in lowercase. 69\textsmaller
). The relsize package is must be loaded. 71\emph
). 127\emph
). 126\emph
). 97\emph
). 99\emph
). 98\emph
). 97\emph
). 72, 73\emph
). 71, 72\emph
). 129\emph
). 128\gls
-like or \glstext
-like commands, it will be placed after the short form, before the footnote marker, on first use. On subsequent use, only the short form is shown (followed by , if provided). The inline full form shows the short form followed by the long form in parentheses. This style sets the regular attribute to false
(which means that the \gls
-like commands won’t use the first/firstplural or text/plural values). This style also sets the nohyperfirst attribute to true
to avoid nesting the footnote marker link. If you want hyperlinks on first use, use the short-postfootnote style instead. 114, 115\glsxtruserfield
(if set) in the parenthetical content. 100\gls
-like or \glstext
-like commands, it will be placed after the short form on first use. On subsequent use, only the short form is shown (followed by , if provided). This style sets the regular attribute to false
(which means that the \gls
-like commands won’t use the first/firstplural or text/plural values). 93false
. 130false
. 130\glsxtrlong
. The full form will only be shown with commands like \glsxtrfull
. This style sets the regular attribute to true
. 65, 65\glsxtruserfield
(if set) in the parenthetical content, which is placed in the post-link hook. 101\textsc
). The short form should therefore be in lowercase. 119\textsc
). The short form should therefore be in lowercase. 118\textsc
). The short form should therefore be in lowercase. 95\textsc
). The short form should therefore be in lowercase. 94\textsc
). The short form should therefore be in lowercase. 68, 69\textsc
). The short form should therefore be in lowercase. 67, 68\textsc
). The short form should therefore be in lowercase. 121\textsc
). The short form should therefore be in lowercase. 120\textsmaller
). The relsize package is must be loaded. 123\textsmaller
). The relsize package is must be loaded. 122\textsmaller
). The relsize package is must be loaded. 96\textsmaller
). The relsize package is must be loaded. 96\textsmaller
). The relsize package is must be loaded. 70, 71\textsmaller
). The relsize package is must be loaded. 69, 70\textsmaller
). The relsize package is must be loaded. 125\textsmaller
). The relsize package is must be loaded. 124Glossary Styles Summary
The default style may be set with \setglossarystyle
or use:
where the style is provided by package glossary-. The default style can be overridden for individual glossaries with the style option. For a summary of all available styles, see Gallery: Predefined Styles.\usepackage
[stylemods=,style=]{glossaries-extra} \glssetwidest
).\item
. Symbols and sub-entry names are not shown.\printunsrttable
. §8.7.4; 481Command Summary
@
\printunsrtglossarypredoglossary
can be defined to show the definition of this command for debugging purposes. §8.4.3; 402\@starttoc
when glossaries-extra loads. §5.3.3; 226\markboth
when glossaries-extra loads. §5.3.3; 226\markright
when glossaries-extra loads. §5.3.3; 226\glsxtrifinmark
to do its first argument ( ). §5.3.3; 226\glsxtrifinmark
to do its first argument ( ). §5.3.3; 226A
\cGLS
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\cGls
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\cgls
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1abbreviations
glossary. The default is “Abbreviations” or \acronymname
if babel has been detected. §2.1; 9\newabbreviation
(unless suppressed with the noshortplural attribute). This command is redefined by the abbreviation styles to \glsxtrabbrvpluralsuffix
or the style’s custom suffix command (such as \glsxtrscsuffix
). 171\cGLSpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\cGlspl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\cglspl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\cGLS
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\cGls
or \Gls
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\cgls
or \gls
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\GLSxtrfull
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrfull
or \Acrfull
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrfull
or \acrfull
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\GLSxtrfullpl
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrfullpl
or \Acrfullpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrfullpl
or \acrfullpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\GLSxtrlong
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrlong
or \Acrlong
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrlong
or \acrlong
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\GLSxtrlongpl
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrlongpl
or \Acrlongpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrlongpl
or \acrlongpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\cGLSpl
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\cGlspl
or \glspl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\cglspl
or \glspl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\acrfull
but sentence case.\newabbreviation
.\acrfullpl
but sentence case.\newabbreviation
.\acrlong
but sentence case.\newabbreviation
.\acrlong
but sentence case.\newabbreviation
.\glsabbrvfont
.acronym
glossary.acronym
. The abbreviations package option will redefine this to \glsxtrabbrvtype
if acronyms/acronym isn’t used. §4.1.4; 44\glsxtrabbrvpluralsuffix
, \abbrvpluralsuffix
and commands provided for use with particular abbreviation styles. This command should not be used with glossaries-extra.\acrshort
but sentence case.\newabbreviation
.\acrshort
but sentence case.\newabbreviation
.\GLSxtrshort
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrshort
or \Acrshort
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrshort
or \acrshort
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\GLSxtrshortpl
defined by the shortcuts=ac package option. §4.3.2; Table 4.1\Glsxtrshortpl
or \Acrshortpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\glsxtrshortpl
or \acrshortpl
defined by the shortcuts=ac or shortcuts=acronyms package option, respectively. §4.3.2; Table 4.1\Glsxtrfull
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrfull
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrfull
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\GLSxtrfullpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrfullpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrfullpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\GLSxtrlong
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrlong
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrlong
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\GLSxtrlongpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrlongpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrlongpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\providecommand
, this just does \mathrm{A}
. §11.5.8; 596\glsseelastsep
(provided by glossaries if not already defined).\glsdefaulttype
is assumed. §8.2; 380\GLSxtrshort
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrshort
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrshort
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\GLSxtrshortpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\Glsxtrshortpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1\glsxtrshortpl
defined by the shortcuts=abbreviations package option. §4.3.2; Table 4.1B
\providecommand
, this just does \mathrm{B}
. §11.5.8; 596@dualindexsymbol
.C
texdoc mfirstuc
or visit ctan.org/pkg/mfirstuc.texdoc mfirstuc
or visit ctan.org/pkg/mfirstuc.\GlsXtrResourceInitEscSequences
to expand to detokenized \CAT
. §11.5.2; 559\GLS
but hooks into the entry counting mechanism. §6.1; 313\Gls
but hooks into the entry counting mechanism. §6.1; 312\gls
but hooks into the entry counting mechanism. §6.1; 311\cGLS
if the entry was not used more than the given trigger value on the previous run. §6.1; 313\cGls
if the entry was not used more than the given trigger value on the previous run. §6.1; 312\cgls
if the entry was not used more than the given trigger value on the previous run. §6.1; 312\GLSpl
but hooks into the entry counting mechanism. §6.1; 313\Glspl
but hooks into the entry counting mechanism. §6.1; 312\glspl
but hooks into the entry counting mechanism. §6.1; 312\cGLSpl
if the entry was not used more than the given trigger value on the previous run. §6.1; 313\cGlspl
if the entry was not used more than the given trigger value on the previous run. §6.1; 313\cglspl
if the entry was not used more than the given trigger value on the previous run. §6.1; 312\providecommand
, this just does \mathrm{X}
. §11.5.8; 596\GlsXtrResourceInitEscSequences
to expand to detokenized \CS
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \csname
. §11.5.2; 559\GlsXtrLetField
but internally uses (etoolbox’s) \csletcs
instead of \cslet
. §3.5; 40\print…glossary
commands to the current glossary label.D
\glsentryfmt
) for the given glossary. If is omitted, \glsdefaulttype
is assumed. This will make the \gls
-like commands do for any entries that have the type field set to the given . If you want to support any abbreviation styles, you need to include \glssetabbrvfmt
in . Non-regular abbreviation styles are designed to work with \glsxtrgenabbrvfmt
.\dgls
but uses \GLS
. §11.5.7; 588\dgls
but uses \Gls
. §11.5.7; 588
for the first prefix in the prefix list that matches a defined entry. §11.5.7; 588\gls
[ ]{ {entry-label}}[ ]\dglsdisp
but applies sentence case. §11.5.7; 589\dgls
but uses \glsdisp
. §11.5.7; 589\dglsfield
but all caps. §11.5.7; 590\dglsfield
but applies sentence case. §11.5.7; 589\dgls
but selects the first matching label that has an entry with the field set. §11.5.7; 589\dglsfield
family of commands to the actual field used. This will either be the requested field or the fallback field. §11.5.7; 591\dglsfield
family of commands to the given . §11.5.7; 591\dglsfield
family of commands. §11.5.7; 591\dglslink
but applies sentence case. §11.5.7; 589\dgls
but uses \glslink
. §11.5.7; 589\dgls
but uses \GLSpl
. §11.5.7; 589\dgls
but uses \Glspl
. §11.5.7; 588\dgls
but uses \glspl
. §11.5.7; 588\providecommand
, this just does \mathrm{F}
. §11.5.8; 596\ifglossaryexists
to test for existence.texdoc datatool
or visit ctan.org/pkg/datatool.texdoc datatool
or visit ctan.org/pkg/datatool.E
\glssetwidest
but expands . §8.6.5.4; 438\glsupdatewidest
but expands . §8.6.5.4; 438\GlsXtrSetField
but expands the value. §3.5; 40\providecommand
, this just does \mathrm{E}
. §11.5.8; 596\providecommand
, this just does \mathrm{H}
. §11.5.8; 596\newabbreviation
. §4.5.3.1; 164F
\glsfirstabbrvfont
.\GlsXtrResourceInitEscSequences
to expand to detokenized \FIRSTLC
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \FIRSTUC
. §11.5.2; 559\forallabbreviationlists
with glossaries-extra.\forglsentries
for each glossary. The optional argument is a comma-separated list of glossary labels. If omitted, all non-ignored glossaries is assumed.\glsdefaulttype
if omitted. This command can’t be used with bib2gls since there are no defined entries until bib2gls has selected them and added them to the glstex file.G
\glssetwidest
but global. §8.6.5.4; 437\glsupdatewidest
but global. §8.6.5.4; 438\GlsXtrSetField
but globally assigns the value. §3.5; 40Glo
\GlossariesExtraWarning
when a command is used that isn’t supported by a complex abbreviation style.
. This command should be redefined by the glossary style.\begin{theglossary}
\printunsrtinnerglossary
). This will typically be defined to use a sectioning command, such as \section
or \chapter
. The default definition follows the section and numberedsection options.\print…glossary
set of commands (such as \printglossary
) to the current glossary’s title.\print…glossary
set of commands (such as \printglossary
) to the current glossary’s table of contents title.\glossentrydesc
but sentence case.\glossentryname
but sentence case.\glossentryname
but uses the given field (identified by its internal label) instead of name. §8.6; 423\glossentrysymbol
but sentence case.\glsxtrp
set of commands (with \glsxtrsetpopts
). §5.4; 230Gls
\gls
but converts the link text to all caps.\gls
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
.\glslink
options.\glsacspace
but includes inner formatting. Unlike \glsacspace
, this command is robust.\glsaccessdesc
. §9.2; 503\glsaccessdesc
. §9.2; 503\glsentrydesc
. §9.2; 503\glsaccessdescplural
. §9.2; 503\glsaccessdescplural
. §9.2; 503\glsentrydescplural
. §9.2; 503\glsaccessfirst
. §9.2; 501\glsaccessfirst
. §9.2; 501\glsentryfirst
. §9.2; 501\glsaccessfirstplural
. §9.2; 502\glsaccessfirstplural
. §9.2; 502\glsentryfirstplural
. §9.2; 502\GLSaccessdesc
but formats the displayed text with \GLSfmtfield
. §9.3; 510\Glsaccessdesc
but formats the displayed text with \Glsfmtfield
. §9.3; 510\glsaccessdesc
but formats the displayed text with \glsfmtfield
. §9.3; 510\GLSaccessdescplural
but formats the displayed text with \GLSfmtfield
. §9.3; 511\Glsaccessdescplural
but formats the displayed text with \Glsfmtfield
. §9.3; 511\glsaccessdescplural
but formats the displayed text with \glsfmtfield
. §9.3; 510\GLSaccessfirst
but formats the displayed text with \GLSfmtfield
. §9.3; 509\Glsaccessfirst
but formats the displayed text with \Glsfmtfield
. §9.3; 509\glsaccessfirst
but formats the displayed text with \glsfmtfield
. §9.3; 509\GLSaccessfirstplural
but formats the displayed text with \GLSfmtfield
. §9.3; 509\Glsaccessfirstplural
but formats the displayed text with \Glsfmtfield
. §9.3; 509\glsaccessfirstplural
but formats the displayed text with \glsfmtfield
. §9.3; 509\GLSaccesslong
but formats the displayed text with \GLSfmtfield
. §9.3; 512\Glsaccesslong
but formats the displayed text with \Glsfmtfield
. §9.3; 512\glsaccesslong
but formats the displayed text with \glsfmtfield
. §9.3; 512\GLSaccesslongpl
but formats the displayed text with \GLSfmtfield
. §9.3; 512\Glsaccesslongpl
but formats the displayed text with \Glsfmtfield
. §9.3; 512\glsaccesslongpl
but formats the displayed text with \glsfmtfield
. §9.3; 512\GLSaccessname
but formats the displayed text with \GLSfmtfield
. §9.3; 508\Glsaccessname
but formats the displayed text with \Glsfmtfield
. §9.3; 508\glsaccessname
but formats the displayed text with \glsfmtfield
. §9.3; 507\GLSaccessplural
but formats the displayed text with \GLSfmtfield
. §9.3; 508\Glsaccessplural
but formats the displayed text with \Glsfmtfield
. §9.3; 508\glsaccessplural
but formats the displayed text with \glsfmtfield
. §9.3; 508\GLSaccessshort
but formats the displayed text with \GLSfmtfield
. §9.3; 511\Glsaccessshort
but formats the displayed text with \Glsfmtfield
. §9.3; 511\glsaccessshort
but formats the displayed text with \glsfmtfield
. §9.3; 511\GLSaccessshortpl
but formats the displayed text with \GLSfmtfield
. §9.3; 511\Glsaccessshortpl
but formats the displayed text with \Glsfmtfield
. §9.3; 511\glsaccessshortpl
but formats the displayed text with \glsfmtfield
. §9.3; 511\GLSaccesssymbol
but formats the displayed text with \GLSfmtfield
. §9.3; 510\Glsaccesssymbol
but formats the displayed text with \Glsfmtfield
. §9.3; 509\glsaccesssymbol
but formats the displayed text with \glsfmtfield
. §9.3; 509\GLSaccesssymbolplural
but formats the displayed text with \GLSfmtfield
. §9.3; 510\Glsaccesssymbolplural
but formats the displayed text with \Glsfmtfield
. §9.3; 510\glsaccesssymbolplural
but formats the displayed text with \glsfmtfield
. §9.3; 510\GLSaccesstext
but formats the displayed text with \GLSfmtfield
. §9.3; 508\Glsaccesstext
but formats the displayed text with \Glsfmtfield
. §9.3; 508\glsaccesstext
but formats the displayed text with \glsfmtfield
. §9.3; 508\GLSaccessuseri
but formats the displayed text with \GLSfmtfield
. §9.3; 513\Glsaccessuseri
but formats the displayed text with \Glsfmtfield
. §9.3; 512\glsaccessuseri
but formats the displayed text with \glsfmtfield
. §9.3; 512\GLSaccessuserii
but formats the displayed text with \GLSfmtfield
. §9.3; 513\Glsaccessuserii
but formats the displayed text with \Glsfmtfield
. §9.3; 513\glsaccessuserii
but formats the displayed text with \glsfmtfield
. §9.3; 513\GLSaccessuseriii
but formats the displayed text with \GLSfmtfield
. §9.3; 513\Glsaccessuseriii
but formats the displayed text with \Glsfmtfield
. §9.3; 513\glsaccessuseriii
but formats the displayed text with \glsfmtfield
. §9.3; 513\GLSaccessuseriv
but formats the displayed text with \GLSfmtfield
. §9.3; 514\Glsaccessuseriv
but formats the displayed text with \Glsfmtfield
. §9.3; 514\glsaccessuseriv
but formats the displayed text with \glsfmtfield
. §9.3; 513\GLSaccessuserv
but formats the displayed text with \GLSfmtfield
. §9.3; 514\Glsaccessuserv
but formats the displayed text with \Glsfmtfield
. §9.3; 514\glsaccessuserv
but formats the displayed text with \glsfmtfield
. §9.3; 514\GLSaccessuservi
but formats the displayed text with \GLSfmtfield
. §9.3; 514\Glsaccessuservi
but formats the displayed text with \Glsfmtfield
. §9.3; 514\glsaccessuservi
but formats the displayed text with \glsfmtfield
. §9.3; 514\glsaccesslong
. §9.2; 504\glsaccesslong
. §9.2; 504\glsentrylong
. §9.2; 504\glsaccesslongpl
. §9.2; 505\glsaccesslongpl
. §9.2; 505\glsentrylongpl
. §9.2; 505\glsaccessname
. §9.2; 500\glsaccessname
. §9.2; 500\glsentryname
. §9.2; 500\glsaccessplural
. §9.2; 501\glsaccessplural
. §9.2; 501\glsentryplural
. §9.2; 501\glsaccessshort
. §9.2; 504\glsaccessshort
. §9.2; 504\glsentryshort
. §9.2; 503\glsaccessshortpl
. §9.2; 504\glsaccessshortpl
. §9.2; 504\glsentryshortpl
. §9.2; 504\glsaccesssymbol
. §9.2; 502\glsaccesssymbol
. §9.2; 502\glsentrysymbol
. §9.2; 502\glsaccesssymbolplural
. §9.2; 503\glsaccesssymbolplural
. §9.2; 502\glsentrysymbolplural
. §9.2; 502\glsaccesstext
. §9.2; 501\glsaccesstext
. §9.2; 501\glsentrytext
. §9.2; 500\glsaccessuseri
. §9.2; 505\glsaccessuseri
. §9.2; 505\glsentryuseri
. §9.2; 505\glsaccessuserii
. §9.2; 506\glsaccessuserii
. §9.2; 505\glsentryuserii
. §9.2; 505\glsaccessuseriii
. §9.2; 506\glsaccessuseriii
. §9.2; 506\glsentryuseriii
. §9.2; 506\glsaccessuseriv
. §9.2; 506\glsaccessuseriv
. §9.2; 506\glsentryuseriv
. §9.2; 506\glsaccessuserv
. §9.2; 507\glsaccessuserv
. §9.2; 507\glsentryuserv
. §9.2; 506\glsaccessuservi
. §9.2; 507\glsaccessuservi
. §9.2; 507\glsentryuservi
. §9.2; 507\glsaccessibility
.\glsacspacemax
otherwise uses \space
. This command is provided by glossaries but has a hard-coded maximum of 3em. This command is redefined by glossaries-extra to use \glsacspacemax
.\glsacspace
. This is a macro not a register. The default is 3em
.\glsadd
. This command can’t be used with bib2gls. Use the selection=all resource option instead.
for each label in the supplied comma-separated list. §5.8; 260\glsadd
[ ]{ }\glsentrytext
( ), \Glsentrytext
( ), \glstext
( ), \Glstext
( ), \GLStext
( ). The starred version switches on field expansion for the given key.\glsadd
. §5.1.1; 187\glsadd
. §5.1.1; 187\capitalisewords
but may be redefined to use \capitalisefmtwords
, if required. §5.2.4; 199\gls
-like and \glstext
-like commands, this expands to if the calling command doesn’t apply a case-change (such as \gls
or \glstext
), to if the calling command converts to sentence case (such as \Gls
or \Glstext
), or to if the calling command converts to all caps (such as \GLS
or \GLStext
). This command may be used within associated hooks, entry display styles (\defglsentryfmt
), and the post-link hook.
. Note that this isn’t the same as \string
\$
\MGP
. §11.5.2; 558\newabbreviation
. Maybe used in the style hooks (but take care to expand this command, if necessary). §4.5.3.1; 163\ifglshasfield
set this to the field’s value for use within the code.\printunsrtglossaryentryprocesshook
to reference the most recent top level entry label (allowing for flatten but not leveloffset). §8.4.3; 404\printunsrtglossaryentryprocesshook
to reference the most recent top level entry label (allowing for flatten and leveloffset). §8.4.3; 404\glsdisp
or the link text for the \glstext
-like commands. This command may be used within associated hooks, entry display styles (\defglsentryfmt
), and the post-link hook.\newabbreviation
automatically assigns shortaccess. This is defined by glossaries-accsupp to just do but is redefined by glossaries-extra to do . ( )
main
but if nomain is used, it will be the label of the first glossary to be defined.\glsxtrpostdesc
for the given to . §8.6.2; 426\glsxtrpostlink
for the given to . §5.5.4; 250\glsxtrpostname
for the given to . §8.6.1; 424\glsdesc
but converts the link text to all caps.\glsdesc
but converts the link text to sentence case. Use \Glossentrydesc
within custom glossary styles instead of this command.\glslink
options. Use \glossentrydesc
within custom glossary styles instead of this command.\glsdesc
but for the descriptionplural field.\glsdisp
but sets the link text to
. This is provided to allow a sentence case mapping in the event that \glssentencecase
{ }\glsdisp
occurs at the start of content that has automated case-changing.\glslink
instead, if the first use flag should not be altered). This command is considered a \gls
-like command. For the first optional argument, see \glslink
options.??
.\ifglsentryexists
, this does if the entry given by exists. If the entry doesn’t it exist, this does and generates an error (undefaction=error) or a warning (undefaction=warn). The unknown marker ??
will be placed before the code.\glsdoifexists
, but always warns (no error) if the entry doesn’t exist, regardless of the undefaction setting, and doesn’t show the unknown marker.\glslinkwrcontent
). §5.8; 266\glsstartrange
but with the end range marker )
. §5.8; 261\glsentryitem
to display the entry counter label.\glsenableentrycount
or \glsenableentryunitcount
). With unit entry counting, this expands to the total for the current unit.\gls
-like commands. This checks if the short field has been set for the current entry and, if set, initialises the abbreviation formatting commands (with \glssetabbrvfmt
). This command will do \glsgenentryfmt
(encapsulated with \glsxtrregularfont
) if the entry is considered a regular entry (\glsifregular
) or if the entry doesn’t have the short field set. Otherwise it will do \glsxtrgenabbrvfmt
encapsulated with \glsxtrabbreviationfont
.\relax
if the entry hasn’t been defined.\glossentrysymbol
occurs in a PDF bookmark. §8.6; 423\glsenableentrycount
or \glsenableentryunitcount
). With unit entry counting, this expands to the total for the current unit.\glsenableentryunitcount
). §6.1; 316\glsenableentryunitcount
). §6.1; 316\glsentrysymbol
but for the symbolaccess field.\glsfieldfetch
).\glssetnoexpandfield
.\glsxtrpostnamehook
. §8.6.1; 425\glsxtr
accsupp. If that command doesn’t exist or if glossaries-extra hasn’t been loaded, it then checks for the existence of \gls
(for example, accsupp\glsshortaccsupp
). Failing that it will use \glsaccsupp
. Whichever command is found first, is performed. { }{ }
\glsdoifexists
.\glsfielddef
but does a global assignment.\glsfieldedef
but does a global assignment.\glsFindWidestAnyName
but also also measures the location list. The length of the widest location is stored in , which should be a length register. §8.6.5.4; 440\glsFindWidestAnyName
but also also measures the symbol. The length of the widest symbol is stored in which should be a length register. §8.6.5.4; 440\glsFindWidestAnyNameSymbol
but also also measures the location list. The length of the widest symbol is stored in and the length of the widest location is stored in , which should both be length registers. §8.6.5.4; 440\glsfindwidesttoplevelname
. §8.6.5.4; 439\glsFindWidestUsedAnyName
but also also measures the location list. The length of the widest location is stored in , which should be a length register. §8.6.5.4; 440\glsFindWidestUsedAnyName
but also also measures the symbol. The length of the widest symbol is stored in which should be a length register. §8.6.5.4; 440\glsFindWidestUsedAnyNameSymbol
but also also measures the location list. The length of the widest symbol is stored in and the length of the widest location is stored in , which should both be length registers. §8.6.5.4; 440\glsfirst
but converts the link text to all caps. If you have defined the entry with \newabbreviation
use \GLSxtrfull
or
instead.\GLS
[prereset]\glsfirst
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. If you have defined the entry with \newabbreviation
use \Glsxtrfull
or
instead.\Gls
[prereset]\newabbreviation
use \glsxtrfull
for the full form or \glsxtrlong
for the long form or use
, as some abbreviation styles are too complicated to work with \gls
[prereset]\glsfirst
. For the first optional argument, see \glslink
options.\glsfirstabbrvfont
and \glsxtrgenentrytextfmt
to . §4.5.3.1; 166\glsfirstlongfont
and \glsxtrgenentrytextfmt
to . §4.5.3.1; 167\glsfirstplural
but converts the link text to all caps. If you have defined the entry with \newabbreviation
use \GLSxtrfullpl
or
instead.\GLSpl
[prereset]\glsfirstplural
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. If you have defined the entry with \newabbreviation
use \Glsxtrfullpl
or
instead.\Glspl
[prereset]\newabbreviation
use \glsxtrfullpl
for the full form or \glsxtrlongpl
for the long form or use
, as some abbreviation styles are too complicated to work with \glspl
[prereset]\glsfirstplural
. For the first optional argument, see \glslink
options.\glsfirstabbrvfont
otherwise with \glsfirstinnerfmtabbrvfont
. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 166\glsfirstlongfont
otherwise with \glsinnerfmtlongfont
. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 168\glsfmtfield
but changes the field value to all caps. §5.5.3; 245\glsfmtfield
but uses \makefirstuc
to change the field value to sentence case. §5.5.3; 245\glsfmtfield
should not be robust as it needs to expand if it’s inside a case-changing command. §5.5.3; 245
in PDF bookmarks (no case-change), otherwise it expands to \glspdffmtfull
{ }
. §5.3.2; 210\GLSxtrtitlefull
{ }
in PDF bookmarks (no case-change), otherwise it expands to \glspdffmtfull
{ }
. §5.3.2; 210\Glsxtrtitlefull
{ }
in PDF bookmarks, otherwise it expands to \glspdffmtfull
{ }
. §5.3.2; 209\glsxtrtitlefull
{ }
in PDF bookmarks (no case-change), otherwise it expands to \glspdffmtfullpl
{ }
. §5.3.2; 210\GLSxtrtitlefullpl
{ }
in PDF bookmarks (no case-change), otherwise it expands to \glspdffmtfullpl
{ }
. §5.3.2; 210\Glsxtrtitlefullpl
{ }
in PDF bookmarks, otherwise it expands to \glspdffmtfullpl
{ }
. §5.3.2; 210\glsxtrtitlefullpl
{ }\glsfmtinsert
but converts to all caps.\glsxtrgenentrytextfmt
to \glsinsert
if \glsinsert
isn’t empty.\glsentryfmt
for regular entries. §5.5.5; 255\ifcsvoid
). Does if the entry hasn’t been defined. §10.2.2; 528\ifcsvoid
). §10.2.2; 528#
. §11.5.2; 558
. §11.5.2; 558\string
\u
.\glsentrytext
{ }\delimR
or \delimN
. This command should not be used outside of location lists as it requires additional information in order to correctly form the hyperlinks.true
. Does if the attribute is true
and otherwise. Does if there’s no such attribute for the given category or if the entry hasn’t been defined. §10.2.2; 529\ifglsfieldeq
for the test). §10; 515\DTLifinlist
to perform the test. §10.2.2; 530true
. Does if the attribute is true
and otherwise. Does if there’s no such attribute for the given category. §10.2.2; 529\glsentryindexcount
is greater than 0. §5.8; 267false
, otherwise does . §10.2.2; 529false
, otherwise does . §10.2.2; 529\gls
-like and \glstext
-like commands, this expands to if the calling command accesses a plural field (such as \glspl
or \glsplural
) otherwise it expands to . This command may be used within associated hooks, entry display styles (\defglsentryfmt
), and the post-link hook.true
, otherwise does . §10.2.2; 529true
, otherwise does . §10.2.2; 529\glsabbrvfont
and \glsxtrgenentrytextfmt
to . §4.5.3.1; 167\glslongfont
and \glsxtrgenentrytextfmt
to . §4.5.3.1; 168\gls
-like commands (but not to the \glstext
-like commands, where the is added to \glscustomtext
). This command may be used within associated hooks, entry display styles (\defglsentryfmt
), and the post-link hook.\newabbreviation
. §4.5.3.1; 163\gls
-like and \glstext
-like commands. This command may be used within associated hooks, entry display styles (\defglsentryfmt
), and the post-link hook.\glslink
but sets the link text to
. This is provided to allow a sentence case mapping in the event that \glssentencecase
{ }\glslink
occurs at the start of content that has automated case-changing.\glsdisp
instead, if the first use flag needs to be unset). This command is considered a \glstext
-like command. For the first optional argument, see \glslink
options.\gls
-like commands that tests if the hyperlink should be switched off on first use.\gls
-like and \glstext
-like commands.\gls
-like and \glstext
-like commands. §5.1.1; 187\glslistinit
to provide better integration with gettitlestring.\glsdescwidth
for long-name-custom3-desc style. §8.7.2.7; 471\glsdescwidth
for long-name-custom2-desc style. §8.7.2.7; 471\glsdescwidth
for long-name-custom1-desc style. §8.7.2.7; 471\glsdescwidth
according to the widest name for styles that only show the name, location list and description. §8.7.2.3; 456\glsdescwidth
according to the widest name for styles that only show the name and description. §8.7.2.1; 453\glsdescwidth
for the abbr-long-short and abbr-short-long styles. §8.7.2.6; 464\glsdescwidth
according to the widest name for styles that show the name, symbol, location list and description. §8.7.2.4; 457\glsdescwidth
according to the widest name for styles that only show the symbol and description. §8.7.2.5; 461\glsdescwidth
according to the widest name for styles that only show the name, symbol and description. §8.7.2.2; 454\glslongextraUpdateWidest
but for child entries. Does nothing by default. §8.7.2; 451\ifGlsLongExtraUseTabular
to false (if this setting is required, the style must be set after this command). §8.7.2; 449\ifGlsLongExtraUseTabular
to true (if this setting is required, the style must be set after this command). §8.7.2; 449\newabbreviation
). §4.5.3.1; 164\newabbreviation
). §4.5.3.1; 164\makefirstuc
to perform the actual case-change. As from mfirstuc v2.08+ this just uses \MFUsentencecase
.\MFUaddmap
, otherwise it will use \glsmfuexcl
instead. See §5.2.1 for further details. §5.2.1; 199\MFUblocker
, otherwise it will use \glsmfuexcl
instead. See §5.2.1 for further details. §5.2.1; 198\MFUexcl
, otherwise it will implement something similar. See §5.2.1 for further details. §5.2.1; 197\glsname
but converts the link text to all caps. This command is incompatible with some abbreviation styles.\glsname
but converts the link text to sentence case. Use \Glossentryname
within custom glossary styles instead of this command.\glslink
options. Use \glossentryname
within custom glossary styles instead of this command.\glossentryname
to apply a font change to the name, unless (with glossaries-extra) the glossnamefont attribute has been set.\glssetexpandfield
.\glshypernumber
otherwise it will simply display its argument, which may be a single location, or locations delimited by \delimR
or \delimN
.numbers
group and (if the numbers package option is used) the numbers
glossary.\par
can’t be used directly).
for use in PDF bookmarks or other text-only contexts. §5.3.2; 209\glsentrylong
{ } (\glsentryshort
{ })
for use in PDF bookmarks or other text-only contexts. §5.3.2; 209\glsentrylongpl
{ } (\glsentryshortpl
{ })\glsgroupskip
with nogroupskip=false for the glossary-longbooktabs styles.\glspl
but converts the link text to all caps.\glspl
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
.\gls
but uses the relevant plural form.\glsplural
but converts the link text to all caps. If you have defined the entry with \newabbreviation
use \GLSxtrshortpl
or
instead.\GLSpl
[preunset]\glsplural
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. If you have defined the entry with \newabbreviation
use \Glsxtrshortpl
or
instead.\Glspl
[preunset]\newabbreviation
use \glsxtrshortpl
for the short form or
, as some abbreviation styles are too complicated to work with \gls
[preunset]\glsplural
. For the first optional argument, see \glslink
options.\gls
-like and \glstext
-like commands. This is redefined by glossaries-extra to use \glsxtrpostlinkhook
.\makeglossaries
or \makenoidxglossaries
only).
. §5.4; 231\GLSxtrp
{short}{ }
. §5.4; 231\Glsxtrp
{short}{ }
. §5.4; 231\glsxtrp
{short}{ }
. §5.4; 231\GLSxtrp
{text}{ }
. §5.4; 231\Glsxtrp
{text}{ }
. §5.4; 231\glsxtrp
{text}{ }\ref
) the entry counter or sub-counter (if entrycounter or subentrycounter options are set) otherwise just does \gls
{ }.\renewcommand
but only issues a warning instead of an error if the command hasn’t been defined. §11.5.8; 596\ifglsresetcurrcount
to false. §6.1; 310\ifglsresetcurrcount
to true. §6.1; 310\glsnonextpages
.\seename
.\glsseelist
to format the first entry. §5.13; 302
.\emph
{ } \glsseelist
{ }\glsseelist
to format each entry.\glsseeitem
to produce the hyperlink text. §5.13; 302\glsseelist
as a separator between penultimate and final entry in the list if there are at least three entries in the list. §5.13; 303\glsseelist
as a separator between penultimate and final entry in the list. §5.13; 303\glsseeitem
(or \mglsseeitem
, the label corresponds to a multi-entry). The separators are \glsseelastsep
(between the penultimate and last items) and \glsseesep
(between all the other items). With glossaries-extra, the first label is encapsulated with \glsseefirstitem
(or \mglsseefirstitem
) and the final separator for a list consisting of at least three items is given by \glsseelastoxfordsep
. §5.13; 301\glsseelist
as a separator between each entry except the last pair. §5.13; 303\Gls
, to perform the case change. This is simply defined to use \makefirstuc
. §5.2.1; 196~
) for abbreviations. §7.4; 347\glsnoexpandfields
).\glsexpandfields
).true
for the given category. §10.2.2; 527\glsaccessibility
.\newabbreviation
). §4.5.3.1; 164\newabbreviation
). §4.5.3.1; 163\glsshowtargetinner
or \glsshowtargetouter
, depending on the current mode.\glsshowtargetfont
declaration.\glsxtrshowtargetsymbolleft
. §2.5; 30\glsxtrshowtargetsymbolright
followed by the right inner annotation. §2.5; 30\glsshowtargetsymbol
) in the text and in the margin.
where can either be provided by the format key in or will default to the format given in \glsaddeach
[ ,format=(
]{ }\GlsXtrSetDefaultRangeFormat
. §5.8; 261\printglossary
or \printnoidxglossary
. §8.4.1; 395\glssymbol
but converts the link text to all caps.\glssymbol
but converts the link text to sentence case. Use \Glossentrysymbol
within custom glossary styles instead of this command.\glslink
options. Use \glossentrysymbol
within custom glossary styles instead of this command.\glssymbol
but for the symbolplural field.symbols
group and (if the symbols package option is used) the symbols
glossary.\glstableChildEntries
between child entries. §8.7.4.1; 486c
or p{
or }>\protect\centeringp{ }
, depending on the par setting. §8.7.4.4; 493\printunsrttable
to perform additional filtering. This command should do if the entry identified by should be filtered and otherwise. §8.7.4; 482\glstableChildEntries
to filter child entries. This command should do if the child entry identified by should be filtered and otherwise. §8.7.4.1; 485l
or p{
or }>\protect\raggedrightp{ }
, depending on the par setting. §8.7.4.4; 493\glstablenextcaption
. §8.7.4.2; 487\glstableChildEntries
before the child list. §8.7.4.1; 485r
or p{
or }>\protect\raggedleftp{ }
, depending on the par setting. §8.7.4.4; 493\glossentryname
{ }, but it can be something else.\glstext
but converts the link text to all caps. If you have defined the entry with \newabbreviation
use \GLSxtrshort
or
instead.\GLS
[preunset]\glstext
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. If you have defined the entry with \newabbreviation
use \Glsxtrshort
or
instead.\Gls
[preunset]\newabbreviation
use \glsxtrshort
for the short form or
, as some abbreviation styles are too complicated to work with \gls
[preunset]\glstext
. For the first optional argument, see \glslink
options.\gls
-like and \glstext
-like commands.\textsc
.\glstopicAssignSubIndent
to calculate the width of the widest name for the given level. §8.7.3; 480\glstreesubgroupitem
{previous group level}{level}{parent label}{group label}{group title}
glossaries-extra-stylemods v1.49+\glssetwidest
but only if is wider than the current widest value for the given hierarchical level. §8.6.5.4; 438\glsuseri
but converts the link text to all caps.\glsuseri
but converts the link text to sentence case.\glslink
options.\glsuserii
but converts the link text to all caps.\glsuserii
but converts the link text to sentence case.\glslink
options.\glsuseriii
but converts the link text to all caps.\glsuseriii
but converts the link text to sentence case.\glslink
options.\glsuseriv
but converts the link text to all caps.\glsuseriv
but converts the link text to sentence case.\glslink
options.\glsuserv
but converts the link text to all caps.\glsuserv
but converts the link text to sentence case.\glslink
options.\glsuservi
but converts the link text to all caps.\glsuservi
but converts the link text to sentence case.\glslink
options.\glsabbrvfont
otherwise with \glsinnerfmtabbrvfont
. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 167\glslongfont
otherwise with \glsinnerfmtlongfont
. This command has to expand, so protect any content that shouldn’t expand. §4.5.3.1; 168Glsxtr
\glsxtr
but applies sentence case. §13; 602\GlsXtrEnableOnTheFly
. §13; 601\GlsXtrRecordCounter
to append to the record. field. Also implements \glsxtrAddCounterRecordHook
. §8.4.3.2; 411\glsentryfmt
to encapsulate non-regular entries the have the short field set. §5.5.2; 240abbreviations
. §4.1.4; 44\nopostdesc
and \glsxtrnopostpunc
. §8.5; 419\glsxtrdisplaylocnameref
. §11.5.6; 581\glsxtr@counterrecord
. If this command is redefined, it must be done so in the preamble before the aux file is input. §8.4.3.2; 411\glsxtrifnextpunc
. You may list multiple characters at the same time to add a batch, but don’t add any separators (including spaces). Note that each character must be a single token, which means a single-byte character for pdfLaTeX. Multi-byte characters (UTF-8) will required a native Unicode engine (XeLaTeX or LuaLaTeX). §5.5.4; 249\relax
. §5.9.2; 279\glsxtrdeffield
. No existence check is performed. §3.5; 38\gls
-like and \glstext
-like commands. §5.1.1; 186\glstext
-like commands to initialise the formatting commands required for the given entry. §5.5.2; 240\gls
-like and \glstext
-like commands, this contains the definitions of \glslabel
, \glstextformat
, \glsxtrgenentrytextfmt
. §5.5.4; 254\glslabel
. This command isn’t used by default as it should rarely be needed an increases complexity. §5.5.3; 243\glsadd
by the \gls
-like and \glstext
-like commands. §5.8; 262address
field. §11.5.2; 560author
field. §11.5.2; 560booktitle
field. §11.5.2; 560chapter
field. §11.5.2; 560edition
field. §11.5.2; 560howpublished
field. §11.5.2; 560institution
field. §11.5.2; 560journal
field. §11.5.2; 560month
field. §11.5.2; 560note
field. §11.5.2; 560number
field. §11.5.2; 560organization
field. §11.5.2; 560pages
field. §11.5.2; 560publisher
field. §11.5.2; 560school
field. §11.5.2; 560series
field. §11.5.2; 560title
field. §11.5.2; 560bibtextype
field. §11.5.2; 560volume
field. §11.5.2; 560\pdfbookmark
, if supported. §8.7.1; 446\glsxtrbookindexfirstmarkfmt
. §8.7.1; 447\glsxtrbookindexlastmarkfmt
. §8.7.1; 447\glsxtrbookindexbetween
but for level 1 entries. §8.7.1; 445\glsxtrbookindexbetween
but for level 2 entries. §8.7.1; 445\glsxtr
. §13; 603\glsfieldaccsupp
.\glsxtrdisplaylocnameref
for format a location where the counter matches . §11.5.6; 582\gls
-like commands or it was one of the inline full form commands, otherwise it will expand to the name of the key associated with the singular form of the command. §5.5.4; 252\glsxtrrevert
. Simply does . 132\GlsXtrSetField
but doesn’t perform any existence checks. §3.5; 38\glsxtrifperiod
. This command is used in post-link hooks. §5.5.4; 247\glsunset
. §5.10.1; 287\glsxtrdisplayendloc
. §8.6.3; 429\glsnoidxdisplayloc
but used for supplementary locations. §11.5.5; 579\glsxtrautoindex
) the entry’s name, if the given attribute is set for the entry’s category. §12; 597\glsxtrifnextpunc
) this does the punctuation character and then , otherwise if does followed by . §5.5.4; 248\GlsXtrDualField
) with the given hyperlink text. §11.5.7; 585\GlsXtrDualBackLink
. §11.5.7; 585\glsxtrdeffield
but (protected) expands . §3.5; 38\glsxtrrevert
used by the emphasized (“em”) abbreviation styles. Uses \textup
. 158\glsxtr
. §13; 601\gls
-like commands (except \glsdisp
) to use the analogous record count commands (\rgls
etc). §11.4; 550\glsxtrforcsvfield
signifies that the loop should break at the end of the current iteration. §5.13; 303\glsxtrentryfmt
but converts to sentence case. §5.12.2; 300\{ }
where the control sequence name is obtained from the field given by \GlsXtrFmtField
. If hyperref has been loaded and this command will expand to \glsxtrpdfentryfmt
{ }{ } in a PDF bookmark. §5.12.2; 298\glsxtrdisplaylocnameref
to format a location where the counter is equation. §11.5.6; 582\dolistcsloop
. §5.14; 306\forlistcsloop
. §5.14; 306\DTLformatlist
. This command uses \glsxtrifhasfield
so the complete list can be obtained with \glscurrentfieldvalue
. This adds implicit grouping. There is no starred version. §5.13; 304\DTLformatlist
. §5.14; 306\ifinlistcs
to determine if is in the list stored in the given field. §5.14; 306\listcsadd
. §3.5; 39\listcseadd
. §3.5; 39\listcsgadd
. §3.5; 39\listcsxadd
. §3.5; 39\glsxtrusefield
but converts the field value to title case. §5.11; 293\glscapitalisewords
, if defined, otherwise uses \capitalisewords
. §5.11; 293\xifinlistcs
to determine if is in the list stored in the given field. §5.14; 307\textsc
) for the “sc” abbreviation styles on first use.\textsmaller
) for the “sm” abbreviation styles on first use.\glsxtrfmt
but applies a sentence case change to . §5.12.2; 300
where the control sequence name is obtained from the field given by \glslink
[ ]{ }{\{ } }\GlsXtrFmtField
. The actual format of the link text is governed by \glsxtrfmtdisplay
. §5.12.2; 297\glsxtrfmt*
but applies a sentence case change to . §5.12.2; 300\glsxtrfmt
but accepts the final option.\glsxtrfmt
. §5.1.1; 187\glsxtrfmt
. §5.12.2; 297\glsxtrnamereflink
to create an external location hyperlink. §11.5.6; 583\glsxtrfmt
. §5.12.2; 297\glsxtrnamereflink
to create an internal location hyperlink. §11.5.6; 583 for each element of the list. This command uses { }
\glsxtrifhasfield
so the complete list can be obtained with \glscurrentfieldvalue
. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 303\GlsXtrForeignTextField
then will be encapsulated according to the language tag stored in that field (using tracklang’s interface). §5.12.1; 295\GlsXtrForeignText
. §5.12.1; 295\glossaryentrynumbers
to encapsulate the entire location list in the glossary. §8.6.3; 427\glsxtrfull
but converts the link text to all caps. §4.3; 53\glsxtrfull
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 53
, depending on the abbreviation style. For the first optional argument, see \gls
{ }\glslink
options. §4.3; 53\glsxtrfullpl
but converts the link text to all caps. §4.3; 53\glsxtrfullpl
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 53
, depending on the abbreviation style. For the first optional argument, see \glspl
{ }\glslink
options. §4.3; 53\glsxtrfull
to save the \glsinsert
placeholder. By default, this just does \glsxtrsaveinsert
. §4.3; 54\glsentryfmt
for entries that have the short field set and have the regular attribute set to false
. §5.5.5; 255\gls
-like and \glstext
-like hooks to set up the inner formatting. Initialised to \glsxtrdefaultentrytextfmt
. §5.5.3; 243\glsxtrgeneralpuncIrules
. 568\glsxtrgeneralpuncIrules
. 568\glsxtrgeneralpuncIrules
. 568\glsxtrgeneralpuncIrules
. 568\glsxtrgeneralpuncIrules
. 569\glossentryname
, with appropriate hooks. §8.5; 418\glsxtrglossentry
but uses the given field instead of name. §8.5; 419true
). §5.3.3; 224true
). §5.3.3; 224true
). §5.3.3; 225true
). §5.3.3; 225true
). §5.3.3; 221true
). §5.3.3; 220true
). §5.3.3; 221true
). §5.3.3; 221\GLSfmtlong
when it occurs in a page header. §5.3.3; 219\Glsfmtlong
when it occurs in a page header. §5.3.3; 219\glsfmtlong
when it occurs in a page header. §5.3.3; 219\GLSfmtlongpl
when it occurs in a page header. §5.3.3; 220\Glsfmtlongpl
when it occurs in a page header. §5.3.3; 220\glsfmtlongpl
when it occurs in a page header. §5.3.3; 220true
). §5.3.3; 222true
). §5.3.3; 222true
). §5.3.3; 224true
). §5.3.3; 223\GLSfmtshort
when it occurs in a page header. §5.3.3; 217\Glsfmtshort
when it occurs in a page header. §5.3.3; 217\glsfmtshort
when it occurs in a page header. §5.3.3; 216\GLSfmtshortpl
when it occurs in a page header. §5.3.3; 219\Glsfmtshortpl
when it occurs in a page header. §5.3.3; 218\glsfmtshortpl
when it occurs in a page header. §5.3.3; 218true
). §5.3.3; 223true
). §5.3.3; 223\glsxtrhiername
. §5.11; 294
. §5.5.4; 253\glscapscase
{ }{ }{ }=
, <
or >
). The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 307\GlsXtrIfFieldCmpNum
with set to =
. The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 308\glsxtrifhasfield
and compares \glscurrentfieldvalue
to using etoolbox’s \ifdefstring
. The unstarred version adds implicit grouping. The starred version doesn’t. §5.15; 308\GlsXtrIfFieldEqStr
but first (protected) expands . §5.15; 308\GlsXtrIfFieldCmpNum
to test if the (numeric) value of the field identified by its internal label for the entry identified by is non-zero. An empty or undefined field is treated as 0. The unstarred version adds implicit grouping. The starred version doesn’t. The value can be referenced within (where it will be 0) or within using \glscurrentfieldvalue
. §5.15; 308\ifcsundef
command. Unlike \glsxtrifhasfield
there is no grouping or starred version. §5.15; 307\DTLifinlist
(provided by datatool-base, which is automatically loaded by the glossaries package). One level expansion is performed on . This command uses \glsxtrifhasfield
so the field value can be obtained with \glscurrentfieldvalue
. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 305\ifglshasfield
but doesn’t produce a warning if the entry or field doesn’t exist. This sets \glscurrentfieldvalue
to the field value and does if its defined and not empty, otherwise it does . The unstarred version adds implicit grouping to make nesting easier. The starred version doesn’t (to make assignments easier). §5.15; 307\GlsXtrIfFieldNonZero
). This requires the save-child-count resource option. §11.5.4; 578true
this does otherwise it does . §5.3.3; 215\markright
, \markboth
or \@starttoc
otherwise does . §5.3.3; 213\@starttoc
is redefined to temporarily set this macro to expand to instead. Will always expand to if \glsxtrRevertTocMarks
or \glsxtrRevertMarks
are used to revert \@starttoc
to its former definition. §5.3.3; 213.,:;?!
(full stop, comma, colon, semicolon, question mark, and exclamation mark). Additional punctuation characters can be added with \glsxtraddpunctuationmark
. §5.5.4; 248\glsxtrrecordtriggervalue
) exceeds the value supplied by the recordcount attribute, otherwise does . §11.4; 547\DTLifinlist
(provided by datatool-base, which is automatically loaded by the glossaries package). No expansion is performed on . This command uses \glsxtrifhasfield
so the complete list can be obtained with \glscurrentfieldvalue
. The unstarred version adds implicit grouping. The starred version doesn’t. §5.13; 305\gls
-like and \glstext
-like commands, this expands to if the calling command was considered the first use, otherwise it expands to . This command may be used within the post-link hook (where it’s too late to test the first use flag with \ifglsused
). §5.10; 284\gls
-like and \glstext
-like commands, this expands to if the calling command was a \gls
-like command, otherwise it expands to . This command may be used within the post-link hook. §5.5.4; 252\glsxtrifwasglslike
and \glsxtrifwasfirstuse
. This does if the calling command was both a \gls
-like command and was considered the first use. §5.5.4; 252\gls
-like command and was the subsequent use or if \glsxtrcurrentfield
was set to short
. §5.5.4; 253\glsxtrifwasglslike
and \glsxtrifwasfirstuse
. This does if the calling command was a \gls
-like command but was not considered the first use. §5.5.4; 253\GlsXtrIfFieldEqStr
but first (protected) expands both the field value and the supplied . §5.15; 308\stepcounter
. §6.2; 319\glsxtrsetaliasnoindex
. §5.9.3; 280\seealsoname
. §5.9.3; 280\GLSxtrfull
to display the all caps inline full form form (defined by the abbreviation style). 175\Glsxtrfull
to display the sentence case inline full form form (defined by the abbreviation style). 175\glsxtrfull
to display the inline full form form (defined by the abbreviation style). 174\GLSxtrfullpl
to display the plural all caps inline full form form (defined by the abbreviation style). 175\Glsxtrfullpl
to display the plural sentence case inline full form form (defined by the abbreviation style). 175\glsxtrfullpl
to display the plural inline full form form (defined by the abbreviation style). 174\ifglsxtrinsertinside
conditional to false. 131\ifglsxtrinsertinside
to true. 131\glsxtrlocationhyperlink
to create an internal hyperlink to the given location (advanced command, see documented code for use).\GlsXtrSetField
but internally uses (etoolbox’s) \cslet
instead of \csdef
. §3.5; 40\glsxtrresourcefile
[ ]{ }, where the is obtained from \jobname
and \glsxtrresourcecount
. §11; 533\glsxtrdisplaylocnameref
to expand to the anchor constructed from and , which corresponds to the record counter. §11.5.6; 581\glsxtrsupplocationurl
is defined and not empty (advanced command, see documented code for use).\glsxtrdisplaystartloc
). §8.6.3; 428\glsxtrlong
but converts the link text to all caps. §4.3; 52\glsxtrlong
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 52\glslink
options. §4.3; 52\glsxtrlongformat
but sentence case. 176\glsxtrlongformat
but sentence case. 175\gls
-like or \glstext
-like commands. The \ifglsxtrinsertinside
, inner formatting, and accessibility settings are supported. 175\glsxtrlongformatgrp
but all caps. 176\glsxtrlongformatgrp
but sentence case. 176\glsxtrlongformat
but adds grouping around (with the inner formatting inside the group). 176\glsxtrlonghyphennoshort
but converts to all caps The argument should be supplied as all caps. 149\glsxtrlonghyphenshort
but converts to all caps. The and arguments should be supplied as all caps. 149\glsxtrlongpl
but converts the link text to all caps. §4.3; 53\glsxtrlongpl
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 53\glslink
options. §4.3; 52\glsxtrlongplformat
but all caps. 176\glsxtrlongplformat
but sentence case. 176\glsxtrlongformat
but for the longplural field. 176\glsxtrlongplformatgrp
but all caps. 177\glsxtrlongplformatgrp
but sentence case. 177\glsxtrlongplformat
but adds grouping around (with the inner formatting inside the group). 176\glsxtrlongshortformat
but all caps. 179\glsxtrlongshortformat
but sentence case. 179\glsxtrlongformat
and the short form in parentheses with \glsxtrshortformat
. 178\glsxtrlongshortplformat
but all caps. 179\glsxtrlongshortplformat
but sentence case. 179\glsxtrlongshortformat
but for the plurals. 179\markright
, \markboth
and \@starttoc
to redefine commands that need to change when they occur within page headers or contents. This must be counteracted with \glsxtrrestoremarkhook
afterwards. §5.3.3; 226\glsxtrresourcefile
, this will add \MFUsave
to the begin document hook and then disable itself. This is provided to help bib2gls pick up any of mfirstuc’s exclusions, blockers and mappings to assist with its sentence case function. §11; 535*
or +
or the token identified with \GlsXtrSetAltModifier
) may be omitted. §7; 328\GlossariesExtraWarning
and does (this warning is used if all elements of a multi-entry set are skipped). { }§7.9.5; 360
\glsxtrmultientryadjustedname
but all caps. §7.14; 374\glsxtrmultientryadjustedname
but title case. §7.14; 374\glsxtrmultientryadjustedname
but sentence case. §7.14; 374\GLSxtrmultientryadjustedname
to encapsulate the main entry name. §7.14; 375\GlsXtrmultientryadjustedname
to encapsulate the main entry name. §7.14; 375\Glsxtrmultientryadjustedname
to encapsulate the main entry name if the first sublist is empty. §7.14; 375\glsxtrmultientryadjustedname
to encapsulate the main entry name. §7.14; 375\GLSxtrmultientryadjustedname
to encapsulate the other (not main) entries. §7.14; 376\GlsXtrmultientryadjustedname
to encapsulate the other (not main) entries. §7.14; 376\Glsxtrmultientryadjustedname
to encapsulate the other (not main) entries. §7.14; 376\glsxtrmultientryadjustedname
to encapsulate the other (not main) entries. §7.14; 376\glsxtrmultientryadjustedname
between the main element and the first element of the second sublist. §7.14; 375\glsxtrmultientryadjustedname
between the last element of the first sublist and the main element. §7.14; 375\glsxtrmultientryadjustedname
. §7.14; 375\glsxtrdisplaysupploc
to format the location. §11.5.5; 579\glsxtrdisplaylocnameref
to create a location hyperlink.\newabbreviation
. §4.1.5; 45
. §5.7; 257\gls
[ , ]{ } to behave like [ ]{ }{ }
. §5.7; 258\glsdisp
[ , ]{ }{ }\glsxtrnewgls
but provides all caps commands. §5.7; 258\glsxtrnewgls
but provides plural and sentence case commands as well. §5.7; 258 to behave like [ ]{ }{ }
. §5.7; 258\glslink
[ , ]{ }{ }numbers
, the category set to number
, the name set to and the sort set to . The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 11\glsxtrnewgls
but uses \rgls
. §5.7; 259\glsxtrnewrgls
but provides all caps commands. §5.7; 259\glsxtrnewrgls
but provides plural and sentence case commands as well. §5.7; 259symbols
, the category set to symbol
, the name set to and the sort set to . The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 10\GlossariesExtraWarning
indicating that the given glossary is missing.main
one. §15; 617main
one. §15; 617\makenoidxglossaries
. §15; 618\printnoidxglossary
(ASCII only). This command can’t be used with \makeglossaries
or with record. §8.4; 387\newabbreviation
. §4.5.3.1; 163\newabbreviation
. §4.5.3.1; 164\newabbreviation
. §4.5.3.1; 164\glsxtrp
but converts to uppercase (but not in the PDF bookmark). §5.4; 231\glsxtrp
but converts the first letter to uppercase (but not in the PDF bookmark). §5.4; 231\gls
-like or \glstext
-like commands). This command is designed to expand to the field value if used in a PDF bookmark and can also expand to a more appropriate command if it ends up in the page header. Note that there’s no optional argument. Options should be set beforehand using \glsxtrsetpopts
, which is done automatically in the glossary with \glossxtrsetpopts
. §5.4; 230\glsrefentry
but uses \pageref
instead of \ref
. As with \glsrefentry
, this will use \gls
instead if the corresponding entry counter is disabled. §8.1; 379
. §5.12.2; 301\MFUsentencecase
{ }\glsxtrp
(and case-changing variants) inside the added scoping. By default this disables the post-link hook and ignores its arguments. §5.4; 230\glsxtrpl
but applies sentence case. §13; 602\glsxtr
but shows the plural form. §13; 602\glspostdescription
that implements the category post-description hook. §8.6.2; 425\glsxtrposthyphenlong
but all caps. 153\glsxtrposthyphenlongpl
but all caps. 153\glsxtrposthyphenlong
but shows the plural. 153\glsxtrposthyphenshort
but all caps. 151\glsxtrposthyphenshortpl
but all caps. 151\glsxtrposthyphenshort
but plural. 151\glsxtrposthyphensubsequent
but all caps. 152\glsxtrpostlink
if that command has been defined, where the category label is obtained from the entry that has just been referenced with a \gls
-like or \glstext
-like command (using \glslabel
). Does nothing if \glsxtrpostlink
isn’t defined. §5.5.4; 250\glsxtrpostlinkendsentence
, otherwise it does \glsxtrpostlink
. §5.5.4; 246\glsxtrpostlinkAddSymbolDescOnFirstUse
to separate the symbol and description, if both are set. §5.5.4; 251\glslocalreset
. This hook is modified by \glsenableentrycount
and \glsenableentryunitcount
. §5.10; 282\glslocalunset
. This hook is modified by \glsenableentrycount
and \glsenableentryunitcount
. §5.10; 282\longnewglossaryentry
. §3.1; 32\glossentryname
and \glossentrynameother
after the entry name is displayed. This hook implements auto-indexing (see §12), then the general hook \glsextrapostnamehook
and finally the \glsxtrpostname
hook. §8.6.1; 424\glsreset
. This hook is modified by \glsenableentrycount
and \glsenableentryunitcount
. §5.10; 282\glsunset
. This hook is modified by \glsenableentrycount
and \glsenableentryunitcount
. §5.10; 282\glsxtruserparen
) in styles like short-postlong-user. 144\glsxtruserparen
) in styles like long-postshort-user. 142\ifGlsXtrPrefixLabelFallbackLast
conditional to false. §11.5.7; 587\ifGlsXtrPrefixLabelFallbackLast
conditional to true. §11.5.7; 587\setglossarystyle
to initialise default definitions of style commands. §8.6; 422\gls
-like and \glstext
-like commands. §5.1.1; 186\glsxtr
accsupp to \glsshortaccsupp
, if not already defined.\glsaddstoragekey
). §11.5.2; 560\providecommand
within the LaTeX document but is treated as \renewcommand
by bib2gls’s interpreter. §11.5.8; 595\glsaddstoragekey
but does nothing if the key has already been defined. §3.2; 35\glsxtrdisplaylocnameref
to expand to the argument. This corresponds to the value of \@currentHref
when the record was created. §11.5.6; 580\glsxtrifrecordtrigger
. §11.4; 547\printglossary
with non-hybrid record.\glsentryfmt
to encapsulate regular entries. Also used by \glsxtrassignfieldfont
for regular entries. §5.5.2; 240\GlsXtrUnsetBufferEnableRepeatLocal
, this will locally reset all entries that are in the buffer that hadn’t been marked as used before the function was enabled. §5.10.1; 287\GlsXtrLoadResources
to provide a unique basename for each resource set. §11; 534\glsxtrresourcefile
. §11; 535\glsxtrresourceinit
to temporarily change the definitions of commands that may be used in regular expressions or within the assign-fields resource option. §11.5.2; 559\glsxtrmarkhook
. §5.3.3; 226\glsxtrnopostpunc
. Does nothing outside of the glossary. §8.6.2; 426\markright
, \markboth
and \@starttoc
to their previous definitions. §5.3; 200\@starttoc
to its previous definition. §5.3; 200\glstext
-like commands (except the inline full form commands like \glsxtrfull
) to save the \glsinsert
placeholder. By default, this sets \glsinsert
to empty. §5.5.4; 253\textsc
) for the “sc” abbreviation styles.\glsxtrrevert
used by styles like long-only-short-sc-only. Uses \glsxtrscrevert
. 155\glsxtrrevert
used by the small caps (“sc”) abbreviation styles. Uses \glstextup
. 157\glsxtrrevert
used by styles like long-postshort-sc-user. Uses \glsxtrscrevert
. 136\relax
. §5.9.2; 279\glsseelist
. §5.13; 301\glsxtruseseeformat
(for see and alias) or \glsxtruseseealsoformat
(for seealso). If any of these fields are set, the list is encapsulated with \glsxtrseelistsencap
. §5.9.2; 278\glsxtrseelists
to as separator between sub-lists. §5.9.2; 279\glsxtrseelists
to encapsulate the lists. §5.9.2; 278\glsxtrdisplaylocnameref
to override the default definition of \glsxtractualanchor
. §11.5.6; 581\gls
-like and \glstext
-like commands that will automatically implement the given options. §5; 183\glsfirst
: 1 (all caps doesn’t work), 2 (all caps and insert doesn’t work), 3 (insert doesn’t work). §4.5.3.1; 166\gls
-like and \glstext
-like commands. §5.1.1; 186\glsstartrange
and \glsendrange
. §5.8; 261\GlsXtrSetField
to check if the entry exists before assigning a value to the field. The part is the assignment code, which is only done if the required condition is met. This can be redefined if the condition needs to be altered. §3.5; 39
) after the glossary section heading. §8.3; 381\label
{ }\glsxtrlong
set of commands to assign \glsxtrifwasfirstuse
. §4.3; 52+
) modifier for \gls
-like and \glstext
-like commands. §5; 183\glsxtrp
(and case-change variants) pass to the relevant \glstext
-like command. §5.4; 230\glsxtrifnextpunc
. The must be a non-delimited list of single tokens that represent each punctuation character. Note that the element of the list must be a single token, which means a single-byte character for pdfLaTeX (for example, ASCII). Multi-byte characters (UTF-8) will required a native Unicode engine (XeLaTeX or LuaLaTeX). §5.5.4; 250*
) modifier for \gls
-like and \glstext
-like commands. §5; 183\glsxtrfull
(and case-changing and plural variations). §4.3; 54\glsxtrshort
but converts the link text to all caps. §4.3; 51\glsxtrshort
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 50\glslink
options. §4.3; 50\glsxtrshortformat
but all caps. 177\glsxtrshortformat
but sentence case. 177\gls
-like or \glstext
-like commands. The \ifglsxtrinsertinside
, inner formatting, and accessibility settings are supported. 177\glsxtrshortformatgrp
but all caps. 178\glsxtrshortformatgrp
but sentence case. 178\glsxtrshortformat
but adds grouping around (with the inner formatting inside the group). 178\glsxtrshorthyphenlong
but is converted to all caps. 152\glsxtrshortlongformat
but all caps. 180\glsxtrshortlongformat
but sentence case. 180\glsxtrshortformat
and the long form in parentheses with \glsxtrlongformat
. 179\glsxtrshortlongplformat
but all caps. 180\glsxtrshortlongplformat
but sentence case. 180\glsxtrshortlongformat
but for the plurals. 180\glsxtrshort
but converts the link text to all caps. §4.3; 51\glsxtrshortpl
but converts the first character of the link text to uppercase (for the start of a sentence) using \makefirstuc
. §4.3; 51\glslink
options. §4.3; 51\glsxtrshortplformat
but all caps. 178\glsxtrshortplformat
but sentence case. 177\glsxtrshortformat
but for the shortplural field. 177\glsxtrshortplformatgrp
but all caps. 178\glsxtrshortplformatgrp
but sentence case. 178\glsxtrshortplformat
but adds grouping around (with the inner formatting inside the group). 178\glsshowtargetinner
but is changed by the showtargets options. §2.5; 30\glsshowtargetouter
but is changed by the showtargets options. §2.5; 30\textsmaller
) for the “sm” abbreviation styles.\glsxtrrevert
used by the smaller (“sm”) abbreviation styles. Uses \textlarger
. 157\glsxtrglossentry
for the header and toc. §8.5; 421\glsxtrglossentryother
for the header and toc. §8.5; 422\GlsXtrStandaloneEntryName
but where the text is obtained from the given field instead of name. §8.5; 419\glsxtrglossentry
for the PDF bookmark. §8.5; 421\glsxtrglossentryother
for the PDF bookmark. §8.5; 421\GlossariesExtraWarning
indicating that the experimental starred version of \GlsXtrEnableOnTheFly
has been used.\glsxtrgenabbrvfmt
to display the all caps subsequent singular form (defined by the abbreviation style). 173\glsxtrgenabbrvfmt
to display the sentence case subsequent singular form (defined by the abbreviation style). 173\glsxtrgenabbrvfmt
to display the subsequent singular form (defined by the abbreviation style). 173\glsxtrgenabbrvfmt
to display the all caps subsequent plural form (defined by the abbreviation style). 173\glsxtrgenabbrvfmt
to display the sentence case subsequent plural form (defined by the abbreviation style). 173\glsxtrgenabbrvfmt
to display the subsequent plural form (defined by the abbreviation style). 173\glsxtrsupplocationurl
to the location provided by the attribute or to empty if the attribute isn’t set. §5.1.2; 194\glsxtrsupphypernumber
to the external location or empty if not provided.\GlsXtrEnableInitialTagging
. §4.4; 56\glsseelist
, this will start the list with if the list only contains one element and if the list contains more than one element. Each element is prefixed with . The tag is separated from the start of the list with \glsxtrtaggedlistsep
. The actual list separators as as for \glsseelist
. The is expanded before being iterated over. Does nothing if is empty. §5.13; 302\glsxtrtaggedlist
between the tag and the list. §5.13; 302\glstarget
but only creates the target if the field given by \glsxtrtarget
field hasn’t been set (if hyperlinks are supported). If that field hasn’t been set, the target is created and the field is set to the target name. §5.6; 256\glsxtrtarget
. §5.6; 256\glsxtrdisplaylocnameref
to display locations that have a title and are not associated with the page counter and don’t have an associated \glsxtr
locfmt command. The anchor is obtained from \glsxtrrecentanchor
. §11.5.6; 583\GLSfmtlong
. §5.3.3; 219\Glsfmtlong
. §5.3.3; 219\glsfmtlong
. §5.3.3; 219\GLSfmtlongpl
. §5.3.3; 220\Glsfmtlongpl
. §5.3.3; 220\glsfmtlongpl
. §5.3.3; 220\glsfmtshort
should use in the title or caption within the document text. §5.3.2; 205\GLSfmtshort
. §5.3.3; 217\Glsfmtshort
. §5.3.3; 216\glsfmtshort
. §5.3.3; 216\GLSfmtshortpl
. §5.3.3; 219\Glsfmtshortpl
. §5.3.3; 218\glsfmtshortpl
. §5.3.3; 218??
). §2.4; 16??
). §2.4; 15\GlossariesExtraWarning
indicating that a valid dialect label can’t be determined for the given locale and root language. §5.12.1; 295\glsxtraddallcrossrefs
. §5.9.3; 281\glsxtruseseeformat
. §5.9.2; 279\glsxtrusefield
but converts the field value to all caps. §5.11; 293\glsxtrusefield
but uses sentence case. §5.11; 293\relax
if the entry or field are undefined. §5.11; 293\glsxtruserfield
within \glsxtruserparen
and \GLSxtruserparen
. 135\glsxtruserlongformat
but all caps. 143\glsxtruserparen
) in styles like short-long-user. 143\glsxtruserlongplformat
but all caps. 144\glsxtruserparen
) in styles like short-long-user. 143\glsxtruserlongshortformat
but all caps. 139\glsxtruserlongshortformat
but sentence case. 139\glsxtruserlongshortplformat
but all caps. 140\glsxtruserlongshortplformat
but sentence case. 140\glsxtruserparen
but the value of the field given by \glsxtruserfield
is converted to all caps. The argument should already be in all caps. 138\glsxtrfullsep
) followed by the parenthetical material (\glsxtrparen
) consisting of and, if set, the value of the field given by \glsxtruserfield
, separated by \glsxtruserparensep
. 137\glsxtruserparen
and \GLSxtruserparen
. 135\glsxtrusershortformat
but all caps. 142\glsxtruserparen
) in styles like long-short-user. 141\glsxtrusershortlongformat
but all caps. 141\glsxtrusershortlongformat
but sentence case. 141\glsxtrusershortlongplformat
but all caps. 141\glsxtrusershortlongplformat
but sentence case. 141\glsxtrusershortplformat
but all caps. 142\glsxtruserparen
) in styles like long-short-user. 142\glsxtruseseeformat
. §5.9.2; 279\glsxtruseseealsoformat
. §5.9.2; 279\glsxtrusesee
. This internally uses \glsseeformat
.\GlossariesExtraWarning
indicating that a deprecated abbreviation style has been used. §4.5.2; 160\GlossariesExtraWarning
indicating that the given options list has been ignored by the given entry because it has already been defined. §13; 602\glsxtrdisplaylocnameref
to format a location where the counter is wrglossary. §11.5.6; 582H
\textbf{
otherwise it just does \glshypernumber
{ }}\textbf{ }
.I
\ifcsstrequal
. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists
.\ifdefstrequal
. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists
.\ifcsstring
. Triggers an error if the given field (identified by its internal field label) hasn’t been defined. Uses \glsdoifexists
.\nopostdesc
otherwise does .\glscurrentfieldvalue
to the field value and does otherwise it does .\GlsXtrResourceInitEscSequences
to expand to detokenized \IN
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \INTERPRET
. §11.5.2; 559\providecommand
, this just does \mathrm{I}
. §11.5.8; 596K
\providecommand
, this just does \mathrm{K}
. §11.5.8; 596L
\GlsXtrResourceInitEscSequences
to expand to detokenized \LABELIFY
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \LABELIFYLIST
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \LC
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \LEN
. §11.5.2; 559\glsdefaulttype
to and inputs . If the optional argument is omitted, the default glossary is assumed. Note that if any entries with have the type key set (including implicitly in commands like \newabbreviation
), then this will override the type given in the optional argument.\longnewglossaryentry
but doesn’t add the \glsxtrpostlongdescription
hook. §3.1; 32M
\RestoreAcronyms
. Not recommended. §4.6; 181\MFUsentencecase
to perform the actual case-change. See the mfirstuc documentation for further details, either: texdoc mfirstuc
or visit ctan.org/pkg/mfirstuc.\printglossary
. If the optional argument is present, any glossaries not identified in should be displayed with \printnoidxglossary
. §8; 377\printnoidxglossary
.\makefirstuc
to convert its argument to all caps and was redefined by glossaries to use \MakeTextUppercase
, but with mfirstuc v2.08+ and glossaries v4.50+ this command is instead defined to use the LaTeX3 all caps command, which is expandable. This command is no longer used by \makefirstuc
(which instead uses \MFUsentencecase
) or by glossaries v4.50+ (which now uses \glsuppercase
for all caps commands such as \GLS
).\makefirstuc
and also identifies as a blocker. Mappings and blockers aren’t supported by \MFUsentencecase
, so both and are identified as exclusions for \MFUsentencecase
.\makefirstuc
and an exclusion for \MFUsentencecase
(which doesn’t support blockers).\makefirstuc
and \MFUsentencecase
.\relax
so it doesn’t repeat the action if used multiple times, and counteracts any use of \MFUsaveatend
.\relax
so it doesn’t repeat the action if used multiple times, but it can be overridden by \MFUsave
.\makefirstuc
, this command is expandable, but only recognises commands identified as exclusions. See the mfirstuc documentation for further details. This command is provided by glossaries-extra v1.49+ if an old version of mfirstuc is detected.\GlsXtrResourceInitEscSequences
to expand to detokenized \MGP
. Note that this isn’t the same as \glscapturedgroup
. §11.5.2; 559\mgls
but uses \GLS
for each element. §7.11.1; 366\mgls
but uses \Gls
for all elements. §7.11.1; 365\mgls
but uses \Gls
for the first element. §7.11.1; 365\mglsusefield
. §7.11.3; 368\mglsforelements
but skips the main entry label. §7.13; 373\mglsfull
but sentence case. §7.11.2; 367\mgls
but uses \glsxtrfull
for any elements that have the short field set and \glsfirst
otherwise. §7.11.2; 366\mglslong
but sentence case. §7.11.2; 367\mgls
but uses \glsxtrlong
for any elements that have the long field set and \glstext
otherwise. §7.11.2; 366\mgls
but uses \GLSpl
for the main element and \GLS
for the others. §7.11.1; 366\mgls
but uses \Glspl
for the main entry and \Gls
for the others. §7.11.1; 365\mgls
uses sentence case for the first element and the plural form for the main element. §7.11.1; 365\mgls
but uses the plural form for the main element. §7.11.1; 365\mgls
but uses \Glsname
. §7.11.3; 367\mgls
but uses \Glsname
for the first entry and \glsname
for the remaining entries. §7.11.3; 367\mgls
but uses \glsname
. §7.11.3; 367\mgls
but uses \GLSpl
for each element. §7.11.1; 366\mgls
but uses \Glspl
for each element. §7.11.1; 365\mgls
but uses \Glspl
for the first element and \glspl
for the remaining elements. §7.11.1; 365\mgls
but uses the plural form for each element. §7.11.1; 365\mglsshort
but sentence case. §7.11.2; 366\mgls
but uses \glsxtrshort
for any elements that have the short field set and \glstext
otherwise. §7.11.2; 366\mgls
but uses \glssymbol
if the symbol field is set and \Gls
otherwise. §7.11.3; 367\mgls
but uses \glssymbol
if the symbol field is set, otherwise it uses \Gls
for the first element and \gls
for the remaining elements. §7.11.3; 367\mgls
but uses \glssymbol
if the symbol field is set and \gls
otherwise. §7.11.3; 367\mglsusefield
but sentence case for each element. §7.11.3; 368\mglsusefield
but sentence case for the first element. §7.11.3; 368\mgls
but uses \glsdisp
if the field identified by \mglsfield
exists with the link text obtained from the field value. §7.11.3; 368\mpgls
but all caps for the all elements. §7.11.4; 371\mpgls
but sentence case for all elements. §7.11.4; 370\mpgls
but sentence case for the first element. §7.11.4; 370\mgls
but uses \pgls
for the first element. §7.11.4; 369\mpglsmainpl
but all caps for the all elements. §7.11.4; 371\mpglsmainpl
but sentence case for all elements. §7.11.4; 370\mpglspl
but sentence case for the first element. §7.11.4; 370\mgls
but uses \pglspl
for the first element if its the main element otherwise \pgls
and, for the remaining elements, uses \glspl
if the element is the main entry or \gls
otherwise. §7.11.4; 370\mpglspl
but all caps for the all elements. §7.11.4; 371\mpglspl
but sentence case for all elements. §7.11.4; 370\mgls
but uses \pglspl
for the first element and \glspl
for the remaining elements. §7.11.4; 370\GlossariesExtraWarning
indicating that glossaries-prefix is required for \mpgls
family of commands. §7.11.4; 369\providecommand
, this just does \mathrm{M}
. §11.5.8; 596\ifmultiglossaryentryglobal
to false. §7; 327\ifmultiglossaryentryglobal
to true. §7; 326N
\newabbreviation
defined by the shortcuts=abbreviations or shortcuts=ac package option. §4.3.2; Table 4.1\newglossaryentry
and any provided (glossary entry keys) will be appended. The category is set to abbreviation by default, but may be overridden in . The appropriate style should be set before the abbreviation is defined with \setabbreviationstyle
. §4.1; 41\newabbreviation
just before the entry is defined. §4.1.5; 45\setabbreviationstyle
. §4.5.3; 160\newabbreviation
with the category key set to acronym. The appropriate style should be set before the abbreviation is defined with
. You can override the category in but remember to change the optional argument of \setabbreviationstyle
[acronym]{ }\setabbreviationstyle
to match.\newabbreviationstyle
instead.
. §11.5.7; 590\dglsfield
[ , ]{ }{ }\newdglsfield
but also defines sentence case ( ) and all caps ( ) commands with mappings. §11.5.7; 590\newglossaryentry
defined by the shortcuts=other package option. §2.4; 18\printglossary
), but this title can be overridden by the title option. The optional indicates which counter should be used by default for the location when indexing any entries that have been assigned to this glossary. (This can be overridden by the counter option.) The other arguments are file extensions for use with makeindex or xindy. These arguments aren’t relevant for other indexing options (in which case, you may prefer to use \newglossary*
).\newglossary
[ -glg]{ }{ -gls}{ }{ }[ ]\printglossaries
. This glossary has no associated indexing files and has hyperlinks disabled. You can use an ignored glossary for common terms or abbreviations that don’t need to be included in any listing (but you may want these terms defined as entries to allow automated formatting with the \gls
-like commands). An ignored glossary can’t be displayed with \printglossary
but may be displayed with the “unsrt” family of commands, such as \printunsrtglossary
.\newignoredglossary
but doesn’t disable hyperlinks. You will need to ensure that the hypertargets are defined. For example, with \printunsrtglossary
or through standalone entrys. §8; 377\glsxtrnewnumber
defined by the shortcuts=other package option (provided the numbers option is also used). §2.4; 19\glsxtrnewsymbol
defined by the shortcuts=other package option (provided the symbols option is also used). §2.4; 18index
, the name set to and the description set to \nopostdesc
. The optional argument is a comma-separated list of glossary entry keys, which can be used to override the defaults. §2.1; 12\GlsXtrResourceInitEscSequences
to expand to detokenized \NIN
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \NOTPREFIXOF
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \NOTSUFFIXOF
. §11.5.2; 559\providecommand
, this just does \mathrm{N}
. §11.5.8; 596\GlsXtrResourceInitEscSequences
to expand to detokenized \NULL
. §11.5.2; 559O
\providecommand
, this just does \mathrm{O}
. §11.5.8; 596\providecommand
, this just does \mathrm{O}
. §11.5.8; 596P
\pgls
but sentence case.\gls
but inserts the appropriate prefix, if provided.\pglsfmtlong
but all caps. §5.3.2; 208\pglsfmtlong
but sentence case. §5.3.2; 208\glsfmtlong
but inserts the prefixfirst field and separator in front if set. §5.3.2; 208\pglsfmtlongpl
but all caps. §5.3.2; 209\pglsfmtlongpl
but sentence case. §5.3.2; 209\glsfmtlongpl
but inserts the prefixfirstplural field and separator in front if set. §5.3.2; 209\pglsfmtshort
but all caps. §5.3.2; 206\pglsfmtshort
but sentence case. §5.3.2; 206\glsfmtshort
but inserts the prefix field and separator in front if set. §5.3.2; 206\pglsfmtshortpl
but all caps. §5.3.2; 207\pglsfmtshortpl
but sentence case. §5.3.2; 207\glsfmtshortpl
but inserts the prefixplural field and separator in front if set. §5.3.2; 207\pgls
but sentence case.\glspl
but inserts the appropriate prefix, if provided.\pglsxtrlong
but all caps. §4.3.1; 55\pglsxtrlong
but sentence case. §4.3.1; 55\glsxtrlong
but inserts the prefixfirst field and separator in front if set. §4.3.1; 55\pglsxtrlongpl
but all caps. §4.3.1; 56\pglsxtrlongpl
but sentence case. §4.3.1; 56\glsxtrlongpl
but inserts the prefixfirstplural field and separator in front if set. §4.3.1; 55\pglsxtrshort
but all caps. §4.3.1; 55\pglsxtrshort
but sentence case. §4.3.1; 54\glsxtrshort
but inserts the prefix field and separator in front if set. §4.3.1; 54\pglsxtrshortpl
but all caps. §4.3.1; 55\pglsxtrshortpl
but sentence case. §4.3.1; 55\glsxtrshortpl
but inserts the prefixplural field and separator in front if set. §4.3.1; 55\Pglsfmtlong
. §5.3.3; 218\Pglsfmtlongpl
. §5.3.3; 218\Pglsfmtshort
. §5.3.3; 218\Pglsfmtshortpl
. §5.3.3; 218\GlsXtrResourceInitEscSequences
to expand to detokenized \PREFIXOF
. §11.5.2; 559\glsdefaulttype
is assumed. §8.2; 380
. §2.1; 9\printglossary
[type=\glsxtrabbrvtype
]
.\printglossary
[type=\acronymtype
]
for each glossary.\printglossary
[type=]\makeglossaries
and either makeindex or xindy.
.\printglossary
[type=index]
for each glossary.\printnoidxglossary
[type=]\makenoidxglossaries
or with the glossaries not identified in the optional argument of \makeglossaries
when using the hybrid method. This method can be very slow and has limitations.
.\printglossary
[type=numbers]
.\printglossary
[type=symbols]\printunsrtabbreviations
[
]glossaries-extra-bib2gls v1.40+
)\usepackage
[abbreviations,record]{glossaries-extra}
. §11.5.1; 557\printunsrtglossary
[type=\glsxtrabbrvtype
]
. §11.5.1; 557\printunsrtglossary
[type=\acronymtype
]
for each glossary. §8.4; 386\printunsrtglossary
[type=]{
which localises . §8.4; 385\printunsrtglossary
[ ]}
is added. §8.4.3; 402\begin{theglossary}
is added. §8.4.3; 403\end{theglossary}
\printunsrtglossaryentryprocesshook
to skip the current entry. §8.4.3; 404\GlsXtrRecordCounter
to display a glossary with \printunsrtglossary*
that filters entries that don’t have a match for the current value. §8.4.3.2; 412\printunsrtglossaryunit
. §8.4.3.2; 413\printunsrtglossaryunit
. §8.4.3.2; 413
. §11.5.1; 558\printunsrtglossary
[type=index]\printunsrtglossary
but doesn’t contain the code that starts and ends the glossary (such as beginning and ending the theglossary environment), so this command needs to be either placed inside printunsrtglossarywrap or in the \printunsrtglossary
entry handler \printunsrtglossaryhandler
. §8.4.3.1; 407
. §11.5.1; 557\printunsrtglossary
[type=numbers]
. §11.5.1; 557\printunsrtglossary
[type=symbols]\printunsrtglossary
with the table style. §8.7.4; 481\newignoredglossary
but does nothing if the glossary has already been defined. §8; 378\multiglossaryentry
but does nothing if a multi-entry set has already been defined with the given label. §7; 326R
\newacronym
to the base glossaries mechanism. Not recommended. §4.6; 181\GLS
but hooks into the entry’s record count. §11.4; 549\Gls
but hooks into the entry’s record count. §11.4; 549\gls
but hooks into the entry’s record count. §11.4; 548\rGLS
if the entry’s record count is more than the given trigger value. §11.4; 549\rGls
if the entry’s record count is more than the given trigger value. §11.4; 549\rgls
if the entry’s record count is more than the given trigger value. §11.4; 548\GLSpl
but hooks into the entry’s record count. §11.4; 549\Glspl
but hooks into the entry’s record count. §11.4; 549\glspl
but hooks into the entry’s record count. §11.4; 548\rGLSpl
if the entry’s record count is more than the given trigger value. §11.4; 549\rGlspl
if the entry’s record count is more than the given trigger value. §11.4; 549\rglspl
if the entry’s record count is more than the given trigger value. §11.4; 548\providecommand
, this just does \mathrm{P}
. §11.5.8; 596S
\alsoname
, if that command has been defined, or “see also”.\newacronym
to use \newabbreviation
. Use:
with the closest matching abbreviation style instead.\setabbreviationstyle
[acronym]{ } \glshypernumber
.\glsdefaulttype
is assumed.\glsxtrpreglossarystyle
.\glossariesextrasetup
. §2; 9\glsadd
. §5.1.1; 189\glslink
options. §5.1.1; 189\GlsXtrResourceInitEscSequences
to expand to detokenized \SUFFIXOF
. §11.5.2; 559T
\providecommand
, this just does \mathrm{T}
. §11.5.8; 596\GlsXtrResourceInitEscSequences
to expand to detokenized \TITLE
. §11.5.2; 559\GlsXtrResourceInitEscSequences
to expand to detokenized \TRIM
. §11.5.2; 559U
\u
is defined by the LaTeX kernel as an accent command, you need to protect it from expansion while the options are written to the aux file (
). §11.5.2; 559\string
\u
\GlsXtrResourceInitEscSequences
to expand to detokenized \UC
. §11.5.2; 559\providecommand
and only if upgreek has been loaded, this just does \mathrm{A}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{B}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{X}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{E}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{H}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{I}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{K}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{M}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{N}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{O}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{o}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{P}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{T}
. §11.5.8; 596\providecommand
and only if upgreek has been loaded, this just does \mathrm{Z}
. §11.5.8; 596W
X
\capitalisefmtwords
but with the first token in expanded. The starred version uses the starred version of \capitalisefmtwords
.\eglssetwidest
but global. §8.6.5.4; 438\eglsupdatewidest
but global. §8.6.5.4; 438\GlsXtrIfValueInFieldCsvList
but fully expands . §5.13; 306\GlsXtrSetField
but expands the value and uses a global assignment. §3.5; 40\glsxtrposthyphenlong
or \GLSxtrposthyphenlong
. 152\glsxtrposthyphenshort
or \GLSxtrposthyphenshort
. 150\glsxtrposthyphensubsequent
or \GLSxtrposthyphensubsequent
. 151Z
\providecommand
, this just does \mathrm{Z}
. §11.5.8; 596Environment Summary
\printunsrtinnerglossary
within the body for each block of entries. §8.4.3.1; 408Package Option Summary
abbreviations
and title given by \abbreviationsname
, redefines \glsxtrabbrvtype
to abbreviations
, redefines \acronymtype
to \glsxtrabbrvtype
(unless the acronym or acronyms option has been used), and provides \printabbreviations
. §2.1; 9wrglossary(
to the )( )log file if there is an attempt to index an entry before the associated indexing file has been opened (makeindex and xindy only). With glossaries-extra, this setting will also display the label of any undefined entries that are referenced in the document. 28\newglossaryentry
is permitted in the document environment. §2.4; 16\newglossaryentry
in the document environment. 16\newglossaryentry
in the document environment, but only before any glossaries. 17\newglossaryentry
in the document environment if the base glossaries package would allow it. 16\GlsXtrLoadResources
(because it’s redundant to make bib2gls sort and collate as well). This setting should be used with \makeglossaries
before \GlsXtrLoadResources
and glossaries should be displayed with \printglossary
(or \printglossaries
). There’s little point in using this setting unless you have a custom xindy module that you can’t convert to an equivalent set of bib2gls options. 25, 25\makeglossaries
or \makenoidxglossaries
. 23\newabbreviation
. 18\newacronym
back to the base glossaries package’s acronym mechanism. 19, 19\newentry
, \newsym
and \newnum
. 18acronym
and title given by \acronymname
, redefines \acronymtype
to acronym
, and provides \printacronyms
. §2.1; 11acronym
, redefines \acronymtype
to acronym
, and provides \printacronyms
. §2.1; 11index
and the title \indexname
, and provides \printindex
and \newterm
. §2.1; 11main
glossary. You will need to define another glossary to use instead. For example, with the acronyms package option.\printglossary
have already been defined (which indicates that the document class or another package also provides a mechanism for creating a glossary that could potentially conflict with glossaries). This option is automatically implemented with glossaries-extra.numbers
and the title \glsnumbersgroupname
, and provides \printnumbers
. With glossaries-extra, this additionally defines \glsxtrnewnumber
. §2.1; 11chapter
or section
.\makeglossaries
.\makeglossaries
.\makeglossaries
.\makeglossaries
.\makeglossaries
and \makenoidxglossaries
only).\glsprestandardsort
hook.symbols
and the title \glssymbolsgroupname
, and provides \printsymbols
. With glossaries-extra, this additionally defines \glsxtrnewsymbol
. §2.1; 10\jobname
.glslabels that contains all defined entry labels and names (for the benefit of autocompletion tools).\jobname
.glslabels that contains all defined entry labels (for the benefit of autocompletion tools).Index
Symbols
&
&
).
(full stop or period).
)~
(non-breaking space)
@
\@currentlabelname
579\@endfortrue
304\@secondoftwo
213A
\actualchar
599\alph
264B
\backmatter
186\bottomrule
468C
\char
387\CurrentTrackedDialect
616\CurrentTrackedLanguage
616D
\Delta
576E
\encapchar
599F
\foreignlanguage
295\frontmatter
186G
\GetTitleStringDisableCommands
214\GetTitleStringSetup
214Glo
Gls
\gls
-like623\glsentryname
23, 47, 210, 211, 293, 294, 302, 376, 416, 418, 421, 500, 515, 597, 598, 627, 631, 715, 733\glssee
21, 22, 24, 33, 37, 185, 260, 268, 269, 273, 274, 280, 632, 788, \glsxtrindexseealso
\glstext
5, 23, 37, 43, 47, 50, 81, 182, 184, 191, 201, 203, 211, 234, 240, 244, 252, 284, 321, 366, 518, 534, 623, 722, 724, 802, 947, 950\glstext
-like623Glsxtr
\glsxtrfull
§4.3; Table 4.1; 43, 47, 50, 53, 54, 105, 139, 140, 142, 143, 159, 161, 174, 184, 209, 235, 252, 254, 284, 366, 622, 624, 654, 655, 664, 680, 685, 742, 842, 843, 844, 862, 898, 904, 943\glsxtrgenentrytextfmt
§5.5.3; 166–168, 173, 175, 177, 190, 243, 244, 254, 624, 744, 749, 757, 821, 845\GlsXtrLoadResources
§11; 23, 24, 34, 38, 59, 389, 397, 398, 402, 531, 533–536, 541, 544, 560, 626, 867, 897, 984, \glsxtrlong
§4.3; Table 4.1; 18, 19, 43, 47, 52, 54, 55, 61, 63, 65, 74, 81, 93, 103, 115, 159, 175, 207, 233, 235, 335, 366, 519, 663, 681, 686, 742, 868, 903, 947, 962\GlsXtrResourceInitEscSequences
§11.5.2; 535, 559, 690, 692, 698, 898, 936, 937, 940, 958, 965, 974–976\glsxtrshort
§4.3; Table 4.1; 18, 19, 43, 47, 50, 54, 61, 63, 65, 74, 82, 93, 103, 115, 159, 177, 182, 184, 201, 203, 206, 235, 240, 247, 252, 336, 366, 654, 655, 684, 687, 802, 905, 908, 950, 963\GlsXtrUnsetBufferEnableRepeatLocal
§5.10.1; 188, 287, 289, 897, 921, \GlsXtrResetLocalBuffer
H
\hfil
431\hl
241\hsize
433\hyperlink
319\hyperref
596\hypertarget
I
\ifcsstring
932\ifdefempty
307\ifdefstring
856\IfTrackedLanguageFileExists
562\ifundef
307\indexspace
434\input
531J
K
L
\leavevmode
32\letcs
498\levelchar
599M
\makefirstuc
196–199, 241, 293, 294, 375, 703, 742, 745, 746, 781, 784, 785, 790, 802, 843, 844, 868, 871, 905, 909, 938, 939, 940\MakeLowercase
\MakeTextLowercase
199\mgls
§7; 182, 325–329, 332, 334–336, 339–341, 349–351, 354–356, 361–364, 374, 643, 644, 940, 943, 947–954\midrule
N
\nameref
214\newabbreviation
§4.1; Table 4.1; 5, 16, 41, 43–45, 47, 50, 63, 66, 82, 94, 115, 133, 161, 163–167, 169, 181, 184, 325, 379, 389, 498, 515, 516, 519–521, 537, 628–634, 651, 678, 682–684, 697, 724, 726, 742, 745, 746, 758, 780, 784, 785, 792, 802, 883, 887, 937, 955, 973, 984\newglossaryentry
16–18, 32, 37, 41, 47, 161, 162, 167, 305, 325, 515, 516, 602, 628, 630, 632, 955, 956, 957, 982, 983\null
6O
P
\pagestyle
205\par
783\parindent
477\part
264.
).
)\printglossary
3, 5, 6, 25, 377, 378, 380, 385, 386, 401, 402, 418, 427, 432, 537, 603, 611, 623, 647, 701, 794, 897, 938, 956, 957, 965, 966, 984, 988\printnoidxglossary
35, 377, 378, 380, 385–388, 390, 400, 427, 428, 430, 432, 611, 637, 647, 649, 794, 886, 938, 966Q
\quotechar
599R
\Roman
264S
\section
701T
\textsubscript
498\textsuperscript
498\toprule
U
\ul
236\underline
56\upbeta
\uppercase
227W
X
Z