From 39dc5cdbdf0c89c978293f541900e89a11db8de9 Mon Sep 17 00:00:00 2001
From: Karl Berry
glossaries-extra.sty v1.24: an extension to the
+class="cmr-17">glossaries-extra.sty v1.25: an extension to the
glossaries package
2017-11-14
Each top-level entry is displayed using -
+For example + + + +
++
Each top-level entry is displayed using +
+
where the entry is identified by ⟨label⟩. This just does \glossentryname{⟨
- Alternatively you can use the Alternatively you can use the \glsxtrpostname⟨category⟩ hook.
- Sub-entries are displayed using
- Sub-entries are displayed using
+
+
which just defaults to \glsxtrbookindexname{⟨label⟩}.
- The separator used before the location list for top-level entries is given
+ The separator used before the location list for top-level entries is given
by
-
+
where ⟨label⟩ is the entry’s label. This checks if the location field has been set. If it
@@ -5101,90 +5122,90 @@ has, it does
otherwise it just does otherwise it just does \glsxtrprelocation (which defaults to \space). If you’re not
using bib2gls, the , the location field won’t be set.
- The separator used before the location list for sub-entries is given by
- The separator used before the location list for sub-entries is given by
+
+
which defaults to \glsxtrbookindexprelocation{⟨label⟩}.
- The separator used between a top-level parent and child entry is given
+ The separator used between a top-level parent and child entry is given
by
-
+
This defaults to \nopagebreak.
- The separator used between a sub-level parent and child entry is given
+ The separator used between a sub-level parent and child entry is given
by
-
+
This defaults to \glsxtrbookindexparentchildsep.
- The separator between top-level entries is given by
- The separator between top-level entries is given by
+
+
This comes after the entry given by ⟨label1⟩, if the entry has no children, or after the
last descendent otherwise, so it always comes immediately before the entry given by
⟨label2⟩ unless the entry occurs at the start of a group. This does nothing by
default.
- The separator between two level 1 entries is given by
- The separator between two level 1 entries is given by
+
- The separator between two level 2 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:
-
-
+
-
+
+
where ⟨sub-sub-label⟩ is the label of the last level 2 entry, ⟨sub-label⟩ is the label of the
last level 1 entry and ⟨label⟩ is the label of the last level 0 entry.
- For example, the resource option For example, the resource option seealso=omit instructs bib2gls to omit the
+ id="dx1-13032"> to omit the
seealso cross-reference from the location list. (The see cross-reference will still be
@@ -5247,7 +5268,7 @@ appended after the child entries using:
This uses This uses \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
@@ -5276,45 +5297,45 @@ with the sub-entries, and a level 1 entry has its cross-reference aligned
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
+ id="dx1-13033">
style only supports a maximum of two sub-levels).
- The The bookindex style uses group headings. (If you use style uses group headings. (If you use bib2gls remember to invoke
+ id="dx1-13036"> remember to invoke
it with the --group or -g switch.) The heading will use
-
+
If \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
+ id="dx1-13038"> 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
nothin.
- The group heading is formatted according to
- The group heading is formatted according to
+
+
which is defined as
where where \glstreegroupheaderfmt is provided by the glossary-tree package, which is
+ id="dx1-13040"> package, which is
automatically loaded. Note that the entry names aren’t encapsulated with
\glstreenamefmt.
- The The glossary-bookindex package provides some supplementary commands that
+ id="dx1-13041"> 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 \print…glossary commands. (That is, they
should only be used in glossary styles.)
-
+
This writes information to the .aux file that can be read on the next run to obtain
the first and last entry on each page of the glossary.
- You can display the first entry associated with the current page using:
- You can display the first entry associated with the current page using:
+
+
and the last entry associated with the current page using:
-
+
These do nothing if there are no entries marked on the current page (or if the
document build isn’t up to date).
- The entry is formatted using:
- The entry is formatted using:
+
+
for the first instance and
-
+
for the last.
- These commands are designed for use in page headers or footers where the page
+ These commands are designed for use in page headers or footers where the page
number is stable. For example, \glsxtrbookindexname can be redefined to mark the
current entry:
@@ -5404,13 +5425,13 @@ current entry:
If you only want to mark the top-level entries, remember to redefine
+ If you only want to mark the top-level entries, remember to redefine
\glsxtrbookindexsubname as it defaults to \glsxtrbookindexname:
@@ -5418,34 +5439,34 @@ class="cmtt-10">\glsxtrbookindexname:
- Then if you’re using
+ Then if you’re using fancyhdr you can set the page style to show the first and last
+ id="dx1-13047"> you can set the page style to show the first and last
entry for the current page with:
-
+
+
The The glossaries-extra-stylemods package (more conveniently loaded through the
§2.9.3 The glossaries-extra-stylemods Package.
- The The glossaries package tries to determine the group title from its label by first
checking if \glsxtr@grouptitle@⟨label⟩
which shouldn’t clash with another package. You can set the group title
using
-
+
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⟨
-
- The post-description code used within the glossary is modified so that it also
+ 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
does
-
+
This occurs before the original \glspostdescription, so if the nopostdot=false
+ id="dx1-15019">
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
⟨category⟩ is the category label associated with th
\glsxtrpostdescgeneral for entries with the category set to general or
+ id="dx1-15020"> or
\glsxtrpostdescacronym for entries with the category set to acronym.
- 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
+ id="dx1-15023"> category, then you could
do:
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-16004">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
@@ -5767,31 +5800,31 @@ 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
+
As from v1.02, As from v1.02, glossaries-extra now includes the package glossaries-extra-stylemods that
@@ -5803,12 +5836,12 @@ 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
- Another option is to use the Another option is to use the stylemods key when you load long3col
- Or the value of Or the value of stylemods may be a comma-separated list of the style package
@@ -5850,19 +5883,19 @@ identifiers. For example:
Remember to group the value if it contains any commas:
+ Remember to group the value if it contains any commas:
- Note that the
+ Note that the inline style is dealt with slightly differently. The original definition
provided by the nopostdot option, but the post-description
category hook can still be used.
- 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:
- The
+
+
(which defaults to \glsxtrprelocation) for top-level items and
-
+
(which defaults to \glslistprelocation) for child items.
- 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 index-like and tree-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.05, the As from version 1.05, the glossaries-extra-stylemods package provides some
additional commands for use with the alttreenotree
+
(New to version 1.21.) This is like \glssetwidest (provided by glossary-tree) 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.
- The command The command \glsfindwidesttoplevelname provided by glossary-tree 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 alttreealttree
+
This is like the previous command but if doesn’t check the parent key. This is useful if
@@ -6185,17 +6218,17 @@ class="cmss-10">parent
+
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 symbol 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 ⟨register⟩.
-
+
This is like the previous command but doesn’t check if the entry has been
used.
- The layout of the symbol, description and The layout of the symbol, description and number list is governed by
-
\glossentryname{#1}%
\ifglshassymbol{#1}{\space (\glossentrysymbol{#1})}{}%
}
-
-
-
-
-
-
-
-
-
-
-
\glsxtrifhasfield{seealso}{#1}{\glstreesubitem\glsxtruseseealso{#1}}{}%
}
@@ -5268,7 +5289,7 @@ appended after the child entries using:
\glsxtrbookindexsubsubatendgroup{#1}%
}
-
\par{\centering\glstreegroupheaderfmt{#1}\par}%
}
-
-
-
-
-
\glsxtrbookindexmarkentry{#1}%
\glossentryname{#1}%
}
\glossentryname{#1}%
}
\lhead{\thepage}%
\lfoot{\glsxtrbookindexfirstmark}%
\cfoot{}%
\rfoot{\glsxtrbookindexlastmark}%
2.9 Glossary Style Modifications
-
-
-2.9.1 Style Hooks
-
-
-
-
(\glsentrysymbol{\glscurrententrylabel})}
+
-
-
(plural: \glsentryplural{\glscurrententrylabel})}
2.9.2 Number List
-
-
-2.9.3 The glossaries-extra-stylemods Package
-
\usepackage{glossary-longragged}
\usepackage{glossaries-extra-stylemods}
\usepackage[longragged]{glossaries-extra-stylemods}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-