From 4fa439e0226fee506c74cf2b08d8e666a1d497db Mon Sep 17 00:00:00 2001
From: Karl Berry
glossaries-extra.sty v1.27: an extension to the
+class="cmr-17">glossaries-extra.sty v1.28: an extension to the
glossaries package
2018-02-26
-
+
+
As \GlsXtrSetField but globally. -
+
As \GlsXtrSetField but uses protected expansion. -
+
As \gGlsXtrSetField but uses protected expansion. -
+
Sets the field given by ⟨field⟩ to the replacement text of ⟨cs⟩ for the entry given by ⟨label⟩ (using \let). -
+
As \GlsXtrLetField but the control sequence name is supplied instead. -
+
Sets the field given by ⟨field-1⟩ for the entry given by ⟨label-1⟩ to the field given by @@ -17364,19 +17367,19 @@ class="cmti-10">code
⟩} is still used, as for \GlsXtrSetField. - The The glossaries package provides \ifglshasfield to determine if a field has been
+ id="dx1-40028"> to determine if a field has been
set. The glossaries-extra package provides a simpler version:
-
+
(New to v1.19.) Note that in this case the ⟨field⟩ must be the internal field label (for
@@ -17404,20 +17407,20 @@ class="cmti-10">true
+
to access the field value. This command includes grouping which scopes the ⟨true⟩ and
⟨false⟩ parts. The starred version
-
+
omits the implicit grouping.
-
- There is also a version that simply uses
+ There is also a version that simply uses \ifcsundef. It doesn’t save the field
value, but can be used if you only need to check if the field is defined without
accessing it:
-
-
+
- You can test if a field value equals a string using
-
+ You can test if a field value equals a string using
+
+
If the entry exists and has the given field set to the given text then this does ⟨true⟩
otherwise it does ⟨\glscurrentfieldvalue
with ⟨text⟩ using etoolbox’s ’s \ifdefstring.
- The The glossaries package provides \glsfieldfetch which can be used to fetch the
+ id="dx1-40036"> which can be used to fetch the
value of the given field and store it in a control sequence. The glossaries-extra package
provides another way of accessing the field value:
-
+
This works in the same way as commands like \glsentrytext but the field label is
specified in the first argument. Note that the ⟨field-label⟩ corresponds to the internal
field tag, which isn’t always the same as the key name. See Table 4.1 of the glossaries
+ id="dx1-40038">
manual. No error occurs if the entry or field haven’t been defined. This command is
not robust.
- There is also a version that converts the first letter to uppercase (analogous to
+ There is also a version that converts the first letter to uppercase (analogous to
\Glsentrytext):
-
- If you want to use a field to store a list that can be used as an
+ If you want to use a field to store a list that can be used as an etoolbox internal
+ id="dx1-40040"> internal
list, you can use the following command that adds an item to the field using
etoolbox’s ’s \listcsadd:
-
+
where ⟨label⟩ is the entry’s label, ⟨field⟩ is the entry’s field and ⟨\listgadd, \listeadd and
\listxadd:
-
-
+
-
+
+
You can then iterate over the list using:
-
+
or
-
+
that internally use \dolistcsloop and \forlistloop, respectively.
- There are also commands that use There are also commands that use \ifinlistcs:
-
+
and \xifinlistcs
-
- See the
+ See the etoolbox’s user manual for further details of these commands, in particular
+ id="dx1-40050">’s user manual for further details of these commands, in particular
the limitations of \ifinlist.
- If the field has a comma-separated list value instead, you can iterate over it
+ If the field has a comma-separated list value instead, you can iterate over it
using:
-
+
where again ⟨handler⟩ is a control sequence that takes a single argument. Unlike the
etoolbox loops, this doesn’t ignore empty elements nor does it discard leading /
+ id="dx1-40052"> loops, this doesn’t ignore empty elements nor does it discard leading /
trailing spaces. Internally it uses \@for (modified by xfor which is automatically
+ id="dx1-40053"> which is automatically
loaded by glossaries). The ). The xfor package modifies the behaviour of package modifies the behaviour of \@for to allow the
loop to be broken prematurely using \@endfortrue. The \glsxtrforcsvfield
command locally defines a user level command:
-
+
which is just a synonym for \@endfortrue.
- The loop is performed within the true part of The loop is performed within the true part of \glsxtrifhasfield so scoping is
automatically applied.
- When using the When using the record option, in addition to recording the usual location, you can
+ id="dx1-40057">
+
For example:
@@ -17763,7 +17766,7 @@ For example:
\usepackage[record]{glossaries-extra}
Each time an entry is referenced with commands like Each time an entry is referenced with commands like \gls or \glstext,
the \gls{bird} Note that there’s no key corresponding to this new Note that there’s no key corresponding to this new record.section field, but its
value can be accessed with \glsxtrfielduse or the list can be iterated over with
\glsxtrfielddolistloop etc.
-
+
+
This behaves like \printnoidxglossary but never sorts the entries and
always lists all the defined entries for the given glossary (and doesn’t require
@@ -17845,8 +17848,8 @@ the definition of \glsgroupskip to avoid the “Incomplete \iftrue” error that may
otherwise occur.
- There’s also a starred form
- There’s also a starred form
+
+
which is equivalent to This means you now have the option to simply list all entries on the first
+ 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 §9
bib2gls: Managing Reference Databases).
-
+
- If you have any entries with the If you have any entries with the see key set, you will need the glossariesrecord For example:
+ For example:
@@ -17931,32 +17934,32 @@ will automatically deal with this.
In the above, zebra will be listed before ant as it was defined first.
- If you allow document definitions with the In the above, zebra will be listed before ant as it was defined first.
+ If you allow document definitions with the docdefs option, the document will
require a second LATEX run if the entries are defined after \printunsrtglossary.
- The optional argument is as for The optional argument is as for \printnoidxglossary (except for the sort key,
which isn’t available).
- All glossaries may be displayed in the order of their definition using:
- All glossaries may be displayed in the order of their definition using:
+
+
which is analogous to \printnoidxglossaries. This just iterates over all defined
glossaries (that aren’t on the ignored list) and does \printunsrtglossary[type=⟨type⟩].
- To avoid complications caused by To avoid complications caused by tabular-like glossary styles,
+
This hook should not display any content, but may be used to perform calculations.
For example, to calculate widths. Within this hook you can use:
-
+
to skip the current entry. This will prevent the entry from being added to the internal
command.
- There’s another hook immediately before the internal command containing the
+ There’s another hook immediately before the internal command containing the
glossary code is performed:
-
+
- The internal command uses
- The internal command uses
+
+
to display each item in the list, where ⟨label⟩ is the current label.
- By default the handler just does
- By default the handler just does
+
+
which determines whether to use \glossentry or \subglossentry and checks the
@@ -18028,10 +18031,10 @@ class="cmss-10">loclist You can redefine the handler if required. For example, you may want to filter
+ You can redefine the handler if required. For example, you may want to filter
entries according to the category label. You can test if a label is contained in a
comma-separated list of labels using:
-
+
The ⟨label⟩ and ⟨label list⟩ will be fully expanded.
-
- For example, if the preamble includes:
+
+ For example, if the preamble includes:
@@ -18062,7 +18065,7 @@ glossary. This could cause a problem for the list-based styles. then you can print the glossary but first redefine the handler to only select entries
+ then you can print the glossary but first redefine the handler to only select entries
that include the current section number in the record.section field:
@@ -18076,8 +18079,8 @@ class="cmtt-10">record.section
- Alternatively you can use the starred form of
+ Alternatively you can use the starred form of \printunsrtglossary which will
localise the change:
@@ -18093,8 +18096,8 @@ localise the change:
- If you are using the
+ If you are using the hyperref package and want to display the same glossary more
than once, you can also add a temporary redefinition of }%
Note that this will cause a problem if your descriptions contain commands like Note that this will cause a problem if your descriptions contain commands like \gls
that need to link an entry that doesn’t appear in the summary. In this case, it’s a
better approach to use:
@@ -18144,8 +18147,8 @@ better approach to use:
- If it’s a short summary at the start of a section, you might also want to suppress
+
+ If it’s a short summary at the start of a section, you might also want to suppress
the glossary header and add some vertical space afterwards:
@@ -18169,9 +18172,9 @@ the glossary header and add some vertical space afterwards:
- There’s a shortcut command that essentially does this:
-
+ There’s a shortcut command that essentially does this:
+
+
The above example can simply be replaced with:
@@ -18191,11 +18194,11 @@ The above example can simply be replaced with:
- This shortcut command is actually defined to use
+ This shortcut command is actually defined to use \printunsrtglossary*
with
-
+
so if you want to just make some minor modifications you can do
@@ -18215,9 +18218,9 @@ so if you want to just make some minor modifications you can do
which will start the list with a subsection header with the title “Summary”
+ which will start the list with a subsection header with the title “Summary”
(overriding the glossary’s title).
- Note that this shortcut command is only available with the Note that this shortcut command is only available with the record (or
@@ -18226,7 +18229,7 @@ href="#styopt.record">record This temporary change in the hypertarget prefix means you need to explicitly use
+ This temporary change in the hypertarget prefix means you need to explicitly use
\hyperlink to create a link to it as commands like \gls will try to link to the target
@@ -18238,12 +18241,12 @@ the front or back matter) which can be the target for all glossary references an
just use \printunsrtglossaryunit for a quick summary at the start of a section
etc.
-
+
It may be that you don’t want a list but would rather display entry details
+ It may be that you don’t want a list but would rather display entry details
throughout the document. You can simply do \glsentryname followed by
\par\medskip
define your entries
+ define your entries
@@ -18278,7 +18281,7 @@ custom command:
and then later in the text:
+ and then later in the text:
@@ -18286,25 +18289,25 @@ custom command:
- However, if may be that you want to use
+ However, if may be that you want to use hyperref and have commands like \gls
link back to the place where the term is described. Instead of using \glsentryname
use
-
+
where ⟨label⟩ is the entry’s label.
- This is designed to behave much like the way the name is displayed in the
+ This is designed to behave much like the way the name is displayed in the
glossary. It performs the following: otherwise it does otherwise it does If you have used If you have used \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 It’s also possible to select a different field (rather than using It’s also possible to select a different field (rather than using name):
-
+
The ⟨field⟩ must be given using its internal field label which may not be the same as
the key used to set the field. See the key to field mappings table in the }.
The The \glsxtrglossentryother command internally uses \glossentrynameother{⟨label⟩}
This means that my custom command can be changed to:
+ This means that my custom command can be changed to:
@@ -18469,7 +18472,7 @@ class="cmtt-10">\glssymbolaccessdisplay).
If I want numbered definitions, then I can use the package options If I want numbered definitions, then I can use the package options entrycounter or
subentrycounter \par\medskip
The counter label uses a dot after the number by default but this can be changed to
+ The counter label uses a dot after the number by default but this can be changed to
a colon:
@@ -18496,13 +18499,13 @@ a colon:
It’s now possible to not only use It’s now possible to not only use \gls to link back to the definition but also use
\glsrefentry to reference the counter and \glsxtrpageref to reference the page
number.
- If I want the description to behave more like it does in a glossary in need to make
+ If I want the description to behave more like it does in a glossary in need to make
the following modification:
@@ -18519,9 +18522,9 @@ the following modification:
(Note the grouping to localise (Note the grouping to localise \glsxtractivatenopost.)
- You can also use You can also use \glsxtrglossentry within section headings. For example:
@@ -18530,7 +18533,7 @@ class="cmtt-10">\glsxtrglossentry This will use This will use \glsentryname in PDF bookmarks (if \texorpdfstring is defined)
and will use \@glsxtrnotinmark and \glsxtrrestoremarkhook.)
-
+
An entry can be made an alias of another entry using the 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
@@ -18562,7 +18565,7 @@ defining the other entry after the aliased entry. (For example, when used with
href="#glo:bib2gls">bib2gls If an entry ⟨ If an entry ⟨entry-1⟩ is made an alias of ⟨entry-2⟩ then: Note that with Note that with record=only=onlybib2gls’s settings. The index suppression trigger is performed by
- The index suppression trigger is performed by
+
+
This is performed after the default options provided by \GlsXtrSetDefaultGlsOpts
@@ -18652,17 +18655,17 @@ class="cmss-10">=only Within the definition of Within the definition of \glsxtrsetaliasnoindex you can use
-
+
to index ⟨entry-2⟩.
- The index suppression command can be redefined to index the main term instead.
+ The index suppression command can be redefined to index the main term instead.
For example:
@@ -18674,27 +18677,27 @@ For example:
- The value of the
+ The value of the alias field can be accessed using
- The The glossaries bundle provides additional support packages glossaries-prefix (for
@@ -18703,10 +18706,10 @@ class="cmss-10">glossaries-accsupp If prefixing is required, you can simply load If prefixing is required, you can simply load glossaries-prefix after glossaries-extra. For
@@ -18730,13 +18733,13 @@ example:
-
+
+
The The glossaries-accsupp package needs to be loaded before glossaries-extra or through
@@ -18751,7 +18754,7 @@ class="cmss-10">accsupp If you don’t load If you don’t load glossaries-accsupp or you load glossaries-accsuppxxx The following The following \glsaccess⟨xxx⟩ commands add accessibility information wrapped
around the corresponding \glsentry⟨xxx⟩ commands. There is no check for existence
of the entry nor do any of these commands add formatting, hyperlinks or indexing
information.
-
+
This displays the value of the name field for the entry identified by ⟨label⟩.
- If the If the glossaries-accsupp package isn’t loaded, this is simply defined as:
@@ -18793,7 +18796,7 @@ class="cmss-10">glossaries-accsupp otherwise it’s defined as:
+ otherwise it’s defined as:
@@ -18807,20 +18810,20 @@ class="cmss-10">glossaries-accsupp ( (\glsnameaccessdisplay is defined by the glossaries-accsupp package.) The first
letter upper case version is:
-
+
Without the glossaries-accsupp package this is just defined as:
@@ -18831,7 +18834,7 @@ class="cmss-10">glossaries-accsupp With the With the glossaries-accsupp package this is defined as:
@@ -18847,112 +18850,112 @@ class="cmss-10">glossaries-accsupp
- The following commands are all defined in an analogous manner.
-
+ The following commands are all defined in an analogous manner.
+
+
This displays the value of the text field.
-
+
This displays the value of the text field with the first letter converted to upper
case.
-
+
This displays the value of the plural field.
-
+
This displays the value of the plural field with the first letter converted to upper
case.
-
+
This displays the value of the first field.
-
+
This displays the value of the first field with the first letter converted to upper
case.
-
+
This displays the value of the firstplural field.
-
+
This displays the value of the firstplural field with the first letter converted to upper
case.
-
+
This displays the value of the symbol field.
-
+
This displays the value of the symbol field with the first letter converted to upper
case.
-
+
This displays the value of the symbolplural field.
-
+
This displays the value of the symbolplural field with the first letter converted to
upper case.
-
+
This displays the value of the desc field.
-
+
This displays the value of the desc field with the first letter converted to upper
case.
-
+
This displays the value of the descplural field.
-
+
This displays the value of the descplural field with the first letter converted to upper
case.
-
+
This displays the value of the short field.
-
+
This displays the value of the short field with the first letter converted to upper
case.
-
+
This displays the value of the shortplural field.
-
+
This displays the value of the shortplural field with the first letter converted to upper
case.
-
+
This displays the value of the long field.
-
+
This displays the value of the long field with the first letter converted to upper
case.
-
+
This displays the value of the longplural field.
- There’s only one command provided by There’s only one command provided by glossaries-extra that you’re likely to want
to change in your document and that’s \abbreviationsname\acronymname You can redefine it in the usual way. For example:
+ You can redefine it in the usual way. For example:
@@ -19459,7 +19462,7 @@ class="cmss-10">glossaries).
Or using Or using babel or polyglossiapolyglossia
- Alternatively you can use the
+ Alternatively you can use the title key when you print the list of abbreviations.
For example:
@@ -19485,7 +19488,7 @@ For example:
or
+ or
@@ -19493,10 +19496,10 @@ For example:
- The other fixed text commands are the diagnostic messages, which shouldn’t
+
+ The other fixed text commands are the diagnostic messages, which shouldn’t
appear in the final draft of your document.
- The The glossaries-extra package has the facility to load language modules (whose
filename is in the form glossariesxtr-⟨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.
- If you want to write your own language module, you just need to create a file
+ If you want to write your own language module, you just need to create a file
called glossariesxtr-⟨lang⟩tracklang package). For example, glossariesxtr-french.ldf.
- The simplest code for this file is:
+ The simplest code for this file is:
@@ -19557,8 +19560,8 @@ class="cmtt-10">glossariesxtr-french.ldf
- You can adapt this for other languages by replacing all instances of the language
+
+ You can adapt this for other languages by replacing all instances of the language
identifier french and the translated text Abr\’eviations as appropriate. You can
@@ -19574,16 +19577,16 @@ class="cmsy-10">§ This 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
+ If you additionally want to provide translations for the diagnostic messages used
when a glossary is missing, you need to redefine the following commands:
-
+
This produces the following text in English:
This document is incomplete. The external file associated with the
+ This document is incomplete. The external file associated with the
glossary ‘⟨label⟩’ (which should be called ⟨file⟩) hasn’t been created.
+
This produces the following text in English:
This has probably happened because there are no entries defined in
+ This has probably happened because there are no entries defined in
this glossary.
+
This produces the following text in English:
If you don’t want this glossary, add If you don’t want this glossary, add nomain to your package option
list when you load glossaries-extra.sty. For example:
+
This produces the following text in English:
Did you forget to use Did you forget to use type=⟨label⟩ when you defined your entries?
If you tried to load entries into this glossary with ] as the optional argument? If you
did, check that the definitions in the file you loaded all had the type
set to \glsdefaulttype.
+
This produces the following text in English:
Check the contents of the file ⟨ Check the contents of the file ⟨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.
+
This produces the following text in English:
You need
+ You need
to either replace \makenoidxglossaries with \makeglossaries or
@@ -19688,17 +19691,17 @@ class="cmtt-10">\printglossaries)
class="cmtt-10">\printnoidxglossary (or \printnoidxglossaries) and then
rebuild this document.
+
This produces the following text in English:
The file ⟨ The file ⟨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 package option.
+
This produces the following text in English:
This message will be removed once the problem has been fixed. This message will be removed once the problem has been fixed.
+
This is advice on how to generate the glossary files. See the documented code
(glossaries-extra-code.pdf) for further details.
-
+
This is the message produced when the automakeconvertgls2bib F
695 10.1Pre version 1.28 used \csedef.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\GlsXtrRecordCounter{section}
10.2 Display All Entries Without Sorting or Indexing
-
-
-
\printunsrtglossaries
\end{document}
-
-
-
-
-
-
-
\GlsXtrRecordCounter{section}
{}%
}
}%
}
}
}%
}
\appto\glossarypostamble{\glspar\medskip\glspar}%
}
-
-
\renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}%
}
10.3 Standalone Entry Items
-
}
description={a relation or expression involving variables}
}
-
⟨label⟩}
-
-
-
\par\medskip
}
}
\par\medskip
}
10.4 Entry Aliases
-
@@ -18625,7 +18628,7 @@ class="cmtt-10">noindex=false
.
-
-
-
\setkeys{glslink}{noindex}%
}
-11. Supplemental Packages
-11.1 Prefixes or Determiners
-
\printglossaries
\end{document}
11.2 Accessibility Support
-
-
}
-
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-13. Multi-Lingual Support
-
}
{}%
}
-
-
-
-
-
-
-
-
-
-
\csGlsXtrLetField 613
\CustomAbbreviationFields 617
\eGlsXtrSetField 618
entry location 623, 624, 625, 626, 627, 628, 629, 630, 631
+href="glossaries-extra-manual.html#dx1-40035" >627, 628, 629, 630, 631
\gGlsXtrSetField 696
glossaries package 703, 704, 705, 706, 707, 708, 707, 708, 709
glossaries-accsupp package 828
\glscurrentfieldvalue 829
\glsentrycurrcount 1006
\glsxtredeffield 1007
\glsxtremsuffix 1016
\glsxtrendfor 1017
\glsxtrentryfmt 1018
\glsxtrfielddolistloop 1019
\glsxtrfieldforlistloop 1020
\glsxtrfieldifinlist 1021
\glsxtrfieldlistadd 1022
\glsxtrfieldlisteadd 1023
\glsxtrfieldlistgadd 1024
\glsxtrfieldlistxadd 1025
\glsxtrfieldtitlecasecs 1026
\glsxtrfieldxifinlist 1027
\glsxtrfmt 1033
\glsxtrforcsvfield 1034
\GlsXtrFormatLocationList 1064
\GlsXtrIfFieldEqStr 1065
\GlsXtrIfFieldUndef 1066
\glsxtrifhasfield 1067
\glsxtrifhasfield* 1068
\glsxtrifkeydefined 1107
\GlsXtrLetField 1108
\GlsXtrLetFieldToField 1109
\GlsXtrLinkCounterName 1188
\GlsXtrRecordCounter 1189
\glsxtrrecordtriggervalue 1239
\Glsxtrusefield 1240
\glsxtrusefield 1241
\glsxtruserfield 1568, 1569
symbol 1570, 1570, 1571, 1572, 1573
@@ -23695,7 +23698,7 @@ href="glossaries-extra-manual.html#dx1-33018" >1707, 1708, 1709, 1710, 1711, 1711, 1712, 1713
X
xfor package 1846, 1847, 1848
+href="glossaries-extra-manual.html#dx1-40053" >1847, 1848
\xglssetwidest 1850
\xGlsXtrSetField 1851
xindy . The .glstex extension was enforced by version
1.11.