From 00032f2a7ba0b85507599fdb600f39d6af5483fa Mon Sep 17 00:00:00 2001
From: Karl Berry
glossaries-extra.sty v1.40: an extension to the
+class="cmr-17">glossaries-extra.sty v1.41: an extension to the
glossaries package
2019-03-31
This is followed by the symbol in parentheses if set, then the description and -post-description hook, and finally the location list is 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:
+(This command isn’t used if the description isn’t set.) +
Finally the location list is displayed using: +
-which just does a space followed by ⟨
+which just does ⟨location⟩ by default.
-
+
The The glossaries-extra-stylemods package (more conveniently loaded through the
§2.12.3 The glossaries-extra-stylemods Package.
- The The glossaries package tries to determine the group title from its label by first
checking if \Agroupname, so glossaries-extra first
-
-
-
checks for the existence of the internal command \glsxtr@grouptitle@⟨label⟩
which shouldn’t clash with another package. You can set the group title
using
-
+
For example:
@@ -8168,9 +8176,9 @@ For example:
This uses a global assignment. If you need to scope the change you can
+ This uses a global assignment. If you need to scope the change you can
use
-
-
+
+
The commands The commands \glossentryname and \glossentrydesc§ If you want to adapt a style to use another field instead of If you want to adapt a style to use another field instead of name, you can
use
-
+
This behaves just like \glossentryname (that is, it obeys description). See the key to field mappings table in the glossaries user
manual.
- There is a hook after There is a hook after \glossentryname and \Glossentryname:
-
+
By default this checks the indexname attribute. If the attribute exists for the
category to which the label belongs, then the name is automatically indexed
using
-
+
See §7 Auto-Indexing for further details.
- As from version 1.04, the post-name hook As from version 1.04, the post-name hook \glsxtrpostnamehook will also use
\glsxtrpostname⟨ (\glsentrysymbol{\glscurrententrylabel})}
For convenience, as from v1.31, you can use
- For convenience, as from v1.31, you can use
+
+
This is simply a shortcut for: As from version 1.25, the post-name hook also does
- As from version 1.25, the post-name hook also does
+
+
(before \glsxtrpostname⟨category⟩) to allow for additional non-category related code.
This does nothing by default.
- The post-description code used within the glossary is modified so that it also
+ The post-description code used within the glossary is modified so that it also
does
-
+
This occurs before the original \glspostdescription, so if the nopostdot=false
option is used, it will be inserted before the terminating full stop.
- This new command will do This new command will do \glsxtrpostdesc⟨category⟩ if it exists, where
⟨\glsxtrpostdescacronym for entries with the category set
class="cmss-10">acronym
+
This is simply a shortcut for: Since both Since both \glossentry and \subglossentry set
-
+
to the label for the current entry, you can use this within the definition of these
post-description hooks if you need to reference the label.
- For example, suppose you want to insert the plural form in brackets after the
+ For example, suppose you want to insert the plural form in brackets after the
description in the glossary, but only for entries in the general category, then you could
@@ -8408,10 +8416,10 @@ do:
\renewcommand{\glsxtrpostdescgeneral}{\space
This means you don’t have to define a custom glossary style, which you may find
+ This means you don’t have to define a custom glossary style, which you may find
more complicated. (It also allows more flexibility if you decide to change the
underlying glossary style.)
-
-
+
+
The The number list is now placed inside the argument of
-
+
This is internally used by \glossaryentrynumbers. The \glossaryentrynumbers so that it doesn’t display th
id="dx1-19004">number list, but it
still saves the number list in case it’s required.
-
- If you want to, for example, change the font for the entire
+ If you want to, for example, change the font for the entire number list
then redefine \GlsXtrFormatLocationList as appropriate. Don’t modify
\glossaryentrynumbers.
- Sometimes users like to insert “page” or “pages” in front of the Sometimes users like to insert “page” or “pages” in front of the number 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:
-
+
where ⟨page⟩ is the text to display if the number list only contains a single location and
@@ -8502,27 +8510,27 @@ class="cmti-10">pages An extra run is required when using this command.
- An extra run is required when using this command.
+
- See the accompanying sample file
+ See the accompanying sample file sample-pages.tex.
- Note that Note that bib2gls can be instructed to insert a prefix at the start of non-empty
location lists, which can be used as an alternative to \GlsXtrEnablePreLocationTag.
-
+
As from v1.02, As from v1.02, glossaries-extra now includes the package glossaries-extra-stylemods that
@@ -8539,7 +8547,7 @@ class="cmss-10">glossaries-extra Alternatively you can load Alternatively you can load glossary-⟨name⟩.sty at the same time by passing ⟨glossaries-extra-stylemods\usepackage[longragged]{glossaries-extra-stylemods}
Another option is to use the Another option is to use the stylemods key when you load long3col
\usepackage[style=long3col,stylemods]{glossaries-extra}
Or the value of Or the value of stylemods may be a comma-separated list of the style package
@@ -8584,7 +8592,7 @@ identifiers. For example:
Remember to group the value if it contains any commas:
+ Remember to group the value if it contains any commas:
@@ -8592,8 +8600,8 @@ identifiers. For example:
- Note that the
+ Note that the inline style is dealt with slightly differently. The original definition
provided by the nopostdot The The tabular-like styles, such as \printglossary, \printnoidxglossary or \printunsrtglossary, you must also
reset the glossary style.
- As from version 1.21, the hard-coded As from version 1.21, the hard-coded \space before the number list in many of
the predefined styles is replaced with
-
+
This just defaults to \space but may be redefined as required. For example:
@@ -8665,36 +8673,36 @@ class="cmtt-10">\space
- The
+
+
(which defaults to \glsxtrprelocation) for top-level items and
-
+
(which defaults to \glslistprelocation) for child items.
- As from v1.31, the description (including the post-description hook) is governed
+ As from v1.31, the description (including the post-description hook) is governed
by:
-
+
for the list and altlist styles (but not the listdotted variations).
- For just the For just the list style and its letter group variations (not the altlistlistdotted
+
which defaults to a full stop.
- The default value of The default value of \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.
- The The separator between groups (if not nogroupskip) is now given by:
+
+This defaults to \indexspace with penalties to deter page breaks. This command
+isn’t used if nogroupskip is set.
+ The glossary-tree package introduced two new commands in package introduced two new commands in glossaries version 4.22,
+ id="dx1-20035"> version 4.22,
\glstreegroupheaderfmt and and \glstreenavigationfmt, which are used to format
+ id="dx1-20037">, which are used to format
the letter group headings and the navigation elements for the appropriate styles.
These two new commands are defined in terms of \glstreenamefmt since that was
+ id="dx1-20038"> 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 has been defined, as from v1.31 glossaries-extra-stylemods
+ id="dx1-20039">
defines:
-
+
+
+
+
which simply does \textbf{⟨text⟩\glstreedefaultnamefmt, but if you only
want to redefine \glstreenamefmt without affecting the other two commands, then
+you now can.
+ The separator between groups (if not nogroupskip) is now given by:
+
+This defaults to \indexspace with penalties to deter page breaks. This command
+isn’t used if nogroupskip is set (except for the styles that display the group
+titles).
+ The styles that display the group titles now use:
+
+where ⟨label⟩ is the group label and ⟨title⟩ is the group title. This does nothing by
+default and is inserted before the group title. You can redefine it to add the group
+title to the PDF bookmarks. For example, if the glossary title uses \chapter
+then:
-you now can.
- The
+ will insert section-level bookmarks. The use of \currentglossary helps to provide
+unique bookmark labels in the event of multiple glossaries.
+ The index-like and -like and tree-like styles insert the pre--like styles insert the pre-number list space with
-
+
(which defaults to \glsxtrprelocation) for top-level items and
-
+
(which defaults to \glstreeprelocation) for child items.
- As from version 1.31, the As from version 1.31, the glossaries-extra-stylemods package also provides:
-
+
which is used by the treenoname styles to display the pre-description separator, the
+ id="dx1-20051"> styles to display the pre-description separator, the
description and the post-description hook. Similarly for the symbol:
-
+
The above are just used for top-level entries. Child entries don’t have the name or
symbol displayed for the treenoname styles, so there’s only a command for the child
+ id="dx1-20053"> styles, so there’s only a command for the child
description:
-
- For the
+ For the tree styles (but not the styles (but not the treenoname or or alttree styles), the description is
+ id="dx1-20057"> styles), the description is
displayed using:
-
+
and the symbol with:
-
+
Again the above two commands are just for top-level entries. The child entries
use:
-
+
for the description and
-
+
for the symbol.
- As from version 1.05, the As from version 1.41, there are now wrapper commands for \glstreedesc and
+\glstreechilddesc that check for the description and symbol to determine whether
+or not to insert a space (\glstreeprelocation or \glstreechildprelocation)
+before the page list. These are:
+
+for top-level entries and
+
+for sub-entries. This prevents a spurious space for terms that don’t have a symbol or
+description but do have a location list (for example, aliases).
+ As from version 1.05, the glossaries-extra-stylemods package provides some
additional commands for use with the alttree style to make it easier to modify. These
+ id="dx1-20064"> style to make it easier to modify. These
commands are only defined if the glossary-tree package has already been loaded,
+ id="dx1-20065"> package has already been loaded,
which is typically the case unless the notree option has been used when loading
+ id="dx1-20066"> option has been used when loading
glossaries.
-
+
(New to version 1.21.) This is like \glssetwidest (provided by glossary-tree) but
+ id="dx1-20068">) but
performs a global assignment.
-
+
This is like \glssetwidest but performs a protected expansion on ⟨name⟩. This has a
localised effect. For a global setting, use
-
+
The following only set the value if ⟨name⟩ is wider than the current value (new to
version 1.23). Local update:
-
+
Global update:
-
+
Locale update (expands ⟨name⟩):
-
+
Global update (expands ⟨name⟩):
-
- The widest entry value can later be retrieved using
-
+ The widest entry value can later be retrieved using
+
+
for the top-level entries and
-
+
+
+
+
for sub-entries, where ⟨level⟩ is the level number.
- Note that if you are 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 The command The command \glsfindwidesttoplevelname provided by glossary-tree has a
+ id="dx1-20079"> has a
CamelCase synonym:
-
+
Similar commands are also provided:
-
+
This has an additional check that the entry has been used. Naturally this is only
useful if the glossaries that use the alttree style occur at the end of the document.
+ id="dx1-20082"> style occur at the end of the document.
This command should be placed just before the start of the glossary. (Alternatively,
place it at the end of the document and save the value in the auxiliary file for the
next run.)
-
-
-
-
+
This is like the previous command but if doesn’t check the parent key. This is useful if
+ id="dx1-20084"> key. This is useful if
all levels should have the same width for the name.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedTopLevelName but also sets the first two sub-levels
as well. Any entry that has a great-grandparent is ignored.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyName but also measures the symbol. The length
of the widest symbol is stored in ⟨register⟩.
-
+
This is like the previous command but it doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyNameSymbol but also measures the number list.
This requires \glsentrynumberlist (see the (see the glossaries user manual). The length of
the widest symbol is stored in ⟨symbol register⟩ and the length of the widest number
+ id="dx1-20093">number
list is stored in ⟨location register⟩.
-
+
This is like the previous command but it doesn’t check if the entry has been
used.
-
+
This is like \glsFindWidestUsedAnyNameSymbolLocation but doesn’t measure the
symbol. The length of the widest number list is stored in ⟨number list is stored in ⟨register⟩.
-
-
-
-
+
This is like the previous command but doesn’t check if the entry has been
used.
- The layout of the symbol, description and number list is governed by
- The layout of the symbol, description and number list is governed by
+
+
for top-level entries and
-
+
for sub-entries.
- There is now a user level command that performs the initialisation for the There is now a user level command that performs the initialisation for the alttree
+ id="dx1-20101">
style:
-
- The paragraph indent for subsequent paragraphs in multi-paragraph descriptions
+
+ The paragraph indent for subsequent paragraphs in multi-paragraph descriptions
is provided by the length
- The new abbreviation system provided by The new abbreviation system provided by glossaries-extra is more flexible
than the acronym handling provided by the base glossaries package. The
@@ -9280,7 +9385,7 @@ their formatting dealt with by the style. You therefore need to select an
abbreviation style that ensures that \gls (and its variants) displays the desired
output.
-
- Abbreviations include acronyms (words formed from initial letters, such as
+
+ Abbreviations include acronyms (words formed from initial letters, such as
“laser”), initialisms (initial letters of a phrase, such as “html”, that aren’t
pronounced as words) and contractions (where parts of words are omitted, often
replaced by an apostrophe, such as “don’t”). The “acronym” code provided by the
@@ -9307,10 +9412,10 @@ to be described for readers unfamiliar with the term). They are therefore
more like a regular term, which may or may not require a description in the
glossary.
- The The glossaries-extra package corrects this misnomer, and provides better
abbreviation handling, with
-
- This sets the
+ This sets the category key to abbreviation by default, but that value may be
@@ -9348,7 +9453,7 @@ href="#sec:categories">§5
Categories for further details.
- See See §2.7 Nested Links regarding the pitfalls of using commands like \glsxtrshort within ⟨short⟩ or ⟨long⟩.
-
- The
+ The \newacronym command provided by the glossaries package is redefined by
@@ -9379,7 +9484,7 @@ class="cmtt-10">acronym
+
is
now
equivalent
@@ -9415,7 +9520,7 @@ class="cmtt-10">{ The The \newabbreviation command is superficially similar to the glossaries
package’s abbreviationglossaries The way the abbreviations are displayed by commands like The way the abbreviations are displayed by commands like \gls varies according
to the abbreviation style. The styles are set according to the entry’s category so,
unlike the base glossaries package, you can have different abbreviation styles within
the same glossary.
- There are two types of full forms. The display full form, which is used on
+ There are two types of full forms. The display full form, which is used on
first use by commands like short-footnote, the display and inline full forms are
different.
- These formatting commands aren’t stored in the These formatting commands aren’t stored in the short, shortplural\glsxtrlong You can apply the formatting command used for the short form to some arbitrary
+ You can apply the formatting command used for the short form to some arbitrary
text using
-
+
where ⟨category⟩ is the category label that identifies the abbreviation style. Similarly
for the formatting command use by the long form:
-
+
If you would like to tag the initial letters in the long form such that those letters are
+ If you would like to tag the initial letters in the long form such that those letters are
underlined in the glossary but not in the main part of the document, you can
use
-
+
before you define your abbreviations.
- This command (robustly) defines ⟨ This command (robustly) defines ⟨cs⟩ (a control sequence) to accept a single
argument, which is the letter (or letters) that needs to be tagged. The normal
behaviour of this command within the document is to simply do its argument, but in
@@ -9538,21 +9643,21 @@ href="#catattr.tagging">tagging attribute set to
“true”. For those cases it will use
-
+
This command defaults to \underline{⟨text⟩} but may be redefined as required.
- The control sequence ⟨ The control sequence ⟨cs⟩ can’t already be defined when used with the unstarred
version of \GlsXtrEnableInitialTagging for safety reasons. The starred
@@ -9561,7 +9666,7 @@ class="cmti-10">cs The first argument of The first argument of \GlsXtrEnableInitialTagging is a comma-separated list
of category names. The §5 Categories) but
this must be done before the glossary is displayed.
- The accompanying sample file The accompanying sample file sample-mixtures.tex uses initial tagging for both
the acronymabbreviation This defines the command This defines the command \itag which can be used in the definitions. For
example:
The underlining of the tagged letters only occurs in the glossary and then only for
+ The underlining of the tagged letters only occurs in the glossary and then only for
entries with the tagging attribute set.
-
+
The abbreviation style must be set before abbreviations are defined using:
- The abbreviation style must be set before abbreviations are defined using:
+
+
where ⟨style-name⟩ is the name of the style and ⟨category⟩ is the category label
@@ -9648,11 +9753,11 @@ class="cmss-10">regular
- Note that
+ Note that \setacronymstyle is disabled by glossaries-extra. Use Abbreviations can be used with the standard Abbreviations can be used with the standard glossaries commands, such as \gls,
@@ -9683,7 +9788,7 @@ class="cmtt-10">\acrshort
+
(Use this instead of \acrshort.)
- The long form can be produced with
- The long form can be produced with
+
+
(Use this instead of \acrlong.)
- The The inline full form can be produced with
-
+
(This this instead of \acrfull.)
-
- As mentioned earlier, the inline full form may not necessarily match the format
+
+ As mentioned earlier, the inline full form may not necessarily match the format
used on first use with short-nolongfirst use, but the full form will display the long form followed by the
short form in parentheses.
-
- The arguments ⟨
+ The arguments ⟨options⟩, ⟨label⟩ and ⟨insert⟩ are the same as for commands such as
\glstext. There are also analogous case-changing commands:
- First letter upper case short form:
- First letter upper case short form:
+
- First letter upper case long form:
-
+ First letter upper case long form:
+
- First letter upper case inline full form:
-
+ First letter upper case inline full form:
+
- All upper case short form:
+
+ All upper case short form:
- 2.12 Glossary Style Modifications
-
-
-2.12.1 Style Hooks
-
-
-
-
-
-
-
-
-
(plural: \glsentryplural{\glscurrententrylabel})}
2.12.2 Number List
-
-
-2.12.3 The glossaries-extra-stylemods Package
-
\usepackage{glossary-longragged}
\usepackage{glossaries-extra-stylemods}
-
-
-
-
-
+
-
+
+
\pdfbookmark[1]{#2}{\currentglossary.#1}%
+
}
+
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3. Abbreviations
-
-
-
-
-3.1 Tagging Initials
-
-
-
[description={a system for detecting the location and
speed of ships, aircraft, etc, through the use of radio
@@ -9605,18 +9710,18 @@ example:
\newabbreviation{xml}{XML}
{e\itag{x}tensible \itag{m}arkup \itag{l}anguage}
3.2 Abbreviation Styles
-
-
-
-
-
-
-
-