summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-26 23:27:56 +0000
committerKarl Berry <karl@freefriends.org>2017-11-26 23:27:56 +0000
commit2405725149721117da17b64f42ef5d9759583cf3 (patch)
treee227d85b9aaf1a3dfd339d3ee47f5c75bdee95e9 /Master/texmf-dist
parent62ff83822fbd8add0ad826135f17f8ba7004bf34 (diff)
bib2gls (26nov17)
git-svn-id: svn://tug.org/texlive/trunk@45917 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/CHANGES116
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/README.md56
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/bib2gls.1316
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/bib2gls.pdfbin718853 -> 2879671 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/convertgls2bib.1208
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/animals.bib82
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/bacteria.bib66
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/baseunits.bib56
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/bigmathsymbols.bib145
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/binaryoperators.bib34
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/books.bib150
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/chemicalformula.bib152
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/constants.bib95
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/derivedunits.bib70
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/films.bib192
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble.bib10
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble2.bib10
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/markuplanguages.bib67
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/mathgreek.bib195
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/mathsobjects.bib154
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/mathsrelations.bib83
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/minerals.bib126
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/miscsymbols.bib140
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/no-interpret-preamble.bib10
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/people.bib192
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.pdfbin0 -> 49004 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.tex50
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.pdfbin0 -> 50456 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.tex51
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.pdfbin0 -> 50245 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.tex38
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.pdfbin0 -> 89404 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.tex57
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.pdfbin0 -> 56140 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.tex54
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.pdfbin0 -> 110945 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.tex97
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-media.pdfbin0 -> 160799 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-media.tex66
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.pdfbin0 -> 103808 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.tex30
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.pdfbin0 -> 240375 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.tex177
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.pdfbin0 -> 317942 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.tex462
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-people.pdfbin0 -> 47747 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-people.tex101
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.pdfbin0 -> 69791 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.tex48
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.pdfbin0 -> 53002 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.tex48
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.pdfbin0 -> 54745 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex51
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.pdfbin0 -> 41119 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.tex65
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.pdfbin0 -> 23918 bytes
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.tex128
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/terms.bib41
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/unaryoperators.bib30
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/usergroups.bib210
-rw-r--r--Master/texmf-dist/doc/support/bib2gls/examples/vegetables.bib53
-rwxr-xr-xMaster/texmf-dist/scripts/bib2gls/bib2gls.jarbin112916 -> 188109 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/bib2gls/convertgls2bib.jarbin21545 -> 22165 bytes
-rw-r--r--Master/texmf-dist/scripts/bib2gls/resources/bib2gls-en.xml130
-rwxr-xr-xMaster/texmf-dist/scripts/bib2gls/texparserlib.jarbin694875 -> 727218 bytes
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/bib2gls-cite.bib92
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/bib2gls-src.zipbin79981 -> 132823 bytes
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/bib2gls.bib6428
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/bib2gls.pod217
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/bib2gls.tex13049
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/convertgls2bib.pod82
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/gls2bib-src.zipbin19202 -> 19544 bytes
-rw-r--r--Master/texmf-dist/source/support/bib2gls/src/texparser-src.zipbin583596 -> 610669 bytes
73 files changed, 22471 insertions, 2109 deletions
diff --git a/Master/texmf-dist/doc/support/bib2gls/CHANGES b/Master/texmf-dist/doc/support/bib2gls/CHANGES
index 9b72a4b6c44..dab2da42a4b 100644
--- a/Master/texmf-dist/doc/support/bib2gls/CHANGES
+++ b/Master/texmf-dist/doc/support/bib2gls/CHANGES
@@ -1,3 +1,119 @@
+v1.1 (2017-11-25):
+
+ * New resource options:
+
+ - counter
+ - dual-counter
+ - name-case-change
+ - description-case-change
+ - not-match
+ - identical-sort-action
+ - dual-identical-sort-action
+ - secondary-identical-sort-action
+ - sort-suffix
+ - sort-suffix-marker
+ - date-sort-format
+ - date-sort-locale
+ - dual-date-sort-format
+ - dual-date-sort-locale
+ - secondary-date-sort-format
+ - secondary-date-sort-locale
+ - entry-type-aliases
+ - tertiary-prefix
+ - tertiary-type
+ - tertiary-category
+ - combine-dual-locations
+ - abbreviation-sort-fallback
+ - abbreviation-name-fallback
+ - symbol-sort-fallback
+ - match-action
+ - save-loclist
+ - action
+ - copy-action-group-field
+ - field-aliases
+ - replicate-fields
+ - post-description-dot
+ - strip-trailing-nopost
+ - write-preamble
+ - bibtex-contributor-fields
+ - contributor-order
+ - check-end-punctuation
+ - sort-number-pad
+ - dual-sort-number-pad
+ - secondary-sort-number-pad
+ - sort-pad-plus
+ - dual-sort-pad-plus
+ - secondary-sort-pad-plus
+ - sort-pad-minus
+ - dual-sort-pad-minus
+ - secondary-sort-pad-minus
+ - cs-label-prefix
+ - record-label-prefix
+ - save-original-id
+ - interpret-label-fields
+ - strip-missing-parents
+ - limit
+ - copy-alias-to-see
+ - replicate-override
+ - date-time-fields
+ - date-fields
+ - time-fields
+ - date-time-field-format
+ - date-field-format
+ - time-field-format
+ - dual-date-time-field-format
+ - dual-date-field-format
+ - dual-time-field-format
+ - date-time-field-locale
+ - date-field-locale
+ - time-field-locale
+ - dual-date-time-field-locale
+ - dual-date-field-locale
+ - dual-time-field-locale
+ - alias
+ - primary-dual-dependency
+ - duplicate-label-suffix
+ - missing-sort-fallback
+ - dual-missing-sort-fallback
+ - secondary-missing-sort-fallback
+
+ * Added 'same as base' as a keyword value of 'category',
+ 'type', 'dual-category', 'dual-type', and
+ 'supplemental-category' resource options.
+
+ * New entry types: @dualindexentry, @dualindexsymbol,
+ @dualindexnumber, @dualindexabbreviation,
+ @tertiaryindexabbreviationentry
+
+ * Case-changing options now also accept the values
+ firstuc and firstuc-cs
+
+ * New sort options: letter-upperlower, letter-upperlower-reverse,
+ letter-lowerupper, letter-lowerupper-reverse,
+ letternumber-case, letternumber-case-reverse,
+ letternumber-nocase, letternumber-nocase-reverse,
+ letternumber-lowerupper, letternumber-lowerupper-reverse,
+ letternumber-upperlower, letternumber-upperlower-reverse,
+ numeric, numeric-reverse, currency, currency-reverse,
+ percent, percent-reverse, numberformat, numberformat-reverse,
+ date, date-reverse, time, time-reverse,
+ datetime, datetime-reverse (and associated resource options).
+
+ * fixed bug in hierarchical entries with label prefixes.
+
+ * fixed bugs in secondary sorting.
+
+ * new switches: --packages (-p), --expand-fields,
+ --no-expand-fields, --record-count (-c), --no-record-count,
+ --record-count-unit (-n), --no-record-count-unit,
+ --no-break-space, --break-space
+
+ * fixed fallback if kpsewhich fails.
+
+ * texparserlib: added extra core maths commands.
+
+ * convertgls2bib: new switches --ignore-sort and --no-ignore-sort.
+
v1.0 (2017-09-09):
* initial release
diff --git a/Master/texmf-dist/doc/support/bib2gls/README.md b/Master/texmf-dist/doc/support/bib2gls/README.md
index 29c9a4a3477..4fb99b7e2c0 100644
--- a/Master/texmf-dist/doc/support/bib2gls/README.md
+++ b/Master/texmf-dist/doc/support/bib2gls/README.md
@@ -3,6 +3,19 @@
Command line application to convert `.bib` files to
`glossaries-extra.sty` resource files.
+Author: Nicola Talbot (http://www.dickimaw-books.com/)
+
+Application Home Page: http://www.dickimaw-books.com/software/bib2gls
+
+# Licence
+
+License GPLv3+: GNU GPL version 3 or later
+http://gnu.org/licenses/gpl.html
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+# Summary
+
This application may be used to extract glossary information
stored in a `.bib` file and convert it into glossary entry
definition commands. This application should be used
@@ -116,13 +129,16 @@ your local or home TEXMF path (for example, `~/texmf/`):
- *TEXMF*`/scripts/bib2gls/convertgls2bib.sh` (Unix-like systems
only.)
- *TEXMF*`/doc/support/bib2gls/bib2gls.pdf` (User manual.)
+ - *TEXMF*`/doc/support/bib2gls/examples/` (example files)
Note that `texparserlib.jar` isn't an application. It's
a library used by `bib2gls.jar` and `convertgls2bib.jar`
and so needs to be on the same class path as them.
The bash `.sh` scripts are provided for Unix-like users.
-They're not required for Windows.
+They're not required for Windows. The `.1` files are `man`
+files and should be placed where `man` can find them. (They
+are created from the `.pod` files.)
To test installation:
```bash
@@ -131,26 +147,33 @@ convertgls2bib --version
```
These should display the version details.
-#Licence
+# Source Code
-License GPLv3+: GNU GPL version 3 or later
-http://gnu.org/licenses/gpl.html
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
+Instructions for compiling the manual and jar files are listed
+below. The source is also available on GitHub, but that may be for
+a newer experimental version.
+
+ - https://github.com/nlct/bib2gls
+ - https://github.com/nlct/texparserlib
-#Source Code
-#User Manual
+## User Manual (bib2gls.pdf)
-The documentation `bib2gls.pdf` is compiled using:
+The examples directory needs to be ../examples relative to directory
+containing bib2gls.tex as the .bib, .tex and .pdf files are included
+in the manual.
```bash
-pdflatex bib2gls
-makeindex -s bib2gls.ist bib2gls
-pdflatex bib2gls
+xelatex bib2gls
+bibtex bib2gls
+bib2gls -g bib2gls
+xelatex bib2gls
+bib2gls -g bib2gls
+xelatex bib2gls
+xelatex bib2gls
```
-#JAR Files
+## JAR Files
Create the following directories:
@@ -203,10 +226,3 @@ cd ../classes
jar cmf ../java/gls2bib/Manifest.txt ../lib/convertgls2bib.jar
com/dickimawbooks/gls2bib/*.class
```
-
-GitHub:
-
- - https://github.com/nlct/bib2gls
- - https://github.com/nlct/texparserlib
-
-Home Page: http://www.dickimaw-books.com/software/bib2gls
diff --git a/Master/texmf-dist/doc/support/bib2gls/bib2gls.1 b/Master/texmf-dist/doc/support/bib2gls/bib2gls.1
new file mode 100644
index 00000000000..6bdfc1318ff
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/bib2gls.1
@@ -0,0 +1,316 @@
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+. if \nF \{
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "BIB2GLS 1"
+.TH BIB2GLS 1 "2017-11-25" "perl v5.18.4" "bib2gls"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBbib2gls\fR [\fIoption\fR]+ \fIauxfile\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBbib2gls\fR is designed to work with the \fBglossaries-extra\fR LaTeX
+package. (The \fBrecord\fR package option is required.) The application
+performs two functions in one: (1) selects entries from .bib files
+according to information found in the \fIauxfile\fR (similar to
+\&\fBbibtex\fR); (2) hierarchically sorts entries and collates location
+lists (similar to \fBmakeindex\fR and \fBxindy\fR). The .aux extension may
+be omitted from \fIauxfile\fR.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-help\fR or \fB\-h\fR" 4
+.IX Item "--help or -h"
+Display help message and exit.
+.IP "\fB\-\-version\fR or \fB\-v\fR" 4
+.IX Item "--version or -v"
+Display version information and exit.
+.IP "\fB\-\-debug\fR [\fIlevel\fR]" 4
+.IX Item "--debug [level]"
+Switch on the debug mode (optionally at the given \fIlevel\fR, which
+should be a non-negative integer). If \fIlevel\fR is \fB0\fR then the
+debug mode is switched off.
+.IP "\fB\-\-no\-debug\fR (or \fB\-\-nodebug\fR)" 4
+.IX Item "--no-debug (or --nodebug)"
+Switch off debug mode. (Equivalent to \fB\-\-debug\fR \fB0\fR)
+.IP "\fB\-\-verbose\fR" 4
+.IX Item "--verbose"
+Switch on verbose mode.
+.IP "\fB\-\-no\-verbose\fR (or \fB\-\-noverbose\fR)" 4
+.IX Item "--no-verbose (or --noverbose)"
+Switch off verbose mode. (Some messages will still be written to
+\&\s-1STDOUT.\s0)
+.IP "\fB\-\-silent\fR" 4
+.IX Item "--silent"
+Only display error messages. All other messages are just written to
+the transcript file.
+.IP "\fB\-\-locale\fR \fIlang\fR (or \fB\-l\fR \fIlang\fR)" 4
+.IX Item "--locale lang (or -l lang)"
+Use language resource file for \fIlang\fR (which should be an \s-1IETF\s0
+locale tag).
+.IP "\fB\-\-log\-file\fR \fIfile\fR (or \fB\-t\fR <file>)" 4
+.IX Item "--log-file file (or -t <file>)"
+Set the transcript file.
+.IP "\fB\-\-dir\fR \fIdirectory\fR (or \fB\-d\fR <directory>)" 4
+.IX Item "--dir directory (or -d <directory>)"
+Files are relative to \fIdirectory\fR. (This doesn't change the current
+working directory.)
+.IP "\fB\-\-tex\-encoding\fR \fIname\fR" 4
+.IX Item "--tex-encoding name"
+Set the character encoding for the output files. This overrides the
+setting given in \fIauxfile\fR.
+.IP "\fB\-\-interpret\fR" 4
+.IX Item "--interpret"
+Use the TeX parser library to interpret known (La)TeX commands
+(default).
+.IP "\fB\-\-no\-interpret\fR" 4
+.IX Item "--no-interpret"
+Don't try interpreting (La)TeX commands.
+.IP "\fB\-\-break\-space\fR" 4
+.IX Item "--break-space"
+Interpret tilde character as a normal space.
+.IP "\fB\-\-no\-break\-space\fR" 4
+.IX Item "--no-break-space"
+Interpret tilde as a non-breaking space (default).
+.IP "\fB\-\-packages\fR \fIlist\fR (or \fB\-p\fR \fIlist\fR)" 4
+.IX Item "--packages list (or -p list)"
+Instruct the TeX parser library to pretend the packages listed
+in \fIlist\fR have been used by the document. Note that there's only a
+limited number of packages supported by the TeX parser library.
+This option has a cumulative action so \fB\-\-packages wasysym,pifont\fR
+is the same as \fB\-\-packages wasysym \-\-packages pifont\fR.
+.IP "\fB\-\-mfirstuc\-protection\fR \fIfields\fR|\fBall\fR (or \fB\-u\fR \fIfields\fR|\fBall\fR)" 4
+.IX Item "--mfirstuc-protection fields|all (or -u fields|all)"
+Insert an empty group if fields start with certain problematic
+commands to protect against case-changing commands like \eGls.
+.Sp
+The default is to do this for all fields. To do this for only a
+subset of fields, set \fIfields\fR to a comma-separated list of fields
+(e.g. \fBname,short,long\fR). The keyword \fBall\fR indicates all fields.
+.IP "\fB\-\-no\-mfirstuc\-protection\fR" 4
+.IX Item "--no-mfirstuc-protection"
+Switch off the auto-insertion of an empty group for all fields.
+.IP "\fB\-\-mfirstuc\-math\-protection\fR" 4
+.IX Item "--mfirstuc-math-protection"
+Switch on the auto-insertion of an empty group for math-shift ($).
+This option will be overridden by \fB\-\-no\-mfirstuc\-protection\fR.
+.IP "\fB\-\-no\-mfirstuc\-math\-protection\fR" 4
+.IX Item "--no-mfirstuc-math-protection"
+Switch off the auto-insertion of an empty group for math-shift ($).
+.IP "\fB\-\-nested\-link\-check\fR \fIlist\fR|\fBnone\fR" 4
+.IX Item "--nested-link-check list|none"
+Check each field listed in \fIlist\fR for potentially problematic
+nested link text. (Default list: name, text, plural, first,
+firstplural, short, shortplural, long, longplural, symbol).
+.Sp
+If \fBnone\fR, disable check.
+.IP "\fB\-\-no\-nested\-link\-check\fR" 4
+.IX Item "--no-nested-link-check"
+Don't check for potentially problematic nested link text.
+(Equivalent to \fB\-\-nested\-link\-check\fR \fBnone\fR)
+.IP "\fB\-\-shortcuts\fR \fIoption\fR" 4
+.IX Item "--shortcuts option"
+Check for the shortcut commands when searching for dependencies.
+Permitted values of \fIoption\fR: \fBacronyms\fR (or \fBacro\fR), \fBac\fR,
+\&\fBabbreviations\fR (or \fBabbr\fR), \fBall\fR (or \fBtrue\fR), \fBnone\fR (or
+\&\fBfalse\fR). This overrides the setting given in \fIauxfile\fR.
+.IP "\fB\-\-map\-format\fR \fIkey\fR\fB:\fR\fIvalue\fR[\fB,\fR\fIkey\fR\fB:\fR\fIvalue\fR]* (or \fB\-m\fR \fIkey\fR\fB:\fR\fIvalue\fR[\fB,\fR\fIkey\fR\fB:\fR\fIvalue\fR]*)" 4
+.IX Item "--map-format key:value[,key:value]* (or -m key:value[,key:value]*)"
+Set location format mappings.
+.IP "\fB\-\-group\fR or \fB\-g\fR" 4
+.IX Item "--group or -g"
+Add 'group' field to entries.
+.IP "\fB\-\-no\-group\fR" 4
+.IX Item "--no-group"
+Don't add 'group' field to entries (default).
+.IP "\fB\-\-record\-count\fR or \fB\-c\fR" 4
+.IX Item "--record-count or -c"
+Add record count fields to entries.
+.IP "\fB\-\-no\-record\-count\fR" 4
+.IX Item "--no-record-count"
+Don't add record count field to entries (default).
+This option automatically implements \fB\-\-no\-record\-count\-unit\fR.
+.IP "\fB\-\-record\-count\-unit\fR or \fB\-n\fR" 4
+.IX Item "--record-count-unit or -n"
+Add unit record count fields to entries.
+This option automatically implements \fB\-\-record\-count\fR.
+.IP "\fB\-\-no\-record\-count\-unit\fR" 4
+.IX Item "--no-record-count-unit"
+Don't add unit record count field to entries (default).
+.IP "\fB\-\-trim\-fields\fR" 4
+.IX Item "--trim-fields"
+Trim leading and trailing spaces from fields.
+.IP "\fB\-\-no\-trim\-fields\fR" 4
+.IX Item "--no-trim-fields"
+Don't trim leading and trailing spaces from fields (default).
+.IP "\fB\-\-expand\-fields\fR" 4
+.IX Item "--expand-fields"
+Don't write \fB\eglsnoexpandfields\fR to the \fB.glstex\fR file.
+.IP "\fB\-\-no\-expand\-fields\fR" 4
+.IX Item "--no-expand-fields"
+Write \fB\eglsnoexpandfields\fR to the \fB.glstex\fR file (default).
+.SH "REQUIRES"
+.IX Header "REQUIRES"
+Java 7 and a TeX distribution.
+.SH "LICENSE"
+.IX Header "LICENSE"
+License GPLv3+: \s-1GNU GPL\s0 version 3 or later
+<http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is \s-1NO WARRANTY,\s0 to the extent permitted by law.
+.SH "RECOMMENDED READING"
+.IX Header "RECOMMENDED READING"
+The bib2gls manual:
+.PP
+.Vb 1
+\& texdoc bib2gls
+.Ve
+.PP
+The glossaries-extra manual:
+.PP
+.Vb 1
+\& texdoc glossaries\-extra
+.Ve
+.PP
+The glossaries manual:
+.PP
+.Vb 1
+\& texdoc glossaries
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Nicola L. C. Talbot,
+<http://www.dickimaw\-books.com/>
diff --git a/Master/texmf-dist/doc/support/bib2gls/bib2gls.pdf b/Master/texmf-dist/doc/support/bib2gls/bib2gls.pdf
index c0f20a256f4..bdb0a64d8da 100644
--- a/Master/texmf-dist/doc/support/bib2gls/bib2gls.pdf
+++ b/Master/texmf-dist/doc/support/bib2gls/bib2gls.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/convertgls2bib.1 b/Master/texmf-dist/doc/support/bib2gls/convertgls2bib.1
new file mode 100644
index 00000000000..f597e111b39
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/convertgls2bib.1
@@ -0,0 +1,208 @@
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+. if \nF \{
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "CONVERTGLS2BIB 1"
+.TH CONVERTGLS2BIB 1 "2017-11-25" "perl v5.18.4" "convertgls2bib"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBconvertgls2bib\fR [\fIoption\fR]+ \fIauxfile\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Converts a \fB.tex\fR file containing glossary definitions using
+commands like \fB\enewglossaryentry\fR and \fB\enewacronym\fR to
+a \fB.bib\fR file in the format required for \fBbib2gls\fR.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-help\fR or \fB\-h\fR" 4
+.IX Item "--help or -h"
+Display help message and exit.
+.IP "\fB\-\-version\fR or \fB\-v\fR" 4
+.IX Item "--version or -v"
+Display version information and exit.
+.IP "\fB\-\-texenc\fR \fIname\fR" 4
+.IX Item "--texenc name"
+Set the character encoding to \fIname\fR for the input \fB.tex\fR files.
+.IP "\fB\-\-bibenc\fR \fIname\fR" 4
+.IX Item "--bibenc name"
+Set the character encoding to \fIname\fR for the output \fB.bib\fR files.
+.IP "\fB\-\-ignore\-sort\fR" 4
+.IX Item "--ignore-sort"
+Ignore the \fBsort\fR field (default).
+.IP "\fB\-\-no\-ignore\-sort\fR" 4
+.IX Item "--no-ignore-sort"
+Don't ignore the \fBsort\fR field.
+.IP "\fB\-\-space\-sub\fR \fIvalue\fR" 4
+.IX Item "--space-sub value"
+Substitute spaces in labels with \fIvalue\fR.
+.IP "\fB\-\-locale\fR \fIlang tag\fR" 4
+.IX Item "--locale lang tag"
+Use the language resource files associated with the given language
+tag \fIlang tag\fR. If there isn't an appropriate file, the \fBen\fR
+(English) file will be used.
+.SH "REQUIRES"
+.IX Header "REQUIRES"
+Java 7 and a TeX distribution.
+.SH "LICENSE"
+.IX Header "LICENSE"
+License GPLv3+: \s-1GNU GPL\s0 version 3 or later
+<http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is \s-1NO WARRANTY,\s0 to the extent permitted by law.
+.SH "RECOMMENDED READING"
+.IX Header "RECOMMENDED READING"
+The bib2gls manual:
+.PP
+.Vb 1
+\& texdoc bib2gls
+.Ve
+.PP
+The glossaries-extra manual:
+.PP
+.Vb 1
+\& texdoc glossaries\-extra
+.Ve
+.PP
+The glossaries manual:
+.PP
+.Vb 1
+\& texdoc glossaries
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Nicola L. C. Talbot,
+<http://www.dickimaw\-books.com/>
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/animals.bib b/Master/texmf-dist/doc/support/bib2gls/examples/animals.bib
new file mode 100644
index 00000000000..129f4e87818
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/animals.bib
@@ -0,0 +1,82 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{duck,
+ name={duck},
+ description={a waterbird with webbed feet},
+ identifier={animal}
+}
+
+@entry{parrot,
+ name={parrot},
+ description={mainly tropical bird with bright plumage},
+ identifier={animal}
+}
+
+@entry{goose,
+ name={goose},
+ plural={geese},
+ description={a large waterbird with a long neck, short legs,
+ webbed feet and a short broad bill},
+ identifier={animal}
+}
+
+@entry{swan,
+ name={swan},
+ description={a large waterbird with a long flexible neck,
+ short legs, webbed feet and a broad bill},
+ identifier={animal}
+}
+
+@entry{chicken,
+ name={chicken},
+ description={a domestic fowl},
+ identifier={animal}
+}
+
+@entry{aardvark,
+ name={aardvark},
+ description={nocturnal African burrowing mammal},
+ identifier={animal}
+}
+
+@entry{zebra,
+ name={zebra},
+ description={wild African horse with black-and-white stripes},
+ identifier={animal}
+}
+
+@entry{armadillo,
+ name={armadillo},
+ description={nocturnal insectivore with large claws},
+ identifier={animal}
+}
+
+@entry{zander,
+ name={zander},
+ description={large freshwater perch},
+ identifier={animal}
+}
+
+@entry{hedgehog,
+ name={hedgehog},
+ description={small nocturnal mammal with a spiny coat and
+ short legs},
+ identifier={animal}
+}
+
+@entry{seal,
+ name={seal},
+ description={sea-dwelling fish-eating mammal with flippers},
+ identifier={animal}
+}
+
+@entry{sealion,
+ name={sea lion},
+ description={a large type of \gls{seal}},
+ identifier={animal}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/bacteria.bib b/Master/texmf-dist/doc/support/bib2gls/examples/bacteria.bib
new file mode 100644
index 00000000000..d1f967f7c66
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/bacteria.bib
@@ -0,0 +1,66 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@abbreviation{cbotulinum,
+ short={C.~botulinum},
+ long={Clostridium botulinum},
+ identifier={bacteria}
+}
+
+@abbreviation{pputida,
+ short={P.~putida},
+ long={Pseudomonas putida},
+ identifier={bacteria}
+}
+
+@abbreviation{cperfringens,
+ short={C.~perfringens},
+ long={Clostridium perfringens},
+ identifier={bacteria}
+}
+
+@abbreviation{bsubtilis,
+ short={B.~subtilis},
+ long={Bacillus subtilis},
+ identifier={bacteria}
+}
+
+@abbreviation{ctetani,
+ short={C.~tetani},
+ long={Clostridium tetani},
+ identifier={bacteria}
+}
+
+@abbreviation{pcomposti,
+ short={P.~composti},
+ long={Planifilum composti},
+ identifier={bacteria}
+}
+
+@abbreviation{pfimeticola,
+ short={P.~fimeticola},
+ long={Planifilum fimeticola},
+ identifier={bacteria}
+}
+
+@abbreviation{cburnetii,
+ short={C.~burnetii},
+ long={Coxiella burnetii},
+ identifier={bacteria}
+}
+
+@abbreviation{raustralis,
+ short={R.~australis},
+ long={Rickettsia australis},
+ identifier={bacteria}
+}
+
+@abbreviation{rrickettsii,
+ short={R.~rickettsii},
+ long={Rickettsia rickettsii},
+ identifier={bacteria}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/baseunits.bib b/Master/texmf-dist/doc/support/bib2gls/examples/baseunits.bib
new file mode 100644
index 00000000000..d42e17727a3
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/baseunits.bib
@@ -0,0 +1,56 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% requires siunix.sty
+
+@unit{ampere,
+ unitname={ampere},
+ unitsymbol={\si{\ampere}},
+ measurement={electric current},
+ identifier={baseunit}
+}
+
+@unit{kilogram,
+ unitname={kilogram},
+ unitsymbol={\si{\kilogram}},
+ measurement={mass},
+ identifier={baseunit}
+}
+
+@unit{metre,
+ unitname={metre},
+ unitsymbol={\si{\metre}},
+ measurement={length},
+ identifier={baseunit}
+}
+
+@unit{second,
+ unitname={second},
+ unitsymbol={\si{\second}},
+ measurement={time},
+ identifier={baseunit}
+}
+
+@unit{kelvin,
+ unitname={kelvin},
+ unitsymbol={\si{\kelvin}},
+ measurement={thermodynamic temperature},
+ identifier={baseunit}
+}
+
+@unit{mole,
+ unitname={mole},
+ unitsymbol={\si{\mole}},
+ measurement={amount of substance},
+ identifier={baseunit}
+}
+
+@unit{candela,
+ unitname={candela},
+ unitsymbol={\si{\candela}},
+ measurement={luminous intensity},
+ identifier={baseunit}
+}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/bigmathsymbols.bib b/Master/texmf-dist/doc/support/bib2gls/examples/bigmathsymbols.bib
new file mode 100644
index 00000000000..eebb2f5be10
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/bigmathsymbols.bib
@@ -0,0 +1,145 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% requires stix.sty
+
+@preamble{"\providecommand{\bigoperatornamefmt}[1]{%
+ $\displaystyle#1\textstyle#1$}
+\providecommand{\nary}[1]{$#1$-ary}"}
+
+@symbol{bigsqcap,
+ name={\bigoperatornamefmt{\bigsqcap}},
+ text={\bigsqcap},
+ description={\nary{n} square intersection operator},
+ identifier={naryoperator}
+}
+
+@symbol{bigsqcup,
+ name={\bigoperatornamefmt{\bigsqcup}},
+ text={\bigsqcup},
+ description={\nary{n} square union operator},
+ identifier={naryoperator}
+}
+
+@symbol{sum,
+ name={\bigoperatornamefmt{\sum}},
+ text={\sum},
+ description={\nary{n} summation},
+ identifier={naryoperator}
+}
+
+@symbol{prod,
+ name={\bigoperatornamefmt{\prod}},
+ text={\prod},
+ description={\nary{n} product},
+ identifier={naryoperator}
+}
+
+@symbol{coprod,
+ name={\bigoperatornamefmt{\coprod}},
+ text={\coprod},
+ description={\nary{n} coproduct},
+ identifier={naryoperator}
+}
+
+@symbol{bigcap,
+ name={\bigoperatornamefmt{\bigcap}},
+ text={\bigcap},
+ description={\nary{n} intersection},
+ identifier={naryoperator}
+}
+
+@symbol{bigcup,
+ name={\bigoperatornamefmt{\bigcup}},
+ text={\bigcup},
+ description={\nary{n} union},
+ identifier={naryoperator}
+}
+
+@symbol{bigodot,
+ name={\bigoperatornamefmt{\bigodot}},
+ text={\bigodot},
+ description={\nary{n} circled dot operator},
+ identifier={naryoperator}
+}
+
+@symbol{bigoplus,
+ name={\bigoperatornamefmt{\bigoplus}},
+ text={\bigoplus},
+ description={\nary{n} circled plus operator},
+ identifier={naryoperator}
+}
+
+@symbol{bigotimes,
+ name={\bigoperatornamefmt{\bigotimes}},
+ text={\bigotimes},
+ description={\nary{n} circled times operator},
+ identifier={naryoperator}
+}
+
+@symbol{biguplus,
+ name={\bigoperatornamefmt{\biguplus}},
+ text={\biguplus},
+ description={\nary{n} union operator with plus},
+ identifier={naryoperator}
+}
+
+@symbol{bigvee,
+ name={\bigoperatornamefmt{\bigvee}},
+ text={\bigvee},
+ description={\nary{n} logical or},
+ identifier={naryoperator}
+}
+
+@symbol{bigwedge,
+ name={\bigoperatornamefmt{\bigwedge}},
+ text={\bigwedge},
+ description={\nary{n} logical and},
+ identifier={naryoperator}
+}
+
+@symbol{int,
+ name={\bigoperatornamefmt{\int}},
+ text={\int},
+ description={integral},
+ identifier={integral}
+}
+
+@symbol{iint,
+ name={\bigoperatornamefmt{\iint}},
+ text={\iint},
+ description={double integral},
+ identifier={integral}
+}
+
+@symbol{iiint,
+ name={\bigoperatornamefmt{\iiint}},
+ text={\iiint},
+ description={triple integral},
+ identifier={integral}
+}
+
+@symbol{oint,
+ name={\bigoperatornamefmt{\oint}},
+ text={\oint},
+ description={contour integral},
+ identifier={integral}
+}
+
+@symbol{oiint,
+ name={\bigoperatornamefmt{\oiint}},
+ text={\oiint},
+ description={surface integral},
+ identifier={integral}
+}
+
+@symbol{oiiint,
+ name={\bigoperatornamefmt{\oiiint}},
+ text={\oiiint},
+ description={volume integral},
+ identifier={integral}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/binaryoperators.bib b/Master/texmf-dist/doc/support/bib2gls/examples/binaryoperators.bib
new file mode 100644
index 00000000000..5cc2ec9ab39
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/binaryoperators.bib
@@ -0,0 +1,34 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@symbol{plus,
+ name={$+$},
+ text={+},
+ description={addition},
+ identifier={binaryoperator}
+}
+
+@symbol{minus,
+ name={$-$},
+ text={-},
+ description={subtraction},
+ identifier={binaryoperator}
+}
+
+@symbol{times,
+ name={$\times$},
+ text={\times},
+ description={multiplication},
+ identifier={binaryoperator}
+}
+
+@symbol{div,
+ name={$\div$},
+ text={\div},
+ description={division},
+ identifier={binaryoperator}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/books.bib b/Master/texmf-dist/doc/support/bib2gls/examples/books.bib
new file mode 100644
index 00000000000..18a1893cf5f
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/books.bib
@@ -0,0 +1,150 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{ataleoftwocities,
+ name={\sortart{A}{Tale of Two Cities}},
+ description={novel by Charles Dickens},
+ identifier={book},
+ author={\sortmediacreator{Charles}{Dickens}},
+ year={1859}
+}
+
+@entry{bleakhouse,
+ name={Bleak House},
+ description={novel by Charles Dickens},
+ identifier={book},
+ author={\sortmediacreator{Charles}{Dickens}},
+ year={1852}
+}
+
+@entry{thebigsleep,
+ name={\sortart{The}{Big Sleep}},
+ description={novel by Raymond Chandler},
+ identifier={book},
+ author={\sortmediacreator{Raymond}{Chandler}},
+ year={1939}
+}
+
+@entry{thelonggoodbye,
+ name={\sortart{The}{Long Goodbye}},
+ description={novel by Raymond Chandler},
+ identifier={book},
+ author={\sortmediacreator{Raymond}{Chandler}},
+ year={1953}
+}
+
+@entry{redharvest,
+ name={Red Harvest},
+ description={novel by Dashiell Hammett},
+ identifier={book},
+ author={\sortmediacreator{Dashiell}{Hammett}},
+ year={1929}
+}
+
+@entry{murderontheorientexpress,
+ name={Murder on the Orient Express},
+ description={novel by Agatha Christie},
+ identifier={book},
+ author={\sortmediacreator{Agatha}{Christie}},
+ year={1934}
+}
+
+@entry{whydidnttheyaskevans,
+ name={Why Didn't They Ask Evans?},
+ description={novel by Agatha Christie},
+ identifier={book},
+ author={\sortmediacreator{Agatha}{Christie}},
+ year={1934}
+}
+
+@entry{icecoldinalex,
+ name={Ice Cold in Alex},
+ description={novel by Christopher Landon},
+ identifier={book},
+ author={\sortmediacreator{Christopher}{Landon}},
+ year={1957}
+}
+
+@entry{thehobbit,
+ name={\sortart{The}{Hobbit}},
+ description={novel by J.R.R. Tolkien},
+ identifier={book},
+ author={\sortmediacreator{J.R.R.}{Tolkien}},
+ year={1937}
+}
+
+@entry{thelordoftherings,
+ name={\sortart{The}{Lord of the Rings}},
+ description={novel by J.R.R. Tolkien},
+ identifier={book},
+ author={\sortmediacreator{J.R.R.}{Tolkien}},
+ year={1954}
+}
+
+@entry{thewonderfulwizardofoz,
+ name={\sortart{The}{Wonderful Wizard of Oz}},
+ description={novel by L. Frank Baum},
+ identifier={book},
+ author={\sortmediacreator{L. Frank}{Baum}},
+ year={1900}
+}
+
+@entry{whiskygalore,
+ name={Whisky Galore},
+ description={novel by Compton Mackenzie},
+ identifier={book},
+ author={\sortmediacreator{Compton}{Mackenzie}},
+ year={1947}
+}
+
+@entry{whereeaglesdare,
+ name={Where Eagles Dare},
+ description={novel by Alistair MacLean},
+ identifier={book},
+ author={\sortmediacreator{Alistair}{MacLean}},
+ year={1967}
+}
+
+@entry{icestationzebra,
+ name={Ice Station Zebra},
+ description={novel by Alistair MacLean},
+ identifier={book},
+ author={\sortmediacreator{Alistair}{MacLean}},
+ year={1963}
+}
+
+@entry{ubik,
+ name={Ubik},
+ description={novel by Philip K. Dick},
+ identifier={book},
+ author={\sortmediacreator{Philip K.}{Dick}},
+ year={1969}
+}
+
+@entry{doandroidsdreamofelectricsheep,
+ name={Do Androids Dream of Electric Sheep?},
+ description={novel by Philip K. Dick},
+ identifier={book},
+ author={\sortmediacreator{Philip K.}{Dick}},
+ year={1968}
+}
+
+@entry{thetroublewithharry,
+ name={\sortart{The}{Trouble with Harry}},
+ description={novel by Jack Trevor Story},
+ identifier={book},
+ author={\sortmediacreator{Jack Trevor}{Story}},
+ year={1950}
+}
+
+@entry{brightonrock,
+ name={Brighton Rock},
+ description={novel by Graham Greene},
+ identifier={book},
+ author={\sortmediacreator{Graham}{Greene}},
+ year={1938}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/chemicalformula.bib b/Master/texmf-dist/doc/support/bib2gls/examples/chemicalformula.bib
new file mode 100644
index 00000000000..9a3f67884c0
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/chemicalformula.bib
@@ -0,0 +1,152 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% requires mhchem.sty
+
+@chemical{H2O,
+ formula={\ce{H2O}},
+ chemicalname={water},
+ identifier={chemical}
+}
+
+@chemical{Al2SO43,
+ formula={\ce{Al2(SO4)3}},
+ chemicalname={aluminium sulfate},
+ identifier={chemical}
+}
+
+@chemical{CH3CH2OH,
+ formula={\ce{CH3CH2OH}},
+ chemicalname={ethanol},
+ identifier={chemical}
+}
+
+@chemical{C6H12O6,
+ formula={\ce{C6H12O6}},
+ chemicalname={glucose},
+ identifier={chemical}
+}
+
+@chemical{CH2O,
+ formula={\ce{CH2O}},
+ chemicalname={formaldehyde},
+ identifier={chemical}
+}
+
+@chemical{H3O+,
+ formula={\ce{H3O+}},
+ chemicalname={hydronium},
+ identifier={chemical}
+}
+
+@chemical{SO42-,
+ formula={\ce{SO4^{2-}}},
+ chemicalname={sulfate},
+ identifier={chemical}
+}
+
+@chemical{O2,
+ formula={\ce{O2}},
+ chemicalname={dioxygen},
+ identifier={chemical}
+}
+
+@chemical{O,
+ formula={\ce{O}},
+ chemicalname={oxygen},
+ identifier={chemical}
+}
+
+@chemical{OF2,
+ formula={\ce{OF2}},
+ chemicalname={oxygen difluoride},
+ identifier={chemical}
+}
+
+@chemical{O2F2,
+ formula={\ce{O2F2}},
+ chemicalname={dioxygen difluoride},
+ identifier={chemical}
+}
+
+@chemical{OH-,
+ formula={\ce{OH-}},
+ chemicalname={hydroxide ion},
+ identifier={chemical}
+}
+
+@chemical{AlF3,
+ formula={\ce{AlF3}},
+ chemicalname={aluminium trifluoride},
+ identifier={chemical}
+}
+
+@chemical{Al2CoO4,
+ formula={\ce{Al2CoO4}},
+ chemicalname={cobalt blue},
+ identifier={chemical}
+}
+
+@chemical{As4S4,
+ formula={\ce{As4S4}},
+ chemicalname={tetraarsenic tetrasulfide},
+ identifier={chemical}
+}
+
+@chemical{C5H4NCOOH,
+ formula={\ce{C5H4NCOOH}},
+ chemicalname={niacin},
+ identifier={chemical}
+}
+
+@chemical{C10H10O4,
+ formula={\ce{C10H10O4}},
+ chemicalname={ferulic acid},
+ identifier={chemical}
+}
+
+@chemical{C8H10N4O2,
+ formula={\ce{C8H10N4O2}},
+ chemicalname={caffeine},
+ identifier={chemical}
+}
+
+@chemical{SO2,
+ formula={\ce{SO2}},
+ chemicalname={sulfur dioxide},
+ identifier={chemical}
+}
+
+@chemical{S2O72-,
+ formula={\ce{S2O7^{2-}}},
+ chemicalname={disulfate ion},
+ identifier={chemical}
+}
+
+@chemical{SbBr3,
+ formula={\ce{SbBr3}},
+ chemicalname={antimony(III) bromide},
+ identifier={chemical}
+}
+
+@chemical{Sc2O3,
+ formula={\ce{Sc2O3}},
+ chemicalname={scandium oxide},
+ identifier={chemical}
+}
+
+@chemical{Zr3PO44,
+ formula={\ce{Zr3(PO4)4}},
+ chemicalname={zirconium phosphate},
+ identifier={chemical}
+}
+
+@chemical{ZnF2,
+ formula={\ce{ZnF2}},
+ chemicalname={zinc fluoride},
+ identifier={chemical}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/constants.bib b/Master/texmf-dist/doc/support/bib2gls/examples/constants.bib
new file mode 100644
index 00000000000..92d9957c7ca
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/constants.bib
@@ -0,0 +1,95 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% Requires upgreek.sty
+
+@preamble{"\providecommand{\constanti}{\mathrm{i}}
+\providecommand{\constantj}{\mathrm{j}}
+\providecommand{\constante}{\mathrm{e}}
+\providecommand{\constantpi}{\uppi}
+\providecommand{\constantgamma}{\upgamma}
+\providecommand{\constantphi}{\upphi}
+\providecommand{\constantlambda}{\uplambda}"}
+
+@constant{pi,
+ constantname={pi},
+ constantsymbol={\ensuremath{\constantpi}},
+ definition={the ratio of the length of the circumference
+ of a circle to its diameter},
+ value={3.14159},
+ identifier={constant}
+}
+
+@constant{eulercons,
+ constantname={Euler's constant},
+ constantsymbol={\ensuremath{\constantgamma}},
+ definition={the limit of \[\sum_{r=1}^n\frac{1}{r}-\ln n\]
+ as $n\to\infty$},
+ value={0.57721},
+ identifier={constant}
+}
+
+@constant{e,
+ constantname={Euler's number},
+ constantsymbol={\ensuremath{\constante}},
+ definition={base of natural logarithms},
+ value={2.71828},
+ identifier={constant}
+}
+
+@constant{root2,
+ constantname={Pythagoras' constant},
+ constantsymbol={\ensuremath{\surd2}},
+ definition={the square root of 2},
+ value={1.41421},
+ identifier={constant}
+}
+
+@constant{goldenratio,
+ constantname={golden ratio},
+ constantsymbol={\ensuremath{\constantphi}},
+ definition={the ratio $\frac{1+\surd5}{2}$},
+ value={1.61803},
+ identifier={constant}
+}
+
+@constant{aperysconstant,
+ constantname={Ap\'ery's constant},
+ constantsymbol={\ensuremath{\zeta(3)}},
+ definition={a special value of the Riemann zeta function},
+ value={1.2020569},
+ identifier={constant}
+}
+
+@constant{conwaysconstant,
+ constantname={Conway's constant},
+ constantsymbol={\ensuremath{\constantlambda}},
+ definition={the invariant growth rate of all derived strings},
+ value={1.30357},
+ identifier={constant}
+}
+
+@constant{zero,
+ constantname={zero},
+ constantsymbol={\ensuremath{0}},
+ definition={nothing or nil},
+ identifier={constant}
+}
+
+@constant{one,
+ constantname={one},
+ constantsymbol={\ensuremath{1}},
+ definition={single entity, unity},
+ identifier={constant}
+}
+
+@constant{imaginary,
+ constantname={imaginary unit},
+ constantsymbol={\ensuremath{\constanti}},
+ definition={defined as $\constanti^2 = -1$},
+ identifier={constant},
+ alternative={\ensuremath{\constantj}}
+}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/derivedunits.bib b/Master/texmf-dist/doc/support/bib2gls/examples/derivedunits.bib
new file mode 100644
index 00000000000..130254b0791
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/derivedunits.bib
@@ -0,0 +1,70 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% requires siunitx.sty
+
+@measurement{area,
+ unitname={square metre},
+ unitsymbol={\si{\metre\squared}},
+ measurement={area},
+ identifier={derivedunit}
+}
+
+@measurement{volume,
+ unitname={cubic metre},
+ unitsymbol={\si{\metre\cubed}},
+ measurement={volume},
+ identifier={derivedunit}
+}
+
+@measurement{velocity,
+ unitname={metre per second},
+ unitsymbol={\si{\metre\per\second}},
+ measurement={velocity},
+ identifier={derivedunit}
+}
+
+@measurement{acceleration,
+ unitname={metre per second squared},
+ unitsymbol={\si{\metre\per\square\second}},
+ measurement={acceleration},
+ identifier={derivedunit}
+}
+
+@measurement{density,
+ unitname={ampere per square metre},
+ unitsymbol={\si{\ampere\per\square\metre}},
+ measurement={density},
+ identifier={derivedunit}
+}
+
+@measurement{luminance,
+ unitname={candela per square metre},
+ unitsymbol={\si{\candela\per\square\metre}},
+ measurement={luminance},
+ identifier={derivedunit}
+}
+
+@measurement{specificvolume,
+ unitname={cubic metre per kilogram},
+ unitsymbol={\si{\cubic\metre\per\kilogram}},
+ measurement={specific volume},
+ identifier={derivedunit}
+}
+
+@measurement{concentration,
+ unitname={mole per cubic metre},
+ unitsymbol={\si{\mole\per\cubic\metre}},
+ measurement={concentration},
+ identifier={derivedunit}
+}
+
+@measurement{wavenumber,
+ unitname={per metre},
+ unitsymbol={\si{\per\metre}},
+ measurement={wave number},
+ identifier={derivedunit}
+}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/films.bib b/Master/texmf-dist/doc/support/bib2gls/examples/films.bib
new file mode 100644
index 00000000000..985463fec47
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/films.bib
@@ -0,0 +1,192 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{film.thebigsleep,
+ name={\sortart{The}{Big Sleep}},
+ description={a film based on the novel
+ \gls{ext1.thebigsleep}},
+ cast={Humphrey Bogart and Lauren Bacall},
+ identifier={film},
+ year={1946},
+ director={\sortmediacreator{Howard}{Hawks}}
+}
+
+@entry{film.thelonggoodbye,
+ name={\sortart{The}{Long Goodbye}},
+ description={a film based on the novel
+ \gls{ext1.thelonggoodbye}},
+ cast={Elliott Gould and Nina van Pallandt},
+ identifier={film},
+ year={1973},
+ director={\sortmediacreator{Robert}{Altman}}
+}
+
+@entry{film.murderontheorientexpress,
+ name={Murder on the Orient Express},
+ description={a film based on the novel
+ \gls{ext1.murderontheorientexpress}},
+ cast={Albert Finney and Lauren Bacall and Ingrid Bergman},
+ identifier={film},
+ director={\sortmediacreator{Sidney}{Lumet}},
+ year={1974}
+}
+
+@entry{film.whydidnttheyaskevans,
+ name={Why Didn't They Ask Evans?},
+ description={a film based on the novel
+ \gls{ext1.whydidnttheyaskevans}\glsxtrnopostpunc},
+ cast={Francesca Annis and John Gielgud and Bernard Miles},
+ identifier={film},
+ director={\sortmediacreator{John}{Davies}},
+ year={1980}
+}
+
+@entry{film.icecoldinalex,
+ name={Ice Cold in Alex},
+ description={a film based on the novel
+ \gls{ext1.icecoldinalex}},
+ cast={John Mills and Anthony Quayle and Sylvia Sims},
+ identifier={film},
+ year={1958},
+ director={\sortmediacreator{J. Lee}{Thompson}}
+}
+
+@entry{film.anunexpectedjourney,
+ name={\sortart{The}{Hobbit}:
+ \sortart{An}{Unexpected Journey}},
+ description={a film based on the novel \gls{ext1.thehobbit}},
+ cast={Martin Freeman and Ian McKellen and Richard Armitage},
+ identifier={film},
+ year={2012},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.desolationofsmaug,
+ name={\sortart{The}{Hobbit}:
+ \sortart{The}{Desolation of Smaug}},
+ description={a film based on the novel
+ \gls{ext1.thehobbit}},
+ cast={Ian McKellen and Martin Freeman and Richard Armitage},
+ identifier={film},
+ year={2013},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.thebattleoffivearmies,
+ name={\sortart{The}{Hobbit}:
+ \sortart{The}{Battle of Five Armies}},
+ description={a film based on the novel
+ \gls{ext1.thehobbit}},
+ cast={Ian McKellen and Martin Freeman and Richard Armitage},
+ identifier={film},
+ year={2014},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.thefellowshipofthering,
+ name={\sortart{The}{Lord of the Rings}:
+ \sortart{The}{Fellowship of the Ring}},
+ description={a film based on the novel
+ \gls{ext1.thelordoftherings}},
+ cast={Elijah Wood and Ian McKellen and Orlando Bloom},
+ identifier={film},
+ year={2001},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.thetwotowers,
+ name={\sortart{The}{Lord of the Rings}:
+ \sortart{The}{Two Towers}},
+ description={a film based on the novel
+ \gls{ext1.thelordoftherings}},
+ cast={Elijah Wood and Ian McKellen and Viggo Mortensen},
+ identifier={film},
+ year={2002},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.thereturnoftheking,
+ name={\sortart{The}{Lord of the Rings}:
+ \sortart{The}{Return of the King}},
+ description={a film based on the novel
+ \gls{ext1.thelordoftherings}},
+ cast={Elijah Wood and Viggo Mortensen and Ian McKellen},
+ identifier={film},
+ year={2003},
+ director={\sortmediacreator{Peter}{Jackson}}
+}
+
+@entry{film.thewizardofoz,
+ name={\sortart{The}{Wizard of Oz}},
+ description={a film based on the novel
+ \gls{ext1.thewonderfulwizardofoz}},
+ cast={Judy Garland},
+ identifier={film},
+ year={1939},
+ director={\sortmediacreator{Victor}{Fleming}}
+}
+
+@entry{film.whiskygalore,
+ name={Whisky Galore!},
+ description={a film based on the novel
+ \gls{ext1.whiskygalore}},
+ cast={Basil Radford and Joan Greenwood},
+ identifier={film},
+ year={1949},
+ director={\sortmediacreator{Alexander}{Mackendrick}}
+}
+
+@entry{film.whereeaglesdare,
+ name={Where Eagles Dare},
+ description={a film based on the novel
+ \gls{ext1.whereeaglesdare}},
+ cast={Richard Burton and Clint Eastwood and Mary Ure},
+ identifier={film},
+ year={1968},
+ director={\sortmediacreator{Brian G.}{Hutton}}
+}
+
+@entry{film.icestationzebra,
+ name={Ice Station Zebra},
+ description={a film based on the novel
+ \gls{ext1.icestationzebra}},
+ cast={Rock Hudson and Ernest Borgnine},
+ identifier={film},
+ year={1968},
+ director={\sortmediacreator{John}{Sturges}}
+}
+
+@entry{film.bladerunner,
+ name={Blade Runner},
+ description={a film loosely based on the novel
+ \gls{ext1.doandroidsdreamofelectricsheep}\glsxtrnopostpunc},
+ cast={Harrison Ford and Rutger Hauer and Sean Young},
+ identifier={film},
+ year={1982},
+ director={\sortmediacreator{Ridley}{Scott}}
+}
+
+@entry{film.thetroublewithharry,
+ name={\sortart{The}{Trouble with Harry}},
+ description={a film based on the novel
+ \gls{ext1.thetroublewithharry}},
+ cast={John Forsythe and Shirley MacLaine},
+ identifier={film},
+ year={1955},
+ director={\sortmediacreator{Alfred}{Hitchcock}}
+}
+
+@entry{film.brightonrock,
+ name={Brighton Rock},
+ description={a film based on the novel
+ \gls{ext1.brightonrock}},
+ cast={Richard Attenborough and Hermione Baddeley
+ and William Hartnell},
+ identifier={film},
+ year={1947},
+ director={\sortmediacreator{John}{Boutling}}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble.bib b/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble.bib
new file mode 100644
index 00000000000..dc95599bf33
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble.bib
@@ -0,0 +1,10 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\sortname}[2]{#2, #1}
+\providecommand{\sortvonname}[3]{#2 #3, #1}
+\providecommand{\sortart}[2]{#2}
+\providecommand{\sortmediacreator}[2]{#2, #1}"}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble2.bib b/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble2.bib
new file mode 100644
index 00000000000..ec5ab283686
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/interpret-preamble2.bib
@@ -0,0 +1,10 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\sortname}[2]{#2, #1}
+\providecommand{\sortvonname}[3]{#2 #3, #1}
+\providecommand{\sortart}[2]{#2}
+\renewcommand{\sortmediacreator}[2]{\MakeLowercase{#2}}"}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/markuplanguages.bib b/Master/texmf-dist/doc/support/bib2gls/examples/markuplanguages.bib
new file mode 100644
index 00000000000..a9026843b72
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/markuplanguages.bib
@@ -0,0 +1,67 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\abbrvtag}[1]{#1}"}
+@string{markuplang="\abbrvtag{m}arkup \abbrvtag{l}anguage"}
+
+@entry{TeX,
+ name={{}\TeX},
+ description={a format for describing complex type and page layout
+ often used for mathematics, technical, and academic publications},
+ identifier={markuplanguage}
+}
+
+@entry{LaTeX,
+ name={{}\LaTeX},
+ description={a format of \glstext{TeX} designed to separate
+ content from style},
+ identifier={markuplanguage}
+}
+
+@entry{markdown,
+ name={markdown},
+ description={a lightweight markup language with plain text
+ formatting syntax},
+ identifier={markuplanguage}
+}
+
+@abbreviation{xml,
+ short={XML},
+ long={e\abbrvtag{x}tensible }#markuplang,
+ description={a markup language that defines a set of rules for
+ encoding documents},
+ identifier={markuplanguage}
+}
+
+@abbreviation{html,
+ short={HTML},
+ long={\abbrvtag{h}yper\abbrvtag{t}ext }#markuplang,
+ description={the standard markup language for creating web pages},
+ identifier={markuplanguage}
+}
+
+@abbreviation{mathml,
+ short={MathML},
+ long={\abbrvtag{m\NoCaseChange{ath}}ematical }#markuplang,
+ description={the standard markup language for creating web pages},
+ identifier={markuplanguage}
+}
+
+@abbreviation{xhtml,
+ short={XHTML},
+ long={e\abbrvtag{x}tensible \abbrvtag{h}yper\abbrvtag{t}ext }
+ # markuplang,
+ description={{}\glstext{xml} version of \glstext{html}},
+ identifier={markuplanguage}
+}
+
+@abbreviation{svg,
+ short={SVG},
+ long={\abbrvtag{s}calable \abbrvtag{v}ector \abbrvtag{g}raphics},
+ description={{}\glstext{xml}-based vector image format},
+ identifier={markuplanguage}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/mathgreek.bib b/Master/texmf-dist/doc/support/bib2gls/examples/mathgreek.bib
new file mode 100644
index 00000000000..6154362ca74
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/mathgreek.bib
@@ -0,0 +1,195 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\omicron}{o}"}
+
+@symbol{alpha,
+ name={\ensuremath{\alpha}},
+ description={alpha},
+ identifier={mathgreek}
+}
+
+@symbol{beta,
+ name={\ensuremath{\beta}},
+ description={beta},
+ identifier={mathgreek}
+}
+
+@symbol{gamma,
+ name={\ensuremath{\gamma}},
+ description={gamma},
+ identifier={mathgreek}
+}
+
+@symbol{delta,
+ name={\ensuremath{\delta}},
+ description={delta},
+ identifier={mathgreek}
+}
+
+@symbol{varepsilon,
+ name={\ensuremath{\varepsilon}},
+ description={epsilon (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{zeta,
+ name={\ensuremath{\zeta}},
+ description={zeta},
+ identifier={mathgreek}
+}
+
+@symbol{eta,
+ name={\ensuremath{\eta}},
+ description={eta},
+ identifier={mathgreek}
+}
+
+@symbol{theta,
+ name={\ensuremath{\theta}},
+ description={theta},
+ identifier={mathgreek}
+}
+
+
+@symbol{iota,
+ name={\ensuremath{\iota}},
+ description={iota},
+ identifier={mathgreek}
+}
+
+@symbol{kappa,
+ name={\ensuremath{\kappa}},
+ description={kappa},
+ identifier={mathgreek}
+}
+
+@symbol{lambda,
+ name={\ensuremath{\lambda}},
+ description={lambda},
+ identifier={mathgreek}
+}
+
+@symbol{mu,
+ name={\ensuremath{\mu}},
+ description={mu},
+ identifier={mathgreek}
+}
+
+@symbol{nu,
+ name={\ensuremath{\nu}},
+ description={nu},
+ identifier={mathgreek}
+}
+
+@symbol{xi,
+ name={\ensuremath{\xi}},
+ description={xi},
+ identifier={mathgreek}
+}
+
+@symbol{omicron,
+ name={\ensuremath{\omicron}},
+ description={omicron},
+ identifier={mathgreek}
+}
+
+@symbol{pi,
+ name={\ensuremath{\pi}},
+ description={pi},
+ identifier={mathgreek}
+}
+
+@symbol{rho,
+ name={\ensuremath{\rho}},
+ description={rho},
+ identifier={mathgreek}
+}
+
+@symbol{varsigma,
+ name={\ensuremath{\varsigma}},
+ description={sigma (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{sigma,
+ name={\ensuremath{\sigma}},
+ description={sigma},
+ identifier={mathgreek}
+}
+
+@symbol{tau,
+ name={\ensuremath{\tau}},
+ description={tau},
+ identifier={mathgreek}
+}
+
+@symbol{upsilon,
+ name={\ensuremath{\upsilon}},
+ description={upsilon},
+ identifier={mathgreek}
+}
+
+@symbol{varphi,
+ name={\ensuremath{\varphi}},
+ description={phi (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{chi,
+ name={\ensuremath{\chi}},
+ description={chi},
+ identifier={mathgreek}
+}
+
+@symbol{psi,
+ name={\ensuremath{\psi}},
+ description={psi},
+ identifier={mathgreek}
+}
+
+@symbol{omega,
+ name={\ensuremath{\omega}},
+ description={omega},
+ identifier={mathgreek}
+}
+
+@symbol{epsilon,
+ name={\ensuremath{\epsilon}},
+ description={epsilon},
+ identifier={mathgreek}
+}
+
+@symbol{vartheta,
+ name={\ensuremath{\vartheta}},
+ description={theta (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{varkappa,
+ name={\ensuremath{\varkappa}},
+ description={kappa (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{phi,
+ name={\ensuremath{\phi}},
+ description={phi},
+ identifier={mathgreek}
+}
+
+@symbol{varrho,
+ name={\ensuremath{\varrho}},
+ description={rho (variant)},
+ identifier={mathgreek}
+}
+
+@symbol{varpi,
+ name={\ensuremath{\varpi}},
+ description={pi (variant)},
+ identifier={mathgreek}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/mathsobjects.bib b/Master/texmf-dist/doc/support/bib2gls/examples/mathsobjects.bib
new file mode 100644
index 00000000000..5aa84e70cb2
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/mathsobjects.bib
@@ -0,0 +1,154 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% requires amssymb.sty
+
+@preamble{"\providecommand{\setfmt}[1]{\mathcal{#1}}
+\providecommand{\setcontentsfmt}[1]{\{#1\}}
+\providecommand{\setmembershipfmt}[2]{\setcontentsfmt{#1: #2}}
+\providecommand{\setmembershiponeargfmt}[1]{\setmembershipfmt#1}
+\providecommand{\setcardfmt}[1]{\lvert#1\rvert}
+\providecommand{\numspacefmt}[1]{\mathbb{#1}}
+\providecommand{\transposefmt}[1]{#1^T}
+\providecommand{\invfmt}[1]{#1^{-1}}
+\providecommand{\vecfmt}[1]{\boldsymbol{#1}}
+\providecommand{\mtxfmt}[1]{\boldsymbol{#1}}"}
+
+@symbol{set,
+ name={\ensuremath{\setfmt{S}}},
+ description={\sortart{a}{set}},
+ format={setfmt},
+ identifier={set}
+}
+
+@symbol{setcontents,
+ name={\ensuremath{\setcontentsfmt{\ldots}}},
+ description={set contents},
+ format={setcontentsfmt},
+ identifier={set}
+}
+
+@symbol{setmembership,
+ name={\ensuremath{\setmembershipfmt{\vecfmt{x}}{\ldots}}},
+ description={set membership},
+ format={setmembershiponeargfmt},
+ identifier={set}
+}
+
+@symbol{setcard,
+ name={\ensuremath{\setcardfmt{\setfmt{S}}}},
+ description={\sortart{the}{cardinality of $\setfmt{S}$}},
+ format={setcardfmt},
+ identifier={set}
+}
+
+@symbol{numberspace,
+ name={\ensuremath{\numspacefmt{S}}},
+ description={\sortart{a}{number space}},
+ format={numspacefmt},
+ identifier={numberspace}
+}
+
+@symbol{naturalnumbers,
+ name={\ensuremath{\numspacefmt{N}}},
+ description={\sortart{the}{set of natural numbers}},
+ identifier={numberspace}
+}
+
+@symbol{integernumbers,
+ name={\ensuremath{\numspacefmt{Z}}},
+ description={\sortart{the}{set of integers}},
+ identifier={numberspace}
+}
+
+@symbol{rationalnumbers,
+ name={\ensuremath{\numspacefmt{Q}}},
+ description={\sortart{the}{set of rational numbers}},
+ identifier={numberspace}
+}
+
+@symbol{algebraicnumbers,
+ name={\ensuremath{\numspacefmt{A}}},
+ description={\sortart{the}{set of algebraic numbers}},
+ identifier={numberspace}
+}
+
+@symbol{realnumbers,
+ name={\ensuremath{\numspacefmt{R}}},
+ description={\sortart{the}{set of real numbers}},
+ identifier={numberspace}
+}
+
+@symbol{imaginarynumbers,
+ name={\ensuremath{\numspacefmt{I}}},
+ description={\sortart{the}{set of imaginary numbers}},
+ identifier={numberspace}
+}
+
+@symbol{complexnumbers,
+ name={\ensuremath{\numspacefmt{C}}},
+ description={\sortart{the}{set of complex numbers}},
+ identifier={numberspace}
+}
+
+@symbol{emptyset,
+ name={\ensuremath{\emptyset}},
+ description={\sortart{the}{empty set}},
+ identifier={set}
+}
+
+@symbol{universalset,
+ name={\ensuremath{\setfmt{U}}},
+ description={\sortart{the}{universal set}},
+ identifier={set}
+}
+
+@symbol{transpose,
+ name={\ensuremath{\transposefmt{\vecfmt{x}}}},
+ description={\sortart{the}{transpose of $\vecfmt{x}$}},
+ format={transposefmt},
+ identifier={matrix}
+}
+
+@symbol{inverse,
+ name={\ensuremath{\invfmt{\mtxfmt{M}}}},
+ description={\sortart{the}{inverse of $\mtxfmt{M}$}},
+ format={invfmt},
+ identifier={matrix}
+}
+
+@symbol{vector,
+ name={\ensuremath{\vecfmt{v}}},
+ description={\sortart{a}{vector}},
+ format={vecfmt},
+ identifier={matrix}
+}
+
+@symbol{matrix,
+ name={\ensuremath{\mtxfmt{M}}},
+ description={\sortart{a}{matrix}},
+ format={mtxfmt},
+ identifier={matrix}
+}
+
+@symbol{0vec,
+ name={\ensuremath{\vecfmt{0}}},
+ description={\sortart{the}{vector of 0s}},
+ identifier={matrix}
+}
+
+@symbol{1vec,
+ name={\ensuremath{\vecfmt{1}}},
+ description={\sortart{the}{vector of 1s}},
+ identifier={matrix}
+}
+
+@symbol{identitymatrix,
+ name={\ensuremath{\mtxfmt{I}}},
+ description={\sortart{the}{identity matrix}},
+ identifier={matrix}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/mathsrelations.bib b/Master/texmf-dist/doc/support/bib2gls/examples/mathsrelations.bib
new file mode 100644
index 00000000000..a9d68d99b4c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/mathsrelations.bib
@@ -0,0 +1,83 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@symbol{leq,
+ name={$\leq$},
+ text={\leq},
+ description={less than or equal to},
+ identifier={relation}
+}
+
+@symbol{less,
+ name={$<$},
+ text={<},
+ description={less than},
+ identifier={relation}
+}
+
+@symbol{ll,
+ name={$\ll$},
+ text={\ll},
+ description={much less than},
+ identifier={relation}
+}
+
+@symbol{geq,
+ name={$\geq$},
+ text={\geq},
+ description={greater than or equal to},
+ identifier={relation}
+}
+
+@symbol{greater,
+ name={$>$},
+ text={>},
+ description={greater than},
+ identifier={relation}
+}
+
+@symbol{gg,
+ name={$\gg$},
+ text={\gg},
+ description={much greater than},
+ identifier={relation}
+}
+
+@symbol{equals,
+ name={$=$},
+ text={=},
+ description={equals},
+ identifier={relation}
+}
+
+@symbol{neq,
+ name={$\neq$},
+ text={\neq},
+ description={not equals},
+ identifier={relation}
+}
+
+@symbol{approx,
+ name={$\approx$},
+ text={\approx},
+ description={approximately},
+ identifier={relation}
+}
+
+@symbol{in,
+ name={$\in$},
+ text={\in},
+ description={in},
+ identifier={relation}
+}
+
+@symbol{ni,
+ name={$\ni$},
+ text={\ni},
+ description={not in},
+ identifier={relation}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/minerals.bib b/Master/texmf-dist/doc/support/bib2gls/examples/minerals.bib
new file mode 100644
index 00000000000..373f78332e5
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/minerals.bib
@@ -0,0 +1,126 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{quartz,
+ name={quartz},
+ description={hard mineral consisting of silica},
+ identifier={mineral}
+}
+
+@entry{corundum,
+ name={corundum},
+ description={crystalline form of aluminium oxide},
+ identifier={mineral}
+}
+
+@entry{beryl,
+ name={beryl},
+ description={composed of beryllium aluminium cyclosilicate},
+ identifier={mineral}
+}
+
+@entry{amethyst,
+ name={amethyst},
+ description={purple variety of \gls{quartz}},
+ identifier={mineral}
+}
+
+@entry{chalcedony,
+ name={chalcedony},
+ description={cryptocrystalline variety of \gls{quartz}},
+ identifier={mineral}
+}
+
+@entry{citrine,
+ name={citrine},
+ description={yellow variety of \gls{quartz}},
+ identifier={mineral}
+}
+
+@entry{aquamarine,
+ name={aquamarine},
+ description={light blue variety of \gls{beryl}},
+ identifier={mineral}
+}
+
+@entry{aragonite,
+ name={aragonite},
+ description={a crystal form of calcium carbonate},
+ identifier={mineral}
+}
+
+@entry{calcite,
+ name={calcite},
+ description={a crystal form of calcium carbonate},
+ identifier={mineral}
+}
+
+@entry{vaterite,
+ name={vaterite},
+ description={a crystal form of calcium carbonate},
+ identifier={mineral}
+}
+
+@entry{bakerite,
+ name={bakerite},
+ description={a borosilicate mineral},
+ identifier={mineral}
+}
+
+@entry{bilinite,
+ name={bílinite},
+ description={an iron sulfate mineral},
+ identifier={mineral}
+}
+
+@entry{biotite,
+ name={biotite},
+ description={a common phyllosilicate mineral},
+ identifier={mineral}
+}
+
+@entry{cobaltite,
+ name={cobaltite},
+ description={a sulfide mineral composed of cobalt, arsenic and
+ sulfur},
+ identifier={mineral}
+}
+
+@entry{cyanotrichite,
+ name={cyanotrichite},
+ description={a hydrous copper aluminium sulfate mineral},
+ identifier={mineral}
+}
+
+@index{lettsomite,
+ alias={cyanotrichite},
+ identifier={mineral}
+}
+
+@entry{diamond,
+ name={diamond},
+ description={a metastable allotrope of carbon},
+ identifier={mineral}
+}
+
+@entry{dolomite,
+ name={dolomite},
+ description={an anhydrous carbonate mineral},
+ identifier={mineral}
+}
+
+@entry{quetzalcoatlite,
+ name={quetzalcoatlite},
+ description={a rare tellurium oxysalt mineral},
+ identifier={mineral}
+}
+
+@entry{vulcanite,
+ name={vulcanite},
+ description={a rare copper telluride mineral},
+ identifier={mineral}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/miscsymbols.bib b/Master/texmf-dist/doc/support/bib2gls/examples/miscsymbols.bib
new file mode 100644
index 00000000000..230eb999f3c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/miscsymbols.bib
@@ -0,0 +1,140 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed icondescription
+% of this file.
+
+% Encoding: UTF-8
+
+% requires marvosym.sty and ifsym.sty
+
+@icon{forward,
+ icon={\Forward},
+ icondescription={play},
+ identifier={mediacontrol}
+}
+
+@icon{forwardtoindex,
+ icon={\ForwardToIndex},
+ icondescription={next track},
+ identifier={mediacontrol}
+}
+
+@icon{rewindtoindex,
+ icon={\RewindToIndex},
+ icondescription={back to start of track},
+ identifier={mediacontrol}
+}
+
+@icon{rewind,
+ icon={\Rewind},
+ icondescription={rewind},
+ identifier={mediacontrol}
+}
+
+@icon{bicycle,
+ icon={\Bicycle},
+ icondescription={bicycle route},
+ identifier={information}
+}
+
+@icon{coffeecup,
+ icon={\Coffeecup},
+ icondescription={caf\'e},
+ identifier={information}
+}
+
+@icon{info,
+ icon={\Info},
+ icondescription={information centre},
+ identifier={information}
+}
+
+@icon{gentsroom,
+ icon={\Gentsroom},
+ icondescription={Gents},
+ identifier={information}
+}
+
+@icon{ladiesroom,
+ icon={\Ladiesroom},
+ icondescription={Ladies},
+ identifier={information}
+}
+
+@icon{wheelchair,
+ icon={\Wheelchair},
+ icondescription={wheelchair access provided},
+ identifier={information}
+}
+
+@icon{football,
+ icon={\Football},
+ icondescription={football stadium},
+ identifier={information}
+}
+
+@icon{recycling,
+ icon={\Recycling},
+ icondescription={recycling centre},
+ identifier={information}
+}
+
+@icon{cloud,
+ icon={\Cloud},
+ icondescription={cloudy},
+ identifier={weather}
+}
+
+@icon{fog,
+ icon={\Fog},
+ icondescription={foggy},
+ identifier={weather}
+}
+
+@icon{thinfog,
+ icon={\ThinFog},
+ icondescription={misty},
+ identifier={weather}
+}
+
+@icon{hail,
+ icon={\Hail},
+ icondescription={hail},
+ identifier={weather}
+}
+
+@icon{sun,
+ icon={\Sun},
+ icondescription={sunny},
+ identifier={weather}
+}
+
+@icon{lightning,
+ icon={\Lightning},
+ icondescription={thunderstorm},
+ identifier={weather}
+}
+
+@icon{suncloud,
+ icon={\SunCloud},
+ icondescription={overcast},
+ identifier={weather}
+}
+
+@icon{raincloud,
+ icon={\RainCloud},
+ icondescription={rain},
+ identifier={weather}
+}
+
+@icon{weakraincloud,
+ icon={\WeakRainCloud},
+ icondescription={drizzle},
+ identifier={weather}
+}
+
+@icon{snowcloud,
+ icon={\SnowCloud},
+ icondescription={snow},
+ identifier={weather}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/no-interpret-preamble.bib b/Master/texmf-dist/doc/support/bib2gls/examples/no-interpret-preamble.bib
new file mode 100644
index 00000000000..570f890da6c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/no-interpret-preamble.bib
@@ -0,0 +1,10 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\sortname}[2]{#1 #2}
+\providecommand{\sortvonname}[3]{#1 #2 #3}
+\providecommand{\sortart}[2]{#1 #2}
+\providecommand{\sortmediacreator}[2]{#1 #2}"}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/people.bib b/Master/texmf-dist/doc/support/bib2gls/examples/people.bib
new file mode 100644
index 00000000000..86fb9b74275
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/people.bib
@@ -0,0 +1,192 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{caesar,
+ name={\sortname{Gaius Julius}{Caesar}},
+ first={\sortname{Julius}{Caesar}},
+ text={Caesar},
+ description={Roman politician and general},
+ born={13~July 100 BC},
+ died={15~March 44 BC},
+ identifier={person}
+}
+
+@entry{wellesley,
+ name={\sortname{Arthur}{Wellesley}},
+ text={Wellington},
+ description={Anglo-Irish soldier and statesman},
+ born={1~May 1769 AD},
+ died={14~September 1852 AD},
+ othername={1st Duke of Wellington},
+ identifier={person}
+}
+
+@index{wellington,
+ name={Wellington},
+ alias={wellesley},
+ identifier={person}
+}
+
+@entry{bonaparte,
+ name={\sortname{Napoleon}{Bonaparte}},
+ text={Bonaparte},
+ description={French military and political leader},
+ born={15~July 1769 AD},
+ died={5~May 1821 AD},
+ identifier={person}
+}
+
+@entry{alexander,
+ name={Alexander III of Macedon},
+ text={Alexander},
+ description={Ancient Greek king of Macedon},
+ born={20~July 356 BC},
+ died={10~June 323 BC},
+ othername={Alexander the Great},
+ identifier={person}
+}
+
+@index{alexanderthegreat,
+ name={Alexander the Great},
+ alias={alexander},
+ identifier={person}
+}
+
+@entry{vonrichthofen,
+ name={\sortvonname{Manfred}{von}{Richthofen}},
+ text={von Richthofen},
+ description={Prussian ace fighter pilot in the German Air Force
+ during World War~I},
+ born={2~May 1892 AD},
+ died={21~April 1918 AD},
+ othername={The Red Baron},
+ identifier={person}
+}
+
+@index{redbaron,
+ name={\sortart{The}{Red Baron}},
+ alias={vonrichthofen},
+ identifier={person}
+}
+
+@entry{dickens,
+ name={\sortname{Charles}{Dickens}},
+ text={Dickens},
+ description={English writer and social critic},
+ born={7~February 1812 AD},
+ died={9~June 1870 AD},
+ identifier={person}
+}
+
+@entry{chandler,
+ name={\sortname{Raymond}{Chandler}},
+ text={Chandler},
+ description={American-British novelist and screenwriter},
+ born={23~July 1888 AD},
+ died={26~March 1959 AD},
+ identifier={person}
+}
+
+@entry{hammett,
+ name={\sortname{Samuel Dashiell}{Hammett}},
+ first={\sortname{Dashiell}{Hammett}},
+ text={Hammett},
+ description={American author, screenwriter and political
+ activist},
+ born={27~May 1894 AD},
+ died={10~January 1961 AD},
+ identifier={person}
+}
+
+@entry{christie,
+ name={\sortname{Dame Agatha Mary Clarissa}{Christie}},
+ first={\sortname{Agatha}{Christie}},
+ text={Christie},
+ othername={Lady Mallowan},
+ description={English crime novelist and playwright},
+ born={15~September 1890 AD},
+ died={12~January 1976 AD},
+ identifier={person}
+}
+
+@entry{landon,
+ name={\sortname{Christopher Guy}{Landon}},
+ first={\sortname{Christopher}{Landon}},
+ text={Landon},
+ description={British novelist and screenwriter},
+ born={29~March 1911 AD},
+ died={26~April 1961 AD},
+ identifier={person}
+}
+
+@entry{tolkien,
+ name={\sortname{John Ronald Reuel}{Tolkien}},
+ first={\sortname{J.R.R.}{Tolkien}},
+ text={Tolkien},
+ description={English writer, poet, philologist, and
+ university professor},
+ born={3~January 1892 AD},
+ died={2~September 1973 AD},
+ identifier={person}
+}
+
+@entry{baum,
+ name={\sortname{Lyman Frank}{Baum}},
+ first={\sortname{L.~Frank}{Baum}},
+ text={Baum},
+ description={American author},
+ born={15~May 1856 AD},
+ died={6~May 1919 AD},
+ identifier={person}
+}
+
+@entry{mackenzie,
+ name={\sortname{Compton}{Mackenzie}},
+ text={Mackenzie},
+ description={English-born Scottish writer, cultural
+ commentator, raconteur and Scottish nationalist},
+ born={17~January 1883 AD},
+ died={30~November 1972 AD},
+ identifier={person}
+}
+
+@entry{maclean,
+ name={\sortname{Alistair}{MacLean}},
+ text={MacLean},
+ description={Scottish novelist},
+ born={21~April 1922 AD},
+ died={2~February 1987 AD},
+ identifier={person}
+}
+
+@entry{dick,
+ name={\sortname{Philip K.}{Dick}},
+ text={Dick},
+ description={American science fiction writer},
+ born={16~December 1928 AD},
+ died={2~March 1982 AD},
+ identifier={person}
+}
+
+@entry{story,
+ name={\sortname{Jack Trevor}{Story}},
+ text={Story},
+ description={British novelist},
+ born={30~March 1917 AD},
+ died={5~December 1991 AD},
+ identifier={person}
+}
+
+@entry{greene,
+ name={\sortname{Henry Graham}{Green}},
+ first={\sortname{Graham}{Greene}},
+ text={Green},
+ description={English novelist},
+ born={2~October 1904 AD},
+ died={3~April 1991 AD},
+ identifier={person}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.pdf
new file mode 100644
index 00000000000..fb1756e4143
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.tex
new file mode 100644
index 00000000000..ee53973f032
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-authors.tex
@@ -0,0 +1,50 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[12pt,a4paper]{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,% using bib2gls
+nostyles,% don't load default styles
+stylemods={bookindex},% load glossary-bookindex and patch styles
+style=bookindex]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src=no-interpret-preamble,
+ interpret-preamble=false
+]
+
+\GlsXtrLoadResources[
+ src={interpret-preamble2,people,books},
+ write-preamble=false,
+ interpret-label-fields,
+ field-aliases={identifier=category,author=parent},
+ check-end-punctuation={name},
+ replicate-fields={name={first}}
+]
+
+\newcommand*{\bookfont}[1]{\emph{#1}}
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+
+% requires glossaries-extra v1.23
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+}
+
+\begin{document}
+\section{Sample}
+
+\gls{ataleoftwocities}. \gls{bleakhouse}. \gls{thebigsleep}.
+\gls{thelonggoodbye}. \gls{redharvest}.
+\gls{murderontheorientexpress}. \gls{whydidnttheyaskevans}.
+\gls{icecoldinalex}. \gls{thehobbit}. \gls{thelordoftherings}.
+\gls{thewonderfulwizardofoz}. \gls{whiskygalore}.
+\gls{whereeaglesdare}. \gls{icestationzebra}. \gls{ubik}.
+\gls{doandroidsdreamofelectricsheep}. \gls{thetroublewithharry}.
+\gls{brightonrock}.
+
+\printunsrtglossary[title={Author and Book List}]
+
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.pdf
new file mode 100644
index 00000000000..b18ceaa7528
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.tex
new file mode 100644
index 00000000000..7acd01f4ec9
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-bacteria.tex
@@ -0,0 +1,51 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[12pt,a4paper]{article}
+
+\usepackage[T1]{fontenc}
+
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+% load glossary-bookindex.sty and patch styles:
+ stylemods={bookindex},
+ style=bookindex]{glossaries-extra}
+
+% abbreviation style must be set before \GlsXtrLoadResources
+\setabbreviationstyle[bacteria]{long-only-short-only}
+
+\GlsXtrLoadResources[
+ src=bacteria,% data in bacteria.bib
+ category=bacteria,
+ abbreviation-sort-fallback=long
+]
+
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glsifcategory{#1}{bacteria}
+ {\glossentrynameother{#1}{long}}%
+ {\glossentryname{#1}}%
+}
+
+\begin{document}
+\section{First Use}
+
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\section{Next Use}
+
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\printunsrtglossary[title={Bacteria Index}]
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.pdf
new file mode 100644
index 00000000000..c2b09d4cac5
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.tex
new file mode 100644
index 00000000000..95330491460
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-chemical.tex
@@ -0,0 +1,38 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{article}
+
+\usepackage[T1]{fontenc}
+\usepackage[version=4]{mhchem}
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+ stylemods={tree},% load glossary-tree and patch styles
+ style=alttreegroup]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={chemicalformula},% definitions in chemicalformula.bib
+ entry-type-aliases={chemical=symbol},
+ field-aliases={formula=name,chemicalname=description},
+ symbol-sort-fallback=name,% use name field as fallback for sort
+ sort=letternumber-case,% case-sensitive letter-number sort
+ set-widest,% needed for alttree styles
+ save-locations=false% don't create location lists
+]
+
+\renewcommand*{\glstreenamefmt}[1]{#1}
+\renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}
+
+\begin{document}
+\section{Sample}
+
+Reference Entries: \gls{Al2SO43}, \gls{H2O}, \gls{C6H12O6},
+\gls{CH3CH2OH}, \gls{CH2O}, \gls{OF2}, \gls{O2F2}, \gls{SO42-},
+\gls{H3O+}, \gls{OH-}, \gls{O2}, \gls{AlF3}, \gls{O},
+\gls{Al2CoO4}, \gls{As4S4}, \gls{C10H10O4}, \gls{C5H4NCOOH},
+\gls{C8H10N4O2}, \gls{SO2}, \gls{S2O72-}, \gls{SbBr3},
+\gls{Sc2O3}, \gls{Zr3PO44}, \gls{ZnF2}.
+
+\printunsrtglossary
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.pdf
new file mode 100644
index 00000000000..9f33a84c0f7
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.tex
new file mode 100644
index 00000000000..7758b419d35
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-constants.tex
@@ -0,0 +1,57 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[12pt,a4paper]{article}
+
+\usepackage[T1]{fontenc}
+\usepackage{upgreek}
+
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+ postdot,% add dot after descriptions
+% load glossary-tree.sty and patch styles:
+ stylemods={tree},
+ style=alttree]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={constants},% data in constants.bib
+ % make @constant behave like @number
+ entry-type-aliases={constant=number},
+ field-aliases={
+ identifier=category,
+ constantsymbol=name,
+ constantname=description,
+ value=user1,
+ definition=user2,
+ alternative=user3
+ },
+ type=main,
+ set-widest,
+ sort-field=user1,
+ missing-sort-fallback=name,
+ sort=double,
+ selection=all
+]
+
+\newcommand{\glsxtrpostdescconstant}{%
+ \glsxtrifhasfield{useriii}{\glscurrententrylabel}%
+ { (also denoted \glscurrentfieldvalue
+ \glsxtrifhasfield{useri}{\glscurrententrylabel}%
+ {, approximately \glscurrentfieldvalue}%
+ {}%
+ )%
+ }%
+ {%
+ \glsxtrifhasfield{useri}{\glscurrententrylabel}%
+ { (approximately \glscurrentfieldvalue)}%
+ {}%
+ }%
+ \glsxtrifhasfield{userii}{\glscurrententrylabel}%
+ {: \glscurrentfieldvalue}%
+ {}%
+}
+
+\begin{document}
+\printunsrtglossary[title={Constants}]
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.pdf
new file mode 100644
index 00000000000..56209bb316e
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.tex
new file mode 100644
index 00000000000..d394c1b0212
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-languages.tex
@@ -0,0 +1,54 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[fontsize=12pt]{scrartcl}
+
+\usepackage[T1]{fontenc}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+% load glossary-tree.sty and patch styles:
+ stylemods={tree},
+ style=treegroup]{glossaries-extra}
+
+% abbreviation style must be set before \GlsXtrLoadResources
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+
+\GlsXtrEnableInitialTagging{markuplanguage}{\abbrvtag}
+
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+
+\GlsXtrLoadResources[
+ src=markuplanguages,% data in markuplanguages.bib
+ loc-suffix,
+ category=markuplanguage
+]
+
+\newcommand{\glsxtrpostdescmarkuplanguage}{%
+ \glsxtrifhasfield{location}{\glscurrententrylabel}%
+ {,}%
+ {.}%
+}
+
+\glssetcategoryattribute{markuplanguage}{glossname}{firstuc}
+
+\renewcommand*{\glsxtrtagfont}[1]{\underline{\MakeTextUppercase{#1}}}
+
+\begin{document}
+
+\section{First Use}
+
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\section{Next Use}
+
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\GlsXtrSetDefaultNumberFormat{glsignore}
+\printunsrtglossary
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.pdf
new file mode 100644
index 00000000000..db4869d08ad
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.tex
new file mode 100644
index 00000000000..677c3bea122
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-maths.tex
@@ -0,0 +1,97 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{article}
+
+\usepackage[T1]{fontenc}
+\usepackage{amssymb}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,% using bib2gls
+ nostyles,% don't load default styles
+ postdot,% append a dot after descriptions
+ stylemods={mcols},% load glossary-mcols.sty and patch
+ style=mcolalttree]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={no-interpret-preamble},
+ interpret-preamble=false
+]
+
+\GlsXtrLoadResources[
+ src={interpret-preamble,bigmathsymbols,mathsobjects},
+ sort-field={category},
+ identical-sort-action={description},
+ field-aliases={identifier=category,format=user1},
+ replicate-fields={category=group},
+ set-widest,
+ save-locations=false
+]
+
+\renewcommand{\GlsXtrFmtDefaultOptions}{}
+
+% requires glossaries-extra.sty v1.23+
+\newcommand{\set}[2][]{\glsxtrfmt*[#1]{set}{#2}}
+\newcommand{\nlset}[1]{\glsxtrentryfmt{set}{#1}}
+\newcommand*{\setcontents}[2][]{\glsxtrfmt*[#1]{setcontents}{#2}}
+\newcommand*{\setmembership}[2]{\glsxtrfmt*{setmembership}{{#1}{#2}}}
+\newcommand*{\setcard}[2][]{\glsxtrfmt*[#1]{setcard}{#2}}
+\newcommand*{\nlsetcard}[1]{\glsxtrentryfmt{setcard}{#1}}
+\newcommand*{\transpose}[2][]{\glsxtrfmt*[#1]{transpose}{#2}}
+\newcommand*{\nltranspose}[1]{\glsxtrentryfmt{transpose}{#1}}
+\newcommand*{\inv}[2][]{\glsxtrfmt*[#1]{inverse}{#2}}
+\newcommand*{\nlinv}[1]{\glsxtrentryfmt{inverse}{#1}}
+\newcommand*{\Vtr}[2][]{\glsxtrfmt[#1]{vector}{#2}}
+\newcommand*{\nlVtr}[1]{\glsxtrentryfmt{vector}{#1}}
+\newcommand*{\Mtx}[2][]{\glsxtrfmt[#1]{matrix}{#2}}
+\newcommand*{\nlMtx}[1]{\glsxtrentryfmt{matrix}{#1}}
+
+\begin{document}
+\section{Sets}
+The universal set ($\gls{universalset}$) contains everything.
+The empty set ($\gls{emptyset}$) contains nothing.
+Some assignments:
+\[
+ \set{B}[_1] = \setcontents{1, 3, 5, 7},\quad
+ \set{B}[_2] = \setcontents{2, 4, 6, 8},\quad
+ \set{B}[_3] = \setcontents{9, 10}
+\]
+Define:
+\[\set{A} = \gls{bigcup}[_{i=1}^3] \set{B}[_i]
+= \setcontents{1, \ldots, 10} \]
+The cardinality of a set \gls{set} is denoted \gls{setcard}
+and is the number of elements in the set.
+\[
+ \setcard{\nlset{B}_1} = 4,\quad
+ \setcard{\nlset{B}_2} = 4,\quad
+ \setcard{\nlset{B}_3} = 2,\quad
+ \setcard{\nlset{B}_1\cup\nlset{B}_2} = 8,\quad
+ \nlsetcard{\gls{emptyset}} = 0
+\]
+
+\section{Spaces}
+A number space (denoted $\gls{numberspace}$) is characterised
+by a set of entities with a set of axioms. For example:
+\begin{align*}
+\gls{naturalnumbers}
+ &= \setmembership{x}{x\text{ is positive integer}}\\
+\gls{integernumbers}
+ &= \setmembership{x}{x\text{ is an integer}}\\
+\gls{realnumbers}
+ &= \setmembership{x}{x\text{ is a real number}}
+\end{align*}
+
+\section{Vectors and Matrices}
+
+A matrix (denoted \gls{matrix}) is a rectangular array of values.
+A vector (denoted \gls{vector}) is a column or row of values (that
+is a one-dimensional matrix).
+\[
+ \gls{identitymatrix}\Vtr{x} = \Vtr{x},\quad
+ \Mtx{A}\inv{\nlMtx{A}} = \gls{identitymatrix},\quad
+ \inv{\nlVtr{x}}\gls{1vec} = \gls{sum}[_i] x_i
+\]
+
+\printunsrtglossaries
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.pdf
new file mode 100644
index 00000000000..4d399fc309f
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.tex
new file mode 100644
index 00000000000..b04b93241bb
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-media.tex
@@ -0,0 +1,66 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[11pt,a4paper]{report}
+
+\usepackage[T1]{fontenc}
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,% using bib2gls
+ nostyles,% don't load default styles
+ postdot,% append a dot after descriptions
+ stylemods={list},% load glossary-list.sty and fix styles
+ style=altlistgroup]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src=no-interpret-preamble,
+ interpret-preamble=false
+]
+
+\GlsXtrLoadResources[
+ src={interpret-preamble,books,films},
+ field-aliases={identifier=category,year=user1,cast=user2},
+ bibtex-contributor-fields={user2},
+ contributor-order={forenames},
+ identical-sort-action={category},
+ save-locations=false,
+ selection=all
+]
+
+% requires datatool-base.sty v2.28+:
+\renewcommand*{\DTLlistformatoxford}{,}
+\renewcommand*{\DTLandname}{and}
+
+\newcommand*{\bookfont}[1]{\emph{#1}}
+\newcommand*{\filmfont}[1]{\textsf{\em #1}}
+
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+
+\glssetcategoryattribute{film}{textformat}{filmfont}
+\glssetcategoryattribute{film}{glossnamefont}{filmfont}
+
+\newcommand*{\glsxtrpostnamebook}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ {\space(published \glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostnamefilm}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ {\space (released \glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostdescfilm}{%
+ \ifglshasfield{user2}{\glscurrententrylabel}%
+ {%
+ \glsxtrrestorepostpunc % requires glossaries-extra v1.23+
+ \ featuring \glscurrentfieldvalue
+ }%
+ {}%
+}
+
+\begin{document}
+\printunsrtglossaries
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.pdf
new file mode 100644
index 00000000000..24a6881c3f9
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.tex
new file mode 100644
index 00000000000..f2b9e0df546
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-msymbols.tex
@@ -0,0 +1,30 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{article}
+
+\usepackage[T1]{fontenc}
+\usepackage{stix}
+
+\usepackage[record,% using bib2gls
+ nostyles,% don't load default styles
+ postdot,% append a dot after descriptions
+ stylemods={mcols},% load glossary-mcols.sty and patch
+ style=mcolalttree]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={bigmathsymbols,mathgreek,
+ mathsrelations,binaryoperators,unaryoperators},
+ sort-field={category},
+ identical-sort-action={description},
+ field-aliases={identifier=category},
+ replicate-fields={category=group},
+ set-widest,
+ save-locations=false,
+ selection=all
+]
+
+\begin{document}
+\printunsrtglossaries
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.pdf
new file mode 100644
index 00000000000..3ac7c10e494
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.tex
new file mode 100644
index 00000000000..d2611ebdece
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi1.tex
@@ -0,0 +1,177 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass{scrreprt}
+
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[version=4]{mhchem}
+\usepackage{siunitx}
+\usepackage[colorlinks]{hyperref}
+
+\usepackage[record,% use bib2gls
+ section,% use \section* for glossary headings
+ postdot,% insert dot after descriptions in glossaries
+ nomain,% don't create 'main' glossary
+ index,% create 'index' glossary
+ nostyles,% don't load default styles
+% load and patch required style packages:
+ stylemods={list,mcols,tree,bookindex}
+]{glossaries-extra}
+
+\newglossary*{bacteria}{Bacteria}
+\newglossary*{markuplanguage}{Markup Languages}
+\newglossary*{vegetable}{Vegetables}
+\newglossary*{mineral}{Minerals}
+\newglossary*{animal}{Animals}
+\newglossary*{chemical}{Chemical Formula}
+\newglossary*{baseunit}{SI Units}
+\newglossary*{derivedunit}{Derived Units}
+
+% abbreviation styles must be set before \GlsXtrLoadResources:
+\setabbreviationstyle[bacteria]{long-only-short-only}
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+
+% style-dependent name format must be set
+% before \GlsXtrLoadResources:
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+
+\GlsXtrLoadResources[
+ src={bacteria,markuplanguages,vegetables,minerals,
+ animals,chemicalformula,baseunits,derivedunits},
+ selection={recorded and deps and see},
+ set-widest,
+ type=index,
+ label-prefix={idx.},
+ dual-prefix={},
+ cs-label-prefix={},
+ combine-dual-locations={primary},
+ dual-field,
+ sort={en},
+ sort-field={name},
+ dual-type={same as category},
+ dual-sort={en},
+ dual-sort-number-pad={2},
+ dual-sort-pad-plus={1},
+ dual-sort-pad-minus={0},
+ dual-break-at=upper-upper-word,
+ entry-type-aliases={
+ abbreviation=dualindexabbreviation,
+ entry=dualindexentry,
+ symbol=dualindexsymbol,
+ unit=dualindexsymbol,
+ measurement=dualindexsymbol,
+ chemical=dualindexsymbol
+ },
+ abbreviation-name-fallback={long},
+ symbol-sort-fallback={name},
+ field-aliases={
+ identifier=category,
+ formula=symbol,
+ chemicalname=name,
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+]
+
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossdescfont}{bacteriafont}
+
+\glssetcategoryattribute{markuplanguage}{glossdesc}{firstuc}
+
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrynameother{#1}{symbol})}%
+ }%
+ {%
+ \glsifcategory{#1}{markuplanguage}%
+ {%
+ \glsxtrifhasfield{short}{\glsxtrusefield{#1}{dual}}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+ }%
+}
+
+\begin{document}
+\chapter{Sample}
+\section{Bacteria}
+\subsection{First Use}
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\subsection{Next Use}
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\section{Markup Languages}
+\subsection{First Use}
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\subsection{Next Use}
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\section{Vegetables}
+\gls{cabbage}, \gls{brussels-sprout}, \gls{artichoke},
+\gls{cauliflower}, \gls{courgette}, \gls{spinach}.
+
+\section{Minerals}
+\Gls{beryl}, \gls{amethyst}, \gls{chalcedony}, \gls{aquamarine},
+\gls{aragonite}, \gls{calcite}, \gls{bilinite},
+\gls{cyanotrichite}, \gls{biotite}, \gls{dolomite},
+\gls{quetzalcoatlite}, \gls{vulcanite}.
+
+\section{Animals}
+\Gls{duck}, \gls{parrot}, \gls{hedgehog}, \gls{sealion}.
+
+\section{Chemicals}
+\gls{Al2SO43}, \gls{H2O}, \gls{C6H12O6},
+\gls{CH3CH2OH}, \gls{CH2O}, \gls{OF2}, \gls{O2F2}, \gls{SO42-},
+\gls{H3O+}, \gls{OH-}, \gls{O2}, \gls{AlF3}, \gls{O},
+\gls{Al2CoO4}, \gls{As4S4}, \gls{C10H10O4}, \gls{C5H4NCOOH},
+\gls{C8H10N4O2}, \gls{SO2}, \gls{S2O72-}, \gls{SbBr3},
+\gls{Sc2O3}, \gls{Zr3PO44}, \gls{ZnF2}.
+
+\section{SI Units}
+Base: \gls{ampere}, \gls{kilogram}, \gls{metre}, \gls{second},
+\gls{kelvin}, \gls{mole}, \gls{candela}.
+Derived: \gls{area}, \gls{volume}, \gls{velocity},
+\gls{acceleration}, \gls{density}, \gls{luminance},
+\gls{specificvolume}, \gls{concentration}, \gls{wavenumber}.
+
+\chapter*{Glossaries}
+\printunsrtglossary[type=bacteria,style=mcoltree]
+\printunsrtglossary[type=markuplanguage,style=altlist]
+\printunsrtglossary[type=vegetable,style=tree,nogroupskip]
+\printunsrtglossary[type=mineral,style=treegroup]
+\printunsrtglossary[type=animal,style=tree]
+\printunsrtglossary*[type=chemical,style=mcolalttreegroup]
+{%
+ \renewcommand\glsxtralttreeSymbolDescLocation[2]{%
+ \glossentrysymbol{#1}\glspostdescription\glsxtrAltTreePar
+ }%
+ \renewcommand*{\glstreenamefmt}[1]{#1}%
+ \renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}%
+}
+\printunsrtglossary[type=baseunit,style=alttree]
+\printunsrtglossary[type=derivedunit,style=alttree]
+
+\setupglossaries{section=chapter}
+\printunsrtglossary[type=index,style=bookindex]
+\end{document}}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.pdf
new file mode 100644
index 00000000000..e53f34efeb1
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.tex
new file mode 100644
index 00000000000..2919981b566
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-multi2.tex
@@ -0,0 +1,462 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass{scrreprt}
+
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[version=4]{mhchem}
+\usepackage{siunitx}
+\usepackage{etoolbox}
+\usepackage{marvosym}
+% package conflict, need to undefine conflicting commands
+\undef\Sun
+\undef\Lightning
+\usepackage[weather]{ifsym}
+
+\usepackage[en-GB]{datetime2}
+\usepackage[colorlinks]{hyperref}
+
+\usepackage[record,% use bib2gls
+ section,% use \section* for glossary headings
+ postdot,% insert dot after descriptions in glossaries
+ nomain,% don't create 'main' glossary
+ index,% create 'index' glossary
+ nostyles,% don't load default styles
+% load and patch required style packages:
+ stylemods={list,mcols,tree,bookindex}
+]{glossaries-extra}
+
+\newglossary*{bacteria}{Bacteria}
+\newglossary*{markuplanguage}{Markup Languages}
+\newglossary*{vegetable}{Vegetables}
+\newglossary*{mineral}{Minerals}
+\newglossary*{animal}{Animals}
+\newglossary*{chemical}{Chemical Formula}
+\newglossary*{baseunit}{SI Units}
+\newglossary*{measurement}{Measurements}
+\newglossary*{film}{Films}
+\newglossary*{book}{Books}
+\newglossary*{person}{People}
+\newglossary*{mediacontrol}{Media Control Symbols}
+\newglossary*{information}{Information Symbols}
+\newglossary*{weather}{Weather Symbols}
+
+\newcommand*{\bibglsdate}[7]{\DTMdisplaydate{#1}{#2}{#3}{#4}}
+
+\GlsXtrLoadResources[
+ src={no-interpret-preamble},
+ interpret-preamble=false
+]
+
+\GlsXtrLoadResources[
+ src={interpret-preamble,people},
+ field-aliases={
+ identifier=category,
+ born=user1,
+ died=user2,
+ othername=user3
+ },
+ replicate-fields={name={first}},
+ type=person,
+ save-locations=false,
+ date-fields={user1,user2},
+ date-field-format={d MMM y G}
+]
+
+% Abbreviation styles must be set before the resource set
+% that defines the abbreviations:
+\setabbreviationstyle[bacteria]{long-only-short-only}
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+
+% And also the style-dependent name format:
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+
+\GlsXtrLoadResources[
+ src={bacteria,markuplanguages,vegetables,
+ minerals,animals,books,films},
+ field-aliases={
+ identifier=category,
+ year=user1,
+ cast=user2
+ },
+ type={same as category},
+ bibtex-contributor-fields={user2},
+ contributor-order={forenames},
+ save-locations=false
+]
+
+\GlsXtrLoadResources[
+ src={chemicalformula},
+ entry-type-aliases={chemical=symbol},
+ field-aliases={
+ identifier=category,
+ formula=name,
+ chemicalname=description,
+ },
+ type={chemical},
+ set-widest,
+ sort={letternumber-case},
+ symbol-sort-fallback={name},
+ save-locations=false
+]
+
+\GlsXtrLoadResources[
+ src={baseunits,derivedunits},
+ entry-type-aliases={measurement=symbol,unit=symbol},
+ field-aliases={
+ unitname=description,
+ unitsymbol=symbol,
+ measurement=name
+ },
+ category={measurement},
+ type={measurement},
+ set-widest,
+ symbol-sort-fallback={name},
+ save-locations=false
+]
+
+\GlsXtrLoadResources[
+ src={baseunits},
+ entry-type-aliases={unit=symbol},
+ field-aliases={
+ unitname=description,
+ unitsymbol=name
+ },
+ category={measurement},
+ type={baseunit},
+ duplicate-label-suffix={.copy},
+ symbol-sort-fallback={name},
+ save-locations=false
+]
+
+\GlsXtrLoadResources[
+ src={miscsymbols},
+ field-aliases={
+ identifier=category,
+ icon=name,
+ icondescription=description
+ },
+ entry-type-aliases={icon=symbol},
+ type={same as category},
+ sort-field={description},
+ save-locations=false,
+ set-widest
+]
+
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glslongfont{\the\glslongtok}\space
+ \glsxtrparen{\glsabbrvfont{\the\glsshorttok}}%
+}
+
+% requires glossaries-extra v1.25:
+\renewcommand*{\glsxtronlyname}{%
+ \protect\glsabbrvonlyfont{\the\glslongtok}%
+}
+
+\GlsXtrLoadResources[
+ src={miscsymbols},
+ selection={recorded no deps},
+ duplicate-label-suffix={.copy},
+ entry-type-aliases={icon=index},
+ field-aliases={
+ identifier=category,
+ icondescription=symbol,
+ icon=name
+ },
+ type=index,
+ sort-field={symbol},
+ group={glssymbols}
+]
+
+\GlsXtrLoadResources[
+ src={terms,bacteria,markuplanguages,vegetables,minerals,
+ animals,chemicalformula,baseunits,derivedunits,people,
+ films,books,miscsymbols},
+ selection={recorded and deps and see},
+ field-aliases={
+ identifier=category,
+ formula=symbol,
+ chemicalname=name,
+ unitname=description,
+ unitsymbol=symbol,
+ measurement=name,
+ icon=symbol,
+ icondescription=name
+ },
+ entry-type-aliases={
+ chemical=index,
+ measurement=entry,
+ unit=dualentry,
+ icon=index
+ },
+ label-prefix={idx.},
+ record-label-prefix={idx.},
+ type=index,
+ dual-type=index,
+ combine-dual-locations=both,
+ abbreviation-sort-fallback={long},
+ replicate-override,
+ replicate-fields={first=name},
+ identical-sort-action={category}
+]
+
+\newcommand*{\swaptwo}[2]{#2, #1}
+\newcommand*{\swapthree}[3]{#2 #3, #1}
+
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossdescfont}{bacteriafont}
+
+\newcommand{\bookfont}[1]{\emph{#1}}
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+
+\newcommand{\filmfont}[1]{\emph{#1}}
+\glssetcategoryattribute{film}{textformat}{filmfont}
+\glssetcategoryattribute{film}{glossnamefont}{filmfont}
+\glssetcategoryattribute{film}{glossdesc}{firstuc}
+
+\glssetcategoryattribute{markuplanguage}{glossdesc}{firstuc}
+
+\newcommand*{\glsxtrpostlinkmediacontrol}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newcommand*{\glsxtrpostlinkinformation}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newcommand*{\glsxtrpostlinkweather}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newcommand*{\glsxtrpostlinkperson}{%
+ \glsxtrifwasfirstuse
+ {%
+ \ifglshasfield{user3}{\glslabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+}
+
+\newcommand*{\glsxtrpostnameperson}{%
+ \ifglshasfield{user3}{\glscurrententrylabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostdescperson}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}
+ {% born
+ \space(\glscurrentfieldvalue\,--\,%
+ \ifglshasfield{user2}{\glscurrententrylabel}
+ {% died
+ \glscurrentfieldvalue
+ }%
+ {}%
+ )%
+ }%
+ {}%
+}
+
+\newcommand*{\glsxtrpostdescfilm}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ {%
+ \glsxtrrestorepostpunc % requires glossaries-extra v1.23+
+ \ (released \glscurrentfieldvalue)}%
+ {}%
+ \ifglshasfield{user2}{\glscurrententrylabel}%
+ {%
+ \glsxtrrestorepostpunc
+ \ featuring \glscurrentfieldvalue
+ }%
+ {}%
+}
+
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrynameother{#1}{symbol})}%
+ }%
+ {%
+ \glsifcategory{#1}{film}%
+ {\ (film)}%
+ {}%
+ }%
+}
+
+% requires glossaries-extra v1.25+:
+\renewcommand*{\glsextrapostnamehook}[1]{%
+ \glsadd[format=hyperbf]{#1}%
+}
+
+\newcommand{\unit}{\glssymbol}
+\newcommand{\measurement}{\gls}
+\glsxtrnewgls{film.}{\film}
+\glsxtrnewglslike{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
+
+\begin{document}
+\chapter{Sample}
+\section{Bacteria}
+This section is about \idxpl{bacteria}.
+\subsection{First Use}
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\subsection{Next Use}
+\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens},
+\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti},
+\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis},
+\gls{rrickettsii}.
+
+\section{Markup Languages}
+This section is about \idxpl{markuplanguage}.
+\subsection{First Use}
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\subsection{Next Use}
+\gls{LaTeX}, \gls{markdown}, \gls{xhtml}, \gls{mathml}, \gls{svg}.
+
+\section{Vegetables}
+This section is about \idxpl{vegetable}.
+\gls{cabbage}, \gls{brussels-sprout}, \gls{artichoke},
+\gls{cauliflower}, \gls{courgette}, \gls{spinach}.
+
+\section{Minerals}
+This section is about \idxpl{mineral}.
+\Gls{beryl}, \gls{amethyst}, \gls{chalcedony}, \gls{aquamarine},
+\gls{aragonite}, \gls{calcite}, \gls{bilinite},
+\gls{cyanotrichite}, \gls{biotite}, \gls{dolomite},
+\gls{quetzalcoatlite}, \gls{vulcanite}.
+
+\section{Animals}
+This section is about \idxpl{animal}.
+\Gls{duck}, \gls{parrot}, \gls{hedgehog}, \gls{sealion},
+\gls{zander}, \gls{aardvark}, \gls{zebra}, \gls{swan},
+\gls{armadillo}.
+
+\section{Chemicals}
+This section is about \idxpl{chemical}.
+\gls{Al2SO43} (\glsdesc{Al2SO43}), \gls{H2O} (\glsdesc{H2O}),
+\gls{C6H12O6} (\glsdesc{C6H12O6}), \gls{CH3CH2OH}
+(\glsdesc{CH3CH2OH}), \gls{CH2O} (\glsdesc{CH2O}), \gls{OF2}
+(\glsdesc{OF2}), \gls{O2F2} (\glsdesc{O2F2}), \gls{SO42-}
+(\glsdesc{SO42-}), \gls{H3O+} (\glsdesc{H3O+}), \gls{OH-}
+(\glsdesc{OH-}), \gls{O2} (\glsdesc{O2}), \gls{AlF3}
+(\glsdesc{AlF3}), \gls{O} (\glsdesc{O}), \gls{Al2CoO4}
+(\glsdesc{Al2CoO4}), \gls{As4S4} (\glsdesc{As4S4}),
+\gls{C10H10O4} (\glsdesc{C10H10O4}), \gls{C5H4NCOOH}
+(\glsdesc{C5H4NCOOH}), \gls{C8H10N4O2} (\gls{C8H10N4O2}),
+\gls{SO2} (\glsdesc{SO2}), \gls{S2O72-} (\gls{S2O72-}),
+\gls{SbBr3} (\glsdesc{SbBr3}), \gls{Sc2O3} (\glsdesc{Sc2O3}),
+\gls{Zr3PO44} (\glsdesc{Zr3PO44}), \gls{ZnF2} (\glsdesc{ZnF2}).
+
+\section{SI Units}
+\Idxpl{baseunit}: \unit{ampere} (measures \measurement{ampere}),
+\unit{kilogram} (measures \measurement{kilogram}), \unit{metre},
+\unit{second}, \unit{kelvin}, \unit{mole}, \unit{candela}.
+
+\Idxpl{derivedunit}: \unit{area}, \unit{volume},
+\unit{velocity},
+\unit{acceleration}, \unit{density}, \unit{luminance},
+\unit{specificvolume}, \unit{concentration}, \unit{wavenumber}.
+
+\section{Books and Films}
+\Idxpl{book}: \gls{ataleoftwocities} (by \gls{dickens}),
+\gls{thebigsleep} (by \gls{chandler}, \idx{film} adaptation:
+\film{thebigsleep}), \gls{icecoldinalex} (by
+\gls{landon}, \idx{film} adaptation: \film{icecoldinalex}),
+\gls{whydidnttheyaskevans} (by \gls{christie},
+\idx{film} adaptation: \film{whydidnttheyaskevans}),
+\gls{doandroidsdreamofelectricsheep} (by \gls{dick},
+inspired the \idx{film} \film{bladerunner}).
+
+\Idxpl{film}: \film{anunexpectedjourney}, \film{desolationofsmaug}
+and \film{thebattleoffivearmies} (adapted from the
+\idx{book} \gls{thehobbit} by \gls{tolkien}),
+\film{thefellowshipofthering}, \film{thetwotowers}
+and \film{thereturnoftheking} (adapted from the
+\idx{book} \gls{thelordoftherings} also by \gls{tolkien}).
+
+\section{Miscellaneous Symbols}
+
+\subsection{First Use}
+
+\Idxpl{mediacontrol}: \gls{forward}, \gls{forwardtoindex},
+\gls{rewindtoindex}, \gls{rewind}.
+
+\Idx{information}: \gls{bicycle}, \gls{coffeecup}, \gls{info},
+\gls{gentsroom}, \gls{ladiesroom}, \gls{wheelchair}, \gls{football},
+\gls{recycling}.
+
+\Idx{weather}: \gls{cloud}, \gls{fog}, \gls{hail}, \gls{sun},
+\gls{lightning}.
+
+\subsection{Next Use}
+
+\Idxpl{mediacontrol}: \gls{forward}, \gls{forwardtoindex},
+\gls{rewindtoindex}, \gls{rewind}.
+
+\Idx{information}: \gls{bicycle}, \gls{coffeecup}, \gls{info},
+\gls{gentsroom}, \gls{ladiesroom}, \gls{wheelchair}, \gls{football}.
+
+\Idx{weather}: \gls{cloud}, \gls{fog}, \gls{hail}, \gls{sun},
+\gls{lightning}.
+
+\section{Measurements}
+
+\Idxpl{measurement}:
+\measurement{ampere}, \measurement{area}, \measurement{metre}.
+
+\chapter{Glossaries}
+\printunsrtglossary[type=bacteria,style=mcoltree]
+\printunsrtglossary[type=markuplanguage,style=altlist]
+\printunsrtglossary[type=vegetable,style=tree,nogroupskip]
+\printunsrtglossary[type=mineral,style=treegroup]
+\printunsrtglossary[type=animal,style=tree]
+\printunsrtglossary[type=person,style=tree,nogroupskip]
+\printunsrtglossary[type=book,style=tree,nogroupskip]
+\printunsrtglossary[type=film,style=tree,nogroupskip]
+\printunsrtglossary*[type=chemical,style=mcolalttreegroup]
+{%
+ \renewcommand*{\glstreenamefmt}[1]{#1}%
+ \renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}%
+}
+\printunsrtglossary*[type=measurement,style=alttree,nogroupskip]
+{%
+ \renewcommand{\glsxtralttreeSymbolDescLocation}[2]{%
+ \glossentrydesc{#1}%
+ \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}%
+ \glspostdescription\glstreeprelocation
+ \glsxtrAltTreePar
+ }%
+}
+
+\printunsrtglossary*[type=baseunit,style=alttree,nogroupskip]
+{%
+ \glsFindWidestTopLevelName[baseunit]%
+}
+\printunsrtglossary[type=information,style=alttree,nogroupskip]
+\printunsrtglossary[type=mediacontrol,style=alttree,nogroupskip]
+\printunsrtglossary[type=weather,style=alttree,nogroupskip]
+
+\printunsrtglossary*[type=index,style=bookindex]
+{%
+ \setupglossaries{section=chapter}%
+ \let\sortname\swaptwo
+ \let\sortvonname\swapthree
+ \renewcommand*{\glsextrapostnamehook}[1]{}%
+}
+\end{document}}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.pdf
new file mode 100644
index 00000000000..873c5cb6041
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.tex
new file mode 100644
index 00000000000..d7c6c0b2a78
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-people.tex
@@ -0,0 +1,101 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[12pt,a4paper]{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,% using bib2gls
+ index,% create index glossary
+ postdot,% dot after descriptions
+% load glossary-list.sty and glossary-bookindex.sty and patch:
+ stylemods={list,bookindex},
+ style=altlistgroup]{glossaries-extra}
+
+\newglossary*{bybirth}{People (Ordered by Birth)}
+
+\newcommand{\bibglsdategroup}[7]{#1#4#7}
+\newcommand{\bibglsdategrouptitle}[7]{\number#1\ #4}
+
+\newcommand*{\swaptwo}[2]{#2, #1}
+\newcommand*{\swapthree}[3]{#2 #3, #1}
+
+\GlsXtrLoadResources[
+ src=no-interpret-preamble,
+ interpret-preamble=false
+]
+
+\GlsXtrLoadResources[
+ src={interpret-preamble,people},
+ match={entrytype=entry},
+ category={people},
+ replicate-fields={name={first}},
+ field-aliases={born=user1,died=user2,othername=user3},
+ secondary={date:user1:bybirth}
+]
+
+\GlsXtrLoadResources[
+ src={people},
+ type=index,
+ category=people,
+ action={define or copy},
+ copy-action-group-field={indexgroup},
+ selection={recorded and deps and see}
+]
+
+\newcommand*{\glsxtrpostlinkpeople}{%
+ \glsxtrifwasfirstuse
+ {%
+ \ifglshasfield{user3}{\glslabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+}
+
+\newcommand*{\glsxtrpostnamepeople}{%
+ \ifglshasfield{user3}{\glscurrententrylabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostdescpeople}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}
+ {% born
+ \space(\glscurrentfieldvalue\,--\,%
+ \ifglshasfield{user2}{\glscurrententrylabel}
+ {% died
+ \glscurrentfieldvalue
+ }%
+ {}%
+ )%
+ }%
+ {}%
+}
+
+\begin{document}
+\chapter{Sample}
+\section{First Use}
+
+\gls{caesar}, \gls{wellesley}, \gls{bonaparte},
+\gls{vonrichthofen} and \gls{alexander}.
+
+\section{Next Use}
+
+\gls{caesar}, \gls{wellesley}, \gls{bonaparte},
+\gls{vonrichthofen} and \gls{alexander}.
+
+\printunsrtglossary[title={People (Alphabetical)},nonumberlist]
+
+\printunsrtglossary[type=bybirth,target=false,nonumberlist]
+
+\printunsrtglossary*
+ [type=index,style=bookindex]
+ {%
+ \let\sortname\swaptwo
+ \let\sortart\swaptwo
+ \let\sortvonname\swapthree
+ \renewcommand{\glsxtrgroupfield}{indexgroup}%
+ \renewcommand*{\glolinkprefix}{idx:}%
+ }
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.pdf
new file mode 100644
index 00000000000..e880fd94f05
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.tex
new file mode 100644
index 00000000000..95b07ce51e8
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-textsymbols.tex
@@ -0,0 +1,48 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{article}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{etoolbox}
+\usepackage{marvosym}
+
+% package conflict, need to undefine conflicting commands
+\undef\Sun
+\undef\Lightning
+
+\usepackage[weather]{ifsym}
+
+\usepackage[record,% using bib2gls
+ nostyles,% don't load default styles
+ postdot,% append a dot after descriptions
+ stylemods={tree},% load glossary-mcols.sty and patch
+ style=alttreegroup]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={miscsymbols},
+% make @icon behave like @symbol:
+ entry-type-aliases={icon=symbol},
+ field-aliases={
+ identifier=category,
+ icon=name,
+ icondescription=description
+ },
+ replicate-fields={category=group},
+ sort-field={category},
+ sort-suffix={description},
+ sort-suffix-marker={|},
+ set-widest,
+ selection=all
+]
+
+\glsxtrsetgrouptitle{information}{Information}
+\glsxtrsetgrouptitle{mediacontrol}{Media Controls}
+\glsxtrsetgrouptitle{weather}{Weather Symbols}
+
+\begin{document}
+\printunsrtglossaries
+\end{document}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.pdf
new file mode 100644
index 00000000000..8c71c72d4ce
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.tex
new file mode 100644
index 00000000000..7e32d06a479
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units1.tex
@@ -0,0 +1,48 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{report}
+
+\usepackage{siunitx}
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+ stylemods={mcols},% load glossary-mcols.sty and patch
+ style=mcolindexgroup]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={baseunits},
+ % make @unit act like @symbol:
+ entry-type-aliases={unit=symbol},
+ field-aliases={
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+ symbol-sort-fallback=name,
+ selection={all},
+ group={baseunits}
+]
+
+\GlsXtrLoadResources[
+ src={derivedunits},
+ % make @measurement act like @symbol:
+ entry-type-aliases={measurement=symbol},
+ field-aliases={
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+ symbol-sort-fallback=name,
+ selection={all},
+ group={derivedunits}
+]
+
+\glsxtrsetgrouptitle{baseunits}{Base Units}
+\glsxtrsetgrouptitle{derivedunits}{Derived Units}
+
+\begin{document}
+
+\printunsrtglossaries
+
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.pdf
new file mode 100644
index 00000000000..2d8a6359cd0
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex
new file mode 100644
index 00000000000..d4bba821f1d
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex
@@ -0,0 +1,51 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[a4paper]{report}
+
+\usepackage{siunitx}
+\usepackage[record,% use bib2gls
+ nomain,% don't define 'main' glossary
+ section,% use \section* for glossary headings
+ nostyles,% don't load default styles
+ stylemods={mcols},% load glossary-mcols.sty and patch
+ style=mcolindex]{glossaries-extra}
+
+\newglossary*{baseunits}{Base Units}
+\newglossary*{derivedunits}{Derived Units}
+
+\GlsXtrLoadResources[
+ src={baseunits},
+ type=baseunits,
+ % make @unit act like @symbol:
+ entry-type-aliases={unit=symbol},
+ field-aliases={
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+ symbol-sort-fallback=name,
+ selection={all}
+]
+
+\GlsXtrLoadResources[
+ src={derivedunits},
+ type=derivedunits,
+ % make @measurement act like @symbol:
+ entry-type-aliases={measurement=symbol},
+ field-aliases={
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+ symbol-sort-fallback=name,
+ selection={all}
+]
+
+\begin{document}
+\chapter*{Glossaries}
+
+\printunsrtglossary[type=baseunits,nogroupskip]
+\printunsrtglossary[type=derivedunits,style=indexgroup]
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.pdf
new file mode 100644
index 00000000000..8e1cc3cfde3
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.tex
new file mode 100644
index 00000000000..997a1ff47ca
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units3.tex
@@ -0,0 +1,65 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass[12pt,a4paper]{report}
+
+\usepackage{siunitx}
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+% load glossary-tree.sty and glossary-longbooktabs.sty and patch:
+ stylemods={tree,longbooktabs},
+ style=alttree]{glossaries-extra}
+
+\newglossary*{units}{Units of Measurement (by SI unit)}
+
+\GlsXtrLoadResources[
+ % data in baseunits.bib and derivedunits.bib:
+ src={baseunits,derivedunits},
+ field-aliases={
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+ },
+ symbol-sort-fallback={name},
+ selection=all,% select all entries
+ % make @measurement and @unit act like @dualsymbol:
+ entry-type-aliases={
+ measurement=dualsymbol,
+ unit=dualsymbol,
+ },
+ set-widest,% needed for alttree style
+ dual-sort={letternumber-upperlower},
+ type=main,% put primary entries in 'main' glossary
+ dual-type={units}% put dual entries in 'units' glossary
+]
+
+\setlength{\glsdescwidth}{.4\hsize}
+
+% define custom glossary style
+\newglossarystyle{units}% style name
+{% base it on long3col-booktabs
+ \setglossarystyle{long3col-booktabs}%
+ \renewcommand*{\glossaryheader}{%
+ \toprule
+ \bfseries Name &
+ \bfseries Measurement &
+ \bfseries Symbol
+ \tabularnewline\midrule\endhead
+ \bottomrule\endfoot}%
+% main entries:
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription &
+ \glossentrysymbol{##1}\tabularnewline
+ }%
+}
+
+\begin{document}
+
+\printunsrtglossary[title={SI Units of Measurement},
+ style={units}]
+
+\printunsrtglossary[type=units]
+
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.pdf b/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.pdf
new file mode 100644
index 00000000000..7d81159db74
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.tex
new file mode 100644
index 00000000000..e4037bec510
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-usergroups.tex
@@ -0,0 +1,128 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+\documentclass{scrreprt}
+
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+
+\usepackage{polyglossia}
+\setmainlanguage[variant=uk]{english}
+\usepackage{tracklang}
+\usepackage{etoolbox}
+
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+ stylemods={bookindex},
+ style={bookindex}
+]{glossaries-extra}
+
+\glsaddstoragekey{language}{}{\glsentrylanguage}
+\glsaddstoragekey{translation}{}{\glsentrytranslation}
+
+\setabbreviationstyle[tug]{long-short-user}
+
+\GlsXtrLoadResources[
+ src={usergroups}, % data in usergroups.bib
+ check-end-punctuation={name,short},
+ category=tug
+]
+
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \ifglshasshort{\glslabel}%
+ {%
+ \glsxtrifwasfirstuse{}%
+ {%
+ \GlsXtrIfFieldUndef{shortendpunc}{\glslabel}{#2}{#1}%
+ }%
+ }%
+ {%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+ }%
+}
+
+\newcommand{\langlist}{}%
+
+\newcommand*{\addfirstlang}[1]{%
+ \TrackLocale{#1}%
+ \edef\thislanguage{%
+ \TrackedLanguageFromDialect\TrackLangLastTrackedDialect}%
+ \IfFileExists{gloss-\thislanguage.ldf}%
+ {%
+ \xifinlist{\thislanguage}{\langlist}{}%
+ {\listxadd{\langlist}{\thislanguage}}%
+ \xGlsXtrSetField{\thislabel}{useri}{text\thislanguage}%
+ \glsxtrendfor
+ }%
+ {}%
+}
+
+\forglsentries{\thislabel}{%
+ \glsxtrifhasfield{translation}{\thislabel}%
+ {%
+ % requires glossaries-extra v1.24
+ \glsxtrforcsvfield{\thislabel}{language}{\addfirstlang}%
+ }%
+ {}%
+}
+
+\forlistloop{\setotherlanguage}{\langlist}
+
+\renewcommand*{\glsxtruserfield}{translation}
+
+\renewcommand*{\glsxtruserparen}[2]{%
+ \
+ \glsxtrparen{#1%
+ \ifglshasfield{\glsxtruserfield}{#2}{,
+ \textenglish{\glscurrentfieldvalue}}{}}%
+}
+
+\newcommand*{\tugtextformat}[1]{%
+ \glsxtrentryfmt{\glslabel}{#1}%
+}
+
+\newcommand*{\tugnameformat}[1]{%
+ \glsxtrentryfmt{\glscurrententrylabel}{#1}%
+}
+
+\glssetcategoryattribute{tug}{textformat}{tugtextformat}
+\glssetcategoryattribute{tug}{glossnamefont}{tugnameformat}
+
+\newcommand{\glsxtrpostnametug}{%
+ \ifglshasdesc{\glscurrententrylabel}%
+ {\ (\glossentrydesc{\glscurrententrylabel}%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {, \textenglish{\glscurrentfieldvalue}}%
+ {}%
+ )}%
+ {%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {\ (\textenglish{\glscurrentfieldvalue})}%
+ {}%
+ }%
+}
+
+\begin{document}
+\chapter{Sample}
+\section{First Use}
+\gls{TUG}. \gls{bgTeX}. \gls{latex-br}. \gls{CTeX}.
+\gls{CSTUG}. \gls{DANTE}. \gls{DKTUG}. \gls{EUG}.
+\gls{CervanTeX}. \gls{TirantloTeX}. \gls{GUTenberg}.
+\gls{UKTUG}. \gls{ɛϕτ}. \gls{MaTeX}. \gls{ITALIC}.
+\gls{ÍsTeX}. \gls{GuIT}. \gls{KTS}. \gls{LTVG}.
+\gls{mxTeX}. \gls{NTG}. \gls{NTUG}. \gls{GUST}. \gls{GUTpt}.
+\gls{VietTUG}. \gls{LUGSA}.
+
+\section{Next Use}
+
+\gls{TUG}. \gls{bgTeX}. \gls{latex-br}. \gls{CTeX}.
+\gls{CSTUG}. \gls{DANTE}. \gls{DKTUG}. \gls{EUG}.
+\gls{CervanTeX}. \gls{TirantloTeX}. \gls{GUTenberg}.
+\gls{UKTUG}. \gls{ɛϕτ}. \gls{MaTeX}. \gls{ITALIC}.
+\gls{ÍsTeX}. \gls{GuIT}. \gls{KTS}. \gls{LTVG}.
+\gls{mxTeX}. \gls{NTG}. \gls{NTUG}. \gls{GUST}. \gls{GUTpt}.
+\gls{VietTUG}. \gls{LUGSA}.
+
+\printunsrtglossaries
+\end{document}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/terms.bib b/Master/texmf-dist/doc/support/bib2gls/examples/terms.bib
new file mode 100644
index 00000000000..60bbbb571be
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/terms.bib
@@ -0,0 +1,41 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@index{mineral}
+@index{vegetable}
+@index{animal}
+@index{film}
+@index{book}
+@index{bacteria,
+ text={bacterium},
+ plural={bacteria}
+}
+@index{chemical,
+ name={chemical formula},
+ plural={chemical formulae}
+}
+@index{baseunit,
+ name={base SI unit}
+}
+@index{derivedunit,
+ name={derived SI unit}
+}
+@index{person,
+ plural={people}
+}
+@index{markuplanguage,
+ name={markup language}
+}
+
+@index{mediacontrol,
+ name={media control}
+}
+
+@index{information}
+
+@index{weather}
+
+@index{measurement}
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/unaryoperators.bib b/Master/texmf-dist/doc/support/bib2gls/examples/unaryoperators.bib
new file mode 100644
index 00000000000..adf8d672924
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/unaryoperators.bib
@@ -0,0 +1,30 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@symbol{factorial,
+ name={\ensuremath{\mathord{!}}},
+ description={factorial},
+ identifier={unary}
+}
+
+@symbol{unaryplus,
+ name={\ensuremath{\mathord{+}}},
+ description={plus},
+ identifier={unary}
+}
+
+@symbol{unaryminus,
+ name={\ensuremath{\mathord{-}}},
+ description={minus},
+ identifier={unary}
+}
+
+@symbol{forall,
+ name={\ensuremath{\forall}},
+ description={for all},
+ identifier={unary}
+}
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/usergroups.bib b/Master/texmf-dist/doc/support/bib2gls/examples/usergroups.bib
new file mode 100644
index 00000000000..95fa3163a50
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/usergroups.bib
@@ -0,0 +1,210 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+% Requires XeLaTeX/LuaLaTeX for non-ASCII labels
+
+@string{tug={\TeX\ Users Group}}
+
+@preamble{"\providecommand{\dash}{\,---\,}"}
+
+@abbreviation{TUG,
+ short={TUG},
+ long=tug,
+ language={en},
+ identifier={texusergroup}
+}
+
+@abbreviation{bgTeX,
+ short={bgTeX},
+ long={Bulgarian \LaTeX\ Users Group},
+ language={bg},
+ identifier={texusergroup}
+}
+
+@abbreviation{latex-br,
+ short={latex-br},
+ long={Grupo de Usuários},
+ language={pt-BR},
+ identifier={texusergroup},
+ translation={Brazilian }#tug
+}
+
+@abbreviation{CTeX,
+ short={CTeX},
+ long={Chinese \TeX\ Society},
+ identifier={texusergroup},
+ language={zh}
+}
+
+@abbreviation{CSTUG,
+ short={CSTUG},
+ long={Československé sdružení uživatelů TeXu, z.~s.},
+ language={cs},
+ identifier={texusergroup},
+ translation={Czech Republic }#tug
+}
+
+@abbreviation{DANTE,
+ short={DANTE e.V.},
+ long={Deutschsprachige Anwendervereinigung \TeX\ e.V.},
+ language={de},
+ identifier={texusergroup},
+ translation={German Speaking }#tug
+}
+
+@abbreviation{DKTUG,
+ short={DK-TUG},
+ long={Danish }#tug,
+ language={da},
+ identifier={texusergroup}
+}
+
+@index{EUG,
+ name={Estonian User Group},
+ language={et},
+ identifier={texusergroup}
+}
+
+@abbreviation{CervanTeX,
+ short={CervanTeX},
+ long={Grupo de Usuarios de \TeX\ Hispanohablantes},
+ language={es},
+ identifier={texusergroup},
+ translation={Spanish Speaking }#tug
+}
+
+@abbreviation{TirantloTeX,
+ short={Tirant lo \TeX},
+ long={Catalan }#tug,
+ language={ca},
+ identifier={texusergroup}
+}
+
+@abbreviation{GUTenberg,
+ short={GUTenberg},
+ long={Groupe francophone des utilisateurs de \TeX},
+ language={fr},
+ identifier={texusergroup},
+ translation={French Speaking }#tug
+}
+
+@abbreviation{UKTUG,
+ short={UK-TUG},
+ long={UK }#tug,
+ language={en-GB},
+ identifier={texusergroup}
+}
+
+@abbreviation{ɛϕτ,
+ short={ɛϕτ},
+ long={Σύλλογος Ελλήνων Φίλων του \TeX},
+ language={el},
+ identifier={texusergroup},
+ translation={Greek \TeX\ Friends}
+}
+
+@abbreviation{MaTeX,
+ short={MaTeX},
+ long={Magyar \TeX\ Egyesület},
+ language={hu},
+ identifier={texusergroup},
+ translation={Hungarian }#tug
+}
+
+@abbreviation{ITALIC,
+ short={ITALIC},
+ long={Irish \TeX\ and \LaTeX\ In-print Community},
+ language={en-GB,en-IE},
+ identifier={texusergroup}
+}
+
+@abbreviation{ÍsTeX,
+ short={ÍsTeX},
+ long={Vefur íslenskra \TeX\ notenda},
+ language={is},
+ identifier={texusergroup},
+ translation={Icelandic }#tug
+}
+
+@abbreviation{GuIT,
+ short={GuIT},
+ long={Gruppo Utilizzatori Italiani di \TeX},
+ language={it},
+ identifier={texusergroup},
+ translation={Italian }#tug
+}
+
+@abbreviation{KTS,
+ short={KTS},
+ identifier={texusergroup},
+ long={Korean \TeX\ Society},
+ language={ko}
+}
+
+@index{KTUG,
+ alias={KTS},
+ identifier={texusergroup}
+}
+
+@index{LTVG,
+ name={Lietuvos \TeX'o Vartotojų Grupė},
+ language={lt},
+ identifier={texusergroup},
+ translation={Lithuanian }#tug
+}
+
+@index{mxTeX,
+ name={\TeX\ México},
+ language={es-MX},
+ identifier={texusergroup},
+ translation={Mexican }#tug
+}
+
+@abbreviation{NTG,
+ short={NTG},
+ long={Nederlandstalige \TeX\ Gebruikersgroep},
+ language={nl},
+ identifier={texusergroup},
+ translation={Netherlands }#tug
+}
+
+@index{NTUG,
+ name={Nordic \TeX\ Users Group},
+ language={da,et,fi,fo,is,nb,nn,sv},
+ identifier={texusergroup}
+}
+
+@abbreviation{GUST,
+ short={GUST},
+ long={Polska Grupa Użytkowników Systemu \TeX},
+ language={pl},
+ identifier={texusergroup},
+ translation={Polish }#tug
+}
+
+@abbreviation{GUTpt,
+ short={GUTpt},
+ long={Grupo de Utilizadores de \TeX},
+ language={pt},
+ identifier={texusergroup},
+ translation={Portuguese }#tug
+}
+
+@abbreviation{VietTUG,
+ short={VietTUG},
+ long={Vietnamese }#tug,
+ language={vi},
+ identifier={texusergroup}
+}
+
+@abbreviation{LUGSA,
+ short={LUGSA},
+ long={\LaTeX\ User Group\dash South Africa},
+ language={en-ZA},
+ identifier={texusergroup}
+}
+
+
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/vegetables.bib b/Master/texmf-dist/doc/support/bib2gls/examples/vegetables.bib
new file mode 100644
index 00000000000..555a2431185
--- /dev/null
+++ b/Master/texmf-dist/doc/support/bib2gls/examples/vegetables.bib
@@ -0,0 +1,53 @@
+% This file is public domain. See the "Examples" chapter
+% in the bib2gls user manual for a more detailed description
+% of this file.
+
+% Encoding: UTF-8
+
+@entry{cabbage,
+ name={cabbage},
+ description={vegetable with thick green or purple leaves},
+ identifier={vegetable}
+}
+
+@entry{brussels-sprout,
+ name={Brussels sprout},
+ description={small leafy green vegetable buds},
+ identifier={vegetable}
+}
+
+@entry{artichoke,
+ name={artichoke},
+ description={a variety of thistle cultivated as food},
+ identifier={vegetable}
+}
+
+@entry{cauliflower,
+ name={cauliflower},
+ description={type of cabbage with edible white flower head},
+ identifier={vegetable}
+}
+
+@entry{spinach,
+ name={spinach},
+ description={green, leafy vegetable},
+ identifier={vegetable}
+}
+
+@entry{marrow,
+ name={marrow},
+ description={long white-fleshed gourd with green skin},
+ identifier={vegetable}
+}
+
+@entry{courgette,
+ name={courgette},
+ description={immature fruit of a vegetable \gls{marrow}},
+ identifier={vegetable}
+}
+
+@index{zucchini,
+ name={zucchini},
+ alias={courgette},
+ identifier={vegetable}
+}
diff --git a/Master/texmf-dist/scripts/bib2gls/bib2gls.jar b/Master/texmf-dist/scripts/bib2gls/bib2gls.jar
index 5e4610756f9..e19edc5510a 100755
--- a/Master/texmf-dist/scripts/bib2gls/bib2gls.jar
+++ b/Master/texmf-dist/scripts/bib2gls/bib2gls.jar
Binary files differ
diff --git a/Master/texmf-dist/scripts/bib2gls/convertgls2bib.jar b/Master/texmf-dist/scripts/bib2gls/convertgls2bib.jar
index 1ccf50f5771..a54983a120d 100755
--- a/Master/texmf-dist/scripts/bib2gls/convertgls2bib.jar
+++ b/Master/texmf-dist/scripts/bib2gls/convertgls2bib.jar
Binary files differ
diff --git a/Master/texmf-dist/scripts/bib2gls/resources/bib2gls-en.xml b/Master/texmf-dist/scripts/bib2gls/resources/bib2gls-en.xml
index c48375fee45..52b02f19c5c 100644
--- a/Master/texmf-dist/scripts/bib2gls/resources/bib2gls-en.xml
+++ b/Master/texmf-dist/scripts/bib2gls/resources/bib2gls-en.xml
@@ -35,8 +35,11 @@ See the manual for further details.</entry>
directory.)</entry>
<entry key="syntax.interpret">{0} Switch on interpret mode (default).</entry>
<entry key="syntax.no.interpret">{0} Switch off interpret mode.</entry>
+<entry key="syntax.break.space">{0} Interpret tilde character as normal space.</entry>
+<entry key="syntax.no.break.space">{0} Interpret tilde character as a non-breaking space
+ (default).</entry>
-<entry key="syntax.mfirstuc">{0} &lt;fields&gt;|all (or {1} &lt;fields&gt;|all)
+<entry key="syntax.mfirstuc">{0} &lt;fields&gt;|"all" (or {1} &lt;fields&gt;|"all")
Insert an empty group if fields start
with certain problematic commands
to protect against case-changing commands
@@ -64,11 +67,11 @@ See the manual for further details.</entry>
<entry key="syntax.check.shortcuts">{0} &lt;option&gt;
Check for the shortcut commands when
- search for dependencies.
+ searching for dependencies.
Permitted values of &lt;option&gt;:
- ''acronyms'' (or ''acro'')
- ''abbreviations'' (or ''abbr'')
- ''all'' (or ''true'')
+ ''ac'', ''acronyms'' (or ''acro''),
+ ''abbreviations'' (or ''abbr''),
+ ''all'' (or ''true''),
''none'' (or ''false'')</entry>
<entry key="syntax.check.nested">{0} &lt;list&gt;|"none"
Check each field listed in &lt;list&gt;
@@ -82,18 +85,35 @@ See the manual for further details.</entry>
Don''t check for potentially problematic
nested link text. (Equivalent to
{1} "none")</entry>
-<entry key="syntax.format.map">{0} &lt;key&gt;=&lt;value&gt;[,&lt;key&gt;=&lt;value&gt;]* (or {1} &lt;key&gt;=&lt;value&gt;[,&lt;key&gt;=&lt;value&gt;]*)
+<entry key="syntax.format.map">{0} &lt;key&gt;:&lt;value&gt;[,&lt;key&gt;:&lt;value&gt;]* (or {1} &lt;key&gt;:&lt;value&gt;[,&lt;key&gt;:&lt;value&gt;]*)
Set location format mappings.</entry>
<entry key="syntax.group">{0} or {1}
Add ''group'' field to entries.</entry>
<entry key="syntax.no.group">{0}
- Don''t add ''group'' field to entries.</entry>
+ Don''t add ''group'' field to entries (default).</entry>
+<entry key="syntax.record.count">{0} or {1}
+ Add record count fields to entries.</entry>
+<entry key="syntax.no.record.count">{0}
+ Don''t add record count fields to entries.
+ (Automatically implements {1})</entry>
+<entry key="syntax.record.count.unit">{0} or {1}
+ Add unit record count fields to entries.
+ (Automatically implements {2})</entry>
+<entry key="syntax.no.record.count.unit">{0}
+ Don''t add unit record count fields to entries.</entry>
<entry key="syntax.trim.fields">{0}
Trim leading and trailing spaces from fields.</entry>
<entry key="syntax.no.trim.fields">{0}
Don''t trim leading and trailing spaces from fields (default).</entry>
+<entry key="syntax.expand.fields">{0}
+ Don''t write \glsnoexpandfields to the .glstex file.</entry>
+<entry key="syntax.no.expand.fields">{0}
+ Write \glsnoexpandfields to the .glstex file (default).</entry>
<entry key="syntax.tex.encoding">{0} &lt;name&gt;
Set the character encoding for the output files.</entry>
+<entry key="syntax.packages">{0} &lt;list&gt; or {1} &lt;list&gt;
+ Instruct interpreter to pretend the listed
+ packages have been used in the document.</entry>
<entry key="message.reading">Reading {0}</entry>
<entry key="message.writing">Writing {0}</entry>
@@ -103,21 +123,50 @@ See the manual for further details.</entry>
<entry key="message.processing">Processing {0}</entry>
<entry key="message.copying">Copying {0} -&gt; {1}</entry>
<entry key="message.moving">Moving {0} -&gt; {1}</entry>
+<entry key="message.crossref.found">Entry {0}: found cross-reference ({1}): {2}</entry>
+<entry key="message.crossref.by">Entry {0} cross-referenced by {1}</entry>
+<entry key="message.checking.crossrefs">Checking cross-references for: {0}</entry>
+<entry key="message.dual.dep">Dual found: {0} (primary {1})</entry>
+<entry key="message.added.alias.dep">Adding alias {0} as dependency for {1}</entry>
<entry key="message.added.dep">Added dependent: {0}</entry>
<entry key="message.added.parent">Adding parent: {0}</entry>
+<entry key="message.selecting.all">Selecting all entries.</entry>
+<entry key="message.selecting.entry.records">Selecting entry {0} (has one or more records).</entry>
+<entry key="message.selecting.entry.record.match">Selecting entry {0} (matches record {1}).</entry>
+<entry key="message.selecting.entry.seerecord.match">Selecting entry {0} (matches cross-reference record {1}).</entry>
+<entry key="message.selecting.entry.suprecord.match">Selecting entry {0} (matches supplemental record {1}).</entry>
+<entry key="message.selecting.entry.crossresource.dep">Selecting entry {0} (cross-resource dependency).</entry>
+<entry key="message.selecting.entry.dualrecords">Selecting entry {0} (dual {1} has one or more records).</entry>
+<entry key="message.selecting.entry.dep">Selecting entry {0} (is dependency).</entry>
+<entry key="message.selecting.entry">Selecting entry {0}.</entry>
+<entry key="message.datetime.field.check">Checking entry {0} field {1} for date/time data (date:{2}, time:{3}).</entry>
+<entry key="message.field.notset">Field {0} not set for entry {1}</entry>
<entry key="message.selection.mode">Selection mode: {0}</entry>
<entry key="message.ignore.fields">Ignoring fields:</entry>
<entry key="message.sort.mode">Sort mode: {0}</entry>
<entry key="message.sort.field">Sort field: {0}</entry>
+<entry key="message.sort.date.locale">Date/time sort locale: {0}</entry>
+<entry key="message.sort.date.format">Date/time sort format: {0}</entry>
+<entry key="message.sort.numeric.locale">Numeric sort locale: {0}</entry>
+<entry key="message.sort.numeric.format">Numeric sort format: {0}</entry>
<entry key="message.label.prefix">Label prefix: {0}</entry>
<entry key="message.dual.label.prefix">Dual label prefix: {0}</entry>
+<entry key="message.tertiary.label.prefix">Tertiary label prefix: {0}</entry>
<entry key="message.dual.sort.mode">Dual sort mode: {0}</entry>
<entry key="message.dual.sort.field">Dual sort field: {0}</entry>
+<entry key="message.dual.sort.date.locale">Dual date/time sort locale: {0}</entry>
+<entry key="message.dual.sort.date.format">Dual date/time sort format: {0}</entry>
+<entry key="message.dual.sort.numeric.locale">Dual numeric sort locale: {0}</entry>
+<entry key="message.dual.sort.numeric.format">Dual numeric sort format: {0}</entry>
<entry key="message.dual.entry.mappings">Dual entry mappings:</entry>
<entry key="message.dual.symbol.mappings">Dual symbol mappings:</entry>
<entry key="message.dual.abbreviation.mappings">Dual abbreviation mappings:</entry>
-<entry key="message.dual.entryabbreviation.mappings">Dual entry-abbreviation mappings:</entry>
+<entry key="message.dual.abbreviationentry.mappings">Dual abbreviation-entry mappings:</entry>
+<entry key="message.dual.indexentry.mappings">Dual index-entry mappings:</entry>
+<entry key="message.dual.indexsymbol.mappings">Dual index-symbol mappings:</entry>
+<entry key="message.dual.indexabbrv.mappings">Dual index-abbreviation mappings:</entry>
<entry key="message.process.result">Processed returned: {0}</entry>
+<entry key="message.truncated">Truncating according to limit={0}.</entry>
<entry key="message.log.file">Transcript written to {0}.</entry>
<entry key="message.written">{0} written to {1}.</entry>
@@ -127,12 +176,25 @@ See the manual for further details.</entry>
<entry key="message.1.entry">1 entry</entry>
<entry key="message.2.entry">{0,number} entries</entry>
+<entry key="message.selected">{0} selected.</entry>
+<entry key="message.dual.selected">{0} dual selected.</entry>
+
<entry key="message.1.sty">1 recognised package:</entry>
<entry key="message.2.sty">{0,number} recognised packages:</entry>
+<entry key="message.initialising.resource">Initialising resource {0}.</entry>
+<entry key="message.parsing.resource.bib">Parsing bib files for resource {0}.</entry>
+<entry key="message.processing.resource">Processing resource {0}.</entry>
+<entry key="message.processing.master">Processing master {0}.</entry>
+<entry key="message.selecting.entries">Selecting entries for resource {0}.</entry>
+<entry key="message.cross-resource.dep.allowed">Cross-resource references allowed.</entry>
+<entry key="message.cross-resource.dep.notallowed">Cross-resource references disabled.</entry>
+<entry key="message.cross-resource.notallowed">Cross-resource references can''t be supported for resource set {0}.</entry>
<entry key="message.checking.read">Checking read access for {0}</entry>
<entry key="message.checking.write">Checking write access for {0}</entry>
<entry key="message.setting.sort">Initialising collation keys (strength={0}, decomposition={1})</entry>
+<entry key="message.non_unique_sort">Sort value ''{0}'' (entry ''{1}'') not unique for the entry''s hierarchical level.</entry>
+<entry key="message.sort_suffix">Appending suffix ''{0}'' to the sort value ''{1}'' for entry ''{2}''.</entry>
<entry key="message.no.fallback">Entry type ''{0}'' has no fallback for field: {1}</entry>
<entry key="message.inconsistent.range">Inconsistent location format {0}
with range started by {1}</entry>
@@ -148,19 +210,34 @@ into explicit range {1}</entry>
Defaulting to: {0}.
(Use {1} if this is incorrect.)</entry>
<entry key="message.tex.charset">TeX character encoding: {0}</entry>
-<entry key="message.adding.target.record">Adding record {0} from aliased entry {1}.</entry>
+<entry key="message.adding.record">Adding record {0} to entry {1}''s record list.</entry>
+<entry key="message.adding.supplemental.record">Adding supplemental record {0} to entry {1}''s record list.</entry>
+<entry key="message.adding.counter.record">Adding record {0} to entry {1}''s {2} record list.</entry>
+<entry key="message.copying.record">Copying record {0} from entry {1} to entry {2}.</entry>
<entry key="message.ignored.record">Ignoring record {0}.</entry>
+<entry key="message.clearing.records">Clearing entry {0}''s record list.</entry>
<entry key="message.normalizing">Normalising {0} to {1}.</entry>
<entry key="message.norm.distinct">Normalized {0} distinct from {1}.</entry>
<entry key="message.no.norm">Can''t normalize {0}.</entry>
<entry key="message.collator.rules">Collator rules: {0}.</entry>
<entry key="message.no.collation.element">No collation element for: {0}.</entry>
<entry key="message.break.points">Break points: {0}.</entry>
+<entry key="message.field.alias.check">Checking field aliases for {0}.</entry>
+<entry key="message.clearing.entry.aliases">Clearing entry type aliases.</entry>
+<entry key="message.setting.entry.aliases">Setting entry type aliases.</entry>
+<entry key="message.removing.missing.parent">Stripping missing parent ''{0}'' from entry {1}</entry>
+<entry key="message.missing.sort.fallback">Entry ''{0}'' missing sort field ''{1}''. Falling back on field ''{2}''.</entry>
<entry key="tag.page">Page</entry>
<entry key="tag.pages">Pages</entry>
<entry key="tag.passim">passim</entry>
+<!-- Sentence terminators for use with check-end-punctuation.
+ Only characters that have the Unicode category
+ "Punctuation, Other" are checked.
+ -->
+<entry key="sentence.terminators">.?!</entry>
+
<!--
Letter groups usually only have the first character converted to upper case
(for example, the digraph 'dz' is converted to 'Dz'). This doesn't apply
@@ -174,9 +251,19 @@ Defaulting to: {0}.
<entry key="warning.removing">Removing {0}</entry>
<entry key="warning.ignoring.unknown.entry.type">Ignoring unknown entry type: {0}</entry>
<entry key="warning.ignoring.unknown.encoding">Ignoring unknown encoding: {0}</entry>
-<entry key="warning.can.find.arg">Can't detect argument for: \{0}</entry>
-<entry key="warning.no.default.sort">Can't determine sort value for: {0}
-(Using sort field ''{1}''.)</entry>
+<entry key="warning.ignoring.unknown.field">Ignoring unknown field: {0}</entry>
+<entry key="warning.entry.already.defined">Entry {0} is being defined in {1} but it has already been defined in a previous .glstex file.</entry>
+<entry key="warning.can.find.arg">Can''t detect argument for: \{0}</entry>
+<entry key="warning.no.default.sort">Can''t determine sort value for: {0}
+(Using sort field ''{1}''. Entry type: {2}.)
+Falling back on ID.</entry>
+<entry key="warning.cant.parse.sort">Can''t parse sort value ''{0}'' for: {1}
+</entry>
+<entry key="warning.cant.parse.pattern.sort">Can''t parse sort value ''{0}'' for ''{1}'' (pattern: ''{2}'')
+</entry>
+<entry key="warning.cant.parse.datetime.pattern">Can''t parse {0} value ''{1}'' (pattern: ''{2}'')</entry>
+<entry key="warning.deprecated.type">Entry type ''{0}'' deprecated. Use ''{1}'' instead.</entry>
+<entry key="warning.deprecated.option">Option ''{0}'' deprecated. Use ''{1}'' instead.</entry>
<entry key="warning.missing.field">Entry ''{0}'' missing required field: {1}</entry>
<entry key="warning.potential.nested.link">Entry ''{0}'' has potentially nested link text in field: {1}
Consider using \glsps'{'{3}'}' or \glspt'{'{3}'}' instead of {2}'{'{3}'}'</entry>
@@ -218,6 +305,13 @@ Contains one or more special characters.</entry>
<entry key="warning.alias.not.found">Can''t find target {0} for aliased entry {1}.
Aliased entries must be in the same resource set as their target entries with option {2}={3}.</entry>
<entry key="warning.deprecated">''{0}'' deprecated. Use ''{1}'' instead.</entry>
+<entry key="warning.identical">Identical sort values for ''{0}'' and ''{1}''</entry>
+<entry key="warning.identical.id">Falling back on ID</entry>
+<entry key="warning.identical.original_id">Falling back on original ID</entry>
+<entry key="warning.identical.none">No fallback</entry>
+<entry key="warning.identical.field">Falling back on ''{0}'' field (''{1}'' &lt;=&gt; ''{2}'' = {3})</entry>
+<entry key="warning.unknown.widest.fortype">Can''t determine widest level {0} entry for glossary type ''{1}''. Using fallback method.</entry>
+<entry key="warning.unknown.widest">Can''t determine widest level {0} entry for unknown glossary type. Using fallback method.</entry>
<entry key="error.title">Error: {0}</entry>
<entry key="error.alias.map.forbidden">The 'alias' field can't be mapped.</entry>
@@ -240,6 +334,9 @@ Have you indexed your entries using commands like \gls?</entry>
<entry key="error.dir.not.found">Directory not found: {0}</entry>
<entry key="error.not.dir">Not a directory: {0}</entry>
<entry key="error.cant.open.log">Can't open log file: {0}</entry>
+<entry key="error.invalid.id">Invalid or missing id
+{0}</entry>
+<entry key="error.invalid.sort.value">Invalid sort method ''{0}'' given in option: {1}</entry>
<entry key="error.invalid.opt.value">Invalid ''{0}'' value: {1}</entry>
<entry key="error.invalid.opt.int.value">Invalid ''{0}'' value: {1} (number required)</entry>
<entry key="error.invalid.opt.minint.value">Invalid ''{0}'' value: {1} (can''t be less than {2,number})</entry>
@@ -255,6 +352,7 @@ Value must be a list of size {2,number}</entry>
The size of the first list ({2,number}) is not the same as the size of
the second list ({3,number}).</entry>
<entry key="error.invalid.field">Invalid field ''{0}'' provided by option ''{1}''</entry>
+<entry key="error.invalid.entry.type">Invalid entry type ''{0}'' provided in option ''{1}''</entry>
<entry key="error.openin.forbidden">Read access forbidden for file: {0}</entry>
<entry key="error.openout.forbidden">Write access forbidden for file: {0}</entry>
<entry key="error.forbidden.ext">Write access forbidden for extension: {0}</entry>
@@ -283,6 +381,9 @@ Error occurred before: {3}
</entry>
<entry key="error.invalid.sort.rule">Invalid syntax in sort rule:
{0}</entry>
+<entry key="error.field.alias.trail">''field-aliases'' can''t contain both ''{0}={1}'' and ''{2}={0}'' (trails not permitted)</entry>
+<entry key="error.field.alias.identity">''field-aliases'' can''t contain identity mapping ''{0}={0}''</entry>
+<entry key="error.cyclic.sameas.type.category">Cyclic reference category='{'same as type'}' and type='{'same as category'}'</entry>
<!--
The following messages are used by convertgls2bib
@@ -291,7 +392,7 @@ Error occurred before: {3}
<entry key="gls2bib.override.newdualentry">Overriding default definition of \\newdualentry with custom
definition. (Change \\newcommand to \\providecommand if you want
\\newdualentry[options]'{'label'}{'short'}{'long'}{'description'}'
-converted to @dualentryabbreviation.)</entry>
+converted to @dualabbreviationentry.)</entry>
<!--
The following messages are used by various parts of
@@ -332,7 +433,7 @@ converted to @dualentryabbreviation.)</entry>
<entry key="tex.error.dimen_expected">Dimension expected</entry>
<entry key="tex.error.missing_unit">Missing unit</entry>
<entry key="tex.error.expected">Expected {0}</entry>
-<entry key="tex.error.undefined">Undefined command {0}</entry>
+<entry key="tex.error.undefined">Undefined command \{0}</entry>
<entry key="tex.error.undefined_char">Undefined active character ''{0}''</entry>
<entry key="tex.error.cs_expected">Control sequence expected (found ''{0}'')</entry>
<entry key="tex.error.number_expected">Number expected (found ''{0}'')</entry>
@@ -370,4 +471,5 @@ converted to @dualentryabbreviation.)</entry>
<entry key="bibtex.error.missing">Missing</entry>
<entry key="bibtex.error.too_many_commas">Too many commas in name ''{0}''</entry>
<entry key="bibtex.error.string_name_undefined">String name ''{0}'' undefined</entry>
+<entry key="bibtex.error.repeated_entry">Repeated entry ''{0}''</entry>
</properties>
diff --git a/Master/texmf-dist/scripts/bib2gls/texparserlib.jar b/Master/texmf-dist/scripts/bib2gls/texparserlib.jar
index 70561ba72dc..57802858524 100755
--- a/Master/texmf-dist/scripts/bib2gls/texparserlib.jar
+++ b/Master/texmf-dist/scripts/bib2gls/texparserlib.jar
Binary files differ
diff --git a/Master/texmf-dist/source/support/bib2gls/src/bib2gls-cite.bib b/Master/texmf-dist/source/support/bib2gls/src/bib2gls-cite.bib
new file mode 100644
index 00000000000..3f131eb252d
--- /dev/null
+++ b/Master/texmf-dist/source/support/bib2gls/src/bib2gls-cite.bib
@@ -0,0 +1,92 @@
+% Encoding: UTF-8
+
+@misc{glossaries,
+ author = "Nicola Talbot",
+ title = "The \sty{glossaries} package",
+ note = {\url{https://ctan.org/pkg/glossaries}},
+ year = 2017
+}
+
+@misc{glossaries-extra,
+ author = "Nicola Talbot",
+ title = "The \sty{glossaries-extra} package",
+ note = {\url{https://ctan.org/pkg/glossaries-extra}},
+ year = 2017
+}
+
+@misc{tex.sx,
+ title={Is there a program for managing glossary tags?},
+ note={\url{https://tex.stackexchange.com/questions/342544}},
+ key={TeX on StackExchange},
+ year=2016
+}
+
+@misc{texparser,
+ author = "Nicola Talbot",
+ title={\code{texparserlib}: {Java} code for parsing {(La)TeX} files},
+ note={\url{https://github.com/nlct/texparser}},
+ year=2017
+}
+
+@misc{collationkey,
+ author={Oracle},
+ title={Java {API}: \code{CollationKey} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/text/CollationKey.html}},
+ year=2017
+}
+
+@misc{pattern,
+ author={Oracle},
+ title={Java {API}: \code{Pattern} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html}},
+ year=2017
+}
+
+@misc{rulebasedcollator,
+ author={Oracle},
+ title={Java {API}: \code{RuleBasedCollator} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}},
+ year=2017
+}
+
+@misc{collator,
+ author={Oracle},
+ title={Java {API}: \code{Collator} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/text/Collator.html}},
+ year=2017
+}
+
+@misc{decimalformat,
+ author={Oracle},
+ title={Java {API}: \code{DecimalFormat} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html}},
+ year=2017
+}
+
+@misc{simpledateformat,
+ author={Oracle},
+ title={Java {API}: \code{SimpleDateFormat} class},
+ note={\url{http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html}},
+ year=2017
+}
+
+@inbook{iterationtips,
+ author = "Nicola L. C. Talbot",
+ title = "{\LaTeX} for Administrative Work",
+ publisher = "Dickimaw Books",
+ series = "Dickimaw {\LaTeX} Series",
+ chapter = "2.7.5",
+ volume = 3,
+ isbn = "978-1-909440-07-4",
+ address = "Norfolk, UK",
+ year = 2015,
+ note = {\url{http://www.dickimaw-books.com/latex/admin/html/foreachtips.shtml}}
+}
+
+@misc{tugusergroups,
+ author={{\TeX{} Users Group}},
+ title={{\TeX}\ user groups around the world},
+ note={\url{http://tug.org/usergroups.html}},
+ year=2017
+}
+
diff --git a/Master/texmf-dist/source/support/bib2gls/src/bib2gls-src.zip b/Master/texmf-dist/source/support/bib2gls/src/bib2gls-src.zip
index 8fdaf076b08..95f6c3cdf85 100644
--- a/Master/texmf-dist/source/support/bib2gls/src/bib2gls-src.zip
+++ b/Master/texmf-dist/source/support/bib2gls/src/bib2gls-src.zip
Binary files differ
diff --git a/Master/texmf-dist/source/support/bib2gls/src/bib2gls.bib b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.bib
new file mode 100644
index 00000000000..f517f088b20
--- /dev/null
+++ b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.bib
@@ -0,0 +1,6428 @@
+% Encoding: UTF-8
+
+@preamble{"\providecommand{\dhyphen}{-}"}
+
+@abbreviation{IETF,
+ short = {IETF},
+ long = {Internet Engineering Task Force}
+}
+
+@abbreviation{JVM,
+ short = {JVM},
+ long = {Java Virtual Machine}
+}
+
+@abbreviation{JRE,
+ short = {JRE},
+ long = {Java Runtime Environment}
+}
+
+@abbreviation{TUG,
+ short = {TUG},
+ long = {{}\TeX\ Users Group}
+}
+
+@abbreviation{SIunit,
+ short = {SI unit},
+ long = {International System of Units},
+ longplural = {International System of Units},
+ category={common}
+}
+
+@dualindexentry{bibglsnewentry,
+ name={\csfmt{bib\-gls\-new\-entry}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.entry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewsymbol,
+ name={\csfmt{bib\-gls\-new\-symbol}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.symbol}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewnumber,
+ name={\csfmt{bib\-gls\-new\-number}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.number}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewindex,
+ name={\csfmt{bib\-gls\-new\-index}},
+ user1={\margm{label}\margm{options}},
+ description={defines terms provided with \gls[noindex]{dual.entry.index}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewabbreviation,
+ name={\csfmt{bib\-gls\-new\-abbreviation}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}},
+ description={defines terms provided with \gls[noindex]{dual.entry.abbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewacronym,
+ name={\csfmt{bib\-gls\-new\-acronym}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}},
+ description={defines terms provided with \gls[noindex]{dual.entry.acronym}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualentry,
+ name={\csfmt{bib\-gls\-new\-dual\-entry}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.dualentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexentry,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-entry}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.dualindexentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexentrysecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-entry\-secondary}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines secondary terms provided with
+\gls[noindex]{dual.entry.dualindexentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexsymbol,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-symbol}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{symbol}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.dualindexsymbol}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexsymbolsecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-symbol\-secondary}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines secondary terms provided with
+\gls[noindex]{dual.entry.dualindexsymbol}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexnumber,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-number}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{symbol}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.dualindexnumber}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexnumbersecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-number\-secondary}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines secondary terms provided with
+\gls[noindex]{dual.entry.dualindexnumber}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexabbreviation,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-abbre\-via\-tion}},
+ user1={\margm{label}\margm{dual-label}\margm{options}\margm{name}\margm{short}\margm{long}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.dualindexabbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualindexabbreviationsecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-index\-abbre\-via\-tion\-sec\-ond\-ary}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{short}\margm{long}\margm{description}},
+ description={defines secondary terms provided with
+\gls[noindex]{dual.entry.dualindexabbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualabbreviationentry,
+ name={\csfmt{bib\-gls\-new\-dual\-abbre\-via\-tion\-entry}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.dualabbreviationentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualabbreviationentrysecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-abbre\-via\-tion\-entry\-sec\-ond\-ary}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}},
+ description={defines secondary terms provided with
+\gls[noindex]{dual.entry.dualabbreviationentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualentryabbreviation,
+ name={\csfmt{bib\-gls\-new\-dual\-entry\-abbre\-via\-tion}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}},
+ description={defines primary terms provided with (deprecated)
+\gls[noindex]{dual.entry.dualentryabbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualentryabbreviationsecondary,
+ name={\csfmt{bib\-gls\-new\-dual\-entry\-abbre\-via\-tion\-sec\-ond\-ary}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}},
+ description={defines secondary terms provided with (deprecated)
+\gls[noindex]{dual.entry.dualentryabbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualsymbol,
+ name={\csfmt{bib\-gls\-new\-dual\-symbol}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.dualsymbol}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualnumber,
+ name={\csfmt{bib\-gls\-new\-dual\-number}},
+ user1={\margm{label}\margm{options}\margm{name}\margm{description}},
+ description={defines terms provided with \gls[noindex]{dual.entry.dualnumber}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualabbreviation,
+ name={\csfmt{bib\-gls\-new\-dual\-abbre\-via\-tion}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}},
+ description={defines terms provided with
+\gls[noindex]{dual.entry.dualabbreviation}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewdualacronym,
+ name={\csfmt{bib\-gls\-new\-dual\-acronym}},
+ user1={\margm{label}\margm{options}\margm{short}\margm{long}},
+ description={defines terms provided with \gls[noindex]{dual.entry.dualacronym}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewtertiaryindexabbreviationentry,
+ name={\csfmt{bib\-gls\-new\-tert\-iary\-index\-abbre\-via\-tion\-entry}},
+ user1={\margm{label}\margm{dual-label}\margm{options}\margm{name}\margm{short}\margm{long}\margm{description}},
+ description={defines primary terms provided with
+\gls[noindex]{dual.entry.tertiaryindexabbreviationentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsnewtertiaryindexabbreviationentrysecondary,
+ name={\csfmt{bib\-gls\-new\-tert\-iary\-index\-abbre\-via\-tion\-entry\-sec\-ond\-ary}},
+ user1={\margm{label}\margm{tertiary-label}\margm{options}\margm{tertiary-opts}\margm{primary-name}\margm{short}\margm{long}\margm{description}},
+ description={defines secondary and tertiary terms provided with
+\gls[noindex]{dual.entry.tertiaryindexabbreviationentry}},
+ category={command}
+}
+
+@dualindexentry{bibglsuselongfont,
+ name={\csfmt{bib\-gls\-use\-long\-font}},
+ user1={\margm{text}\margm{category}},
+ description={ensures that the given text is formatted according to
+ the given category's long format},
+ category={command}
+}
+
+@index{glsuselongfont,
+ name={\csfmt{gls\-use\-long\-font}},
+ user1={\margm{text}\margm{category}},
+ description={applies the formatting command used for the long
+ form for the abbreviation style associated with the given category},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@dualindexentry{bibglsuseabbrvfont,
+ name={\csfmt{bib\-gls\-use\-abbrv\-font}},
+ user1={\margm{text}\margm{category}},
+ description={ensures that the given text is formatted according to
+ the given category's short format},
+ category={command}
+}
+
+@index{glsuseabbrvfont,
+ name={\csfmt{gls\-use\-abbrv\-font}},
+ user1={\margm{text}\margm{category}},
+ description={applies the formatting command used for the short
+ form for the abbreviation style associated with the given category},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@dualindexentry{bibglsseesep,
+ name={\csfmt{bib\-gls\-see\-sep}},
+ user1={},
+ description={separator between \gls[noindex]{dual.field.see}
+ cross-references and location list},
+ category={command}
+}
+
+@dualindexentry{bibglsaliassep,
+ name={\csfmt{bib\-gls\-alias\-sep}},
+ user1={},
+ description={separator between \gls[noindex]{dual.field.alias}
+ cross-reference and location list},
+ category={command}
+}
+@dualindexentry{bibglsseealsosep,
+ name={\csfmt{bib\-gls\-see\-also\-sep}},
+ user1={},
+ description={separator between \gls[noindex]{dual.field.seealso}
+ cross-references and location list},
+ category={command}
+}
+
+@dualindexentry{bibglspassim,
+ name={\csfmt{bib\-gls\-passim}},
+ user1={},
+ description={passim range suffix},
+ category={command}
+}
+
+@dualindexentry{bibglspassimname,
+ name={\csfmt{bib\-gls\-passim\-name}},
+ user1={},
+ description={name used by passim range suffix},
+ category={command}
+}
+
+@dualindexentry{bibglsusesee,
+ name={\csfmt{bib\-gls\-use\-see}},
+ user1={\margm{label}},
+ description={display cross-reference list for given entry},
+ category={command}
+}
+
+@dualindexentry{bibglsusealias,
+ name={\csfmt{bib\-gls\-use\-alias}},
+ user1={\margm{label}},
+ description={display cross-reference list for given entry},
+ category={command}
+}
+@dualindexentry{bibglsuseseealso,
+ name={\csfmt{bib\-gls\-use\-see\-also}},
+ user1={\margm{label}},
+ description={display cross-reference list for given entry},
+ category={command}
+}
+
+@dualindexentry{bibglsdelimN,
+ name={\csfmt{bib\-gls\-delimN}},
+ user1={},
+ description={delimit individual locations (except last)},
+ seealso={bibglslastDelimN},
+ category={command}
+}
+
+@dualindexentry{bibglslastDelimN,
+ name={\csfmt{bib\-gls\-last\-DelimN}},
+ user1={},
+ description={delimit last location},
+ seealso={bibglsdelimN},
+ category={command}
+}
+
+@dualindexentry{bibglsrange,
+ name={\csfmt{bib\-gls\-range}},
+ user1={\marg{\meta{start}\gls{delimR} \meta{end}}},
+ description={Explicit range format},
+ category={command}
+}
+
+@dualindexentry{bibglsinterloper,
+ name={\csfmt{bib\-gls\-inter\-loper}},
+ user1={\margm{location}},
+ description={interloper location format},
+ category={command}
+}
+
+@dualindexentry{bibglspostlocprefix,
+ name={\csfmt{bib\-gls\-post\-loc\-prefix}},
+ user1={},
+ description={location list post prefix},
+ category={command}
+}
+
+@dualindexentry{bibglslocprefix,
+ name={\csfmt{bib\-gls\-loc\-prefix}},
+ user1={\margm{n}},
+ description={location list prefix},
+ category={command}
+}
+
+@dualindexentry{bibglspagename,
+ name={\csfmt{bib\-gls\-page\-name}},
+ user1={},
+ description={name used for single page},
+ category={command}
+}
+
+@dualindexentry{bibglspagesname,
+ name={\csfmt{bib\-gls\-pages\-name}},
+ user1={},
+ description={name used for multiple pages},
+ category={command}
+}
+
+@dualindexentry{bibglslocsuffix,
+ name={\csfmt{bib\-gls\-loc\-suffix}},
+ user1={\margm{n}},
+ description={location list suffix},
+ category={command}
+}
+
+@dualindexentry{bibglshyperlink,
+ name={\csfmt{bib\-gls\-hyper\-link}},
+ user1={\margm{text}\margm{label}},
+ description={displays \meta{text} with a hyperlink to the entry
+ given by \meta{label}, if supported},
+ category={command}
+}
+
+@dualindexentry{bibglslocationgroup,
+ name={\csfmt{bib\-gls\-location\-group}},
+ user1={\margm{n}\margm{counter}\margm{list}},
+ description={location group encapsulator},
+ category={command}
+}
+
+@dualindexentry{bibglslocationgroupsep,
+ name={\csfmt{bib\-gls\-location\-group\-sep}},
+ user1={},
+ description={location group separator},
+ category={command}
+}
+
+@dualindexentry{bibglssupplemental,
+ name={\csfmt{bib\-gls\-supple\-mental}},
+ user1={\margm{n}\margm{list}},
+ description={supplemental list encapsulator},
+ category={command}
+}
+
+@dualindexentry{bibglssupplementalsep,
+ name={\csfmt{bib\-gls\-supple\-mental\-sep}},
+ user1={},
+ description={separator between main and supplementary locations},
+ category={command}
+}
+
+@dualindexentry{glsgroupheading,
+ name={\csfmt{gls\-group\-heading}},
+ user1={\margm{label}},
+ description={formats the heading for the group identified by the
+given label},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{bibglssetlettergrouptitle,
+ name={\csfmt{bib\-gls\-set\-letter\-group\-title}},
+ user1={\marg{\margm{title}\margm{letter}\margm{id}\margm{type}}},
+ description={sets the letter group title},
+ category={command}
+}
+
+@dualindexentry{glsxtrsetgrouptitle,
+ name={\csfmt{gls\-xtr\-set\-group\-title}},
+ user1={\margm{group label}\margm{group title}},
+ description={globally sets the title for the group identified by the given label},
+ note={provided by \styfmt{glossaries-extra} version 1.14+},
+ category={command}
+}
+
+@dualindexentry{glsxtrlocalsetgrouptitle,
+ name={\csfmt{gls\-xtr\-local\-set\-group\-title}},
+ user1={\margm{group label}\margm{group title}},
+ description={locally sets the title for the group identified by the given label},
+ note={provided by \styfmt{glossaries-extra} version 1.24+},
+ category={command}
+}
+
+@dualindexentry{bibglslettergroup,
+ name={\csfmt{bib\-gls\-letter\-group}},
+ user1={\margm{title}\margm{letter}\margm{id}\margm{type}},
+ description={expands to the letter group label},
+ category={command}
+}
+
+@dualindexentry{bibglslettergrouptitle,
+ name={\csfmt{bib\-gls\-letter\-group\-title}},
+ user1={\margm{title}\margm{letter}\margm{id}\margm{type}},
+ description={expands to the letter group title},
+ category={command}
+}
+
+@dualindexentry{bibglssetothergrouptitle,
+ name={\csfmt{bib\-gls\-set\-other\-group\-title}},
+ user1={\marg{\margm{character}\margm{id}\margm{type}}},
+ description={sets the non-letter group title},
+ category={command}
+}
+
+@dualindexentry{bibglsothergroup,
+ name={\csfmt{bib\-gls\-other\-group}},
+ user1={\margm{character}\margm{id}\margm{type}},
+ description={expands to the non-letter group label},
+ category={command}
+}
+
+@dualindexentry{bibglsothergrouptitle,
+ name={\csfmt{bib\-gls\-other\-group\-title}},
+ user1={\margm{character}\margm{id}\margm{type}},
+ description={expands to the non-letter group title},
+ category={command}
+}
+
+@dualindexentry{bibglssetemptygrouptitle,
+ name={\csfmt{bib\-gls\-set\-empty\-group\-title}},
+ user1={\marg{\margm{type}}},
+ description={sets the empty group title},
+ category={command}
+}
+
+@dualindexentry{bibglsemptygroup,
+ name={\csfmt{bib\-gls\-empty\-group}},
+ user1={\margm{type}},
+ description={expands to the empty group label},
+ category={command}
+}
+
+@dualindexentry{bibglsemptygrouptitle,
+ name={\csfmt{bib\-gls\-empty\-group\-title}},
+ user1={\margm{type}},
+ description={expands to the empty group title},
+ category={command}
+}
+
+@dualindexentry{bibglssetnumbergrouptitle,
+ name={\csfmt{bib\-gls\-set\-number\-group\-title}},
+ user1={\marg{\margm{value}\margm{id}\margm{type}}},
+ description={sets the number group title},
+ category={command}
+}
+
+@dualindexentry{bibglsnumbergroup,
+ name={\csfmt{bib\-gls\-number\-group}},
+ user1={\margm{value}\margm{id}\margm{type}},
+ description={expands to the number group label},
+ category={command}
+}
+
+@dualindexentry{bibglsnumbergrouptitle,
+ name={\csfmt{bib\-gls\-number\-group\-title}},
+ user1={\margm{value}\margm{id}\margm{type}},
+ description={expands to the number group title},
+ category={command}
+}
+
+@dualindexentry{bibglsdatetimegroup,
+ name={\csfmt{bib\-gls\-date\-time\-group}},
+ user1={\margm{YYYY}\margm{MM}\margm{DD}\margm{hh}\margm{mm}\margm{ss}\margm{zone}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the date-time group label},
+ category={command}
+}
+
+@dualindexentry{bibglsdatetimegrouptitle,
+ name={\csfmt{bib\-gls\-date\-time\-group\-title}},
+ user1={\margm{YYYY}\margm{MM}\margm{DD}\margm{hh}\margm{mm}\margm{ss}\margm{zone}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the date-time group title},
+ category={command}
+}
+
+@dualindexentry{bibglsdategroup,
+ name={\csfmt{bib\-gls\-date\-group}},
+ user1={\margm{YYYY}\margm{MM}\margm{DD}\margm{G}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the date group label},
+ category={command}
+}
+
+@dualindexentry{bibglsdategrouptitle,
+ name={\csfmt{bib\-gls\-date\-group\-title}},
+ user1={\margm{YYYY}\margm{MM}\margm{DD}\margm{G}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the date group title},
+ category={command}
+}
+
+@dualindexentry{bibglstimegroup,
+ name={\csfmt{bib\-gls\-time\-group}},
+ user1={\margm{hh}\margm{mm}\margm{ss}\margm{zone}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the time group label},
+ category={command}
+}
+
+@dualindexentry{bibglstimegrouptitle,
+ name={\csfmt{bib\-gls\-time\-group\-title}},
+ user1={\margm{hh}\margm{mm}\margm{ss}\margm{zone}\margm{title}\margm{group\dhyphen id}\margm{type}},
+ description={expands to the time group title},
+ category={command}
+}
+
+@dualindexentry{bibglshypergroup,
+ name={\csfmt{bib\-gls\-hyper\-group}},
+ user1={\margm{type}\margm{group\dhyphen id}},
+ description={creates group navigation information},
+ category={command}
+}
+
+@dualindexentry{bibglsflattenedhomograph,
+ name={\csfmt{bib\-gls\-flattened\-homograph}},
+ user1={\margm{name}\margm{parent label}},
+ description={expands to the flattened entry's new name},
+ category={command}
+}
+
+@dualindexentry{bibglsflattenedchildpresort,
+ name={\csfmt{bib\-gls\-flattened\-child\-pre\-sort}},
+ user1={\margm{child name}\margm{parent name}},
+ description={expands to the pre-sort flattened child entry's new name},
+ category={command}
+}
+
+@dualindexentry{bibglsflattenedchildpostsort,
+ name={\csfmt{bib\-gls\-flattened\-child\-post\-sort}},
+ user1={\margm{parent name}\margm{child name}},
+ description={expands to the post-sort flattened child entry's new
+name},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidest,
+ name={\csfmt{bib\-gls\-set\-widest}},
+ user1={\margm{level}\margm{name}},
+ description={sets the widest name},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidestfortype,
+ name={\csfmt{bib\-gls\-set\-widest\-for\-type}},
+ user1={\margm{type}\margm{level}\margm{name}},
+ description={sets the widest name for the given glossary type},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidesttoplevelfallback,
+ name={\csfmt{bib\-gls\-set\-widest\-top\-level\-fallback}},
+ user1={\margm{glossary list}},
+ description={fallback used instead of \gls{bibglssetwidest}
+ in the event that \bibgls\ can't determine the widest name
+ where there are only top level entries},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidestfallback,
+ name={\csfmt{bib\-gls\-set\-widest\-fallback}},
+ user1={\margm{glossary list}},
+ description={fallback used instead of \gls{bibglssetwidest}
+ in the event that \bibgls\ can't determine the widest name},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidestfortypefallback,
+ name={\csfmt{bib\-gls\-set\-widest\-for\-type\-fallback}},
+ user1={\margm{type}},
+ description={fallback used instead of \gls{bibglssetwidestfortype}
+ in the event that \bibgls\ can't determine the widest name},
+ category={command}
+}
+
+@dualindexentry{bibglssetwidesttoplevelfortypefallback,
+ name={\csfmt{bib\-gls\-set\-widest\-top\-level\-for\-type\-fallback}},
+ user1={\margm{type}},
+ description={fallback used instead of \gls{bibglssetwidestfortype}
+ in the event that \bibgls\ can't determine the widest name
+ where there are only top-level entries},
+ category={command}
+}
+
+
+@dualindexentry{bibglscontributorlist,
+ name={\csfmt{bib\-gls\-contributor\-list}},
+ user1={\margm{list}\margm{number}},
+ description={used to markup a list of names from a field
+ that was converted from \BibTeX's contributor syntax},
+ category={command}
+}
+
+@dualindexentry{bibglscontributor,
+ name={\csfmt{bib\-gls\-contributor}},
+ user1={\margm{forenames}\margm{von-part}\margm{surname}\margm{suffix}},
+ description={used to markup a contributor's name that was converted from
+ \BibTeX's contributor syntax},
+ category={command}
+}
+
+@dualindexentry{bibglsdate,
+ name={\csfmt{bib\-gls\-date}},
+ user1={\margm{year}\margm{month}\margm{day-of-month}\margm{day-of-week}\margm{day-of-year}\margm{era}\marg{original}},
+ description={used to markup a date converted from a field value},
+ category={command}
+}
+
+@dualindexentry{bibglsdatetime,
+ name={\csfmt{bib\-gls\-date\-time}},
+ user1={\margm{year}\margm{month}\margm{day-of-month}\margm{day-of-week}\margm{day-of-year}\margm{era}\margm{hour}\margm{minute}\margm{second}\margm{millisec}\margm{dst}\margm{zone}\marg{original}},
+ description={used to markup a date-time instance converted from a field value},
+ category={command}
+}
+
+@dualindexentry{bibglsdatetimeremainder,
+ name={\csfmt{bib\-gls\-date\-time\-remainder}},
+ user1={\margm{millisec}\margm{dst}\margm{zone}\marg{original}},
+ description={used internally to pick up the final four arguments of
+ \gls{bibglsdatetime}},
+ category={command}
+}
+
+@dualindexentry{bibglstime,
+ name={\csfmt{bib\-gls\-time}},
+ user1={\margm{hour}\margm{minute}\margm{second}\margm{millisec}\margm{dst}\margm{zone}\marg{original}},
+ description={used to markup a time converted from a field value},
+ category={command}
+}
+
+@dualindexentry{bibglshashchar,
+ name={\csfmt{bib\-gls\-hash\-char}},
+ user1={},
+ description={expands to a literal hash character},
+ category={command}
+}
+
+@dualindexentry{bibglsunderscorechar,
+ name={\csfmt{bib\-gls\-under\-score\-char}},
+ user1={},
+ description={expands to a literal underscore character},
+ category={command}
+}
+
+@dualindexentry{bibglsdollarchar,
+ name={\csfmt{bib\-gls\-dollar\-char}},
+ user1={},
+ description={expands to a literal dollar character},
+ category={command}
+}
+
+@dualindexentry{bibglsampersandchar,
+ name={\csfmt{bib\-gls\-amper\-sand\-char}},
+ user1={},
+ description={expands to a literal ampersand character},
+ category={command}
+}
+
+@dualindexentry{bibglscircumchar,
+ name={\csfmt{bib\-gls\-circum\-char}},
+ user1={},
+ description={expands to a literal circumflex character},
+ category={command}
+}
+
+@dualindexentry{newglossaryentry,
+ name={\csfmt{new\-glossary\-entry}},
+ user1={\margm{label}\margm{\keyvallist}},
+ description={defines a new glossary entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{longnewglossaryentry,
+ name={\csfmt{long\-new\-glossary\-entry}},
+ user1={\margm{label}\margm{\keyvallist}\margm{description}},
+ description={defines a new glossary entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{provideglossaryentry,
+ name={\csfmt{provide\-glossary\-entry}},
+ user1={\margm{label}\margm{\keyvallist}},
+ description={defines a new glossary entry if one doesn't
+ already exist with the given label},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{longprovideglossaryentry,
+ name={\csfmt{long\-provide\-glossary\-entry}},
+ user1={\margm{label}\margm{\keyvallist}\margm{description}},
+ description={defines a new glossary entry if one doesn't
+ already exist with the given label},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{newterm,
+ name={\csfmt{new\-term}},
+ user1={\oargm{\keyvallist}\margm{label}},
+ description={defines a new glossary entry where the
+ \gls[noindex]{dual.field.description} field defaults to empty},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{newabbreviation,
+ name={\csfmt{new\-abbreviation}},
+ user1={\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}},
+ description={defines a new abbreviation},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{newacronym,
+ name={\csfmt{new\-acronym}},
+ user1={\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}},
+ description={defines a new abbreviation with the
+ \gls[noindex]{dual.field.category} set to \code{acronym}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{glsxtrnewsymbol,
+ name={\csfmt{gls\-xtr\-new\-symbol}},
+ user1={\oargm{\keyvallist}\margm{label}\margm{symbol}},
+ description={defines a new symbol},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{glsxtrnewnumber,
+ name={\csfmt{gls\-xtr\-new\-number}},
+ user1={\oargm{\keyvallist}\margm{label}},
+ description={defines a new number},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{newdualentry,
+ name={\csfmt{new\-dual\-entry}},
+ user1={\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}\margm{description}},
+ description={example given in \styfmt{glossaries} user manual},
+ category={command}
+}
+
+@dualindexentry{@gls@hypergroup,
+ name={\csfmt{@gls@hypergroup}},
+ user1={\margm{type}\margm{group id}},
+ description={identifies that the given group was used in the
+ glossary on the previous run},
+ note={internal command provided by \styfmt{glossary-hypernav}},
+ category={command}
+}
+
+@dualindexentry{glssetexpandfield,
+ name={\csfmt{gls\-set\-expand\-field}},
+ user1={\margm{field}},
+ description={when defining a new entry, the given field should be
+ expanded},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{glsxtrfmt,
+ name={\csfmt{gls\-xtr\-fmt}},
+ user1={\oargm{options}\margm{label}\margm{text}},
+ description={formats the given text according to the formatting
+ command identified by the value of the field obtained
+ from \cs{GlsXtrFmtField}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{glsxtrfmt*,
+ name={\csfmt{gls\-xtr\-fmt*}},
+ user1={\oargm{options}\margm{label}\margm{text}\oargm{insert}},
+ description={like \cs{glsxtrfmt} but inserts extra
+ material into the link text but outside of the formatting command},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{glsxtrentryfmt,
+ name={\csfmt{gls\-xtr\-entry\-fmt}},
+ user1={\margm{label}\margm{text}},
+ description={alternative to \cs{glsxtrfmt} for use in
+ section headings},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@dualindexentry{glsxtrresourcefile,
+ name={\csfmt{gls\-xtr\-resource\-file}},
+ user1={\oargm{options}\margm{filename}},
+ description={input the \ext{glstex} file created by \bibgls\ and
+ write resource instructions to the \ext{aux} file},
+ note={provided by \styfmt{glossaries-extra}},
+ seealso={resourceoptions,GlsXtrLoadResources},
+ category={command}
+}
+
+@index{resourceoptions,
+ name={resource options},
+ text={resource option}
+}
+
+@dualindexentry{opt.charset,
+ name={\csoptfmt{charset}},
+ user1={\meta{encoding-name}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.interpret-preamble,
+ name={\csoptfmt{interpret\dhyphen preamble}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.interpret-label-fields,
+ name={\csoptfmt{interpret\dhyphen label\dhyphen fields}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.primary-dual-dependency,
+ name={\csoptfmt{primary\dhyphen dual\dhyphen dependency}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.strip-missing-parents,
+ name={\csoptfmt{strip\dhyphen missing\dhyphen parents}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.copy-alias-to-see,
+ name={\csoptfmt{copy\dhyphen alias\dhyphen to\dhyphen see}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.write-preamble,
+ name={\csoptfmt{write\dhyphen preamble}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.set-widest,
+ name={\csoptfmt{set\dhyphen widest}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.duplicate-label-suffix,
+ name={\csoptfmt{duplicate\dhyphen label\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.entry-type-aliases,
+ name={\csoptfmt{entry\dhyphen type\dhyphen aliases}},
+ user1={\meta{\keyvallist}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.field-aliases,
+ name={\csoptfmt{field\dhyphen aliases}},
+ user1={\meta{\keyvallist}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.replicate-fields,
+ name={\csoptfmt{replicate\dhyphen fields}},
+ user1={\meta{\keyvallist}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.replicate-override,
+ name={\csoptfmt{replicate\dhyphen override}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.action,
+ name={\csoptfmt{action}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.copy-action-group-field,
+ name={\csoptfmt{copy\dhyphen action\dhyphen group\dhyphen field}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.src,
+ name={\csoptfmt{src}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.selection,
+ name={\csoptfmt{selection}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.match,
+ name={\csoptfmt{match}},
+ user1={\meta{\keyvallist}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.match-op,
+ name={\csoptfmt{match\dhyphen op}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.match-action,
+ name={\csoptfmt{match\dhyphen action}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.not-match,
+ name={\csoptfmt{not\dhyphen match}},
+ user1={\meta{\keyvallist}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.limit,
+ name={\csoptfmt{limit}},
+ user1={\meta{number}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.flatten,
+ name={\csoptfmt{flatten}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.flatten-lonely,
+ name={\csoptfmt{flatten\dhyphen lonely}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.flatten-lonely-rule,
+ name={\csoptfmt{flatten\dhyphen lonely\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.master,
+ name={\csoptfmt{master}},
+ user1={\meta{name}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.master-resources,
+ name={\csoptfmt{master\dhyphen resources}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.ignore-fields,
+ name={\csoptfmt{ignore\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-time-fields,
+ name={\csoptfmt{date\dhyphen time\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-fields,
+ name={\csoptfmt{date\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.time-fields,
+ name={\csoptfmt{time\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-time-field-format,
+ name={\csoptfmt{date\dhyphen time\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-time-field-format,
+ name={\csoptfmt{dual\dhyphen date\dhyphen time\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-field-format,
+ name={\csoptfmt{date\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-field-format,
+ name={\csoptfmt{dual\dhyphen date\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.time-field-format,
+ name={\csoptfmt{time\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-time-field-format,
+ name={\csoptfmt{dual\dhyphen time\dhyphen field\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-time-field-locale,
+ name={\csoptfmt{date\dhyphen time\dhyphen field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-time-field-locale,
+ name={\csoptfmt{dual\dhyphen date\dhyphen time\dhyphen
+field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-field-locale,
+ name={\csoptfmt{date\dhyphen field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-field-locale,
+ name={\csoptfmt{dual\dhyphen date\dhyphen field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.time-field-locale,
+ name={\csoptfmt{time\dhyphen field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-time-field-locale,
+ name={\csoptfmt{date\dhyphen time\dhyphen field\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.bibtex-contributor-fields,
+ name={\csoptfmt{bibtex\dhyphen contributor\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.contributor-order,
+ name={\csoptfmt{contributor\dhyphen order}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.category,
+ name={\csoptfmt{category}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.type,
+ name={\csoptfmt{type}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.counter,
+ name={\csoptfmt{counter}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.label-prefix,
+ name={\csoptfmt{label\dhyphen prefix}},
+ user1={\meta{tag}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.cs-label-prefix,
+ name={\csoptfmt{cs\dhyphen label\dhyphen prefix}},
+ user1={\meta{tag}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.record-label-prefix,
+ name={\csoptfmt{record\dhyphen label\dhyphen prefix}},
+ user1={\meta{tag}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.ext-prefixes,
+ name={\csoptfmt{ext\dhyphen prefixes}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.save-original-id,
+ name={\csoptfmt{save\dhyphen original\dhyphen id}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.short-case-change,
+ name={\csoptfmt{short\dhyphen case\dhyphen change}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.name-case-change,
+ name={\csoptfmt{name\dhyphen case\dhyphen change}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.description-case-change,
+ name={\csoptfmt{description\dhyphen case\dhyphen change}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.post-description-dot,
+ name={\csoptfmt{post\dhyphen description\dhyphen dot}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.strip-trailing-nopost,
+ name={\csoptfmt{strip\dhyphen trailing\dhyphen nopost}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.check-end-punctuation,
+ name={\csoptfmt{check\dhyphen end\dhyphen punctuation}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.group,
+ name={\csoptfmt{group}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.save-child-count,
+ name={\csoptfmt{save\dhyphen child\dhyphen count}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.short-plural-suffix,
+ name={\csoptfmt{short\dhyphen plural\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-short-plural-suffix,
+ name={\csoptfmt{dual\dhyphen short\dhyphen plural\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.save-locations,
+ name={\csoptfmt{save\dhyphen locations}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.save-loclist,
+ name={\csoptfmt{save\dhyphen loclist}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.min-loc-range,
+ name={\csoptfmt{min\dhyphen loc\dhyphen range}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.max-loc-diff,
+ name={\csoptfmt{max\dhyphen loc\dhyphen diff}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.suffixF,
+ name={\csoptfmt{suffixF}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.suffixFF,
+ name={\csoptfmt{suffixFF}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.see,
+ name={\csoptfmt{see}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.seealso,
+ name={\csoptfmt{seealso}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.alias,
+ name={\csoptfmt{alias}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.alias-loc,
+ name={\csoptfmt{alias\dhyphen loc}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.loc-prefix,
+ name={\csoptfmt{loc\dhyphen prefix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.loc-suffix,
+ name={\csoptfmt{loc\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.loc-counters,
+ name={\csoptfmt{loc\dhyphen counters}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.supplemental-locations,
+ name={\csoptfmt{supplemental\dhyphen locations}},
+ user1={\meta{basename}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.supplemental-selection,
+ name={\csoptfmt{supplemental\dhyphen selection}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.supplemental-category,
+ name={\csoptfmt{supplemental\dhyphen category}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort,
+ name={\csoptfmt{sort}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.shuffle,
+ name={\csoptfmt{shuffle}},
+ user1={\meta{seed}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-field,
+ name={\csoptfmt{sort\dhyphen field}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.symbol-sort-fallback,
+ name={\csoptfmt{symbol\dhyphen sort\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.abbreviation-sort-fallback,
+ name={\csoptfmt{abbreviation\dhyphen sort\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.abbreviation-name-fallback,
+ name={\csoptfmt{abbreviation\dhyphen name\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.trim-sort,
+ name={\csoptfmt{trim\dhyphen sort}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.missing-sort-fallback,
+ name={\csoptfmt{missing\dhyphen sort\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-missing-sort-fallback,
+ name={\csoptfmt{dual\dhyphen missing\dhyphen sort\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-missing-sort-fallback,
+ name={\csoptfmt{secondary\dhyphen missing\dhyphen sort\dhyphen fallback}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-rule,
+ name={\csoptfmt{sort\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.break-at,
+ name={\csoptfmt{break\dhyphen at}},
+ user1={\meta{option}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.break-marker,
+ name={\csoptfmt{break\dhyphen marker}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.identical-sort-action,
+ name={\csoptfmt{identical\dhyphen sort\dhyphen action}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-identical-sort-action,
+ name={\csoptfmt{dual\dhyphen identical\dhyphen sort\dhyphen action}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-identical-sort-action,
+ name={\csoptfmt{secondary\dhyphen identical\dhyphen sort\dhyphen action}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-suffix,
+ name={\csoptfmt{sort\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-suffix-marker,
+ name={\csoptfmt{sort\dhyphen suffix\dhyphen marker}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.strength,
+ name={\csoptfmt{strength}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.decomposition,
+ name={\csoptfmt{decomposition}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.letter-number-rule,
+ name={\csoptfmt{letter\dhyphen number\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.letter-number-punc-rule,
+ name={\csoptfmt{letter\dhyphen number\dhyphen punc\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.numeric-sort-pattern,
+ name={\csoptfmt{numeric\dhyphen sort\dhyphen pattern}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.numeric-locale,
+ name={\csoptfmt{numeric\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-sort-locale,
+ name={\csoptfmt{date\dhyphen sort\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.date-sort-format,
+ name={\csoptfmt{date\dhyphen sort\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.trigger-type,
+ name={\csoptfmt{trigger\dhyphen type}},
+ user1={\meta{type}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary,
+ name={\csoptfmt{secondary}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-trim-sort,
+ name={\csoptfmt{secondary\dhyphen trim\dhyphen sort}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-rule,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-break-at,
+ name={\csoptfmt{secondary\dhyphen break\dhyphen at}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-break-marker,
+ name={\csoptfmt{secondary\dhyphen break\dhyphen marker}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-suffix,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-suffix-marker,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen suffix\dhyphen
+marker}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-strength,
+ name={\csoptfmt{secondary\dhyphen strength}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-decomposition,
+ name={\csoptfmt{secondary\dhyphen decomposition}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-letter-number-rule,
+ name={\csoptfmt{secondary\dhyphen letter\dhyphen number\dhyphen
+rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-letter-number-punc-rule,
+ name={\csoptfmt{secondary\dhyphen letter\dhyphen number\dhyphen
+punc\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-numeric-sort-pattern,
+ name={\csoptfmt{secondary\dhyphen numeric\dhyphen sort\dhyphen
+pattern}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-numeric-locale,
+ name={\csoptfmt{secondary\dhyphen numeric\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-date-sort-locale,
+ name={\csoptfmt{secondary\dhyphen date\dhyphen sort\dhyphen
+locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-date-sort-format,
+ name={\csoptfmt{secondary\dhyphen date\dhyphen sort\dhyphen
+format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-prefix,
+ name={\csoptfmt{dual\dhyphen prefix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.combine-dual-locations,
+ name={\csoptfmt{combine\dhyphen dual\dhyphen locations}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-type,
+ name={\csoptfmt{dual\dhyphen type}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-category,
+ name={\csoptfmt{dual\dhyphen category}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-counter,
+ name={\csoptfmt{dual\dhyphen counter}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-short-case-change,
+ name={\csoptfmt{dual\dhyphen short\dhyphen case\dhyphen change}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-field,
+ name={\csoptfmt{dual\dhyphen field}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort,
+ name={\csoptfmt{dual\dhyphen sort}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-field,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen field}},
+ user1={\meta{field}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-trim-sort,
+ name={\csoptfmt{dual\dhyphen trim\dhyphen sort}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-rule,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-break-at,
+ name={\csoptfmt{dual\dhyphen break\dhyphen at}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-break-marker,
+ name={\csoptfmt{dual\dhyphen break\dhyphen marker}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-suffix,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen suffix}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-suffix-marker,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen suffix\dhyphen marker}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-strength,
+ name={\csoptfmt{dual\dhyphen strength}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-decomposition,
+ name={\csoptfmt{dual\dhyphen decomposition}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-letter-number-rule,
+ name={\csoptfmt{dual\dhyphen letter\dhyphen number\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-letter-number-punc-rule,
+ name={\csoptfmt{dual\dhyphen letter\dhyphen number\dhyphen punc\dhyphen rule}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-numeric-sort-pattern,
+ name={\csoptfmt{dual\dhyphen numeric\dhyphen sort\dhyphen
+pattern}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-numeric-locale,
+ name={\csoptfmt{dual\dhyphen numeric\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-sort-locale,
+ name={\csoptfmt{dual\dhyphen date\dhyphen sort\dhyphen locale}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-date-sort-format,
+ name={\csoptfmt{dual\dhyphen date\dhyphen sort\dhyphen format}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-entry-map,
+ name={\csoptfmt{dual\dhyphen entry\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-abbrv-map,
+ name={\csoptfmt{dual\dhyphen abbrv\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-abbrventry-map,
+ name={\csoptfmt{dual\dhyphen abbrventry\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-symbol-map,
+ name={\csoptfmt{dual\dhyphen symbol\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexentry-map,
+ name={\csoptfmt{dual\dhyphen indexentry\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexsymbol-map,
+ name={\csoptfmt{dual\dhyphen indexsymbol\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexabbrv-map,
+ name={\csoptfmt{dual\dhyphen indexabbrv\dhyphen map}},
+ user1={\marg{\margm{list1},\margm{list2}}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-entry-backlink,
+ name={\csoptfmt{dual\dhyphen entry\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-abbrv-backlink,
+ name={\csoptfmt{dual\dhyphen abbrv\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-entryabbrv-backlink,
+ name={\csoptfmt{dual\dhyphen entryabbrv\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-abbrventry-backlink,
+ name={\csoptfmt{dual\dhyphen abbrventry\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-symbol-backlink,
+ name={\csoptfmt{dual\dhyphen symbol\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexentry-backlink,
+ name={\csoptfmt{dual\dhyphen indexentry\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexsymbol-backlink,
+ name={\csoptfmt{dual\dhyphen indexsymbol\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-indexabbrv-backlink,
+ name={\csoptfmt{dual\dhyphen indexabbrv\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-backlink,
+ name={\csoptfmt{dual\dhyphen backlink}},
+ user1={\margm{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.tertiary-prefix,
+ name={\csoptfmt{tertiary\dhyphen prefix}},
+ user1={\margm{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.tertiary-type,
+ name={\csoptfmt{tertiary\dhyphen type}},
+ user1={\margm{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.tertiary-category,
+ name={\csoptfmt{tertiary\dhyphen category}},
+ user1={\margm{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-number-pad,
+ name={\csoptfmt{sort\dhyphen number\dhyphen pad}},
+ user1={\meta{number}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-number-pad,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen number\dhyphen pad}},
+ user1={\meta{number}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-number-pad,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen number\dhyphen pad}},
+ user1={\meta{number}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-pad-plus,
+ name={\csoptfmt{sort\dhyphen pad\dhyphen plus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-pad-plus,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen pad\dhyphen plus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-pad-plus,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen pad\dhyphen plus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.sort-pad-minus,
+ name={\csoptfmt{sort\dhyphen pad\dhyphen minus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.dual-sort-pad-minus,
+ name={\csoptfmt{dual\dhyphen sort\dhyphen pad\dhyphen minus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{opt.secondary-sort-pad-minus,
+ name={\csoptfmt{secondary\dhyphen sort\dhyphen pad\dhyphen minus}},
+ user1={\meta{marker}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@dualindexentry{GlsXtrLoadResources,
+ name={\csfmt{Gls\-Xtr\-Load\-Resources}},
+ user1={\oargm{options}},
+ description={a shortcut command that uses \gls[noindex]{glsxtrresourcefile}},
+ note={provided by \styfmt{glossaries-extra}},
+ seealso={resourceoptions,glsxtrresourcefile},
+ category={command}
+}
+
+@dualindexentry{glsxtrcopytoglossary,
+ name={\csfmt{gls\-xtr\-copy\-to\-glossary}},
+ user1={\margm{label}\margm{type}},
+ description={copies the entry given by \meta{label} to the
+glossary given by \meta{type}},
+ note={provided by \styfmt{glossaries-extra} v1.12+},
+ category={command}
+}
+
+@dualindexentry{glsxtrnewglslike,
+ name={\csfmt{gls\-xtr\-new\-gls\-like}},
+ user1={\oargm{options}\margm{prefix}\margm{gls-like
+cs}\margm{glspl-like cs}\margm{Gls-like
+cs}\margm{Glspl-like cs}},
+ description={defines commands to behave like \ics{gls}, \ics{glspl},
+ \ics{Gls} and \ics{Glspl} with the given label prefix},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ seealso={glsxtrnewgls},
+ category={command}
+}
+
+@dualindexentry{glsxtrnewgls,
+ name={\csfmt{gls\-xtr\-new\-gls}},
+ user1={\oargm{options}\margm{prefix}\margm{cs}},
+ description={defines the command \meta{cs} to behave like
+ \ics{gls} with the given label prefix},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ seealso={gls},
+ category={command}
+}
+
+@dualindexentry{glsnoidxdisplayloc,
+ name={\csfmt{gls\-no\-idx\-display\-loc}},
+ user1={\margm{prefix}\margm{counter}\margm{format}\margm{location}},
+ description={handler used to display the number list stored in
+ the \gls[noindex]{dual.field.loclist} field},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{glsxtr@record,
+ name={\csfmt{glsxtr@record}},
+ user1={\margm{label}\margm{prefix}\margm{counter}\margm{format}\margm{location}},
+ description={this command is written to the \ext{aux} file each
+ time an entry is indexed to provide \bibgls\ with the record information},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{glsxtrfieldlistadd,
+ name={\csfmt{gls\-xtr\-field\-list\-add}},
+ user1={\margm{label}\margm{field}\margm{item}},
+ description={adds the given item to the given field that contains
+ an \styfmt{etoolbox} internal list},
+ note={provided by \styfmt{glossaries-extra} v1.12+},
+ category={command}
+}
+
+@index{omicron,
+ name={\csfmt{omicron}},
+ user1={},
+ description={custom command},
+ category={command}
+}
+
+@index{bigoperatornamefmt,
+ name={\csfmt{bigoperatornamefmt}},
+ user1={\margm{text}},
+ description={custom command},
+ category={command}
+}
+
+@index{nary,
+ name={\csfmt{nary}},
+ user1={\margm{text}},
+ description={custom command},
+ category={command}
+}
+
+@dualindexentry{strong,
+ name={\csfmt{strong}},
+ user1={\margm{text}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{sortop,
+ name={\csfmt{sortop}},
+ user1={\margm{text1}\margm{text2}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{sortname,
+ name={\csfmt{sortname}},
+ user1={\margm{first name(s)}\margm{surname}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{sortvonname,
+ name={\csfmt{sort\-von\-name}},
+ user1={\margm{first name(s)}\margm{von}\margm{surname}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{sortart,
+ name={\csfmt{sortart}},
+ user1={\margm{article}\margm{text}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{sortmediacreator,
+ name={\csfmt{sort\-media\-creator}},
+ user1={\margm{first name(s)}\margm{surname}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{setfmt,
+ name={\csfmt{setfmt}},
+ user1={\margm{symbol}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{setcontentsfmt,
+ name={\csfmt{setcontentsfmt}},
+ user1={\margm{contents}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{setmembershipfmt,
+ name={\csfmt{setmembershipfmt}},
+ user1={\margm{variable(s)}\margm{condition}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{setmembershiponeargfmt,
+ name={\csfmt{setmembershiponeargfmt}},
+ user1={\marg{\margm{variable(s)}\margm{condition}}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{setcardfmt,
+ name={\csfmt{setcardfmt}},
+ user1={\margm{maths}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{numspacefmt,
+ name={\csfmt{numspacefmt}},
+ user1={\margm{symbol}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{transposefmt,
+ name={\csfmt{transposefmt}},
+ user1={\margm{maths}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{invfmt,
+ name={\csfmt{invfmt}},
+ user1={\margm{maths}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{vecfmt,
+ name={\csfmt{vecfmt}},
+ user1={\margm{symbol}},
+ description={example command},
+ category={command}
+}
+
+@dualindexentry{mtxfmt,
+ name={\csfmt{mtxfmt}},
+ user1={\margm{symbol}},
+ description={example command},
+ category={command}
+}
+
+@index{fileformats,
+ name={file formats},
+ text={file format}
+}
+
+@index{tex,
+ name={\extfmt{tex}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{bib,
+ name={\extfmt{bib}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{aux,
+ name={\extfmt{aux}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{out,
+ name={\extfmt{out}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{sh,
+ name={\extfmt{sh}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{bat,
+ name={\extfmt{bat}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{jar,
+ name={\extfmt{jar}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{glg,
+ name={\extfmt{glg}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{log,
+ name={\extfmt{log}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{glstex,
+ name={\extfmt{glstex}},
+ category={fileformat},
+ parent={fileformats}
+}
+
+@index{applications,
+ name={applications},
+ text={applications}
+}
+
+@index{bibtex,
+ name={\appfmt{bibtex}},
+ category={application},
+ parent={applications}
+}
+
+@index{biber,
+ name={\appfmt{biber}},
+ category={application},
+ parent={applications}
+}
+
+@index{makeindex,
+ name={\appfmt{makeindex}},
+ category={application},
+ parent={applications}
+}
+
+@index{xindy,
+ name={\appfmt{xindy}},
+ category={application},
+ parent={applications}
+}
+
+@index{makeglossaries,
+ name={\appfmt{make\-glos\-saries}},
+ category={application},
+ parent={applications}
+}
+
+@index{kpsewhich,
+ name={\appfmt{kpsewhich}},
+ category={application},
+ parent={applications}
+}
+
+@index{convertgls2bib,
+ name={\appfmt{convert\-gls2bib}},
+ category={application},
+ parent={applications}
+}
+
+@index{packages,
+ name={packages},
+ text={package}
+}
+
+@index{glossaries,
+ name={\styfmt{glossaries}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossaries-extra,
+ name={\styfmt{glossaries-extra}},
+ category={package},
+ parent={packages}
+}
+
+@index{pifonts,
+ name={\styfmt{pifonts}},
+ category={package},
+ parent={packages}
+}
+
+@index{upgreek,
+ name={\styfmt{upgreek}},
+ category={package},
+ parent={packages}
+}
+
+@index{fourier,
+ name={\styfmt{fourier}},
+ category={package},
+ parent={packages}
+}
+
+@index{wasysym,
+ name={\styfmt{wasysym}},
+ category={package},
+ parent={packages}
+}
+
+@index{amssymb,
+ name={\styfmt{amssymb}},
+ category={package},
+ parent={packages}
+}
+
+@index{stix,
+ name={\styfmt{stix}},
+ category={package},
+ parent={packages}
+}
+
+@index{mhchem,
+ name={\styfmt{mhchem}},
+ category={package},
+ parent={packages}
+}
+
+@index{bpchem,
+ name={\styfmt{bpchem}},
+ category={package},
+ parent={packages}
+}
+
+@index{siunitx,
+ name={\styfmt{siunitx}},
+ category={package},
+ parent={packages}
+}
+
+@index{mfirstuc,
+ name={\styfmt{mfirstuc}},
+ category={package},
+ parent={packages}
+}
+
+@index{hyperref,
+ name={\styfmt{hyperref}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-hypernav,
+ name={\styfmt{glossary\dhyphen hypernav}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossaries-prefix,
+ name={\styfmt{glossaries\dhyphen prefix}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossaries-accsupp,
+ name={\styfmt{glossaries\dhyphen accsupp}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossaries-extra-stylemods,
+ name={\styfmt{glossaries\dhyphen extra\dhyphen stylemods}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-list,
+ name={\styfmt{glossary\dhyphen list}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-tree,
+ name={\styfmt{glossary\dhyphen tree}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-mcols,
+ name={\styfmt{glossary\dhyphen mcols}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-long,
+ name={\styfmt{glossary\dhyphen long}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-longbooktabs,
+ name={\styfmt{glossary\dhyphen longbooktabs}},
+ category={package},
+ parent={packages}
+}
+
+@index{glossary-bookindex,
+ name={\styfmt{glossary\dhyphen bookindex}},
+ category={package},
+ parent={packages}
+}
+
+@index{inputenc,
+ name={\styfmt{inputenc}},
+ category={package},
+ parent={packages}
+}
+
+@index{fontenc,
+ name={\styfmt{fontenc}},
+ category={package},
+ parent={packages}
+}
+
+@index{polyglossia,
+ name={\styfmt{polyglossia}},
+ category={package},
+ parent={packages}
+}
+
+@index{fontspec,
+ name={\styfmt{fontspec}},
+ category={package},
+ parent={packages}
+}
+
+@index{textcase,
+ name={\styfmt{textcase}},
+ category={package},
+ parent={packages}
+}
+
+@index{datetime2,
+ name={\styfmt{datetime2}},
+ category={package},
+ parent={packages}
+}
+
+@index{datatool-base,
+ name={\styfmt{datatool\dhyphen base}},
+ category={package},
+ parent={packages}
+}
+
+@index{datatool,
+ name={\styfmt{datatool}},
+ category={package},
+ parent={packages}
+}
+
+@index{etoolbox,
+ name={\styfmt{etoolbox}},
+ category={package},
+ parent={packages}
+}
+
+@index{tracklang,
+ name={\styfmt{tracklang}},
+ category={package},
+ parent={packages}
+}
+
+@index{stringconcat,
+ name={\code{\#} (string concatenation)},
+ text={\code{\#}}
+}
+
+@index{param,
+ name={\code{\#} (parameter)},
+ text={\code{\#}}
+}
+
+@index{hashchar,
+ name={\code{\#} (literal)},
+ text={\code{\#}}
+}
+
+@index{cs.hash,
+ name={\csfmt{\#}}
+}
+
+@index{colsep,
+ name={\code{\&} (alignment)},
+ text={\code{\&}}
+}
+
+@index{ampchar,
+ name={\code{\&} (literal)},
+ text={\code{\&}}
+}
+
+@index{cs.amp,
+ name={\csfmt{\&}}
+}
+
+@index{bgroupchar,
+ name={\code{\{} (begin group)},
+ text={\code{\{}}
+}
+
+@index{openbracechar,
+ name={\code{\{} (literal)},
+ text={\code{\{}}
+}
+
+@index{cs.openbrace,
+ name={\csfmt{\{}}
+}
+
+@index{egroupchar,
+ name={\code{\}} (end group)},
+ text={\code{\}}}
+}
+
+@index{closebracechar,
+ name={\code{\}} (literal)},
+ text={\code{\}}}
+}
+
+@index{cs.closebrace,
+ name={\csfmt{\}}}
+}
+
+@index{commentchar,
+ name={\code{\%} (comment)},
+ text={\code{\%}}
+}
+
+@index{percentchar,
+ name={\code{\%} (literal)},
+ text={\code{\%}}
+}
+
+@index{cs.percent,
+ name={\csfmt{\%}}
+}
+
+@index{sbchar,
+ name={\code{\_} (subscript)},
+ text={\code{\_}}
+}
+
+@index{underscorechar,
+ name={\code{\_} (literal)},
+ text={\code{\_}}
+}
+
+@index{cs.underscore,
+ name={\csfmt{\_}}
+}
+
+@index{spchar,
+ name={\code{\char`\^} (superscript)},
+ text={\code{\char`\^}}
+}
+
+@index{circumchar,
+ name={\code{\char`\^} (literal)},
+ text={\code{\char`\^}}
+}
+
+@index{cs.circum,
+ name={\csfmt{\char`\^}}
+}
+
+@index{mshiftchar,
+ name={\code{\$} (maths shift)},
+ text={\code{\$}}
+}
+
+@index{dollarchar,
+ name={\code{\$} (literal)},
+ text={\code{\$}}
+}
+
+@index{cs.dollar,
+ name={\csfmt{\$}}
+}
+
+@index{escchar,
+ name={\code{\glsbackslash} (escape)},
+ text={\code{\glsbackslash}}
+}
+
+@index{backslashchar,
+ name={\code{\glsbackslash} (literal)},
+ text={\code{\glsbackslash}}
+}
+
+@index{cs.backslash,
+ name={\csfmt{\glsbackslash}}
+}
+
+@index{nbspchar,
+ name={\code{\glstildechar} (non-breakable space)},
+ text={\code{\glstildechar}}
+}
+
+@index{tildechar,
+ name={\code{\glstildechar} (literal)},
+ text={\code{\glstildechar}}
+}
+
+@index{cs.tilde,
+ name={\csfmt{\glstildechar}}
+}
+
+@index{zeroormore,
+ name={\code{*} (regular expression, zero or more)}
+}
+
+@index{matchanydot,
+ name={\code{.}\ (regular expression, match any)}
+}
+
+@index{periodchar,
+ name={\code{.}\ (end of sentence)},
+ text={\code{.}},
+ alias={full-stop}
+}
+
+@index{cs.period,
+ name={\csfmt{.}}
+}
+
+@index{cs.space,
+ name={\csfmt{\textvisiblespace}}
+}
+
+@index{undef,
+ name={\csfmt{undef}},
+ user1={\meta{cs}},
+ description={undefines the control sequence \meta{cs}},
+ note={provided by \styfmt{etoolbox}},
+ category={command}
+}
+
+@index{xifinlist,
+ name={\csfmt{xifinlist}},
+ user1={\margm{element}\margm{list cs}\margm{true}\margm{false}},
+ description={tests if \meta{element} is in the list stored
+ in the control sequence \meta{list cs}},
+ note={provided by \styfmt{etoolbox}},
+ category={command}
+}
+
+@index{listxadd,
+ name={\csfmt{listxadd}},
+ user1={\margm{list cs}\margm{element}},
+ description={globally adds (expanded) \meta{element} to the list stored
+ in the control sequence \meta{list cs}},
+ note={provided by \styfmt{etoolbox}},
+ category={command}
+}
+
+@index{marvosym,
+ name={\styfmt{marvosym}},
+ category={package},
+ parent={packages}
+}
+
+@index{ifsym,
+ name={\styfmt{ifsym}},
+ category={package},
+ parent={packages}
+}
+
+@index{CJKutf8,
+ name={\styfmt{CJKutf8}},
+ category={package},
+ parent={packages}
+}
+
+@index{env.CJK,
+ name={\envfmt{CJK}},
+ category={environment}
+}
+
+@index{env.description,
+ name={\envfmt{description}},
+ category={environment}
+}
+
+@index{longtable,
+ name={\styfmt{longtable}},
+ category={package},
+ parent={packages}
+}
+
+@index{env.longtable,
+ name={\envfmt{longtable}},
+ category={environment}
+}
+
+@index{abbreviationstyles,
+ name={abbreviation styles},
+ text={abbreviation style}
+}
+
+@index{long-noshort-desc,
+ name={\abbrstylefmt{long-noshort-desc}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short-sc,
+ name={\abbrstylefmt{long-short-sc}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short-sm,
+ name={\abbrstylefmt{long-short-sm}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short,
+ name={\abbrstylefmt{long-short}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short-user,
+ name={\abbrstylefmt{long-short-user}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short-desc,
+ name={\abbrstylefmt{long-short-desc}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-short-user-desc,
+ name={\abbrstylefmt{long-short-user-desc}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-postshort-user-desc,
+ name={\abbrstylefmt{long-postshort-user-desc}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{short-long,
+ name={\abbrstylefmt{short-long}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{long-only-short-only,
+ name={\abbrstylefmt{long-only-short-only}},
+ category={abbreviationstyle},
+ parent={abbreviationstyles}
+}
+
+@index{glossarystyle,
+ name={glossary styles},
+ text={glossary style}
+}
+
+@index{glostyle.indexgroup,
+ name={\glostylefmt{indexgroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.mcolindexgroup,
+ name={\glostylefmt{mcolindexgroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.indexhypergroup,
+ name={\glostylefmt{indexhypergroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.alttree,
+ name={\glostylefmt{alttree}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.alttreegroup,
+ name={\glostylefmt{alttreegroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.mcolalttree,
+ name={\glostylefmt{mcolalttree}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.mcolalttreegroup,
+ name={\glostylefmt{mcolalttreegroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.list,
+ name={\glostylefmt{list}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.altlist,
+ name={\glostylefmt{altlist}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.altlistgroup,
+ name={\glostylefmt{altlistgroup}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.index,
+ name={\glostylefmt{index}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.bookindex,
+ name={\glostylefmt{bookindex}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.long3col,
+ name={\glostylefmt{long3col}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{glostyle.long3col-booktabs,
+ name={\glostylefmt{long3col\dhyphen booktabs}},
+ category={glossarystyle},
+ parent={glossarystyle}
+}
+
+@index{categoryattribute,
+ name={category attributes},
+ text={category attribute}
+}
+
+@index{recordcount,
+ name={\catattrfmt{recordcount}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{glossname,
+ name={\catattrfmt{glossname}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{glossnamefont,
+ name={\catattrfmt{glossnamefont}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{glossdescfont,
+ name={\catattrfmt{glossdescfont}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{textformat,
+ name={\catattrfmt{textformat}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{aposplural,
+ name={\catattrfmt{aposplural}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{noshortplural,
+ name={\catattrfmt{noshortplural}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{targeturl,
+ name={\catattrfmt{targeturl}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{targetname,
+ name={\catattrfmt{targetname}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{externallocation,
+ name={\catattrfmt{externallocation}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{discardperiod,
+ name={\catattrfmt{discardperiod}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
+@index{ctr.equation,
+ name={\counterfmt{equation}},
+ category={counter}
+}
+
+@index{ctr.page,
+ name={\counterfmt{page}},
+ category={counter}
+}
+
+@index{ctr.section,
+ name={\counterfmt{section}},
+ category={counter}
+}
+
+@index{labelprefixes,
+ name={label prefixes},
+ text={label prefix},
+ plural={label prefixes}
+}
+
+@index{idprefix.dual,
+ name={\idprefixfmt{dual}},
+ category={idprefix},
+ parent={labelprefixes}
+}
+
+@index{idprefix.tertiary,
+ name={\idprefixfmt{tertiary}},
+ category={idprefix},
+ parent={labelprefixes}
+}
+
+@index{idprefix.extn,
+ name={\idprefixfmt{ext\meta{n}}},
+ category={idprefix},
+ parent={labelprefixes}
+}
+
+@index{packageoptions,
+ name={package options},
+ text={package option}
+}
+
+@index{styopt.record,
+ name={\styoptfmt{record}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.automake,
+ name={\styoptfmt{automake}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.shortcuts,
+ name={\styoptfmt{shortcuts}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.accsupp,
+ name={\styoptfmt{accsupp}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.abbreviations,
+ name={\styoptfmt{abbreviations}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.symbols,
+ name={\styoptfmt{symbols}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.numbers,
+ name={\styoptfmt{numbers}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.sort,
+ name={\styoptfmt{sort}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.undefaction,
+ name={\styoptfmt{undefaction}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.nomain,
+ name={\styoptfmt{nomain}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.nonumberlist,
+ name={\styoptfmt{nonumberlist}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.nogroupskip,
+ name={\styoptfmt{nogroupskip}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.xindy,
+ name={\styoptfmt{xindy}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.nopostdot,
+ name={\styoptfmt{nopostdot}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.postdot,
+ name={\styoptfmt{postdot}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.index,
+ name={\styoptfmt{index}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.nostyles,
+ name={\styoptfmt{nostyles}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.stylemods,
+ name={\styoptfmt{stylemods}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.style,
+ name={\styoptfmt{style}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{styopt.section,
+ name={\styoptfmt{section}},
+ category={packageoption},
+ parent={packageoptions}
+}
+
+@index{fields,
+ name={fields},
+ text={field}
+}
+
+@dualindexentry{field.alias,
+ name={\fieldfmt{alias}},
+ description={The entry with this field set is a synonym of the
+ entry whose label is given by this field.},
+ note={provided by \styfmt{glossaries-extra}},
+ category={extrafield},
+ parent={fields}
+}
+
+@dualindexentry{field.category,
+ name={\fieldfmt{category}},
+ description={The entry's category label.},
+ note={provided by \styfmt{glossaries-extra}},
+ category={extrafield},
+ parent={fields}
+}
+
+@dualindexentry{field.description,
+ name={\fieldfmt{description}},
+ description={The description displayed in the glossary.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.descriptionplural,
+ name={\fieldfmt{descriptionplural}},
+ description={The plural form of the description.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.first,
+ name={\fieldfmt{first}},
+ description={The text to display on first use of \gls{gls}\margm{label}.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.firstplural,
+ name={\fieldfmt{firstplural}},
+ description={The text to display on first use of \gls{glspl}\margm{label}.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.long,
+ name={\fieldfmt{long}},
+ description={The long form of an abbreviation. (Set internally
+ by commands like \gls{newabbreviation}.)},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.longplural,
+ name={\fieldfmt{longplural}},
+ description={The plural long form of an abbreviation.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.name,
+ name={\fieldfmt{name}},
+ description={The name displayed in the glossary.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.parent,
+ name={\fieldfmt{parent}},
+ description={The parent entry's label.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.plural,
+ name={\fieldfmt{plural}},
+ description={The text to display on subsequent use of
+ \gls{glspl}\margm{label}.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.see,
+ name={\fieldfmt{see}},
+ description={General purpose cross-reference
+ (syntax: \code{see=\marg{\oargm{tag}\meta{xr-list}}}).},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.seealso,
+ name={\fieldfmt{seealso}},
+ description={Cross-reference related entries
+ (syntax: \code{seealso=\margm{xr-list}}).},
+ note={provided by \styfmt{glossaries-extra}},
+ category={extrafield},
+ parent={fields}
+}
+
+@dualindexentry{field.short,
+ name={\fieldfmt{short}},
+ description={The short form of an abbreviation. (Set internally
+ by commands like \gls{newabbreviation}.)},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.shortplural,
+ name={\fieldfmt{shortplural}},
+ description={The plural short form of an abbreviation.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.symbol,
+ name={\fieldfmt{symbol}},
+ description={The associated symbol.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.symbolplural,
+ name={\fieldfmt{symbolplural}},
+ description={The plural form of the associated symbol.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.text,
+ name={\fieldfmt{text}},
+ description={The text to display on subsequent use of
+ \gls{gls}\margm{label}.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user1,
+ name={\fieldfmt{user1}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user2,
+ name={\fieldfmt{user2}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user3,
+ name={\fieldfmt{user3}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user4,
+ name={\fieldfmt{user4}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user5,
+ name={\fieldfmt{user5}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.user6,
+ name={\fieldfmt{user6}},
+ description={A general purpose user field.},
+ note={provided by \styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
+}
+
+@dualindexentry{field.duallong,
+ name={\fieldfmt{duallong}},
+ description={The long form of a dual
+ abbreviation mapped by \gls{dual.entry.dualabbreviation}.},
+ note={provided by \appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@dualindexentry{field.duallongplural,
+ name={\fieldfmt{duallongplural}},
+ description={The plural long form of a dual
+ abbreviation mapped by \gls{dual.entry.dualabbreviation}.},
+ note={provided by \appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@dualindexentry{field.dualshort,
+ name={\fieldfmt{dualshort}},
+ description={The short form of a dual
+ abbreviation mapped by \gls{dual.entry.dualabbreviation}.},
+ note={provided by \appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@dualindexentry{field.dualshortplural,
+ name={\fieldfmt{dualshortplural}},
+ description={The plural short form of a dual abbreviation
+ mapped by \gls{dual.entry.dualabbreviation}.},
+ note={provided by \appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@dualindexentry{field.prefix,
+ name={\fieldfmt{prefix}},
+ description={The prefix associated with the \gls[noindex]{dual.field.text}
+ field.},
+ note={provided by \styfmt{glossaries-prefix}},
+ category={prefixfield},
+ parent={fields}
+}
+
+@dualindexentry{field.prefixfirst,
+ name={\fieldfmt{prefixfirst}},
+ description={The prefix associated with the \gls[noindex]{dual.field.first}
+field.},
+ note={provided by \styfmt{glossaries-prefix}},
+ category={prefixfield},
+ parent={fields}
+}
+
+@dualindexentry{field.prefixfirstplural,
+ name={\fieldfmt{prefixfirstplural}},
+ description={The prefix associated with the
+ \gls[noindex]{dual.field.firstplural} field.},
+ note={provided by \styfmt{glossaries-prefix}},
+ category={prefixfield},
+ parent={fields}
+}
+
+@dualindexentry{field.prefixplural,
+ name={\fieldfmt{prefixplural}},
+ description={The prefix associated with the
+ \gls[noindex]{dual.field.plural} field.},
+ note={provided by \styfmt{glossaries-prefix}},
+ category={prefixfield},
+ parent={fields}
+}
+
+@dualindexentry{field.access,
+ name={\fieldfmt{access}},
+ description={The replacement text for the \gls[noindex]{dual.field.name} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.descriptionaccess,
+ name={\fieldfmt{descriptionaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.description} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.descriptionpluralaccess,
+ name={\fieldfmt{descriptionpluralaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.descriptionplural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.firstaccess,
+ name={\fieldfmt{firstaccess}},
+ description={The replacement text for the \gls[noindex]{dual.field.first} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.firstpluralaccess,
+ name={\fieldfmt{firstpluralaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.firstplural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.longaccess,
+ name={\fieldfmt{longaccess}},
+ description={The replacement text for the \gls[noindex]{dual.field.long} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.longpluralaccess,
+ name={\fieldfmt{longpluralaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.longplural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.pluralaccess,
+ name={\fieldfmt{pluralaccess}},
+ description={The replacement text for the \gls[noindex]{dual.field.plural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.shortaccess,
+ name={\fieldfmt{shortaccess}},
+ description={The replacement text for the \gls[noindex]{dual.field.short} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.shortpluralaccess,
+ name={\fieldfmt{shortpluralaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.shortplural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.symbolaccess,
+ name={\fieldfmt{symbolaccess}},
+ description={The replacement text for the \gls[noindex]{dual.field.symbol} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.symbolpluralaccess,
+ name={\fieldfmt{symbolpluralaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.symbolplural} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@dualindexentry{field.textaccess,
+ name={\fieldfmt{textaccess}},
+ description={The replacement text for the
+ \gls[noindex]{dual.field.text} field.},
+ note={provided by \styfmt{glossaries-accsupp}},
+ category={accessfield},
+ parent={fields}
+}
+
+@index{internalfields,
+ name={fields, internal},
+ text={internal fields}
+}
+
+@dualindexentry{field.childcount,
+ name={\fieldfmt{childcount}},
+ description={Stores the number of children this entry has
+ had selected.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.counter,
+ name={\fieldfmt{counter}},
+ description={The default counter used for indexing (assigned by
+ the \gls{dual.opt.counter} option).},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.group,
+ name={\fieldfmt{group}},
+ description={The letter group determined by the comparator
+ (or assigned by the \gls{dual.opt.group} option).},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.location,
+ name={\fieldfmt{location}},
+ description={The typeset location list.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.loclist,
+ name={\fieldfmt{loclist}},
+ description={The internal list of locations.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.recordcount,
+ name={\fieldfmt{recordcount}},
+ description={Used with record counting to store the
+ total record count.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.recordcount.counter,
+ name={\fieldfmt{recordcount.\discretionary{}{}{}\meta{counter}}},
+ description={Used with record counting to store the
+ total number of records for a given counter.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.recordcount.counter.location,
+ name={\fieldfmt{recordcount.\discretionary{}{}{}\meta{counter}.\discretionary{}{}{}\meta{location}}},
+ description={Used with record counting to store the
+ total number of records for a given location.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.secondarygroup,
+ name={\fieldfmt{secondarygroup}},
+ description={The letter group determined by the
+ comparator used with the \gls{dual.opt.secondary} sort.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.secondarysort,
+ name={\fieldfmt{secondarysort}},
+ description={The sort value determined by the
+ comparator used with the \gls{dual.opt.secondary} sort.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.sort,
+ name={\fieldfmt{sort}},
+ description={The sort value obtained by the comparator.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.type,
+ name={\fieldfmt{type}},
+ description={The glossary this entry belongs to (assigned by
+ the \gls{dual.opt.type} option).},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.fieldendpunc,
+ name={\meta{field}\fieldfmt{endpunc}},
+ description={Used with the \gls{dual.opt.check-end-punctuation}
+ option.},
+ note={internal field set by \appfmt{bibgls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.currcount,
+ name={\fieldfmt{currcount}},
+ description={Used with entry counting to store the current total.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.currcountunit,
+ name={\fieldfmt{currcount@}\meta{value}},
+ description={Used with unit entry counting (\styfmt{glossaries-extra}).},
+ note={internal field set by \styfmt{glossaries-extra}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.desc,
+ name={\fieldfmt{desc}},
+ description={Corresponds to \gls[noindex]{dual.field.description} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.descplural,
+ name={\fieldfmt{descplural}},
+ description={Corresponds to \gls[noindex]{dual.field.descriptionplural} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.firstpl,
+ name={\fieldfmt{firstpl}},
+ description={Corresponds to \gls[noindex]{dual.field.firstplural} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.flag,
+ name={\fieldfmt{flag}},
+ description={Boolean that determines if an entry has been used.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.index,
+ name={\fieldfmt{index}},
+ description={The main part of the indexing code
+ (\appfmt{makeindex} or \appfmt{xindy}).},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.level,
+ name={\fieldfmt{level}},
+ description={Hierarchical level.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.longpl,
+ name={\fieldfmt{longpl}},
+ description={Corresponds to \gls[noindex]{dual.field.longplural} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.nonumberlist,
+ name={\fieldfmt{nonumberlist}},
+ description={Used to suppress the location list for a specific entry.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.prevcount,
+ name={\fieldfmt{prevcount}},
+ description={Used with entry counting to store the total
+ from the previous run.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.prevcountunit,
+ name={\fieldfmt{prevcount@}\meta{value}},
+ description={Used with unit entry counting
+ (\styfmt{glossaries-extra}).},
+ note={internal field set by \styfmt{glossaries-extra}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.prevunitmax,
+ name={\fieldfmt{prevunitmax}},
+ description={Used with unit entry counting
+ (\styfmt{glossaries-extra}).},
+ note={internal field set by \styfmt{glossaries-extra}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.prevunittotal,
+ name={\fieldfmt{prevunittotal}},
+ description={Used with unit entry counting
+ (\styfmt{glossaries-extra}).},
+ note={internal field set by \styfmt{glossaries-extra}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.shortpl,
+ name={\fieldfmt{shortpl}},
+ description={Corresponds to \gls[noindex]{dual.field.shortplural} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.sortvalue,
+ name={\fieldfmt{sortvalue}},
+ description={Original \gls[noindex]{dual.field.sort} value
+ (before sanitizing and escaping special characters).},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.unitlist,
+ name={\fieldfmt{unitlist}},
+ description={Used with unit entry counting
+ (\styfmt{glossaries-extra}).},
+ note={internal field set by \styfmt{glossaries-extra}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.useri,
+ name={\fieldfmt{useri}},
+ description={Corresponds to \gls[noindex]{dual.field.user1} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.userii,
+ name={\fieldfmt{userii}},
+ description={Corresponds to \gls[noindex]{dual.field.user2} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.useriii,
+ name={\fieldfmt{useriii}},
+ description={Corresponds to \gls[noindex]{dual.field.user3} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.useriv,
+ name={\fieldfmt{useriv}},
+ description={Corresponds to \gls[noindex]{dual.field.user4} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.userv,
+ name={\fieldfmt{userv}},
+ description={Corresponds to \gls[noindex]{dual.field.user5} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.uservi,
+ name={\fieldfmt{uservi}},
+ description={Corresponds to \gls[noindex]{dual.field.user6} key.},
+ note={internal field set by \styfmt{glossaries}},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.bib2gls@sort,
+ name={\fieldfmt{bib2gls@sort}},
+ description={Used by \bibgls\ to store the actual sort value.},
+ note={internal field set by \bibgls},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@dualindexentry{field.bib2gls@sortfallback,
+ name={\fieldfmt{bib2gls@sortfallback}},
+ description={Used by \bibgls\ to store the sort fallback value.},
+ note={internal field set by \bibgls},
+ category={baseinternalfield},
+ parent={internalfields}
+}
+
+@index{entrytypes,
+ name={entry types},
+ text={entry type}
+}
+
+@dualindexentry{entry.string,
+ name={\atentryfmt{string}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.preamble,
+ name={\atentryfmt{preamble}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.entry,
+ name={\atentryfmt{entry}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.symbol,
+ name={\atentryfmt{symbol}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.number,
+ name={\atentryfmt{number}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.index,
+ name={\atentryfmt{index}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.abbreviation,
+ name={\atentryfmt{abbreviation}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.acronym,
+ name={\atentryfmt{acronym}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualentry,
+ name={\atentryfmt{dual\-entry}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualindexentry,
+ name={\atentryfmt{dual\-index\-entry}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualindexabbreviation,
+ name={\atentryfmt{dual\-index\-abbre\-via\-tion}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualindexsymbol,
+ name={\atentryfmt{dual\-index\-symbol}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualindexnumber,
+ name={\atentryfmt{dual\-index\-number}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualabbreviationentry,
+ name={\atentryfmt{dual\-abbre\-via\-tion\-entry}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualentryabbreviation,
+ name={\atentryfmt{dual\-entry\-abbre\-via\-tion}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualsymbol,
+ name={\atentryfmt{dual\-symbol}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualnumber,
+ name={\atentryfmt{dual\-number}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualabbreviation,
+ name={\atentryfmt{dual\-abbre\-via\-tion}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.dualacronym,
+ name={\atentryfmt{dual\-acronym}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@dualindexentry{entry.tertiaryindexabbreviationentry,
+ name={\atentryfmt{tert\-iary\-index\-abbre\-via\-tion\-entry}},
+ category={entrytype},
+ parent={entrytypes}
+}
+
+@index{switches,
+ name={switches},
+ text={switch},
+ plural={switches},
+ see={commandlineoptions}
+}
+
+@index{commandlineoptions,
+ name={command line options},
+ text={command line option}
+}
+
+@dualindexentry{switch.help,
+ name={\longargfmt{help}},
+ symbol={\shortargfmt{h}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.version,
+ name={\longargfmt{version}},
+ symbol={\shortargfmt{v}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.debug,
+ name={\longargfmt{debug}},
+ user1={\oargm{n}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-debug,
+ name={\longargfmt{no\dhyphen debug}},
+ symbol={\longargfmt{nodebug}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.verbose,
+ name={\longargfmt{verbose}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-verbose,
+ name={\longargfmt{no\dhyphen verbose}},
+ symbol={\longargfmt{noverbose}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.silent,
+ name={\longargfmt{silent}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.locale,
+ name={\longargfmt{locale}},
+ symbol={\shortargfmt{l}},
+ user1={\meta{lang}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.log-file,
+ name={\longargfmt{log\dhyphen file}},
+ symbol={\shortargfmt{t}},
+ user1={\meta{filename}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.dir,
+ name={\longargfmt{dir}},
+ symbol={\shortargfmt{d}},
+ user1={\meta{dirname}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.interpret,
+ name={\longargfmt{interpret}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-interpret,
+ name={\longargfmt{no\dhyphen interpret}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.break-space,
+ name={\longargfmt{break\dhyphen space}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-break-space,
+ name={\longargfmt{no\dhyphen break\dhyphen space}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.packages,
+ name={\longargfmt{packages}},
+ symbol={\shortargfmt{p}},
+ user1={\meta{list}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.mfirstuc-protection,
+ name={\longargfmt{mfirstuc\dhyphen protection}},
+ symbol={\shortargfmt{u}},
+ user1={\meta{list}\argor\code{all}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-mfirstuc-protection,
+ name={\longargfmt{no\dhyphen mfirstuc\dhyphen protection}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.mfirstuc-math-protection,
+ name={\longargfmt{mfirstuc\dhyphen math\dhyphen protection}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-mfirstuc-math-protection,
+ name={\longargfmt{no\dhyphen mfirstuc\dhyphen math\dhyphen protection}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.nested-link-check,
+ name={\longargfmt{nested\dhyphen link\dhyphen check}},
+ user1={\meta{list}\argor\code{none}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-nested-link-check,
+ name={\longargfmt{no\dhyphen nested\dhyphen link\dhyphen check}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.shortcuts,
+ name={\longargfmt{shortcuts}},
+ user1={\meta{value}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.map-format,
+ name={\longargfmt{map\dhyphen format}},
+ symbol={\shortargfmt{m}},
+ user1={\meta{map:value list}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.group,
+ name={\longargfmt{group}},
+ symbol={\shortargfmt{g}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-group,
+ name={\longargfmt{no\dhyphen group}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.tex-encoding,
+ name={\longargfmt{tex\dhyphen encoding}},
+ user1={\meta{name}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-expand-fields,
+ name={\longargfmt{no\dhyphen expand\dhyphen fields}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.expand-fields,
+ name={\longargfmt{expand\dhyphen fields}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.record-count,
+ name={\longargfmt{record\dhyphen count}},
+ symbol={\shortargfmt{c}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-record-count,
+ name={\longargfmt{no\dhyphen record\dhyphen count}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.record-count-unit,
+ name={\longargfmt{record\dhyphen count\dhyphen unit}},
+ symbol={\shortargfmt{n}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-record-count-unit,
+ name={\longargfmt{no\dhyphen record\dhyphen count\dhyphen unit}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.trim-fields,
+ name={\longargfmt{trim\dhyphen fields}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@dualindexentry{switch.no-trim-fields,
+ name={\longargfmt{no\dhyphen trim\dhyphen fields}},
+ user1={},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@index{lettergroup,
+ name={letter group}
+}
+
+@index{nonlettergroup,
+ name={non-letter group}
+}
+
+@index{symbolgroup,
+ name={symbol group},
+ alias={nonlettergroup}
+}
+
+@index{emptygroup,
+ name={empty group (unknown commands)},
+ text={empty group}
+}
+
+@index{numbergroup,
+ name={number group}
+}
+
+@index{datetimegroup,
+ name={date-time group}
+}
+
+@index{dategroup,
+ name={date group}
+}
+
+@index{timegroup,
+ name={time group}
+}
+
+@index{customgroup,
+ name={custom group}
+}
+
+@index{ignoredglossary,
+ name={ignored glossary},
+ plural={ignored glossaries}
+}
+
+@index{postlinkhook,
+ name={post-link hook}
+}
+
+@index{postnamehook,
+ name={post-name hook}
+}
+
+@index{postdescriptionhook,
+ name={post-description hook}
+}
+
+@index{encoding}
+
+@index{digraph}
+
+@index{trigraph}
+
+@index{primary}
+
+@index{dual}
+
+@index{secondary,
+ seealso={dual}}
+
+@index{tertiary}
+
+@index{non-ASCII}
+
+@index{full-stop,
+ name={full stop (\code{.})},
+ text={full stop}
+}
+
+@index{period,
+ alias={full-stop}
+}
+
+@index{resourceset,
+ name={resource set}
+}
+
+@index{crossresourceref,
+ name={cross-resource reference}
+}
+
+@index{unicodecategories,
+ name={Unicode categories},
+ text={Unicode category},
+ plural={Unicode categories}
+}
+
+@index{numberdecimaldigit,
+ name={\unicodecategoryfmt{Number, Decimal Digit}},
+ parent={unicodecategories}
+}
+
+@index{separatorspace,
+ name={\unicodecategoryfmt{Separator, Space}},
+ parent={unicodecategories}
+}
+
+@index{letteruppercase,
+ name={\unicodecategoryfmt{Letter, Uppercase}},
+ parent={unicodecategories}
+}
+
+@index{letterlowercase,
+ name={\unicodecategoryfmt{Letter, Lowercase}},
+ parent={unicodecategories}
+}
+
+@index{lettertitlecase,
+ name={\unicodecategoryfmt{Letter, Titlecase}},
+ parent={unicodecategories}
+}
+
+@index{lettermodifier,
+ name={\unicodecategoryfmt{Letter, Modifier}},
+ parent={unicodecategories}
+}
+
+@index{letterother,
+ name={\unicodecategoryfmt{Letter, Other}},
+ parent={unicodecategories}
+}
+
+@index{punctuationclose,
+ name={\unicodecategoryfmt{Punctuation, Close}},
+ parent={unicodecategories}
+}
+
+@index{punctuationfinalquote,
+ name={\unicodecategoryfmt{Punctuation, Final quote}},
+ parent={unicodecategories}
+}
+
+@index{punctuationother,
+ name={\unicodecategoryfmt{Punctuation, Other}},
+ parent={unicodecategories}
+}
+
+@index{texmfcnf.openinany,
+ name={\texmfcnffmt{openin\_any}}
+}
+
+@index{texmfcnf.openoutany,
+ name={\texmfcnffmt{openout\_any}}
+}
+
+@index{file.bib2gls-en.xml,
+ name={\filefmt{bib2gls-en.xml}}
+}
+
+@index{file.bib2gls.sh,
+ name={\filefmt{bib2gls.sh}}
+}
+
+@index{file.convertgls2bib.sh,
+ name={\filefmt{convert\-gls2bib.sh}}
+}
+
+@index{file.texparserlib.jar,
+ name={\filefmt{texparserlib.jar}}
+}
+
+@index{file.bib2gls.jar,
+ name={\filefmt{bib2gls.jar}}
+}
+
+@index{file.convertgls2bib.jar,
+ name={\filefmt{convert\-gls2bib.jar}}
+}
+
+@index{file.bib2gls.bat,
+ name={\filefmt{bib2gls.bat}}
+}
+
+@index{file.sample-dual.tex,
+ name={\filefmt{sample\dhyphen dual.tex}}
+}
+
+@dualindexentry{file.no-interpret-preamble.bib,
+ name={\filefmt{no\dhyphen interpret\dhyphen preamble.bib}}
+}
+
+@dualindexentry{file.interpret-preamble.bib,
+ name={\filefmt{interpret\dhyphen preamble.bib}}
+}
+
+@dualindexentry{file.interpret-preamble2.bib,
+ name={\filefmt{interpret\dhyphen preamble2.bib}}
+}
+
+@dualindexentry{file.people.bib,
+ name={\filefmt{people.bib}}
+}
+
+@dualindexentry{file.sample-people.tex,
+ name={\filefmt{sample\dhyphen people.tex}}
+}
+
+@dualindexentry{file.sample-authors.tex,
+ name={\filefmt{sample\dhyphen authors.tex}}
+}
+
+@dualindexentry{file.bacteria.bib,
+ name={\filefmt{bacteria.bib}}
+}
+
+@dualindexentry{file.sample-bacteria.tex,
+ name={\filefmt{sample\dhyphen bacteria.tex}}
+}
+
+@dualindexentry{file.chemicalformula.bib,
+ name={\filefmt{chemicalformula.bib}}
+}
+
+@dualindexentry{file.sample-chemical.tex,
+ name={\filefmt{sample\dhyphen chemical.tex}}
+}
+
+@dualindexentry{file.constants.bib,
+ name={\filefmt{constants.bib}}
+}
+
+@dualindexentry{file.sample-constants.tex,
+ name={\filefmt{sample\dhyphen constants.tex}}
+}
+
+@dualindexentry{file.baseunits.bib,
+ name={\filefmt{baseunits.bib}}
+}
+
+@dualindexentry{file.derivedunits.bib,
+ name={\filefmt{derivedunits.bib}}
+}
+
+@dualindexentry{file.sample-units1.tex,
+ name={\filefmt{sample-units1.tex}}
+}
+
+@dualindexentry{file.sample-units2.tex,
+ name={\filefmt{sample-units2.tex}}
+}
+
+@dualindexentry{file.sample-units3.tex,
+ name={\filefmt{sample-units3.tex}}
+}
+
+@dualindexentry{file.books.bib,
+ name={\filefmt{books.bib}}
+}
+
+@dualindexentry{file.films.bib,
+ name={\filefmt{films.bib}}
+}
+
+@dualindexentry{file.sample-media.tex,
+ name={\filefmt{sample\dhyphen media.tex}}
+}
+
+@dualindexentry{file.bigmathsymbols.bib,
+ name={\filefmt{bigmathsymbols.bib}}
+}
+
+@dualindexentry{file.mathgreek.bib,
+ name={\filefmt{mathgreek.bib}}
+}
+
+@dualindexentry{file.mathsrelations.bib,
+ name={\filefmt{mathsrelations.bib}}
+}
+
+@dualindexentry{file.binaryoperators.bib,
+ name={\filefmt{binaryoperators.bib}}
+}
+
+@dualindexentry{file.unaryoperators.bib,
+ name={\filefmt{unaryoperators.bib}}
+}
+
+@dualindexentry{file.mathsobjects.bib,
+ name={\filefmt{mathsobjects.bib}}
+}
+
+@dualindexentry{file.sample-msymbols.tex,
+ name={\filefmt{sample\dhyphen msymbols.tex}}
+}
+
+@dualindexentry{file.sample-maths.tex,
+ name={\filefmt{sample\dhyphen maths.tex}}
+}
+
+@dualindexentry{file.miscsymbols.bib,
+ name={\filefmt{miscsymbols.bib}}
+}
+
+@dualindexentry{file.sample-textsymbols.tex,
+ name={\filefmt{sample\dhyphen textsymbols.tex}}
+}
+
+@dualindexentry{file.markuplanguages.bib,
+ name={\filefmt{markuplanguages.bib}}
+}
+
+@dualindexentry{file.sample-languages.tex,
+ name={\filefmt{sample\dhyphen languages.tex}}
+}
+
+@dualindexentry{file.usergroups.bib,
+ name={\filefmt{usergroups.bib}}
+}
+
+@dualindexentry{file.sample-usergroups.tex,
+ name={\filefmt{sample\dhyphen usergroups.tex}}
+}
+
+@dualindexentry{file.animals.bib,
+ name={\filefmt{animals.bib}}
+}
+
+@dualindexentry{file.vegetables.bib,
+ name={\filefmt{vegetables.bib}}
+}
+
+@dualindexentry{file.minerals.bib,
+ name={\filefmt{minerals.bib}}
+}
+
+@dualindexentry{file.terms.bib,
+ name={\filefmt{terms.bib}}
+}
+
+@dualindexentry{file.sample-multi1.tex,
+ name={\filefmt{sample\dhyphen multi1.tex}}
+}
+
+@dualindexentry{file.sample-multi2.tex,
+ name={\filefmt{sample\dhyphen multi2.tex}}
+}
+
+@index{glshyperlink,
+ name={\csfmt{gls\-hyper\-link}},
+ user1={\oargm{link text}\margm{label}},
+ description={creates a hyperlink to the entry information in the
+ glossary},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrfielddolistloop,
+ name={\csfmt{gls\-xtr\-field\-do\-list\-loop}},
+ user1={\margm{label}\margm{field}},
+ description={iterates over the items the given field, which contains
+ an \styfmt{etoolbox} internal list},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrfieldforlistloop,
+ name={\csfmt{gls\-xtr\-field\-for\-list\-loop}},
+ user1={\margm{label}\margm{field}\margm{handler}},
+ description={iterates over the items the given field, which contains
+ an \styfmt{etoolbox} internal list, using the given handler},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsfieldfetch,
+ name={\csfmt{gls\-field\-fetch}},
+ user1={\margm{label}\margm{field}\margm{cs}},
+ description={fetches the value of the given field for the given
+ label and stores it in the command \meta{cs}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsseeformat,
+ name={\csfmt{gls\-see\-format}},
+ user1={\margm{tag}\margm{labels}\margm{location (ignored)}},
+ description={formats the entries identified in the comma separated
+ list of labels as a set of cross-references},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtruseseeformat,
+ name={\csfmt{gls\-xtr\-use\-see\-format}},
+ user1={\margm{tag}\margm{labels}},
+ description={formats the entries identified in the comma separated
+ list of labels as a set of cross-references},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsextrapostnamehook,
+ name={\csfmt{gls\-extra\-post\-name\-hook}},
+ user1={\margm{label}},
+ description={additional category-independent code for the
+post-name hook},
+ note={provided by \styfmt{glossaries-extra} version 1.25+},
+ category={command}
+}
+
+@index{glsentrytext,
+ name={\csfmt{gls\-entry\-text}},
+ user1={\margm{label}},
+ description={expands to the value of the
+ \gls[noindex]{dual.field.text} field},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsentryname,
+ name={\csfmt{gls\-entry\-name}},
+ user1={\margm{label}},
+ description={expands to the value of the
+ \gls[noindex]{dual.field.name} field},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glspluralsuffix,
+ name={\csfmt{gls\-plural\-suffix}},
+ user1={},
+ description={the suffix used to construct the default plural},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{acrpluralsuffix,
+ name={\csfmt{acr\-plural\-suffix}},
+ user1={},
+ description={the suffix used to construct the default plural for
+ the short form of acronyms},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{abbrvpluralsuffix,
+ name={\csfmt{abbrv\-plural\-suffix}},
+ user1={},
+ description={the style sensitive suffix used to construct the
+ default plural for the short form of abbreviations},
+ note={provided by \styfmt{glossaries-extra}},
+ seealso={glsxtrabbrvpluralsuffix},
+ category={command}
+}
+
+@index{glsxtrabbrvpluralsuffix,
+ name={\csfmt{gls\-xtr\-abbrv\-plural\-suffix}},
+ user1={},
+ description={the default suffix used to construct the plural for
+ the short form of abbreviations},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrifwasfirstuse,
+ name={\csfmt{glsxtr\-if\-was\-first\-use}},
+ user1={\margm{true}\margm{false}},
+ description={only for use in the post-link hooks this
+ tests if the entry just referenced was used for the first time},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glslabel,
+ name={\csfmt{glslabel}},
+ user1={},
+ description={only for use in the post-link hooks this
+ expands to the label of the entry that was last referenced},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glscurrententrylabel,
+ name={\csfmt{gls\-current\-entry\-label}},
+ user1={},
+ description={only for use in the glossary, such as in the style or
+in the post-name or post-description hooks, this expands to the
+label of the current entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrusefield,
+ name={\csfmt{gls\-xtr\-use\-field}},
+ user1={\margm{entry label}\margm{field label}},
+ description={expands to the value of the given field for the given
+ entry},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{GlsXtrSetField,
+ name={\csfmt{Gls\-Xtr\-Set\-Field}},
+ user1={\margm{entry label}\margm{field label}\margm{value}},
+ description={assigns the given \meta{value} to the field
+ identified by \meta{field label} for the
+ entry identified by \meta{entry label}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrifhasfield,
+ name={\csfmt{gls\-xtr\-if\-has\-field}},
+ user1={\margm{field label}\margm{entry label}\margm{true}\margm{false}},
+ description={tests if the given entry has the given \emph{internal} field set
+ (defined and not empty)
+ without testing if the entry exists and adds implicit scoping
+ to \meta{true} and \meta{false}},
+ note={provided by \styfmt{glossaries-extra} v1.19+},
+ seealso={GlsXtrIfFieldUndef},
+ category={command}
+}
+
+@index{glsxtrifhasfield*,
+ name={\csfmt{gls\-xtr\-if\-has\-field*}},
+ user1={\margm{field label}\margm{entry label}\margm{true}\margm{false}},
+ description={tests if the given entry has the given field set
+ (defined and not empty)
+ without testing if the entry exists and without introducing
+ an implicit scope},
+ note={provided by \styfmt{glossaries-extra} v1.19+},
+ seealso={GlsXtrIfFieldUndef},
+ category={command}
+}
+
+@index{GlsXtrIfFieldUndef,
+ name={\csfmt{Gls\-Xtr\-If\-Field\-Undef}},
+ user1={\margm{field label}\margm{entry label}\margm{true}\margm{false}},
+ description={tests if the given field isn't defined for the given
+ entry, which may also not exist},
+ note={provided by \styfmt{glossaries-extra} v1.23+},
+ category={command}
+}
+
+@index{ifglshasfield,
+ name={\csfmt{if\-gls\-has\-field}},
+ user1={\margm{field label}\margm{entry label}\margm{true}\margm{false}},
+ description={tests if the given entry, which must be defined, has the
+ given field set to a non-empty value},
+ note={provided by \styfmt{glossaries}},
+ seealso={glsxtrifhasfield,GlsXtrIfFieldUndef},
+ category={command}
+}
+
+@dualindexentry{glsxtrifcustomdiscardperiod,
+ name={\csfmt{gls\-xtr\-if\-custom\-discard\-period}},
+ user1={\margm{true}\margm{false}},
+ description={should expand to \meta{true} if the post-link hook
+ should check for a following full stop (in addition to attribute
+ checks) otherwise should expand to \meta{false}},
+ note={provided by \styfmt{glossaries-extra} v1.23+},
+ category={command}
+}
+
+@index{glsxtrlongshortdescname,
+ name={\csfmt{gls\-xtr\-long\-short\-desc\-name}},
+ user1={},
+ description={governs the way the \field{name} field is set
+ by the \abbrstyle{long-short-desc} abbreviation styles},
+ note={provided by \styfmt{glossaries-extra} v1.17+},
+ category={command}
+}
+
+@index{glsxtrlongshortname,
+ name={\csfmt{gls\-xtr\-long\-short\-name}},
+ user1={},
+ description={governs the way the \field{name} field is set
+ by the \abbrstyle{long-short} abbreviation styles},
+ note={provided by \styfmt{glossaries-extra} v1.25+},
+ category={command}
+}
+
+@index{glsxtronlyname,
+ name={\csfmt{gls\-xtr\-only\-name}},
+ user1={},
+ description={governs the way the \field{name} field is set
+ by the \abbrstyle{long-only-short-only} abbreviation styles},
+ note={provided by \styfmt{glossaries-extra} v1.25+},
+ category={command}
+}
+
+@index{glsxtronlydescname,
+ name={\csfmt{gls\-xtr\-only\-desc\-name}},
+ user1={},
+ description={governs the way the \field{name} field is set
+ by the \abbrstyle{long-only-short-only} abbreviation styles},
+ note={provided by \styfmt{glossaries-extra} v1.17+},
+ category={command}
+}
+
+@index{glsaddkey,
+ name={\csfmt{gls\-add\-key}},
+ user1={\margm{key}\margm{default value}\margm{no link cs}\margm{no link ucfirst cs}\margm{link cs}\margm{link ucfirst cs}\margm{link allcaps cs}},
+ description={adds a new key for use in \cs{newglossaryentry}
+ and associated commands to access it},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrprovidestoragekey,
+ name={\csfmt{gls\-xtr\-provide\-storage\-key}},
+ user1={\margm{key}\margm{default value}\margm{no link cs}},
+ description={adds a new key, if not already defined, for use in \cs{newglossaryentry}
+ and an associated command
+ to access it where (unlike \cs{glsaddstoragekey})
+ the \meta{no link cs} part may be empty if unrequired},
+ note={provided by \styfmt{glossaries-extra} v1.12+},
+ category={command}
+}
+
+@index{glsaddstoragekey,
+ name={\csfmt{gls\-add\-storage\-key}},
+ user1={\margm{key}\margm{default value}\margm{no link cs}},
+ description={adds a new key for internal use that can be set in
+ \cs{newglossaryentry}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{GlsXtrEnableInitialTagging,
+ name={\csfmt{Gls\-Xtr\-Enable\-Initial\-Tagging}},
+ user1={\margm{category list}\margm{cs}},
+ description={defines the control sequence \meta{cs}
+ to be used with abbreviation tagging
+ with the given categories},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrtagfont,
+ name={\csfmt{gls\-xtr\-tag\-font}},
+ user1={\margm{text}},
+ description={font used by tagging command defined by
+ \cs{GlsXtrEnableInitialTagging}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command},
+ seealso={GlsXtrEnableInitialTagging}
+}
+
+@index{glsnavhypertarget,
+ name={\csfmt{gls\-nav\-hyper\-target}},
+ user1={\oargm{type}\margm{label}\margm{text}},
+ description={creates a hyper target for the group given by
+ \meta{label} for the given glossary type and displays the text},
+ note={provided by \styfmt{glossary-hypernav}},
+ category={command}
+}
+
+@index{glsnoexpandfields,
+ name={\csfmt{gls\-noexpand\-fields}},
+ user1={},
+ description={don't expand fields when an entry is defined},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{newentry,
+ name={\csfmt{newentry}},
+ user1={\margm{label}\margm{\keyvallist}},
+ description={equivalent to \csref[noindex]{newglossaryentry}},
+ note={provided by \styfmt{glossaries-extra}'s shortcuts},
+ category={command}
+}
+
+@index{newsym,
+ name={\csfmt{newsym}},
+ user1={\margm{label}\margm{\keyvallist}\margm{symbol}},
+ description={equivalent to \cs{glsxtrnewsymbol}},
+ note={provided by \styfmt{glossaries-extra}'s
+ \gls{styopt.shortcuts} package option},
+ category={command}
+}
+
+@index{newnum,
+ name={\csfmt{newnum}},
+ user1={\margm{label}\margm{\keyvallist}},
+ description={equivalent to \cs{glsxtrnewnumber}},
+ note={provided by \styfmt{glossaries-extra}'s
+\gls{styopt.shortcuts} package option},
+ category={command}
+}
+
+@index{acronymtype,
+ name={\csfmt{acronym\-type}},
+ user1={},
+ description={expands to the default glossary type when using
+ \cs{newacronym}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrabbrvtype,
+ name={\csfmt{gls\-xtr\-abbrv\-type}},
+ user1={},
+ description={expands to the default glossary type when using
+ \cs{newabbreviation}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{nopostdesc,
+ name={\csfmt{no\-post\-desc}},
+ user1={},
+ description={suppresses the post-description hook},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrnopostpunc,
+ name={\csfmt{gls\-xtr\-no\-post\-punc}},
+ user1={},
+ description={suppresses the post-description punctuation
+ without suppressing the post-description hook},
+ note={provided by \styfmt{glossaries-extra} v1.22+},
+ category={command}
+}
+
+@index{glsxtrrestorepostpunc,
+ name={\csfmt{gls\-xtr\-restore\-post\-punc}},
+ user1={},
+ description={used within post-description category hooks,
+ this restores the post-description punctuation
+ if it's been suppressed with \cs{glsxtrnopostpunc}},
+ note={provided by \styfmt{glossaries-extra} v1.23+},
+ category={command}
+}
+
+@index{loadglsentries,
+ name={\csfmt{load\-gls\-entries}},
+ user1={\oargm{type}\margm{file}},
+ description={locally redefines \cs{glsdefaulttype}
+ to \meta{type} and inputs \meta{file}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{newglossary,
+ name={\csfmt{newglossary}},
+ user1={\oargm{log}\margm{type}\margm{gls}\margm{glo}\margm{title}},
+ description={defines a new glossary identified by \meta{type}
+ with the given title and associated file extensions used by
+ \appfmt{makeindex} or \appfmt{xindy}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{newglossary*,
+ name={\csfmt{newglossary*}},
+ user1={\margm{type}\margm{title}},
+ description={defines a new glossary identified by \meta{type}
+ with the given title},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{newignoredglossary,
+ name={\csfmt{new\-ignored\-glossary}},
+ user1={\margm{type}},
+ description={defines a new ignored glossary (with hyperlinks
+ suppressed) identified by \meta{type}
+ that's not included in the list used by commands, such
+ as \cs{printunsrtglossaries}, that iterate over defined glossaries},
+ note={provided by \styfmt{glossaries} v4.08+},
+ category={command}
+}
+
+@index{newignoredglossary*,
+ name={\csfmt{new\-ignored\-glossary*}},
+ user1={\margm{type}},
+ description={defines a new ignored glossary (without
+ suppressing hyperlinks) identified by \meta{type}
+ that's not included in the list used by commands, such
+ as \cs{printunsrtglossaries}, that iterate over defined glossaries},
+ note={provided by \styfmt{glossaries-extra} v1.11+},
+ category={command}
+}
+
+@index{provideignoredglossary,
+ name={\csfmt{provide\-ignored\-glossary}},
+ user1={\margm{type}},
+ description={as \cs{newignoredglossary} but does nothing
+ if a glossary identified by \meta{type} already exists},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{provideignoredglossary*,
+ name={\csfmt{provide\-ignored\-glossary*}},
+ user1={\margm{type}},
+ description={as \ics{provideignoredglossary} but doesn't
+ suppress hyperlinks},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{delimN,
+ name={\csfmt{delimN}},
+ user1={},
+ description={used to delimited individual locations},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{delimR,
+ name={\csfmt{delimR}},
+ user1={},
+ description={used as a separator between the start and end locations
+ of a range},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsnoidxloclist,
+ name={\csfmt{gls\-noidx\-loc\-list}},
+ user1={\margm{location list cs}},
+ description={iterates over the given internal location list using
+ the \cs{glsnoidxloclisthandler} handler},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsnoidxloclisthandler,
+ name={\csfmt{gls\-noidx\-loc\-list\-handler}},
+ description={the handler used by the internal list loop function used
+ in \cs{glsnoidxloclist}},
+ user1={\margm{location}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glossentry,
+ name={\csfmt{glossentry}},
+ user1={\margm{label}\margm{location list}},
+ description={used in the glossary to display a top-level entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{subglossentry,
+ name={\csfmt{subglossentry}},
+ user1={\margm{level}\margm{label}\margm{location list}},
+ description={used in the glossary to display a sub-entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsaddall,
+ name={\csfmt{glsaddall}},
+ user1={\oargm{options}},
+ description={iterates over all entries defined for all glossaries
+ (or for the sub-list provided in the options) and performs
+ \cs{glsadd} for each entry},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsaddallunused,
+ name={\csfmt{gls\-add\-all\-unused}},
+ user1={\oargm{list}},
+ description={iterates over all entries defined for all glossaries
+ (or for the sub-list provided in the options) and performs
+ \cs{glsadd} for each entry that hasn't been used with
+ the \gls[noindex]{glsadd.format} set to \code{glsignore}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsadd,
+ name={\csfmt{glsadd}},
+ user1={\oargm{options}\margm{label}},
+ description={indexes the entry without displaying any text},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsadd.thevalue,
+ name={\csoptfmt{thevalue}},
+ category={commandoption},
+ parent={glsadd}
+}
+
+@index{glsadd.theHvalue,
+ name={\csoptfmt{theHvalue}},
+ category={commandoption},
+ parent={glsadd}
+}
+
+@index{glsadd.format,
+ name={\csoptfmt{format}},
+ category={commandoption},
+ parent={glsadd}
+}
+
+@index{frontmatter,
+ name={\csfmt{front\-matter}},
+ user1={},
+ description={switches to front matter},
+ note={provided by book-like classes},
+ category={command}
+}
+
+@index{mainmatter,
+ name={\csfmt{main\-matter}},
+ user1={},
+ description={switches to main matter},
+ note={provided by book-like classes},
+ category={command}
+}
+
+@index{backmatter,
+ name={\csfmt{back\-matter}},
+ user1={},
+ description={switches to back matter},
+ note={provided by book-like classes},
+ category={command}
+}
+
+@index{GlsXtrSetDefaultNumberFormat,
+ name={\csfmt{Gls\-Xtr\-Set\-Default\-Number\-Format}},
+ user1={\margm{format}},
+ description={set the default format to use if the
+ \gls[noindex]{glsadd.format} key isn't set},
+ note={provided by \styfmt{glossaries-extra} v1.19+},
+ category={command}
+}
+
+@index{GlsXtrSetDefaultGlsOpts,
+ name={\csfmt{Gls\-Xtr\-Set\-Default\-Gls\-Opts}},
+ user1={\margm{options}},
+ description={set the default options for commands like \cs{gls}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsnumberformat,
+ name={\csfmt{gls\-number\-format}},
+ user1={\margm{text}},
+ description={default location format},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{hypersf,
+ name={\csfmt{hypersf}},
+ user1={\margm{text}},
+ description={a location format that uses the sans-serif
+ font that also has a hyperlink (if enabled)},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{hyperit,
+ name={\csfmt{hyperit}},
+ user1={\margm{text}},
+ description={a location format that uses the italic
+ font that also has a hyperlink (if enabled)},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{hyperbf,
+ name={\csfmt{hyperbf}},
+ user1={\margm{text}},
+ description={a location format that uses the bold
+ font that also has a hyperlink (if enabled)},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{emph,
+ name={\csfmt{emph}},
+ user1={\margm{text}},
+ description={emphasizes the given text (italic or slanted
+ if the surrounding font is upright, otherwise upright font is
+ used)},
+ note={kernel command},
+ category={command}
+}
+
+@index{glsignore,
+ name={\csfmt{glsignore}},
+ user1={\margm{text}},
+ description={does nothing but when used as a location format
+ \bibgls\ recognises it as an ignored location},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glstriggerrecordformat,
+ name={\csfmt{gls\-trigger\-record\-format}},
+ user1={\margm{text}},
+ description={does nothing but when used as a location format
+ \bibgls\ recognises it as an ignored location indexed by
+ commands like \cs{rgls}},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@index{at,
+ name={\csfmt{@}},
+ user1={},
+ description={adjusts the space factor to indicate the following
+ punctuation character marks the end of the sentence},
+ note={kernel command},
+ category={command}
+}
+
+@index{forall,
+ name={\csfmt{forall}},
+ user1={},
+ description={for all symbol ($\forall$)},
+ note={kernel command},
+ category={command}
+}
+
+@index{ensuremath,
+ name={\csfmt{ensuremath}},
+ user1={\margm{maths}},
+ description={ensures the argument is in math mode},
+ note={kernel command},
+ category={command}
+}
+
+@index{mathord,
+ name={\csfmt{mathord}},
+ user1={\margm{maths}},
+ description={assigns the character or sub-formula in the
+ argument to class 0, ordinary},
+ note={\TeX\ primitive},
+ category={command}
+}
+
+@index{mathop,
+ name={\csfmt{mathop}},
+ user1={\margm{maths}},
+ description={assigns the character or sub-formula in the
+ argument to class 1, large operator},
+ note={\TeX\ primitive},
+ category={command}
+}
+
+@index{mathpunct,
+ name={\csfmt{mathpunct}},
+ user1={\margm{maths}},
+ description={assigns the character or sub-formula in the
+ argument to class 6, punctuation},
+ note={\TeX\ primitive},
+ category={command}
+}
+
+@index{mathrel,
+ name={\csfmt{mathrel}},
+ user1={\margm{maths}},
+ description={assigns the character or sub-formula in the
+ argument to class 3, relation},
+ note={\TeX\ primitive},
+ category={command}
+}
+
+@index{write18,
+ name={\csfmt{write18}},
+ user1={\margm{system call}},
+ description={perform shell escape if permitted},
+ note={kernel command},
+ category={command}
+}
+
+@index{immediate,
+ name={\csfmt{immediate}},
+ user1={\meta{file operation}},
+ description={perform the file operation immediately instead of the
+usual delay},
+ note={{}\TeX\ primitive},
+ category={command}
+}
+
+@index{AtEndDocument,
+ name={\csfmt{AtEndDocument}},
+ user1={\margm{code}},
+ description={perform \meta{code} at the end of the document},
+ note={kernel command},
+ category={command}
+}
+
+@index{unexpanded,
+ name={\csfmt{unexpanded}},
+ user1={\margm{general text}},
+ description={expands to the argument},
+ note={{}\eTeX\ primitive},
+ category={command}
+}
+
+@index{input,
+ name={\csfmt{input}},
+ user1={\margm{file}},
+ description={input the given file},
+ note={kernel command},
+ category={command}
+}
+
+@index{jobname,
+ name={\csfmt{jobname}},
+ user1={},
+ description={the current job name, which is usually the name of
+ the main \ext{tex} file without the extension},
+ note={primitive},
+ category={command}
+}
+
+@index{protect,
+ name={\csfmt{protect}},
+ user1={\meta{token}},
+ description={protects \meta{token} from expansion},
+ note={kernel command},
+ category={command}
+}
+
+@index{ifcase,
+ name={\csfmt{ifcase}},
+ user1={\meta{number}},
+ description={case conditional},
+ note={\TeX\ primitive},
+ category={command}
+}
+
+@index{renewcommand,
+ name={\csfmt{renewcommand}},
+ user1={\margm{cs}\oargm{n}\oargm{def}\margm{code}},
+ description={redefines an existing command},
+ note={kernel command},
+ category={command}
+}
+
+@index{newcommand,
+ name={\csfmt{newcommand}},
+ user1={\margm{cs}\oargm{n}\oargm{def}\margm{code}},
+ description={defines a new command},
+ note={kernel command},
+ category={command}
+}
+
+@index{providecommand,
+ name={\csfmt{providecommand}},
+ user1={\margm{cs}\oargm{n}\oargm{def}\margm{code}},
+ description={defines a command if it's not already defined},
+ note={kernel command},
+ category={command}
+}
+
+@index{section,
+ name={\csfmt{section}},
+ user1={\oargm{toc title}\margm{title}},
+ description={section heading},
+ note={most classes that have a concept of document sections},
+ category={command}
+}
+
+@index{section*,
+ name={\csfmt{section*}},
+ user1={\margm{title}},
+ description={unnumbered section heading},
+ note={most classes that have a concept of document sections},
+ category={command}
+}
+
+@index{chapter,
+ name={\csfmt{chapter}},
+ user1={\oargm{toc title}\margm{title}},
+ description={chapter heading},
+ note={book or report classes},
+ category={command}
+}
+
+@index{chapter*,
+ name={\csfmt{chapter*}},
+ user1={\margm{title}},
+ description={unnumbered chapter heading},
+ note={book or report classes},
+ category={command}
+}
+
+@index{boldsymbol,
+ name={\csfmt{boldsymbol}},
+ user1={\margm{symbol}},
+ description={renders given maths symbol in bold if supported by
+ the current font},
+ note={provided by \styfmt{amsmath}},
+ category={command}
+}
+
+@index{ifglsentryexists,
+ name={\csfmt{ifglsentryexists}},
+ user1={\margm{label}\margm{true}\margm{false}},
+ description={tests if the entry given by \meta{label} exists},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsdefaulttype,
+ name={\csfmt{gls\-default\-type}},
+ user1={},
+ description={the default glossary type},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glssymbolsgroupname,
+ name={\csfmt{gls\-symbols\-group\-name}},
+ user1={},
+ description={the name used for the symbols group},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsnumbersgroupname,
+ name={\csfmt{gls\-numbers\-group\-name}},
+ user1={},
+ description={the name used for the numbers group},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{printunsrtglossary,
+ name={\csfmt{print\-unsrt\-glos\-sary}},
+ user1={\oargm{options}},
+ description={display the glossary by iterating over all entries
+ associated with that glossary in the order in which they were
+ defined},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{printunsrtglossary*,
+ name={\csfmt{print\-unsrt\-glos\-sary*}},
+ user1={\oargm{options}\margm{code}},
+ description={as \cs{printunsrtglossary} but performs
+ \meta{code} first (scoped to localise any assignments within
+ \meta{code})},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{printunsrtglossaries,
+ name={\csfmt{print\-unsrt\-glos\-saries}},
+ user1={},
+ description={iterates over all non-ignored defined glossaries
+ and performs \cs{printunsrtglossary} for each one},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{cs.makeglossaries,
+ name={\csfmt{make\-glos\-saries}},
+ user1={},
+ description={opens associated glossary files to be processed
+ by \gls{makeindex} or \gls{xindy}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{printglossary,
+ name={\csfmt{print\-glos\-sary}},
+ user1={\oargm{options}},
+ description={inputs file created by \gls{makeindex} or \gls{xindy}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{printglossaries,
+ name={\csfmt{print\-glos\-saries}},
+ user1={},
+ description={iterates over all non-ignored defined glossaries
+ and performs \cs{printglossary} for each one},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{makefirstuc,
+ name={\csfmt{make\-first\-uc}},
+ user1={\margm{text}},
+ description={converts the first letter of \meta{text} to upper case},
+ note={provided by \styfmt{mfirstuc}},
+ category={command}
+}
+
+@index{ac,
+ name={\csfmt{ac}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={equivalent to \cs{gls}},
+ note={provided by \styfmt{glossaries-extra} \gls{styopt.shortcuts} package
+option},
+ category={command}
+}
+
+@index{glsxtrp,
+ name={\csfmt{glsxtrp}},
+ user1={\margm{field}\margm{label}},
+ description={displays the given field for the entry given by label},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{GlsXtrFmtField,
+ name={\csfmt{Gls\-Xtr\-Fmt\-Field}},
+ user1={},
+ description={expands to the internal label of the field used
+ to store the control sequence name for use with \cs{glsxtrfmt}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrusesee,
+ name={\csfmt{gls\-xtr\-use\-see}},
+ user1={\margm{label}},
+ description={applies \cs{glsseeformat} to the entry's
+ \gls[noindex]{dual.field.see} field if not empty},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtruseseealso,
+ name={\csfmt{gls\-xtr\-use\-seealso}},
+ user1={\margm{label}},
+ description={applies \cs{glsseeformat} to the entry's
+ \gls[noindex]{dual.field.seealso} field if not empty},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrsetaliasnoindex,
+ name={\csfmt{gls\-xtr\-set\-alias\-noindex}},
+ user1={},
+ description={hooks into the alias \gls{gls.noindex} setting},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtruseseealsoformat,
+ name={\csfmt{gls\-xtr\-use\-seealso\-format}},
+ user1={\margm{xr list}},
+ description={used to format the entries whose labels are
+ given in \meta{xr list} as a list of \qt{see also} cross-references},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrindexseealso,
+ name={\csfmt{gls\-xtr\-index\-seealso}},
+ user1={\margm{label}\margm{xr list}},
+ description={indexes a \qt{see also} cross-reference},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glssee,
+ name={\csfmt{glssee}},
+ user1={\oargm{tag}\margm{label}\margm{xr label list}},
+ description={indexes a \qt{see} cross-reference},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{setabbreviationstyle,
+ name={\csfmt{setabbreviationstyle}},
+ user1={\oargm{category}\margm{style-name}},
+ description={sets the abbreviation style to \meta{style-name} for the
+given \meta{category}, must be used before the abbreviation is
+defined},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glshex,
+ name={\csfmt{glshex}},
+ user1={},
+ description={expands to \cs{cs.string}\cs{u}},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@index{glsxtrresourceinit,
+ name={\csfmt{gls\-xtr\-resource\-init}},
+ user1={},
+ description={provides code that locally redefines commands
+ during the protected write operation performed by
+ \cs{glsxtrresourcefile}},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@index{glsxtrgroupfield,
+ name={\csfmt{gls\-xtr\-group\-field}},
+ user1={},
+ description={expands to the field label used to store the
+ entry group labels},
+ note={provided by \styfmt{glossaries-extra} v1.21+},
+ category={command}
+}
+
+@index{glolinkprefix,
+ name={\csfmt{glo\-link\-prefix}},
+ user1={},
+ description={target name prefix used in entry hyperlinks},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{apptoglossarypreamble,
+ name={\csfmt{app\-to\-glossary\-preamble}},
+ user1={\oargm{type}\margm{code}},
+ description={appends \meta{code} to the preamble for the given
+glossary},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsbackslash,
+ name={\csfmt{glsbackslash}},
+ user1={},
+ description={expands to a literal backslash \texttt{\glsbackslash}
+ character},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsquote,
+ name={\csfmt{glsquote}},
+ user1={\margm{text}},
+ description={encapsulates \meta{text} with literal straight
+ double-quotes \texttt{\glsquote{\meta{text}}}},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glstildechar,
+ name={\csfmt{glstildechar}},
+ user1={},
+ description={expands to a literal tilde \texttt{\glstildechar} character},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{pagelistname,
+ name={\csfmt{pagelistname}},
+ user1={},
+ description={language-sensitive name used for the location list
+ header for some glossary styles},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{seealsoname,
+ name={\csfmt{seealsoname}},
+ user1={},
+ description={language sensitive \qt{see also} text},
+ note={provided by \styfmt{glossaries-extra} or language
+packages},
+ category={command}
+}
+
+@index{glsxtruserfield,
+ name={\csfmt{gls\-xtr\-user\-field}},
+ user1={},
+ description={used by the parenthetical abbreviation styles, this
+ expands to the label of the field used to store the parenthetical
+ material},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtruserparen,
+ name={\csfmt{gls\-xtr\-user\-paren}},
+ user1={},
+ description={used by the parenthetical abbreviation styles
+ to format the parenthetical material},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrpostdescabbreviation,
+ name={\csfmt{gls\-xtr\-post\-desc\-abbreviation}},
+ user1={},
+ description={hook used after the description is displayed in the
+ glossary for entries that have the
+ \gls[noindex]{dual.field.category} set to \code{abbreviation}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrpostdescsymbol,
+ name={\csfmt{gls\-xtr\-post\-desc\-symbol}},
+ user1={},
+ description={hook used after the description is displayed in the
+ glossary for entries that have the
+ \gls[noindex]{dual.field.category} set to \code{symbol}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrpostdescgeneral,
+ name={\csfmt{gls\-xtr\-post\-desc\-general}},
+ user1={},
+ description={hook used after the description is displayed in the
+ glossary for entries that have the
+ \gls[noindex]{dual.field.category} set to \code{general}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrpostdesccategory,
+ name={\csfmt{gls\-xtr\-post\-desc\-\meta{category}}},
+ user1={},
+ description={hook used after the description is displayed in the
+ glossary for entries that have the
+ \gls[noindex]{dual.field.category} set to \meta{category}},
+ note={common category hooks such as
+ \cs{glsxtrpostdescgeneral} are provided by
+\styfmt{glossaries-extra}, custom categories need the hook defined},
+ category={command}
+}
+
+@index{glsxtrpostnamecategory,
+ name={\csfmt{gls\-xtr\-post\-name\-\meta{category}}},
+ user1={},
+ description={hook used after the name is displayed in the
+ glossary for entries that have the
+ \gls[noindex]{dual.field.category} set to \meta{category}},
+ note={user needs to define hook for use with
+ \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrpostlinkcategory,
+ name={\csfmt{gls\-xtr\-post\-link\-\meta{category}}},
+ user1={},
+ description={hook used after commands like \cs{gls}
+ for entries that have the
+ \gls[noindex]{dual.field.category} set to \meta{category}},
+ note={user needs to define hook for use with
+ \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{GlsXtrFmtDefaultOptions,
+ name={\csfmt{Gls\-Xtr\-Fmt\-Default\-Options}},
+ user1={},
+ description={the default options used by \cs{glsxtrfmt}},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glslink,
+ name={\csfmt{glslink}},
+ user1={\oargm{options}\margm{label}\oargm{text}},
+ description={links to the entry's location in the glossary with
+ the given link text without altering the first use flag},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrshort,
+ name={\csfmt{glsxtrshort}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{short} field (using the
+ appropriate abbreviation style)
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glsxtrlong,
+ name={\csfmt{glsxtrlong}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{long} field (using the
+ appropriate abbreviation style)
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries-extra}},
+ category={command}
+}
+
+@index{glstext,
+ name={\csfmt{glstext}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{text} field
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsname,
+ name={\csfmt{glsname}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{name} field
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsfirst,
+ name={\csfmt{glsfirst}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{first} field
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glssymbol,
+ name={\csfmt{glssymbol}},
+ user1={\oargm{options}\margm{label}},
+ description={links to the entry's location in the glossary with
+ the link text obtained from the \field{symbol} field
+ without altering the first use flag},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@dualindexentry{rgls,
+ name={\csfmt{rgls}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={like \cs{gls} but checks for the record
+ count trigger setting},
+ note={provided by \styfmt{glossaries-extra} version 1.21+},
+ category={command}
+}
+
+@dualindexentry{rglsformat,
+ name={\csfmt{rglsformat}},
+ user1={\margm{label}\oargm{insert}},
+ description={used by \cs{rgls} if the record count
+ switch is triggered},
+ note={provided by \styfmt{glossaries-extra} version 1.21+},
+ category={command}
+}
+
+@index{glsxtrenablerecordcount,
+ name={\csfmt{glsxtr\-enable\-record\-count}},
+ user1={},
+ description={redefines \cs{gls} etc to their
+ \cs{rgls} counterpart},
+ note={provided by \styfmt{glossaries-extra} version 1.21+},
+ category={command}
+}
+
+@dualindexentry{GlsXtrSetRecordCountAttribute,
+ name={\csfmt{Gls\-Xtr\-Set\-Record\-Count\-Attribute}},
+ user1={\margm{category list}\margm{value}},
+ description={sets the \catattr{recordcount} attribute to
+ \meta{value} for the given categories},
+ note={provided by \styfmt{glossaries-extra} version 1.21+},
+ category={command}
+}
+
+@index{gls,
+ name={\csfmt{gls}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={on first use displays the first use text
+ (the value of the \gls[noindex]{dual.field.first} field
+ for general entries) and on subsequent use displays
+ the subsequent use text (the value of the
+ \gls[noindex]{dual.field.text} field
+ for general entries) where the text is optionally hyperlinked
+ to the relevant place in the glossary},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{gls.format,
+ name={\csoptfmt{format}},
+ category={commandoption},
+ parent={gls}
+}
+
+@index{gls.counter,
+ name={\csoptfmt{counter}},
+ category={commandoption},
+ parent={gls}
+}
+
+@index{gls.noindex,
+ name={\csoptfmt{noindex}},
+ category={commandoption},
+ parent={gls}
+}
+
+@index{glspl,
+ name={\csfmt{glspl}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={as \cs{gls} but shows the plural form},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{Gls,
+ name={\csfmt{Gls}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={as \cs{gls} but converts the first letter
+ of the link text to upper case},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{Glspl,
+ name={\csfmt{Glspl}},
+ user1={\oargm{options}\margm{label}\oargm{insert}},
+ description={as \cs{Gls} but shows the plural form},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glssetwidest,
+ name={\csfmt{gls\-set\-widest}},
+ user1={\oargm{level}\margm{text}},
+ description={used with the \glostyle{alttree} style to set the
+ widest entry name for the given level},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsupdatewidest,
+ name={\csfmt{gls\-update\-widest}},
+ user1={\oargm{level}\margm{text}},
+ description={as \cs{glssetwidest} but only sets if \meta{text} is
+wider than the current value},
+ note={provided by \styfmt{glossaries-extra-stylemods} version
+1.23+},
+ seealso={glssetwidest},
+ category={command}
+}
+
+@index{glsFindWidestTopLevelName,
+ name={\csfmt{gls\-Find\-Widest\-Top\-Level\-Name}},
+ user1={\oargm{glossary list}},
+ description={CamelCase synonym for \cs{glsfindwidesttoplevelname}},
+ note={provided by \styfmt{glossaries-extra-stylemods}},
+ seealso={glsfindwidesttoplevelname},
+ category={command}
+}
+
+@index{glsfindwidesttoplevelname,
+ name={\csfmt{gls\-find\-widest\-top\-level\-name}},
+ user1={\oargm{glossary list}},
+ description={finds the widest top-level name in the given
+glossaries},
+ note={provided by \styfmt{glossary-tree}},
+ category={command}
+}
+
+@index{glsFindWidestLevelTwo,
+ name={\csfmt{gls\-Find\-Widest\-Level\-Two}},
+ user1={\oargm{glossary list}},
+ description={finds the widest name in the given glossaries
+ for the top level and first two sub-levels},
+ note={provided by \styfmt{glossaries-extra-stylemods}},
+ seealso={glsfindwidesttoplevelname},
+ category={command}
+}
+
+@index{glsxtrbookindexname,
+ name={\csfmt{glsxtr\-book\-index\-name}},
+ user1={\margm{label}},
+ description={used with the \glostyle{bookindex} style to
+ format the entry's name},
+ note={provided by \styfmt{glossary-bookindex}},
+ category={command}
+}
+
+@index{glstreenamefmt,
+ name={\csfmt{gls\-tree\-name\-fmt}},
+ user1={\margm{text}},
+ description={used with the tree styles to format the entry's name},
+ note={provided by \styfmt{glossary-tree}},
+ category={command}
+}
+
+@index{glstreegroupheaderfmt,
+ name={\csfmt{gls\-tree\-group\-header\-fmt}},
+ user1={\margm{text}},
+ description={used with the tree styles to format the group
+headings},
+ note={provided by \styfmt{glossary-tree}},
+ category={command}
+}
+
+@index{glsdescwidth,
+ name={\csfmt{gls\-desc\-width}},
+ user1={},
+ description={length register used by the tabular styles to specify
+the width of the description column},
+ note={provided by \styfmt{glossary-long} and
+ \styfmt{glossary-super}},
+ category={command}
+}
+
+@index{glsxtralttreeSymbolDescLocation,
+ name={\csfmt{gls\-xtr\-alt\-tree\-Symbol\-Desc\-Location}},
+ user1={\margm{label}\margm{location list}},
+ description={used by the \glostyle{alttree} styles to format the
+symbol, description and location},
+ note={provided by \styfmt{glossaries-extra-stylemods}},
+ category={command}
+}
+
+@index{glsentrylong,
+ name={\csfmt{gls\-entry\-long}},
+ user1={\margm{label}},
+ description={displays the long form without any formatting or
+indexing},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glossentryname,
+ name={\csfmt{gloss\-entry\-name}},
+ user1={\margm{label}},
+ description={used by glossary styles to display the name},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsnamefont,
+ name={\csfmt{gls\-name\-font}},
+ user1={\margm{text}},
+ description={used by \cs{glossentryname} to format the name},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glossentrynameother,
+ name={\csfmt{gloss\-entry\-name\-other}},
+ user1={\margm{label}\margm{field}},
+ description={acts like \ics{glossentryname} (obeys
+ \catattr{glossname} and \catattr{glossnamefont}
+ or \cs{glsnamefont} and the post-name hook) but uses
+ the given \meta{field} instead of the \field{name} field},
+ note={provided by \styfmt{glossaries-extra} v1.22+},
+ category={command}
+}
+
+@index{glossentrydesc,
+ name={\csfmt{gloss\-entry\-desc}},
+ user1={\margm{label}},
+ description={used by glossary styles to display the description},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glossentrysymbol,
+ name={\csfmt{gloss\-entry\-symbol}},
+ user1={\margm{label}},
+ description={used by glossary styles to display the symbol},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{forglsentries,
+ name={\csfmt{for\-gls\-entries}},
+ user1={\oargm{glossary-list}\margm{cs}\margm{body}},
+ description={iterates over all entries defined in the listed
+ glossaries and perform \meta{body} where you can use the
+ control sequence \meta{cs} to reference the current label},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{glsxtrforcsvfield,
+ name={\csfmt{gls\-xtr\-for\-csv\-field}},
+ user1={\margm{label}\margm{field}\margm{handler}},
+ description={iterates over the comma-separated list
+ in the given \meta{field} for the entry identified
+ by \meta{label} and performs \meta{handler}\margm{element}
+ on each element of the list, where \meta{handler} is
+ a control sequence which takes a single argument},
+ note={provided by \styfmt{glossaries-extra} version 1.24+},
+ seealso={glsxtrendfor},
+ category={command}
+}
+
+@index{glsxtrendfor,
+ name={\csfmt{gls\-xtr\-end\-for}},
+ user1={},
+ description={may be used within the handler macro
+ of \cs{glsxtrforcsvfield} to prematurely break the loop},
+ note={provided by \styfmt{glossaries-extra} version 1.24+},
+ seealso={glsxtrforcsvfield},
+ category={command}
+}
+
+@index{TrackLocale,
+ name={\csfmt{Track\-Locale}},
+ user1={\margm{language tag}},
+ description={tracks the given language tag},
+ note={provided by \styfmt{tracklang} version 1.3+},
+ category={command}
+}
+
+@index{glstextformat,
+ name={\csfmt{glstextformat}},
+ user1={\margm{text}},
+ description={used by commands like \cs{gls} to format the link-text},
+ note={provided by \styfmt{glossaries}},
+ category={command}
+}
+
+@index{TrackLangLastTrackedDialect,
+ name={\csfmt{Track\-Lang\-Last\-Tracked\-Dialect}},
+ user1={},
+ description={set by commands like \cs{TrackLocale}},
+ note={provided by \styfmt{tracklang}},
+ category={command}
+}
+
+@index{TrackedLanguageFromDialect,
+ name={\csfmt{Tracked\-Language\-From\-Dialect}},
+ user1={\margm{dialect}},
+ description={expands to the root language associated with the
+given (\styfmt{tracklang}) dialect label},
+ note={provided by \styfmt{tracklang}},
+ category={command}
+}
+
+@index{DTMdisplaydate,
+ name={\csfmt{DTM\-display\-date}},
+ user1={\margm{year}\margm{month}\margm{day}\margm{dow}},
+ description={formats the given date where all arguments are
+ numeric},
+ note={provided by \styfmt{datetime2}},
+ category={command}
+}
+
+@index{DTLformatlist,
+ name={\csfmt{DTL\-format\-list}},
+ user1={\margm{list}},
+ description={formats a comma-separated list},
+ note={provided by \styfmt{datatool-base}},
+ category={command}
+}
+
+@index{DTLlistformatsep,
+ name={\csfmt{DTL\-list\-format\-sep}},
+ user1={},
+ description={used by \ics{DTLformatlist} to separate items in the
+list, except for the last pair},
+ note={provided by \styfmt{datatool-base}},
+ seealso={DTLformatlist},
+ category={command}
+}
+
+@index{DTLlistformatlastsep,
+ name={\csfmt{DTL\-list\-format\-last\-sep}},
+ user1={},
+ description={used by \ics{DTLformatlist} to separate the last two items in the
+list},
+ note={provided by \styfmt{datatool-base}},
+ seealso={DTLformatlist},
+ category={command}
+}
+
+@index{DTLlistformatoxford,
+ name={\csfmt{DTL\-list\-format\-oxford}},
+ user1={},
+ description={insert before \ics{DTLlistformatlastsep} if the list
+has three or more items},
+ note={provided by \styfmt{datatool-base}},
+ seealso={DTLformatlist},
+ category={command}
+}
+
+@index{DTLandname,
+ name={\csfmt{DTL\-and\-name}},
+ user1={},
+ description={used in the definition of \ics{DTLlistformatlastsep}},
+ note={provided by \styfmt{datatool-base}},
+ seealso={DTLformatlist},
+ category={command}
+}
+
+@index{si,
+ name={\csfmt{si}},
+ user1={\margm{unit}},
+ description={displays the unit with intelligent formatting},
+ note={provided by \styfmt{siunitx}},
+ category={command}
+}
+
+@index{ce,
+ name={\csfmt{ce}},
+ user1={\margm{formula}},
+ description={displays the chemical formula},
+ note={provided by \styfmt{mhchem}},
+ category={command}
+}
+
+@index{MakeTextLowercase,
+ name={\csfmt{MakeTextLowercase}},
+ user1={\margm{text}},
+ description={converts \meta{text} to lower case},
+ note={provided by \styfmt{textcase}},
+ category={command}
+}
+
+@index{MakeTextUppercase,
+ name={\csfmt{MakeTextUppercase}},
+ user1={\margm{text}},
+ description={converts \meta{text} to upper case},
+ note={provided by \styfmt{textcase}},
+ category={command}
+}
+
+@index{NoCaseChange,
+ name={\csfmt{NoCaseChange}},
+ user1={\margm{text}},
+ description={prevents \cs{MakeTextUppercase} and
+ \cs{MakeTextLowercase} from converting \meta{text}},
+ note={provided by \styfmt{textcase}},
+ category={command}
+}
+
+@index{MakeUppercase,
+ name={\csfmt{MakeUppercase}},
+ user1={\margm{text}},
+ description={converts \meta{text} to upper case},
+ note={kernel command},
+ category={command}
+}
+
+@index{char,
+ name={\csfmt{char}},
+ user1={\meta{number}},
+ description={accesses the character identified by \meta{number}},
+ note={{}\TeX\ primitive},
+ category={command}
+}
+
+@index{cs.string,
+ name={\csfmt{string}},
+ user1={\meta{token}},
+ description={if \meta{token} is a control sequence it expands
+ to the escape character followed by the control sequence name},
+ note={{}\TeX\ primitive},
+ category={command}
+}
+
+@index{let,
+ name={\csfmt{let}},
+ user1={\meta{token1}\meta{token2}},
+ description={assigns \meta{token1} to \meta{token2}},
+ note={{}\TeX\ primitive},
+ category={command}
+}
+
+@index{u,
+ name={\csfmt{u}},
+ user1={\margm{character}},
+ description={puts a breve accent over \meta{character}},
+ note={kernel command},
+ category={command}
+}
+
+@index{textsuperscript,
+ name={\csfmt{textsuperscript}},
+ user1={\margm{text}},
+ description={displays \meta{text} as a superscript},
+ note={kernel command},
+ category={command}
+}
+
+@index{textsubscript,
+ name={\csfmt{textsubscript}},
+ user1={\margm{text}},
+ description={displays \meta{text} as a subscript},
+ note={kernel command as from 2015/01/01},
+ category={command}
+}
+
+@index{MakeLowercase,
+ name={\csfmt{MakeLowercase}},
+ user1={\margm{text}},
+ description={converts \meta{text} to lower case},
+ note={kernel command},
+ category={command}
+}
+
+@index{textsc,
+ name={\csfmt{textsc}},
+ user1={\margm{text}},
+ description={applies small-caps font to \meta{text}},
+ note={kernel command},
+ category={command}
+}
+
+@index{cjkname,
+ name={\csfmt{cjkname}},
+ user1={\margm{CJK characters}},
+ description={displays \meta{CJK characters} in the appropriate
+ encoding},
+ note={provided by \styfmt{CJKutf8}},
+ category={command}
+}
+
diff --git a/Master/texmf-dist/source/support/bib2gls/src/bib2gls.pod b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.pod
new file mode 100644
index 00000000000..f41ce3bcf96
--- /dev/null
+++ b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.pod
@@ -0,0 +1,217 @@
+=head1 SYNOPSIS
+
+B<bib2gls> [I<option>]+ I<auxfile>
+
+=head1 DESCRIPTION
+
+B<bib2gls> is designed to work with the B<glossaries-extra> LaTeX
+package. (The B<record> package option is required.) The application
+performs two functions in one: (1) selects entries from .bib files
+according to information found in the I<auxfile> (similar to
+B<bibtex>); (2) hierarchically sorts entries and collates location
+lists (similar to B<makeindex> and B<xindy>). The .aux extension may
+be omitted from I<auxfile>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help> or B<-h>
+
+Display help message and exit.
+
+=item B<--version> or B<-v>
+
+Display version information and exit.
+
+=item B<--debug> [I<level>]
+
+Switch on the debug mode (optionally at the given I<level>, which
+should be a non-negative integer). If I<level> is B<0> then the
+debug mode is switched off.
+
+=item B<--no-debug> (or B<--nodebug>)
+
+Switch off debug mode. (Equivalent to B<--debug> B<0>)
+
+=item B<--verbose>
+
+Switch on verbose mode.
+
+=item B<--no-verbose> (or B<--noverbose>)
+
+Switch off verbose mode. (Some messages will still be written to
+STDOUT.)
+
+=item B<--silent>
+
+Only display error messages. All other messages are just written to
+the transcript file.
+
+=item B<--locale> I<lang> (or B<-l> I<lang>)
+
+Use language resource file for I<lang> (which should be an IETF
+locale tag).
+
+=item B<--log-file> I<file> (or B<-t> <file>)
+
+Set the transcript file.
+
+=item B<--dir> I<directory> (or B<-d> <directory>)
+
+Files are relative to I<directory>. (This doesn't change the current
+working directory.)
+
+=item B<--tex-encoding> I<name>
+
+Set the character encoding for the output files. This overrides the
+setting given in I<auxfile>.
+
+=item B<--interpret>
+
+Use the TeX parser library to interpret known (La)TeX commands
+(default).
+
+=item B<--no-interpret>
+
+Don't try interpreting (La)TeX commands.
+
+=item B<--break-space>
+
+Interpret tilde character as a normal space.
+
+=item B<--no-break-space>
+
+Interpret tilde as a non-breaking space (default).
+
+=item B<--packages> I<list> (or B<-p> I<list>)
+
+Instruct the TeX parser library to pretend the packages listed
+in I<list> have been used by the document. Note that there's only a
+limited number of packages supported by the TeX parser library.
+This option has a cumulative action so B<--packages wasysym,pifont>
+is the same as B<--packages wasysym --packages pifont>.
+
+=item B<--mfirstuc-protection> I<fields>|B<all> (or B<-u> I<fields>|B<all>)
+
+Insert an empty group if fields start with certain problematic
+commands to protect against case-changing commands like \Gls.
+
+The default is to do this for all fields. To do this for only a
+subset of fields, set I<fields> to a comma-separated list of fields
+(e.g. B<name,short,long>). The keyword B<all> indicates all fields.
+
+=item B<--no-mfirstuc-protection>
+
+Switch off the auto-insertion of an empty group for all fields.
+
+=item B<--mfirstuc-math-protection>
+
+Switch on the auto-insertion of an empty group for math-shift ($).
+This option will be overridden by B<--no-mfirstuc-protection>.
+
+=item B<--no-mfirstuc-math-protection>
+
+Switch off the auto-insertion of an empty group for math-shift ($).
+
+=item B<--nested-link-check> I<list>|B<none>
+
+Check each field listed in I<list> for potentially problematic
+nested link text. (Default list: name, text, plural, first,
+firstplural, short, shortplural, long, longplural, symbol).
+
+If B<none>, disable check.
+
+=item B<--no-nested-link-check>
+
+Don't check for potentially problematic nested link text.
+(Equivalent to B<--nested-link-check> B<none>)
+
+=item B<--shortcuts> I<option>
+
+Check for the shortcut commands when searching for dependencies.
+Permitted values of I<option>: B<acronyms> (or B<acro>), B<ac>,
+B<abbreviations> (or B<abbr>), B<all> (or B<true>), B<none> (or
+B<false>). This overrides the setting given in I<auxfile>.
+
+=item B<--map-format> I<key>B<:>I<value>[B<,>I<key>B<:>I<value>]* (or
+B<-m> I<key>B<:>I<value>[B<,>I<key>B<:>I<value>]*)
+
+Set location format mappings.
+
+=item B<--group> or B<-g>
+
+Add 'group' field to entries.
+
+=item B<--no-group>
+
+Don't add 'group' field to entries (default).
+
+=item B<--record-count> or B<-c>
+
+Add record count fields to entries.
+
+=item B<--no-record-count>
+
+Don't add record count field to entries (default).
+This option automatically implements B<--no-record-count-unit>.
+
+=item B<--record-count-unit> or B<-n>
+
+Add unit record count fields to entries.
+This option automatically implements B<--record-count>.
+
+=item B<--no-record-count-unit>
+
+Don't add unit record count field to entries (default).
+
+=item B<--trim-fields>
+
+Trim leading and trailing spaces from fields.
+
+=item B<--no-trim-fields>
+
+Don't trim leading and trailing spaces from fields (default).
+
+=item B<--expand-fields>
+
+Don't write B<\glsnoexpandfields> to the B<.glstex> file.
+
+=item B<--no-expand-fields>
+
+Write B<\glsnoexpandfields> to the B<.glstex> file (default).
+
+=back
+
+=head1 REQUIRES
+
+Java 7 and a TeX distribution.
+
+=head1 LICENSE
+
+License GPLv3+: GNU GPL version 3 or later
+<http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+=head1 RECOMMENDED READING
+
+The bib2gls manual:
+
+ texdoc bib2gls
+
+The glossaries-extra manual:
+
+ texdoc glossaries-extra
+
+The glossaries manual:
+
+ texdoc glossaries
+
+=head1 AUTHOR
+
+Nicola L. C. Talbot,
+L<http://www.dickimaw-books.com/>
+
+=cut
+
diff --git a/Master/texmf-dist/source/support/bib2gls/src/bib2gls.tex b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.tex
index b26599e0a0e..538acf5c19b 100644
--- a/Master/texmf-dist/source/support/bib2gls/src/bib2gls.tex
+++ b/Master/texmf-dist/source/support/bib2gls/src/bib2gls.tex
@@ -1,34 +1,104 @@
-% arara: pdflatex
-% arara: makeindex: {style: bib2gls.ist}
-% arara: pdflatex
-\documentclass[titlepage=false,index=totoc,12pt]{scrreprt}
+% arara: xelatex
+% arara: bibtex
+% arara: bib2gls: {group: on} if missing("glstex") || changed("bib")
+% arara: xelatex if missing("toc")
+% arara: xelatex if changed("glstex")
+% arara: bib2gls: {group: on}
+% arara: xelatex
+% arara: xelatex if found ("log", "Rerun")
+\documentclass[titlepage=false,index=totoc,bibliography=totoc,
+ fontsize=12pt,captions=tableheading]{scrreprt}
+
+% Need support for extended characters
+% and need a mono font that supports hyphenation
+\usepackage[no-math]{fontspec}
+\setmainfont{Linux Libertine O}
+
+\newfontface\greekmono{FreeMono}[Scale=MatchLowercase]
+\newfontface\devangari{FreeSerif}
+\newcommand{\devone}{{\devangari\char"0967}}
+\newcommand{\devtwo}{{\devangari\char"0968}}
+\newcommand{\devsix}{{\devangari\char"096C}}
-\usepackage[T1]{fontenc}
-\usepackage{tgtermes}
\usepackage[x11names]{xcolor}
\usepackage{alltt}
+\usepackage{array}
\usepackage{upquote}
\usepackage{etoolbox}
-\usepackage{filecontents}
-
-\newcommand*{\actual}{=}
-
-\begin{filecontents*}{\jobname.ist}
-actual '='
-\end{filecontents*}
+\usepackage{hologo}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{accents}
-\usepackage{makeidx}
+\usepackage{tikz}
\usepackage{datetime2}
+\usepackage{listings}
\usepackage[hidelinks]{hyperref}
-\usepackage{glossaries-extra}
-\glsdisablehyper
+\usepackage{cleveref}
+\usepackage[% v1.21+
+ record,% use bib2gls
+ index,% create index glossary
+ entrycounter,% enable entry counting
+ subentrycounter,% enable entry counting
+ %debug=showtargets,% debugging information
+ stylemods=bookindex,% adjust predefined styles and load glossary-bookindex.sty
+ style=bookindex
+ ]
+ {glossaries-extra}
+
+\glsxtrprovidestoragekey{note}{}{}
+
+% put break before dash to avoid confusion with a hyphen
+\newcommand{\dhyphen}{%
+ \texorpdfstring
+ {\discretionary{}{}{}\texttt{-}}%
+ {-}%
+}
-\makeindex
+% Redefine \- (used in entry names) so that hyphenation in command names,
+% switches options etc uses a serif hyphen to reduce confusion with an
+% actual hyphen in the code.
+\renewrobustcmd{\-}{%
+ \discretionary
+ {{\rmfamily\char\ifnum\hyphenchar\font<0
+ \defaulthyphenchar\else\hyphenchar\font\fi
+ }}%
+ {}{}%
+}
-\newabbreviation{IETF}{IETF}{Internet Engineering Task Force}
+\renewcommand{\glsentrycounterlabel}{}
+\renewcommand{\glssubentrycounterlabel}{}
+\renewcommand\glstreeitem{\par\hangindent10pt}
+\renewcommand\glstreesubitem{\par\hangindent30pt\hspace*{15pt}}
+
+\newcommand{\bibglsseealsosep}{\glstreesubitem}
+
+\renewcommand*{\glsseesep}{, \glstreesubitem\qquad}
+\renewcommand*{\glsseelastsep}{\glstreesubitem\qquad\andname\space}
+
+\newcommand{\glsxtrpostnameabbreviation}{%
+ \space(\glsentrylong{\glscurrententrylabel})%
+}
+
+\newcommand{\glsxtrpostnameenvironment}{\space environment}
+\newcommand{\glsxtrpostnamecounter}{\space counter}
+
+\setabbreviationstyle[common]{short-nolong}
+
+\GlsXtrLoadResources[
+ label-prefix={idx.},
+ save-loclist=false,
+ sort={letternumber-nocase},
+ type={index},
+ dual-field={dualid},
+ match-action={add},
+ match={{category}={.*field}},
+ dual-prefix={},
+ dual-type={main},
+ combine-dual-locations={primary},
+ selection={recorded and deps and see},
+ strip-missing-parents
+]
\DTMsavetimestamp{creation}{2017-01-20T15:39:00Z}
@@ -42,26 +112,43 @@ actual '='
\newif\ifmainmatter
+% ignore locations outside of main matter
+\GlsXtrSetDefaultNumberFormat{glsignore}
+
+\GlsXtrSetAltModifier{!}{format=glsignore}
+
\newcommand{\frontmatter}{%
\clearpage\pagenumbering{roman}%
\mainmatterfalse
}
\newcommand{\mainmatter}{%
\clearpage\pagenumbering{arabic}%
+ \GlsXtrSetDefaultNumberFormat{glsnumberformat}%
\mainmattertrue
}
+\pagestyle{headings}
+
\newcommand{\bibgls}{\appfmt{bib2gls}}
-\newcommand*{\sectionref}[1]{\hyperref[#1]{section~\ref*{#1}}}
-\newcommand*{\Sectionref}[1]{\hyperref[#1]{Section~\ref*{#1}}}
+\newcommand*{\BibTeX}{\hologo{BibTeX}}
+\newcommand*{\eTeX}{\hologo{eTeX}}
+\newcommand*{\XeLaTeX}{\hologo{XeLaTeX}}
+\newcommand*{\LuaLaTeX}{\hologo{LuaLaTeX}}
+\newcommand*{\pdfLaTeX}{\hologo{pdfLaTeX}}
\newcommand{\langxml}{\hyperref[sec:lang.xml]{language resource file}}
+\newcommand{\hex}[1]{0x#1}
+\newcommand{\hexsb}[1]{\textsubscript{\scriptsize\rmfamily#1}}
+\newcommand{\subfigfmt}[1]{(\emph{#1})}
+
\newcommand{\qt}[1]{``#1''}
\newcommand{\qtt}[1]{\qt{\,\texttt{#1}\,}}
+\newcommand{\era}[1]{\texorpdfstring{\textsc{\MakeLowercase{#1}}}{#1}}
+
\newcommand{\dequals}{%
\texorpdfstring
{\discretionary{}{}{}\texttt{=}\discretionary{}{}{}}%
@@ -80,21 +167,27 @@ actual '='
{:}%
}
-% put page break before dash to avoid confusion with a hyphen
-\newcommand{\dhyphen}{%
- \texorpdfstring
- {\discretionary{}{}{}\texttt{-}}%
- {-}%
-}
-
\pdfstringdefDisableCommands{%
\def\dhyphen{-}%
\def\dcolon{:}%
\def\dcomma{,}%
\def\dequals{,}%
+ \let\-\empty
}
-\newcommand*{\filefmt}[1]{\texorpdfstring{\nolinkurl{#1}}{#1}}
+\newcommand*{\csfmt}[1]{%
+ \texorpdfstring
+ {\texttt{\char`\\ #1}}%
+ {\string\\#1}%
+}
+
+% Provide commands that work like \gls[#1]{idx.#2}[#3]
+
+\glsxtrnewglslike{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
+
+\newcommand{\stringu}{\idx{cs.string}\idx{u}}
+
+\newcommand*{\filefmt}[1]{\texorpdfstring{\texttt{#1}}{#1}}
\newcommand*{\metafilefmt}[3]{%
\filefmt{#1}\discretionary{}{}{}\meta{#2}\discretionary{}{}{}\filefmt{#3}%
}
@@ -108,19 +201,19 @@ actual '='
\newcommand*{\suppresourcefmt}[1]{%
\texorpdfstring
{\texttt{\char`\\ jobname-#1.glstex}}%
- {\string\\jobname-1.glstex}%
+ {\string\\jobname-#1.glstex}%
}
\newcommand*{\appfmt}[1]{\texorpdfstring{\texttt{#1}}{#1}}
\newcommand*{\styfmt}[1]{\texorpdfstring{\textsf{#1}}{#1}}
-\newcommand*{\csfmt}[1]{\texorpdfstring{\texttt{\char`\\ #1}}{\string\\#1}}
\newcommand*{\envfmt}[1]{\texorpdfstring{\textsf{#1}}{#1}}
\newcommand*{\optfmt}[1]{\texorpdfstring{\texttt{#1}}{#1}}
\newcommand*{\csoptfmt}[1]{\texorpdfstring{\textcolor{DarkSeaGreen4}{\optfmt{#1}}}{#1}}
\newcommand*{\styoptfmt}[1]{\texorpdfstring{\textcolor{DarkOrchid4}{\optfmt{#1}}}{#1}}
\newcommand*{\fieldfmt}[1]{\texorpdfstring{\texttt{\color{DarkSlateGray4}#1}}{#1}}
\newcommand*{\entryfmt}[1]{\texorpdfstring{\texttt{\color{SteelBlue4}#1}}{#1}}
+\newcommand*{\atentryfmt}[1]{\entryfmt{@#1}}
\newcommand*{\abbrstylefmt}[1]{\texorpdfstring{\textsf{#1}}{#1}}
\newcommand*{\glostylefmt}[1]{\texorpdfstring{\textsf{#1}}{#1}}
\newcommand*{\catattrfmt}[1]{\texorpdfstring{\textsf{#1}}{#1}}
@@ -128,15 +221,15 @@ actual '='
\newcommand*{\idprefixfmt}[1]{%
\texorpdfstring{\texttt{#1\spacefactor999 .}}{#1.}}
-\newcommand*{\argor}{\texorpdfstring{\protect\textbar}{\string\|}}
+\newcommand*{\argor}{\texorpdfstring{\protect\textbar}{|}}
\newrobustcmd*{\texmeta}[1]{{\normalfont\normalcolor$\langle$\emph{#1}$\rangle$}}
\newcommand*{\meta}[1]{%
- \texorpdfstring{\texmeta{#1}}{#1}%
+ \texorpdfstring{\ifmmode\text{\texmeta{#1}}\else\texmeta{#1}\fi}{#1}%
}
-\newcommand*{\oarg}[1]{[#1]}
+\newcommand*{\oarg}[1]{\discretionary{}{}{}[#1]}
\newcommand*{\oargm}[1]{\oarg{\meta{#1}}}
\newcommand*{\marg}[1]{\texorpdfstring
@@ -148,76 +241,61 @@ actual '='
\newcommand*{\file}[1]{%
\texorpdfstring
- {\filefmt{#1}\index{#1\actual\filefmt{#1}}}%
+ {\idx{file.#1}}%
{#1}%
}
-\newcommand*{\ext}[1]{%
- \texorpdfstring
- {\filefmt{.#1}\index{file formats!#1\actual\filefmt{.#1}}}%
- {.#1}%
-}
+\newcommand{\texmfcnffmt}[1]{\texttt{#1}}
-\newcommand*{\app}[1]{%
- \texorpdfstring
- {\appfmt{#1}\index{#1\actual\appfmt{#1}}}%
- {#1}%
+\glsxtrnewgls{idx.texmfcnf.}{\texmfcnf}
+
+\newcommand*{\extfmt}[1]{\filefmt{.#1}}%
+
+\glsxtrnewgls[format=glsignore]{idx.}{\ext}
+
+\newcommand*{\iext}[1]{%
+ \glsxtrtitleorpdforheading{\idx{#1}}{.#1}{\extfmt{#1}}%
}
-\newcommand*{\sty}[1]{%
- \texorpdfstring
- {\styfmt{#1}\index{#1\actual\styfmt{#1}}}%
- {#1}%
+\glsxtrnewgls[format=glsignore]{idx.}{\sty}
+
+\newcommand*{\isty}[1]{%
+ \texorpdfstring{\idx{#1}}{#1}%
}
\newcommand*{\env}[1]{%
- \texorpdfstring
- {\envfmt{#1}\index{#1 environment\actual\envfmt{#1} environment}}%
- {#1}%
+ \texorpdfstring{\idx{env.#1}}{#1}%
}
+\newcommand{\glsxtrpostdescenvironment}{environment}
+
\newcommand*{\abbrstyle}[1]{%
- \texorpdfstring
- {\abbrstylefmt{#1}\index{abbreviation style!#1\actual\abbrstylefmt{#1}}}%
- {#1}%
+ \texorpdfstring{\idx{#1}}{#1}%
}
\newcommand*{\glostyle}[1]{%
- \texorpdfstring
- {\glostylefmt{#1}\index{glossary style!#1\actual\glostylefmt{#1}}}%
- {#1}%
+ \texorpdfstring{\idx{glostyle.#1}}{#1}%
}
\newcommand*{\catattr}[1]{%
- \texorpdfstring
- {\catattrfmt{#1}\index{category attributes!#1\actual\catattrfmt{#1}}}%
- {#1}%
+ \texorpdfstring{\idx{#1}}{#1}%
}
\newcommand*{\counter}[1]{%
- \texorpdfstring
- {\counterfmt{#1}\index{#1 counter\actual\counterfmt{#1} counter}}%
- {#1}%
+ \texorpdfstring{\idx{ctr.#1}}{#1}%
}
+\newcommand{\glsxtrpostdesccounter}{counter}
+
\newcommand*{\idprefix}[1]{%
- \texorpdfstring
- {\idprefixfmt{#1}\index{label prefixes!#1\actual\protect\idprefixfmt{#1}}}%
- {#1}%
+ \texorpdfstring{\idx{idprefix.#1}}{#1}%
}
-\newcommand*{\cs}[1]{%
- \texorpdfstring
- {\csfmt{#1}\index{#1\actual\protect\csfmt{#1}}}
- {\string\\#1}%
-}
\newcommand*{\styopt}[2][]{%
\texorpdfstring%
{%
- \styoptfmt{#2\ifblank{#1}{}{\dequals\marg{#1}}}%
- \index{package options!#2\actual\protect\styoptfmt{#2}}%
- \index{#2\actual\protect\styoptfmt{#2}}%
+ \idx{styopt.#2}\styoptfmt{\ifblank{#1}{}{\dequals\marg{#1}}}%
}%
{#2\ifblank{#1}{}{=#1}}%
}
@@ -228,54 +306,238 @@ actual '='
{key=value list}%
}
-\newcommand*{\csopt}[2][]{\gencsopt[#1]{glsxtrresourcefile}{#2}}%
-\newcommand*{\glsopt}[2][]{\gencsopt[#1]{gls}{#2}}%
-\newcommand*{\glsaddopt}[2][]{\gencsopt[#1]{glsadd}{#2}}%
+\newcommand{\cssection}[2][\subsection]{%
+ #1{\texorpdfstring{\glsxtrglossentry{#2}}{\string\\#2}}%
+}
-\newcommand*{\csoptnv}[1]{%
- \texorpdfstring
- {\protect\gencsopt{glsxtrresourcefile}{#1}}%
- {#1}%
-}%
+\newcommand{\format}[1]{%
+ \gls{#1}\glsentryuseri{#1}%
+}
+
+\newcommand{\formatdef}[1]{%
+ \begin{definition}%
+ \gls[hyper=false]{#1}\glsentryuseri{#1}%
+ \end{definition}\ignorespaces
+}
-\newcommand*{\csopteqval}[1]{\csoptfmt{=\margm{#1}}}
+\newcommand{\nosecformatdef}[1]{%
+ \begin{definition}
+ \glsadd{#1}\glsxtrglossentry{#1}%
+ \glsentryuseri{#1}%
+ \end{definition}\ignorespaces
+}
+
+\newcommand{\nosecdef}[1]{%
+ \begin{flushleft}\ttfamily
+ \glsadd{#1}\glsxtrglossentry{#1}%
+ \glsentryuseri{#1}%
+ \end{flushleft}\ignorespaces
+}
-\newcommand*{\gencsopt}[3][]{%
+\newcommand*{\csref}{\gls}
+
+\newcommand*{\cs}[1]{%
+ \glsdoifexists{idx.#1}%
+ {\glsdohyperlink{\glolinkprefix cs.idx.#1}{\glsentryname{idx.#1}}}%
+}
+
+\newcommand*{\ics}[2][]{\glsadd[#1]{idx.#2}\cs{#2}}
+
+\newcommand*{\encap}[2][]{\glsadd[#1]{idx.#2}%
+ {%
+ \let\csfmt\code
+ \glsdohyperlink{\glolinkprefix cs.idx.#2}{\glsentryname{idx.#2}}%
+ }%
+}
+
+\newcommand{\optsection}[2][\subsection]{%
+ \glsxtrifhasfield*{useri}{opt.#2}%
+ {%
+ #1[\texorpdfstring
+ {\glsxtrheadname{opt.#2}\csoptfmt{=\glscurrentfieldvalue}}%
+ {\glsentryname{opt.#2}=\glscurrentfieldvalue}]
+ {\glsadd{opt.#2}\glsxtrglossentry{opt.#2}%
+ \csoptfmt{=\glscurrentfieldvalue}%
+ }%
+ }%
+ {%
+ #1[\texorpdfstring{\glsxtrheadname{opt.#2}}{\glsentryname{opt.#2}}]
+ {\glsadd{opt.#2}\glsxtrglossentry{opt.#2}}%
+ }%
+}
+
+\glsxtrnewgls{file.}{\exfile}
+
+\newcommand{\filesection}[2][\section]{%
+ #1[\texorpdfstring{\glsxtrheadname{file.#2}}{\glsentryname{file.#2}}]
+ {\glsadd{file.#2}\glsxtrglossentry{file.#2}}%
+}
+
+\newcommand*{\csopt}[2][]{\gencsopt{#1}{opt}{#2}}%
+\newcommand*{\glsopt}[2][]{\gencsopt{#1}{idx.gls}{#2}}%
+\newcommand*{\glsaddopt}[2][]{\gencsopt{#1}{idx.glsadd}{#2}}%
+
+\newcommand*{\gencsopt}[3]{%
\texorpdfstring%
{%
- \csoptfmt{#3\ifblank{#1}{}{\dequals\marg{#1}}}%
- \ifmainmatter
- {\def\dhyphen{-}\index{#2\actual\protect\csfmt{#2}!#3\actual\protect\csoptfmt{#3}}}%
- \fi
+ \gls{#2.#3}%
+ \csoptfmt{\ifblank{#1}{}{\dequals\marg{#1}}}%
}%
{#3\ifblank{#1}{}{=#1}}%
}
\newcommand*{\field}[1]{%
\texorpdfstring
- {\fieldfmt{#1}%
- \index{fields!#1\actual\protect\fieldfmt{#1}}%
- \index{#1 field\actual\protect\fieldfmt{#1} field}%
- }%
+ {\gls{field.#1}}%
{#1}%
}
-\newcommand*{\entry}[1]{%
+\newcommand*{\fielddisp}[2]{%
\texorpdfstring
- {\entryfmt{#1}%
- \index{entry types!#1\actual\protect\entryfmt{@#1}}%
- \index{#1 entry type\actual\protect\entryfmt{@#1} entry type}%
+ {\glsdisp{field.#1}{\fieldfmt{#2}}}%
+ {#2}%
+}
+
+\newcommand*{\fielddef}[1]{%
+ \glsadd{field.#1}%
+ \glsxtrglossentry{field.#1}{}%
+}
+
+\newglossarystyle{fieldstyle}{%
+ \renewenvironment{theglossary}%
+ {%
+ \setlength{\glsdescwidth}{\dimexpr\linewidth-\maxnamewidth-4\tabcolsep}%
+ \begin{tabular}{l>{\raggedright}p{\glsdescwidth}}%
+ }%
+ {\end{tabular}}%
+ \renewcommand*{\glossaryheader}{%
+ \bfseries Field & \bfseries Description\tabularnewline}%
+ \renewcommand*{\glsgroupheading}[1]{}%
+ \renewcommand{\glossentry}[2]{%
+ \glsadd{##1}%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\tabularnewline
+ }%
+ \renewcommand{\subglossentry}[3]{\glossentry{##2}{##3}}%
+ \renewcommand*{\glsgroupskip}{}%
+}
+
+\newcommand*{\fieldhook}[1]{%
+ \edef\currentcategory{\glscategory{#1}}%
+ \glsxtriflabelinlist{\currentcategory}{\fieldcategories}%
+ {%
+ \settowidth{\dimen0}{\glsentryname{#1}}%
+ \ifdim\dimen0>\maxnamewidth \setlength{\maxnamewidth}{\dimen0}\fi
+ }%
+ {\printunsrtglossaryskipentry}%
+}
+
+\newlength\maxnamewidth
+
+\newcommand*{\printfields}[1]{%
+ \printunsrtglossary*[style=fieldstyle]{%
+ \renewcommand*\glossarysection[2][]{}%
+ \setlength{\maxnamewidth}{0pt}%
+ \def\fieldcategories{#1}%
+ \let\printunsrtglossaryentryprocesshook\fieldhook
+ }%
+}
+
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glsxtrifhasfield{dualid}{#1}%
+ {%
+ \glshyperlink[\glossentryname{#1}]{\glscurrentfieldvalue}%
+ }
+ {%
+ \GlsXtrIfFieldEqStr{category}{#1}{command}%
+ {\glsdohyperlink{\glolinkprefix cs.#1}{\glossentryname{#1}}}%
+ {\glossentryname{#1}}%
}%
- {#1}%
}
-\newcommand*{\atentry}[1]{%
+\newglossarystyle{commandsummary}%
+{%
+ \setglossarystyle{index}%
+ \renewcommand*{\glossaryheader}{\raggedright}%
+ \renewcommand*{\glsgroupheading}[1]{%
+ \glsxtrgetgrouptitle{##1}{\thisgrptitle}%
+ \glsxtrbookindexbookmark{\thisgrptitle}{summary.##1}%
+ \glsxtrbookindexformatheader{\thisgrptitle}%
+ \nopagebreak\indexspace\nopagebreak\csuse{@afterheading}%
+ }%
+ \renewcommand*{\glossentry}[2]{%
+ \item
+ \glsxtrifhasfield{dualid}{##1}%
+ {%
+ \glshyperlink{\glscurrentfieldvalue}%
+ \glsxtrifhasfield{useri}{##1}{\glscurrentfieldvalue}{}%
+ \nopagebreak\par\hspace{10pt}%
+ \Glossentrydesc{\glscurrentfieldvalue}%
+ }%
+ {%
+ \glstarget{cs.##1}{\strut}\gls[hyper=false]{##1}%
+ \glsxtrifhasfield{useri}{##1}{\glscurrentfieldvalue}{}%
+ \nopagebreak\par\hspace{10pt}%
+ \Glossentrydesc{##1}%
+ }%
+ \glsxtrifhasfield{note}{##1}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ .%
+ \par\medskip
+ }%
+}
+
+\newcommand*{\commandsummaryhook}[1]{%
+ \edef\currentcategory{\glscategory{#1}}%
+ \ifdefstring{\currentcategory}{command}%
+ {}%
+ {\printunsrtglossaryskipentry}%
+}
+
+\newcommand*{\printcommandsummary}{%
+ \printunsrtglossary*[type=index,
+ style=commandsummary,
+ title={Command Summary}
+ ]%
+ {%
+ \let\printunsrtglossaryentryprocesshook\commandsummaryhook
+ \glsxtrlocalsetgrouptitle{glssymbols}{@}%
+ }%
+}
+
+\newcommand{\entrysection}[2][\subsection]{%
+ #1[\texorpdfstring{\glsxtrheadname{entry.#2}}{\glsentryname{entry.#2}}]
+ {\glsadd{entry.#2}\glsxtrglossentry{entry.#2}}%
+}
+
+\newcommand*{\atentry}[2][]{%
\texorpdfstring
- {\entryfmt{@#1}%
- \index{entry types!#1\actual\protect\entryfmt{@#1}}%
- \index{#1 entry type\actual\protect\entryfmt{@#1} entry type}%
+ {\gls[#1]{entry.#2}}%
+ {#2}%
+}
+
+\newcommand{\argsection}[2][\section]{%
+ \def\switcharg{}%
+ \def\switchalt{}%
+ \def\switchaltpdf{}%
+ \glsxtrifhasfield*{useri}{switch.#2}%
+ {%
+ \edef\switcharg{ \expandonce\glscurrentfieldvalue}%
+ }%
+ {}%
+ \ifglshassymbol{switch.#2}%
+ {%
+ \def\switchalt{ (or \protect\glsentrysymbol{switch.#2}\switcharg)}%
}%
- {@#1}%
+ {}%
+ #1[\texorpdfstring
+ {\glsxtrheadname{switch.#2}}%
+ {\glsentryname{switch.#2}}%
+ \switcharg\switchalt
+ ]
+ {\glsadd{switch.#2}%
+ \glsxtrglossentry{switch.#2}\switcharg\switchalt}%
}
\newrobustcmd{\longswitch}{\string-{}\string-}
@@ -290,37 +552,19 @@ actual '='
{\string-#1}%
}
-\newrobustcmd{\longargindex}[1]{%
- \ifmainmatter
- {\def\dhyphen{-}%
- \index{command line options!#1\actual\protect\longargfmt{#1}}%
- }%
- \fi
-}
-
\newcommand*{\longarg}[1]{%
\texorpdfstring
- {\longargfmt{#1}\longargindex{#1}}%
+ {\gls{switch.#1}}%
{\string-\string-#1}%
}
-\newrobustcmd{\shortargindex}[1]{%
- \ifmainmatter
- {\def\dhyphen{-}%
- \index{command line options!#1\actual\protect\shortargfmt{#1}}%
- }%
- \fi
-}
-
-\newcommand*{\shortarg}[1]{%
+\newcommand*{\longargorshort}[1]{%
\texorpdfstring
- {\shortargfmt{#1}\shortargindex{#1}}%
- {\string-#1}%
+ {\gls{switch.#1}\ifglshassymbol{switch.#1}{ or \glssymbol{switch.#1}}{}}%
+ {\string-\string-#1}%
}
-\newcommand*{\keyword}[1]{%
- \texorpdfstring{\emph{#1}\index{#1}}{#1}%
-}
+\newcommand*{\unicodecategoryfmt}[1]{\textsf{#1}}
\definecolor{defbackground}{rgb}{1,1,0.75}
\newsavebox\defsbox
@@ -344,6 +588,43 @@ actual '='
\ignorespacesafterend
}
+\setcounter{tocdepth}{4}
+
+\newcommand*{\sectionref}[1]{\cref{#1}}
+\newcommand*{\Sectionref}[1]{\Cref{#1}}
+\newcommand*{\figureref}[1]{\hyperlink{#1-top}{figure~\ref*{#1}}}
+\newcommand*{\Figureref}[1]{\hyperlink{#1-top}{Figure~\ref*{#1}}}
+\newcommand*{\tableref}[1]{\cref{#1}}
+\newcommand*{\Tableref}[1]{\Cref{#1}}
+
+\newcommand{\figcontents}[3]{%
+ \hypertarget{#3-top}{}%
+ \centering
+ #1\par
+ #2\label{#3}%
+}
+
+\newlength\imagewidth
+\newcommand*{\pdftwocol}[3][1]{%
+ \renewcommand{\tabcolsep}{2pt}%
+ \setlength{\imagewidth}{\dimexpr.5\linewidth-2\tabcolsep}%
+ \def\tabcontents{\begin{tabular}{@{}cc@{}}}%
+ \count0=\numexpr#1-1\relax
+ \loop
+ \advance\count0 by 1\relax
+ \eappto\tabcontents{\noexpand\frame{%
+ \noexpand\includegraphics[page=\the\count0,width=\noexpand\imagewidth]{#2}}}%
+ \ifodd\count0
+ \appto\tabcontents{&}%
+ \else
+ \appto\tabcontents{\\}%
+ \fi
+ \ifnum\count0<#3
+ \repeat
+ \appto\tabcontents{\end{tabular}}%
+ \tabcontents
+}
+
% This is a bit fiddly. Need to represent \vec{v} in typewriter
% font for the interpreter examples. ($\mathtt{\vec{v}}$ doesn't
% work)
@@ -356,56 +637,37 @@ actual '='
\newcommand*{\imaginary}{i}
\newcommand{\addr}[1]{\\\url{#1}}
-\title{\appfmt{bib2gls}: a command line Java application to convert
+\title{\bibgls: a command line Java application to convert
\filefmt{.bib} files to \filefmt{glossaries-extra.sty} resource
files}
\author{Nicola Talbot\addr{http://www.dickimaw-books.com/}}
\date{\DTMusedate{moddate}}
\makeatletter
+\renewcommand{\fps@figure}{htbp}
+
+\newcommand{\code}[1]{\texorpdfstring{{\ttfamily\obeyspaces #1}}{#1}}
+\newenvironment{codeenv}
+ {\begin{flushleft}\ttfamily\obeylines\frenchspacing\@vobeyspaces}
+ {\end{flushleft}\ignorespacesafterend}
+
\begingroup
\renewcommand{\addr}[1]{}
\let\texorpdfstring\@secondoftwo
\DTMsetstyle{pdf}
\protected@edef\x{\endgroup
\noexpand\hypersetup{%
- pdftitle={\@title},
- pdfauthor={\@author}}%
- \noexpand\pdfinfo{/CreationDate (\DTMuse{creation})
- /ModDate (\DTMuse{moddate})
+ pdfinfo={
+ Title={\@title},
+ Author={\@author},
+ CreationDate={\DTMuse{creation}},
+ ModDate={\DTMuse{moddate}},
+ }%
+ %\noexpand\pdfinfo{/CreationDate (\DTMuse{creation})
+ %/ModDate (\DTMuse{moddate})}
}%
}\x
-\newcommand*{\labelarg}[1]{%
- {\def\@currentlabelname{\protect\longarg{#1}}\label{arg.#1}}%
-}
-\newcommand*{\argref}[1]{\nameref{arg.#1}}
-
-\newcommand*{\labelopt}[1]{%
- {\def\dhyphen{\string\dhyphen\space}%
- \protected@edef\@currentlabelname{\protect\csoptfmt{#1}}%
- \def\dhyphen{-}\label{opt.#1}}%
-}
-\newrobustcmd*{\optref}[2][]{%
- \nameref{opt.#2}%
- \ifblank{#1}{}{\csoptfmt{\dequals\marg{#1}}}}
-
-\newcommand*{\labelatentry}[1]{%
- {\def\@currentlabelname{\protect\atentry{#1}}\label{at.#1}}%
-}
-\newcommand*{\atentryref}[1]{\nameref{at.#1}}
-
-\newcommand*{\labelcs}[1]{%
- {\def\@currentlabelname{\protect\cs{#1}}\label{cs.#1}}%
-}
-\newcommand*{\csref}[1]{\nameref{cs.#1}}
-
-\newcounter{phantom}
-\newcommand*{\plabel}[2][]{\refstepcounter{phantom}%
- {\def\@currentlabelname{#1}\label{#2}}%
-}
-\newcommand{\plabelcs}[1]{\plabel[\protect\cs{#1}]{cs.#1}}
-
\makeatother
\begin{document}
@@ -415,19 +677,19 @@ files}
\begin{abstract}
The \bibgls\ command line application can be used to extract
-glossary information stored in a \filefmt{.bib} file and convert it
+glossary information stored in a \ext{bib} file and convert it
into glossary entry definition commands that can be read using
-\styfmt{glossaries-extra}'s \csfmt{GlsXtrLoadResources} command. When used
-in combination with the \styopt{record} package option, \bibgls\
+\styfmt{glossaries-extra}'s \ics{GlsXtrLoadResources} command. When used
+in combination with the \styoptfmt{record} package option, \bibgls\
can select only those entries that have been used in the document,
as well as any dependent entries, which reduces the \TeX\ resources
required by not defining unnecessary commands.
Since \bibgls\ can also sort and collate the recorded locations
-present in the \filefmt{.aux} file, it can simultaneously by-pass the
-need to use \appfmt{makeindex} or \appfmt{xindy}, although \bibgls\
+present in the \ext{aux} file, it can simultaneously by-pass the
+need to use \idx{makeindex} or \idx{xindy}, although \bibgls\
can be used together with an external indexing application if required. (For
-example, if a custom \appfmt{xindy} rule is needed.)
+example, if a custom \idx{xindy} rule is needed.)
An additional build may be required to ensure the locations are
up-to-date as the page-breaking may be slightly different on the
@@ -435,18 +697,18 @@ first \LaTeX\ run due to the unknown references being replaced with
?? which can be significantly shorter than the actual text produced
when the reference is known.
-Note that \bibgls\ is a Java application, so it requires the
-Java Runtime Environment (at least JRE~7). Additionally,
-\styfmt{glossaries-extra} must be at least version 1.12.
-(Although the latest version is recommended.)
+Note that \bibgls\ is a Java application, and requires Java~7
+(although the latest version is recommended). Additionally,
+\sty{glossaries-extra} must be at least version 1.12.
+(Although again the latest version is recommended.)
This application was developed in response to the question
-\href{http://tex.stackexchange.com/q/342544}{Is there a program for
-managing glossary tags?} on \TeX\ on StackExchange. The \ext{bib}
+\qt{\href{http://tex.stackexchange.com/q/342544}{Is there a program for
+managing glossary tags?}} on \TeX\ on StackExchange~\cite{tex.sx}. The \ext{bib}
file can be managed in an application such as JabRef.
If you already have a \ext{tex} file containing
-entry definitions using commands like \cs{newglossaryentry}
-then you can use the supplementary tool \appfmt{convertgls2bib}
+entry definitions using commands like \gls{newglossaryentry}
+then you can use the supplementary tool \idx{convertgls2bib}
to convert the entries to the \ext{bib} format required by
\bibgls. See \sectionref{sec:gls2bib} for further details.
\end{abstract}
@@ -454,58 +716,61 @@ to convert the entries to the \ext{bib} format required by
\frontmatter
\tableofcontents
+\listoftables
+\listoffigures
\mainmatter
\chapter{Introduction}
-If you have extensively used the \styfmt{glossaries} or
-\styfmt{glossaries-extra} package, you may have found yourself
-creating a large \ext{tex} file containing many definitions that
-you frequently use in documents. This file can then simply be
-loaded using \cs{input} or \cs{loadglsentries}, but a large file
-like this can be difficult to maintain and if the document only
-actually uses a small proportion of those entries, the document
-build is unnecessarily slow due to the time and resources taken on
-defining the unwanted entries.
+If you have extensively used the \styfmt{glossaries}~\cite{glossaries} or
+\styfmt{glossaries-extra}~\cite{glossaries-extra} package,
+you may have found yourself creating a large \iext{tex} file
+containing many definitions that you frequently use in documents.
+This file can then simply be loaded using \ics{input} or
+\ics{loadglsentries}, but a large file like this can be difficult to
+maintain and if the document only actually uses a small proportion
+of those entries, the document build is unnecessarily slow due to
+the time and resources taken on defining the unwanted entries.
The aim of \bibgls\ is to allow the entries to be stored in a
-\ext{bib} file, which can be maintained using a reference system
+\iext{bib} file, which can be maintained using a reference system
such as JabRef. The document build process
-can now be analogous to that used with \app{bibtex} (or
+can now be analogous to that used with \idx{bibtex} (or
\appfmt{biber}), where only those entries that have been recorded in the
document (and possibly their dependent entries) will be extracted
from the \ext{bib} file. Since \bibgls\ can also perform
hierarchical sorting and can collate location lists, it doubles as
-an indexing application, which means that the \app{makeglossaries}
+an indexing application, which means that the \idx{makeglossaries}
step can be skipped.
-You can't use \cs{glsaddall} with this method as that command works
+You can't use \ics{glsaddall} with this method as that command works
by iterating over all defined entries and calling
-\cs{glsadd}\margm{label}. On the first \LaTeX\ run there are no
-entries defined, so \cs{glsaddall} does nothing. If you want to
-select all entries, just use \optref[all]{selection} instead (which
-has the advantage over \cs{glsaddall} in that it doesn't create a
+\ics{glsadd}\margm{label}. On the first \LaTeX\ run there are no
+entries defined, so \ics{glsaddall} does nothing. If you want to
+select all entries, just use \csopt[all]{selection} instead (which
+has the advantage over \ics{glsaddall} in that it doesn't create a
redundant location for each entry).
Note that \bibgls\ requires the extension package
-\sty{glossaries-extra} and can't be used with just the base
-\sty{glossaries} package, since it requires some of the extension
-commands. See the \sty{glossaries-extra} user manual for information
+\isty{glossaries-extra} and can't be used with just the base
+\isty{glossaries} package, since it requires some of the extension
+commands. See the \styfmt{glossaries-extra} user
+manual~\cite{glossaries-extra} for information
on the differences between the basic package and the extended
package, as some of the default settings are different.
Since the information used by \bibgls\ is
-written to the \ext{aux} file, it's not possible to run \bibgls\
+written to the \iext{aux} file, it's not possible to run \bibgls\
through \TeX's shell escape while the \ext{aux} file is open for
write access. (The \ext{aux} file is closed \emph{after} the end
-document hook, so it can't be deferred with \cs{AtEndDocument}.)
+document hook, so it can't be deferred with \ics{AtEndDocument}.)
This means that if you really want to run \bibgls\
-through \cs{write18} it must be done in the preamble with
-\cs{immediate}. For example:
+through \ics{write18} it must be done in the preamble with
+\ics{immediate}. For example:
\begin{verbatim}
\immediate\write18{bib2gls \jobname}
\end{verbatim}
-As from version 1.14 of \sty{glossaries-extra}, this can be done
+As from version 1.14 of \styfmt{glossaries-extra}, this can be done
automatically with the \styopt{automake} option if the \ext{aux}
file exists. (Remember that this will require the shell escape to be
enabled.)
@@ -562,7 +827,7 @@ pdflatex myDoc
with \appfmt{latex}, \appfmt{xelatex} or \appfmt{lualatex} as
appropriate.)
-You can have multiple instances of \cs{GlsXtrLoadResources}. For
+You can have multiple instances of \gls{GlsXtrLoadResources}. For
example:
\begin{verbatim}
\documentclass{article}
@@ -606,24 +871,24 @@ Abbreviation: \gls{html}.
\end{document}
\end{verbatim}
-Note that there's no need to called \app{xindy} or \app{makeindex}
+Note that there's no need to called \idx!{xindy} or \idx!{makeindex}
since \bibgls\ automatically sorts the entries and collates the locations
after selecting the required entries from the \ext{bib} file and
-before writing the temporary file that's input with \cs{glsxtrresourcefile}
+before writing the temporary file that's input with \gls{glsxtrresourcefile}
(or the more convenient shortcut
-\cs{GlsXtrLoadResources}).\footnote{This document will mostly use
-the more convenient \cs{GlsXtrLoadResources}.} This
+\gls{GlsXtrLoadResources}).\footnote{This document will mostly use
+the more convenient \gls{GlsXtrLoadResources}.} This
means the entries are already defined in the correct order, and only
those entries that are required in the document are defined, so
-\cs{printunsrtglossary} (or \cs{printunsrtglossaries}) may be used.
+\ics{printunsrtglossary} (or \ics{printunsrtglossaries}) may be used.
(The \qtt{unsrt} part of the command name indicates that all
defined entries should be listed in the order of definition from
-\sty{glossaries-extra}'s point of view.)
+\styfmt{glossaries-extra}'s point of view.)
If you additionally want to use an indexing application, such
-as \app{xindy}, you need the package option
-\styopt[alsoindex]{record} and use \cs{makeglossaries}
-and \cs{printglossary} (or the iterative \cs{printglossaries}) as usual.
+as \idx{xindy}, you need the package option
+\styopt[alsoindex]{record} and use \ics{cs.makeglossaries}
+and \ics{printglossary} (or the iterative \ics{printglossaries}) as usual.
This requires a more complicated build process:
\begin{verbatim}
pdflatex myDoc
@@ -633,41 +898,281 @@ makeglossaries myDoc
pdflatex myDoc
\end{verbatim}
(The entries aren't defined until the second \LaTeX\ run, so the
-indexing files required by \app{makeindex} or \app{xindy} can't be
-created until then.)
+indexing files required by \idx!{makeindex} or \idx!{xindy} can't be
+created until then.) There are more examples provided in
+\sectionref{sec:examples}.
+
+\section{Defining a New Glossary}
+\label{sec:newglossary}
+
+Some of the examples in this manual use \ics{newglossary*} to define
+a new glossary type and some use \ics{newignoredglossary} or
+\ics{newignoredglossary*}. Why define an \idx{ignoredglossary}?
+
+The base \styfmt{glossaries} package was originally designed to work
+with \idx!{makeindex}. Support for \idx!{xindy} was later added, but
+both require three files per glossary type: the transcript file
+(created by the indexing application), the file written by \LaTeX\
+(and input by the indexing application) and the file input by
+\LaTeX\ (and written by the indexing application). So when a new glossary
+is defined with \ics{newglossary}, this not only defines internal
+control sequences that store the list of entry labels associated
+with that glossary, the title and the entry format but also has to
+define internal control sequences that store the three file
+extensions. The starred form \cs{newglossary*} is just a shortcut
+that forms the extensions from the glossary label. For the purposes
+of \bibgls, this is simpler than the unstarred version since the
+extensions are now irrelevant as they are only applicable to
+\idx!{makeindex} and \idx!{xindy}. (Unless, of course, you are using
+a hybrid method with \styopt[alsoindex]{record}.)
+
+Since some users wanted the ability to define entries that were
+common enough to not be worth including in any glossary lists, the
+concept of an \idx{ignoredglossary} was introduced, defined with
+\cs{newignoredglossary}. This only requires an internal control
+sequence to store the list of entry labels associated with that
+glossary\footnote{All entries must be assigned to a glossary. If you
+don't use the \field{type} field the default is used.}\ and the
+associated internal command that governs the way that
+commands like \cs{gls} are displayed for that glossary type.
+Since this type of glossary has no associated files, it can't be
+used with \cs{printglossary} and therefore isn't included in the
+list of glossary labels that's iterated over by commands like
+\cs{printglossaries}. Since there's no glossary list (and therefore
+no targets), \cs{newignoredglossary} additionally disables hyperlinks for that
+glossary type, but it doesn't disable indexing. The indexing macro
+is still called, but because there's no associated file to write to,
+it has no effect. With \bibgls, the indexing is written to the
+\ext{aux} file and so does have an effect.
+
+Although \idxpl{ignoredglossary} can't be used with
+\cs{printglossary}, they can be used with \cs{printunsrtglossary},
+which is designed to work without any indexing, but you need to
+explicitly set the title in the optional argument to override the
+default. The \idxpl{ignoredglossary} still can't be used in
+\cs{printunsrtglossaries}, since they're not included in the list
+that this command iterates over.
+
+So \cs{newignoredglossary} is useful with \bibgls\ if you're happy
+to use \cs{printunsrtglossary} as it reduces the overall number of
+internal control sequences. Since there is now the possibility of
+targets (created within \cs{printunsrtglossary}), it's useful to
+have an \idx{ignoredglossary} that doesn't suppress the hyperlinks.
+The \styfmt{glossaries-extra} package provides a starred form
+\ics{newignoredglossary*} that doesn't suppress the hyperlinks.
+
+Some resource options, such as \csopt{master}, \csopt{secondary} and
+\csopt{trigger-type}, need to ensure that a
+required glossary is defined. In this case, \bibgls\ uses
+\ics{provideignoredglossary*} in the \iext{glstex} file. If you
+haven't already defined that glossary in the document with \cs{newglossary*},
+you'll need to set the title in the optional argument of
+\cs{printunsrtglossary} if you don't want the default. The glossary
+won't be defined on the first run (if the definition is only
+provided in the \ext{glstex} file) but \cs{printunsrtglossary} will
+just give a warning if the type is undefined so it won't interrupt
+the document build.
+
+\section{Resource Sets}
+\label{sec:resourcesets}
+
+Each instance of \gls{glsxtrresourcefile} or
+\gls{GlsXtrLoadResources} in the document represents a \idx{resourceset}. Each
+\idx{resourceset} has one or more associated \iext{bib} files
+that provides the data for that set. Command line switches
+(\sectionref{sec:switches}) are applied to all \idxpl{resourceset}.
+Resource options (\sectionref{sec:resourceopts}) are only applied to
+that specific \idx{resourceset}. Each \idx{resourceset} is processed
+in stages:
+\begin{description}
+
+\item[Stage 1 (Initialisation)] Occurs after the \ext{aux} file has
+been parsed, this stage parses the resource option list and ensures
+options are valid and don't cause a conflict. The transcript will
+show the message
+\begin{alltt}
+Initialising resource \meta{resource-name}
+\end{alltt}
+at this point.
+
+\item[Stage 2 (Parsing)] All the \iext{bib} files associated with
+the \idx{resourceset} are parsed. Entry aliases (identified by
+\csopt{entry-type-aliases}) are performed. Preamble information (provided by
+\atentry{preamble}) is saved but is not interpreted at this stage.
+The transcript will show the message
+\begin{alltt}
+Parsing bib files for resource \meta{resource-name}
+\end{alltt}
+at this point.
+
+\item[Stage 3 (Processing Entries)]
+The transcript will show the message
+\begin{alltt}
+Processing resource \meta{resource-name}
+\end{alltt}
+at this point.
+For each entry that was found in
+the corresponding set of \ext{bib} files:
+\begin{itemize}
+\item Records are transferred to aliases if required (\csopt{alias-loc}).
+\item Field checks and modifications are performed:
+ \begin{itemize}
+ \item field aliases are performed (\csopt{field-aliases});
+ \item ignored fields (identified by \csopt{ignore-fields}) are
+ removed;
+ \item case-changes (for example, \csopt{short-case-change}) are
+ performed, except for the \field{name} field;
+ \item suffixes are appended if required (for example, with
+ \csopt{short-plural-suffix});
+ \item field replications are made (\csopt{replicate-fields});
+ \item the \field{group} field is assigned if \csopt{group} is set;
+ \item any variables (identified by \atentry{string}) are expanded
+ (if not already done in any of the previous steps);
+ \item any fields that have been identified by
+ \csopt{bibtex-contributor-fields} are converted;
+ \item any fields whose value must be a label are interpreted
+ if \csopt{interpret-label-fields} is set;
+ \item the \field{parent} field is adjusted according to the label prefix
+ settings (\csopt{label-prefix} etc);
+ \item \ics{makefirstuc} protection is applied according to
+ \longarg{mfirstuc-protection} and \longarg{mfirstuc-math-protection};
+ \item fields are parsed for commands like \cs{gls} or
+ \cs{glshyperlink} and also checked for nested links if
+ \longarg{nested-link-check} is set;
+ \item the \field{description} field is adjusted according to
+ \csopt{strip-trailing-nopost};
+ \item end punctuation is checked according to
+ \csopt{check-end-punctuation};
+ \item \field{name} case-change is performed if
+ \csopt{name-case-change} is set.
+ \end{itemize}
+\item The dual version (if appropriate) is created.
+\item Records are added to the entry's location list (or transferred
+to the dual\slash primary according to \csopt{combine-dual-locations}).
+\item The \field{type}, \field{category} and \field{counter} fields
+are set according to \csopt{type}, \csopt{dual-type},
+\csopt{category}, \csopt{dual-category}, \csopt{counter} and
+\csopt{dual-counter}.
+\item Filtering is applied (according to options like \csopt{match}
+but not \csopt{selection} or \csopt{limit}).
+\item Required fields are checked for existence.
+\item Dependencies are registered (if
+\csopt[recorded and deps]{selection} or \csopt[recorded and deps and
+see]{selection}).
+\item Any fields that have been identified by
+\csopt{date-time-fields}, \csopt{date-fields} or \csopt{time-fields}
+are converted.
+\end{itemize}
+If \csopt[recorded and deps and see]{selection} then any recorded
+entries that have been cross-referenced by an unrecorded entry, will
+register a dependency with the unrecorded entry. Finally,
+supplemental records are added to entries.
+
+\item[Stage 4 (Selection, Sorting, Writing)] Entries are selected
+from the list according to the \csopt{selection} setting, sorting is
+performed (if required), truncation is applied (if \csopt{limit} is
+set) and the \iext{glstex} file is written.
+The transcript will show the message
+\begin{alltt}
+Selecting entries for resource \meta{resource-name}
+\end{alltt}
+or (if \csopt{master})
+\begin{alltt}
+Processing master \meta{resource-name}
+\end{alltt}
+at this point.
+
+\end{description}
+
+Parent entries must always be in the same \idx{resourceset} as their
+child entries. (They may be defined in different \ext{bib} files as
+long as all those \ext{bib} files are listed in the same \csopt{src}.)
+Other forms of dependencies may be in a
+different \idx{resourceset} under certain circumstances. These types
+of dependencies are instances of commands such as \cs{gls} being
+found (for example, in the \field{description} field), or the
+cross-reference fields (\field{see}, \field{seealso} or
+\field{alias}) in recorded entries that reference unrecorded
+entries. The \qt{cross-referenced by} dependencies enabled with
+\csopt[recorded and deps and see]{selection} (where an unrecorded
+entry references a recorded entry through the cross-reference
+fields) aren't supported across \idxpl{resourceset}.
+
+A \idx{crossresourceref} is a reference from an entry provided in one
+\idx{resourceset} to an entry in another \idx{resourceset}. Since
+the contents of each \idx{resourceset}['s] preamble must be
+processed before fields can be interpreted and one
+\idx{resourceset}['s] preamble may contain definitions that override
+another, \idxpl{crossresourceref} can't be supported if fields
+containing cross-referencing information need to be interpreted.
+
+The \idx{crossresourceref} mode determines whether or not \bibgls\
+can support \idxpl{crossresourceref}. If enabled, the message
+\begin{verbatim}
+Cross-resource references allowed.
+\end{verbatim}
+will be written to the transcript otherwise the message is
+\begin{verbatim}
+Cross-resource references disabled.
+\end{verbatim}
+The mode can only be enabled if the following condition is satisfied:
+\begin{itemize}
+\item the interpreter is off (\longarg{no-interpret}), or
+\item every \idx{resourceset} either doesn't have a preamble
+(provided by \atentry{preamble} in the associated \ext{bib} files) or has
+\csopt[false]{interpret-preamble} or
+\csopt[false]{interpret-label-fields} set.
+\end{itemize}
+Note that if you don't use either \csopt[recorded and
+deps]{selection} or \csopt[recorded and deps and see]{selection}
+then the dependencies aren't picked up for that \idx{resourceset}
+(and so can't be cross-referenced from another \idx{resourceset}).
+
+Trails don't work with \idxpl{crossresourceref}. For example, if
+entry $A$ has been recorded and depends on entry $B$ that hasn't been
+recorded, then $B$ can be picked up from a different
+\idx{resourceset}, but if $A$ and $B$ are in the same
+\idx{resourceset} and $B$ is dependent on $C$ which is in a
+different \idx{resourceset} then $C$ won't be picked up if it hasn't
+been recorded because $B$ hasn't been recorded and is in a different
+\idx{resourceset}.
+
+If the \idx{crossresourceref} mode is enabled then stage~3 and
+stage~4 are processed in separate loops, otherwise they are
+processed in the same loop.
\section{Security}
\TeX\ Live come with security settings
-\texttt{openin\_any} and \texttt{openout\_any} that, respectively,
+\texmfcnf{openinany} and \texmfcnf{openoutany} that, respectively,
govern read and write file access (in addition to the operating
-system's file permissions). \bibgls\ uses \app{kpsewhich} to
+system's file permissions). \bibgls\ uses \idx{kpsewhich} to
determine these values and honours them. MikTeX doesn't use these
settings, so if these values are unset, \bibgls\ will default to
-\texttt{a} (any) for \texttt{openin\_any} and \texttt{p} (paranoid) for
-\texttt{openout\_any}.
+\code{a} (any) for \texmfcnf{openinany} and \code{p} (paranoid) for
+\texmfcnf{openoutany}.
\section{Localisation}
\label{sec:lang.xml}
The messages produced by \bibgls\ are fetched from a resource file
called \metafilefmt{bib2gls-}{lang}{.xml}, where \meta{lang} is a
-valid \gls{IETF} language tag.
+valid \idx{IETF} language tag.
The appropriate file is searched for in the following order, where
\meta{locale} is the operating system's locale or the value supplied
-by the \argref{locale} switch:
+by the \longarg{locale} switch:
\begin{enumerate}
\item \meta{lang} exactly matches \meta{locale}.
-For example, my locale is \texttt{en-GB}, so \bibgls\ will first search
+For example, my locale is \code{en-GB}, so \bibgls\ will first search
for \filefmt{bib2gls-en-GB.xml}. This file doesn't exist, so it will
try again.
\item If \meta{locale} has an associated script, the
next try is with \meta{lang} set to \meta{lang
-code}\texttt{-}\meta{script} where \meta{lang code} is the two
+code}\code{-}\meta{script} where \meta{lang code} is the two
letter ISO language code and \meta{script} is the script code.
-For example, if \meta{locale} is \texttt{sr-RS-Latn}
+For example, if \meta{locale} is \code{sr-RS-Latn}
then \bibgls\ will search for \filefmt{bib2gls-sr-Latn.xml} if
\filefmt{bib2gls-sr-RS-Latn.xml} doesn't exist.
@@ -681,7 +1186,7 @@ If there is no match, \bibgls\ will fallback on the English resource file
to translating it. Any volunteers who want to provide other language
resource files would be much appreciated.)
-Note that if you use the \optref[true]{loc-prefix} option, the
+Note that if you use the \csopt[true]{loc-prefix} option, the
textual labels (\qt{Page} and \qt{Pages} in English) will be taken
from the resource file. In the event that the loaded resource file
doesn't match the document language, you will have to manually set
@@ -712,7 +1217,7 @@ Copy the files provided to the following locations:
If you are using a Unix-like system, there are also bash scripts
provided called \file{bib2gls.sh} and \file{convertgls2bib.sh}.
-Either copy then directly to somewhere on your path without the \ext{sh}
+Either copy then directly to somewhere on your path without the \iext{sh}
extension, for example:
\begin{verbatim}
cp bib2gls.sh ~/bin/bib2gls
@@ -734,10 +1239,11 @@ The \file{texparserlib.jar} file isn't an application but is a
library used by both \file{bib2gls.jar} and
\file{convertgls2bib.jar}, and so needs to be in the same class path.
(The library is in a separate
-\href{https://github.com/nlct/texparser}{GitHub repository} as it's
+\href{https://github.com/nlct/texparser}{GitHub
+repository}~\cite{texparser} as it's
also used by some of my other applications.)
-Windows users can create a \ext{bat} file that works in a
+Windows users can create a \iext{bat} file that works in a
similar way to the bash scripts. To do this, create a file called
\file{bib2gls.bat} that contains the following:
\begin{verbatim}
@@ -748,11 +1254,11 @@ java -Djava.locale.providers=CLDR,JRE -jar "%JARPATH%" %*
\end{verbatim}
Save this file to somewhere on your system's path.
(Similarly for \filefmt{convertgls2bib}.) Note that \TeX\
-distributions for Windows usually convert \ext{jar} files to
+distributions for Windows usually convert \iext{jar} files to
executables.
You may need to refresh \TeX's database to ensure that
-\app{kpsewhich} can find the \ext{jar} files.
+\idx{kpsewhich} can find the \iext{jar} files.
To test that the application has been successfully installed, open a
command prompt or terminal and run the following command:
@@ -766,18 +1272,47 @@ This should display the version information for both applications.
\label{sec:texparserlib}
The \bibgls\ application requires the \TeX\ Parser Library
-\file{texparserlib.jar}\footnote{\url{https://github.com/nlct/texparser}} which is used to parse the \ext{aux}
-and \ext{bib} files.
-
-With the \argref{interpret} switch on (default), this library is
-also used to interpret the sort value when it contains
-a backslash \verb|\| or a dollar symbol \verb|$| or braces \verb|{|
-\verb|}| (and when the \optref{sort} option is not \optfmt{unsrt} or
-\optfmt{none} or \optfmt{use}). The other case is with
-\optref{set-widest} when determining the width of the \field{name}
-field. The \argref{no-interpret} switch will turn off this function,
-but the library will still be used to parse the \ext{aux} and
-\ext{bib} files.
+\file{texparserlib.jar}\footnote{\url{https://github.com/nlct/texparser}}
+which is used to parse the \iext{aux} and \iext{bib} files.
+
+With the \longarg{interpret} switch on (default), this library is
+also used to interpret the sort value when it contains a backslash
+\idx{escchar} or a tilde \idx{nbspchar} or a dollar symbol
+\idx{mshiftchar} or braces \idx{bgroupchar} \idx{egroupchar}
+(and when the \csopt{sort} option is not
+\optfmt{unsrt} or \optfmt{none} or \optfmt{use}).\footnote{The other
+special characters are omitted from the check: the comment symbol
+\idx{commentchar} is best avoided in field values, the subscript and
+superscript characters \idx{sbchar} and \idx{spchar} should
+either be encapsulated by \idx{mshiftchar} or by \cs{ensuremath}, which
+will be picked up by the check for \idx{mshiftchar} or
+\idx{escchar}, and the other special characters would
+indicate something too complex for the interpreter to handle.}
+
+The other cases that the interpreter is used for are:
+\begin{itemize}
+\item when \csopt{set-widest} is used to determine the width of
+the \field{name} field;
+\item if \csopt[true]{interpret-label-fields} and the
+\field{parent}, \field{category}, \field{type}, \field{group},
+\field{seealso} or \field{alias} fields contain \idx{escchar}
+or \idx{bgroupchar} or \idx{egroupchar} the interpreter is used
+since these fields must be just a label
+(other special characters aren't checked as they won't expand to
+characters allowed in a label).
+\end{itemize}
+
+The \longarg{no-interpret} switch will turn off the interpreter, but
+the library will still be used to parse the \ext{aux} and \ext{bib}
+files. Note that the \field{see} field doesn't use the interpreter as
+it may legitimately contain \LaTeX\ code in the optional tag part
+(such as \cs{seealsoname}).
+
+The parser has a different concept of expansion to \LaTeX\
+and will expand some things that aren't expanded by \LaTeX\
+(such as \ics{MakeUppercase} and \ics{char}) and won't expand other commands
+that would be expanded by \LaTeX\ (such as commands defined
+in terms of complicated internals).
The \file{texparserlib.jar} library is not a
\TeX\ engine and there are plenty of situations where it doesn't
@@ -785,21 +1320,28 @@ work. In particular, in this case it's being used in a fragmented
context without knowing most of the packages used by the
document\footnote{\bibgls\ can detect from the log file a small
number of packages that the parser can support, such as
-\sty{pifonts}, \sty{wasysym}, \sty{amssymb}, \sty{stix}, \sty{mhchem}
-and \sty{bpchem}. There's also partial support for \sty{siunitx}'s
-\cs{si} command.}\ or any custom
+\isty{pifonts}, \isty{upgreek}, \isty{wasysym}, \isty{amssymb},
+\isty{stix}, \isty{mhchem} and \isty{bpchem}. There's also partial
+support for \isty{siunitx}'s \ics{si} command.}\ or any custom
commands or environments provided within the document.
+Since the parser doesn't have a full set of commands available
+within the \LaTeX\ document, when it encounters \ics{renewcommand} it
+won't check if the command is undefined. If the command isn't
+defined, it will simply behave like \cs{newcommand}. Whereas
+with \ics{providecommand} the parser will only define the command
+if it's unrecognised.
+
\TeX\ syntax can be quite complicated and, in some cases, far too
complicated for simple regular expressions. The library performs
better than a simple pattern match, and that's the purpose of
\file{texparserlib.jar} and why it's used by \bibgls\ (and by
-\appfmt{convertgls2bib}). When
-the \argref{debug} mode is on, any warnings or errors triggered by
-the \argref{interpret} mode will be written to the transcript
-prefixed with \texttt{texparserlib:} (the results of the conversions
+\idx{convertgls2bib}). When
+the \longarg{debug} mode is on, any warnings or errors triggered by
+the \longarg{interpret} mode will be written to the transcript
+prefixed with \code{texparserlib:} (the results of the conversions
will be included in the transcript as informational messages
-prefixed with \texttt{texparserlib:} even with \argref{no-debug}).
+prefixed with \code{texparserlib:} even with \longarg{no-debug}).
For example, suppose the \ext{bib} file includes:
\begin{verbatim}
@@ -844,63 +1386,62 @@ protects against the possibility that the \catattr{glossname}
category attribute might be set to \optfmt{firstuc}, which
automatically converts the first letter of the name to
upper case when displaying the glossary. See also
-\argref{mfirstuc-protection} and
-\argref{mfirstuc-math-protection}.)
+\longarg{mfirstuc-protection} and
+\longarg{mfirstuc-math-protection}.)
None of these entries have a \field{sort} field so the \field{name}
-is used. If the entry type had been \atentryref{symbol} instead,
+is used. If the entry type had been \atentry{symbol} instead,
the fallback would be the entry's label.
-This means that with \entry{symbol} instead of \entry{entry}, and the default
-\optref[sort]{sort-field}, and with
-\optref[letter-case]{sort}, these entries will be defined in
-the order: \texttt{M}, \texttt{S}, \texttt{card}, \texttt{i}, \texttt{v} (since
+This means that with \atentry{symbol} instead of \atentry{entry}, and the default
+\csopt[sort]{sort-field}, and with
+\csopt[letter-case]{sort}, these entries will be defined in
+the order: \code{M}, \code{S}, \code{card}, \code{i}, \code{v} (since
this is the case-sensitive letter order of the labels) whereas
-with \optref[letter-nocase]{sort-field}, the order will be:
-\texttt{card}, \texttt{i}, \texttt{M}, \texttt{S}, \texttt{v} (since this
+with \csopt[letter-nocase]{sort-field}, the order will be:
+\code{card}, \code{i}, \code{M}, \code{S}, \code{v} (since this
is the case-insensitive letter order of the labels).
-However, with \atentryref{entry}, the fallback field will
-be taken from the \field{name} which in the above example contains \TeX\ code, so
+However, with \atentry{entry}, the fallback field will be taken from
+the \field{name} which in the above example contains \TeX\ code, so
\bibgls\ will use \file{texparserlib.jar} to interpret this code.
The library has several different ways of writing the processed
-code. For simplicity, \bibgls\ uses the library's HTML output and then
-strips the HTML markup and trims any leading or trailing
-spaces. The library method that writes non-ASCII
-characters using \qtt{\&x\meta{hex};} markup is overridden
-by \bibgls\ to just write the Unicode character, which means
-that the letter-based sorting options will sort according
-to the integer value \meta{hex} rather than the string
-\qtt{\&x\meta{hex};}.
+code. For simplicity, \bibgls\ uses the library's HTML output and
+then strips the HTML markup and trims any leading or trailing
+spaces. The library method that writes \idx{non-ASCII} characters
+using \qtt{\&x\meta{hex};} markup is overridden by \bibgls\ to just
+write the Unicode character, which means that the letter-based
+sorting options will sort according to the integer value \meta{hex}
+rather than the string \qtt{\&x\meta{hex};}.
The interpreter is first passed the code provided with
-\atentryref{preamble}:
+\atentry{preamble}:
\begin{verbatim}
\providecommand{\mtx}[1]{\boldsymbol{#1}}
\providecommand{\set}[1]{\mathcal{#1}}
\providecommand{\card}[1]{|\set{#1}|}
\providecommand{\imaginary}{i}
\end{verbatim}
-(unless \optref[false]{interpret-preamble}).
+(unless \csopt[false]{interpret-preamble}).
This means that the provided commands are now recognised by the
interpreter when it has to parse the fields later.
-In the case of the \texttt{M} entry in the example above, the
+In the case of the \code{M} entry in the example above, the
code that's passed to the interpreter is:
\begin{verbatim}
{}$\mtx{M}$
\end{verbatim}
-The transcript (\ext{glg}) file will show the results of the
-conversion:\footnote{The \argref{debug} mode will show additional
+The transcript (\iext{glg}) file will show the results of the
+conversion:\footnote{The \longarg{debug} mode will show additional
information.}
\begin{verbatim}
texparserlib: {}$\mtx{M}$ -> M
\end{verbatim}
So the \field{sort} value for this entry is set to \qtt{M}. The font
-change (caused by math-mode and \cs{boldsymbol}) has been
+change (caused by math-mode and \ics{boldsymbol}) has been
ignored. The sort value therefore consists of a single Unicode
character 0x4D (Latin upper case letter \qtt{M}, decimal value 77).
-For the \texttt{v} entry, the code is:
+For the \code{v} entry, the code is:
\begin{verbatim}
{}$\vec{v}$
\end{verbatim}
@@ -913,7 +1454,7 @@ which consists of two Unicode characters 0x76
(Latin lower case letter \qtt{v}, decimal value 118) and
0x20D7 (combining right arrow above, decimal value 8407).
-For the \texttt{set} entry, the code is:
+For the \code{set} entry, the code is:
\begin{verbatim}
{}$\set{S}$
\end{verbatim}
@@ -925,7 +1466,7 @@ So the \field{sort} value for this entry is set to \qtt{S} (again
ignoring the font change). This consists of a single Unicode
character 0x53 (Latin upper case letter \qtt{S}, decimal value~83).
-For the \texttt{card} entry, the code is:
+For the \code{card} entry, the code is:
\begin{verbatim}
{}$\card{S}$
\end{verbatim}
@@ -940,11 +1481,11 @@ font change has been discarded). In this case the sort value
consists of three Unicode characters 0x7C (vertical line, decimal
value 124),
0x53 (Latin upper case letter \qtt{S}, decimal value 83) and 0x7C again.
-If \optref[false]{interpret-preamble} had been used, \csfmt{card}
+If \csopt[false]{interpret-preamble} had been used, \csfmt{card}
wouldn't be recognised and would be discarded leaving just \qtt{S}
as the sort value.
-For the \texttt{i} entry, the code is:
+For the \code{i} entry, the code is:
\begin{verbatim}
{}$\imaginary$
\end{verbatim}
@@ -954,13 +1495,13 @@ texparserlib: {}$\imaginary$ -> i
\end{verbatim}
So the \field{sort} value for this entry is set to \qtt{i}.
-This means that in the case of the default \optref[sort]{sort-field} with
-\optref[letter-case]{sort}, these entries will be defined in
-the order: \texttt{M} ($\mtx{M}$), \texttt{S} ($\set{S}$),
-\texttt{i} ($\imaginary$), \texttt{v} ($\vec{v}$) and
-\texttt{card} ($\card{S}$).
+This means that in the case of the default \csopt[sort]{sort-field} with
+\csopt[letter-case]{sort}, these entries will be defined in
+the order: \code{M} ($\mtx{M}$), \code{S} ($\set{S}$),
+\code{i} ($\imaginary$), \code{v} ($\vec{v}$) and
+\code{card} ($\card{S}$).
In this case, the entries have been sorted according to
-the character codes. If you run \bibgls\ with \argref{verbose}
+the character codes. If you run \bibgls\ with \longarg{verbose}
the decimal character codes will be included in the transcript.
For this example:
\begin{alltt}
@@ -971,7 +1512,7 @@ S -> 'S' [83]
v -> '\usebox\varrow' [118 8407]
\end{alltt}
-The \argref{group} option (in addition to \argref{verbose})
+The \longarg{group} option (in addition to \longarg{verbose})
will place the letter group in
parentheses before the character code list:
\begin{alltt}
@@ -981,16 +1522,16 @@ M -> 'M' (M) [77]
S -> 'S' (S) [83]
v -> '\usebox\varrow' (v) [118 8407]
\end{alltt}
-(Note that the \texttt{card} entry doesn't have a letter
+(Note that the \code{card} entry doesn't have a letter
group since the vertical bar character isn't considered a
letter.)
-If \optref[letter-nocase]{sort} is used instead then, after conversion
+If \csopt[letter-nocase]{sort} is used instead then, after conversion
by the interpreter, the sort values will all be changed to
-lower case. The order is now: \texttt{i} ($\imaginary$),
-\texttt{M} ($\mtx{M}$), \texttt{S} ($\set{S}$),
-\texttt{v} ($\vec{v}$) and \texttt{card} ($\card{S}$).
-The transcript (with \argref{verbose}) now shows
+lower case. The order is now: \code{i} ($\imaginary$),
+\code{M} ($\mtx{M}$), \code{S} ($\set{S}$),
+\code{v} ($\vec{v}$) and \code{card} ($\card{S}$).
+The transcript (with \longarg{verbose}) now shows
\begin{alltt}
i -> 'i' [105]
card -> '|s|' [124 115 124]
@@ -998,7 +1539,7 @@ M -> 'm' [109]
S -> 's' [115]
v -> '\usebox\varrow' [118 8407]
\end{alltt}
-With \argref{group} (in addition to \argref{verbose})
+With \longarg{group} (in addition to \longarg{verbose})
the letter groups are again included:
\begin{alltt}
i -> 'i' (I) [105]
@@ -1008,15 +1549,15 @@ S -> 's' (S) [115]
v -> '\usebox\varrow' (V) [118 8407]
\end{alltt}
Note that the letter groups are upper case not lower case.
-Again the \texttt{card} entry doesn't have an associated
+Again the \code{card} entry doesn't have an associated
letter group.
If a locale-based sort is used, the ordering will follow the
-locale's alphabet rules. For example, with \optref[en]{sort}
+locale's alphabet rules. For example, with \csopt[en]{sort}
(English, no region or variant), the order becomes:
-\texttt{card} ($\card{S}$), \texttt{i} ($\imaginary$),
-\texttt{M} ($\mtx{M}$), \texttt{S} ($\set{S}$) and
-\texttt{v} ($\vec{v}$). The transcript (with \argref{verbose})
+\code{card} ($\card{S}$), \code{i} ($\imaginary$),
+\code{M} ($\mtx{M}$), \code{S} ($\set{S}$) and
+\code{v} ($\vec{v}$). The transcript (with \longarg{verbose})
shows the collation keys instead:
\begin{alltt}
i -> 'i' [0 92 0 0 0 0]
@@ -1025,10 +1566,10 @@ M -> 'M' [0 96 0 0 0 0]
S -> 'S' [0 102 0 0 0 0]
v -> '\usebox\varrow' [0 105 0 0 0 0]
\end{alltt}
-Again the addition of the \argref{group} switch will show
+Again the addition of the \longarg{group} switch will show
the letter groups.\footnote{For more information on collation keys see the
\href{http://docs.oracle.com/javase/8/docs/api/java/text/CollationKey.html}{CollationKey}
-class in Java's API.}
+class in Java's API~\cite{collationkey}.}
Suppose I add a new symbol to my \ext{bib} file:
\begin{verbatim}
@@ -1038,28 +1579,27 @@ Suppose I add a new symbol to my \ext{bib} file:
}
\end{verbatim}
and I also use this entry in the document. Then with
-\optref[en]{sort}, the order is: \texttt{card} ($\card{S}$),
-\texttt{angstrom} (\AA), \texttt{i} ($\imaginary$), \texttt{M}
-($\mtx{M}$), \texttt{S} ($\set{S}$), and \texttt{v} ($\vec{v}$).
-The \argref{group} switch shows that the \texttt{angstrom} entry
+\csopt[en]{sort}, the order is: \code{card} ($\card{S}$),
+\code{angstrom} (\AA), \code{i} ($\imaginary$), \code{M}
+($\mtx{M}$), \code{S} ($\set{S}$), and \code{v} ($\vec{v}$).
+The \longarg{group} switch shows that the \code{angstrom} entry
(\AA) has been placed in the \qt{A} letter group.
-However, if I change the locale to \optref[sv]{sort}, the
-\texttt{angstrom} entry is moved to the end of the list and the
-\argref{group} switch shows that it's been placed in the \qt{\AA}
+However, if I change the locale to \csopt[sv]{sort}, the
+\code{angstrom} entry is moved to the end of the list and the
+\longarg{group} switch shows that it's been placed in the \qt{\AA}
letter group.
If you are using Java~8, you can set the
-\texttt{java.locale.providers} property to \texttt{CLDR,JRE} to use
+\code{java.locale.providers} property to \code{CLDR,JRE} to use
the Common Locale Data Repository, which has more extensive
-support for locales than the native Java Runtime Environment.
+support for locales than the native \idx{JRE}.
This isn't available for Java~7, and should be enabled by default
for the proposed Java~9.
\chapter{Command Line Options}
\label{sec:switches}
-\edef\resetsecnumdepth{\noexpand\setcounter{secnumdepth}{\arabic{secnumdepth}}}
\setcounter{secnumdepth}{0}
The syntax of \bibgls\ is:
@@ -1071,77 +1611,65 @@ extension may be omitted.) Only one \meta{filename} is permitted.
Available options are listed below.
-\section{\longarg{help} (or \shortarg{h})}
-\labelarg{help}
+\argsection{help}
Display the help message and quit.
-\section{\longarg{version} (or \shortarg{v})}
-\labelarg{version}
+\argsection{version}
Display the version information and quit.
-\section{\longarg{debug} \oargm{n}}
-\labelarg{debug}
+\argsection{debug}
Switch on debugging mode. If \meta{n} is present, it must be a
non-negative integer indicating the debugging level. If omitted 1 is
assumed. This option also switches on the verbose mode. A value of 0
is equivalent to \longargfmt{no-debug}.
-\section{\longarg{no-debug} (or \longarg{nodebug})}
-\labelarg{no-debug}
+\argsection{no-debug}
Switches off the debugging mode.
-\section{\longarg{verbose}}
-\labelarg{verbose}
+\argsection{verbose}
Switches on the verbose mode. This writes extra information to the
terminal and transcript file.
-\section{\longarg{no-verbose} (or \longarg{noverbose})}
-\labelarg{no-verbose}
+\argsection{no-verbose}
Switches off the verbose mode. This is the default behaviour.
Some messages are written to the terminal. To completely suppress
all messages (except errors), switch on the silent mode.
For additional information messages, switch on the verbose mode.
-\section{\longarg{silent}}
-\labelarg{silent}
+\argsection{silent}
Suppresses all messages except for errors that would normally be
written to the terminal. Warnings and informational messages are
written to the transcript file, which can be inspected afterwards.
-\section{\longarg{locale} \meta{lang} (or \shortarg{l} \meta{lang})}
-\labelarg{locale}
+\argsection{locale}
-Specify the preferred \langxml, where \meta{lang} is a valid \gls{IETF} language tag.
+Specify the preferred \langxml, where \meta{lang} is a valid \idx{IETF} language tag.
This option requires an appropriate \metafilefmt{bib2gls-}{lang}{.xml}
resource file otherwise \bibgls\ will fallback on English.
-\section{\longarg{log-file} \meta{filename} (or \shortarg{t}
-\meta{filename})}
-\labelarg{log-file}
+\argsection{log-file}
Sets the name of the transcript file. By default, the name is the
-same as the \ext{aux} file but with a \ext{glg} extension. Note that
-if you use \bibgls\ in combination with \app{xindy} or
-\app{makeindex}, you will need to change the transcript file name to
+same as the \iext{aux} file but with a \iext{glg} extension. Note that
+if you use \bibgls\ in combination with \idx{xindy} or
+\idx{makeindex}, you will need to change the transcript file name to
prevent interference.
-\section{\longarg{dir} \meta{dirname} (or \shortarg{d}
-\meta{dirname})}
-\labelarg{dir}
+\argsection{dir}
By default \bibgls\ assumes that the output files should be written
-in the current working directory. The input \ext{bib} files are assumed to be
+in the current working directory. The input \iext{bib} files are assumed to be
either in the current working directory or on \TeX's path (in which
-case \app{kpsewhich} will be used to find them).
+case \idx{kpsewhich} will be used to find them).
-If your \ext{aux} file isn't in the current working directory (for
+If your \iext{aux} file isn't in the current working directory (for
example, you have run \TeX\ with \shortargfmt{output-directory})
then you need to take care how you invoke \bibgls.
@@ -1174,42 +1702,64 @@ bib2gls tmp/mydoc
\end{verbatim}
then the \ext{aux} file is found and the transcript file is
\filefmt{tmp/mydoc.glg} (since the default is the same as the
-\ext{aux} file but with the extension changed to \ext{glg}) but the
+\ext{aux} file but with the extension changed to \iext{glg}) but the
output file \filefmt{mydoc.glstex} will be written to the current
directory.
This works fine from \TeX's point of view as it can find the
-\ext{glstex} file, but it may be that you'd rather the \ext{glstex}
+\iext{glstex} file, but it may be that you'd rather the \ext{glstex}
file was tidied away into the \filefmt{tmp} directory along with all
the other files. In this case you need to invoke \bibgls\ with the
-\longarg{dir} or \shortarg{d} option:
+\longargorshort{dir} option:
\begin{verbatim}
bib2gls -d tmp mydoc
\end{verbatim}
-\section{\longarg{interpret}}
-\labelarg{interpret}
+\argsection{interpret}
Switch on the interpreter mode (default). See \sectionref{sec:texparserlib}
for more details.
-\section{\longarg{no-interpret}}
-\labelarg{no-interpret}
+\argsection{no-interpret}
Switch off the interpreter mode. See \sectionref{sec:texparserlib}
for more details.
-\section{\longarg{mfirstuc-protection} (or \shortarg{u})}
-\labelarg{mfirstuc-protection}
+\argsection{no-break-space}
+
+The interpreter treats a tilde character \idx{nbspchar} as a non-breakable
+space (default).
+
+\argsection{break-space}
+
+The interpreter treats a tilde character \idx{nbspchar} as a normal
+space.
+
+\argsection{packages}
+
+Instruct the interpreter to pretend the packages listed
+in \meta{list} have been used by the document.
+This option has a cumulative action so \code{\longarg{packages}
+"wasysym,pifont"} is the same as \code{\longarg{packages} wasysym
+\longarg{packages} pifont}.
-Commands like \cs{Gls} use \cs{makefirstuc} provided by the
-\sty{mfirstuc} package. This command has limitations and one of the
+Note that there's only a limited number of packages supported by the
+\TeX\ parser library. This option is provided for cases where you're
+using a command from a package that the interpreter doesn't support
+but it happens to have the same name and meaning as a command from
+a package that the interpreter does support.
+
+\argsection{mfirstuc-protection}
+
+Commands like \ics{Gls} use \ics{makefirstuc} provided by the
+\isty{mfirstuc} package. This command has limitations and one of the
things that can break it is the use of a referencing command
at the start of its argument. The \sty{glossaries-extra} package has
more detail about the problem in the \qt{Nested Links} section of
-the user manual. If a glossary field starts with one of these
-problematic commands, the recommended method (if the command can't
-be replaced) is to insert an empty group in front of it.
+the user manual~\cite{glossaries-extra}. If a glossary field starts
+with one of these problematic commands, the recommended method (if
+the command can't be replaced) is to insert an empty group in front
+of it.
For example, the following definition
\begin{verbatim}
@@ -1225,23 +1775,25 @@ The above example, would be written in a \ext{bib} file as:
}
\end{verbatim}
-With the \longarg{mfirstuc-protection} switch on (the default
-behaviour), \bibgls\ will automatically insert an empty group at the
-start of the \field{long} field to guard against this problem. A
-warning will be written to the transcript.
+The argument should either be a comma-separated list of fields or
+the keyword \code{all} (which indicates all fields).
+\bibgls\ will automatically insert an empty group at the
+start of the listed fields that start with a problematic command,
+and a warning will be written to the transcript. Unknown fields are
+skipped even if they're included in the list. An empty argument is
+equivalent to \longarg{no-mfirstuc-protection}. The default value is
+\code{all}.
-\section{\longarg{no-mfirstuc-protection}}
-\labelarg{no-mfirstuc-protection}
+\argsection{no-mfirstuc-protection}
-Switches off the \sty{mfirstuc} protection mechanism described
+Switches off the \isty{mfirstuc} protection mechanism described
above.
-\section{\longarg{mfirstuc-math-protection}}
-\labelarg{mfirstuc-math-protection}
+\argsection{mfirstuc-math-protection}
-This works in the same way as \argref{mfirstuc-protection} but
+This works in the same way as \longarg{mfirstuc-protection} but
guards against fields starting with inline maths
-(\verb|$|\ldots\verb|$|). For example, if the \field{name} field
+(\idx{mshiftchar}\ldots\idx{mshiftchar}). For example, if the \field{name} field
starts with \verb|$x$| and the glossary style automatically tries to
convert the first letter of the name to upper case, then this will
cause a problem.
@@ -1250,17 +1802,15 @@ With \longarg{mfirstuc-math-protection} set, \bibgls\ will
automatically insert an empty group at the start of the field and
write a warning in the transcript. This setting is on by default.
-\section{\longarg{no-mfirstuc-math-protection}}
-\labelarg{no-mfirstuc-math-protection}
+\argsection{no-mfirstuc-math-protection}
Switches off the above.
-\section{\longarg{nested-link-check} \meta{list}\argor\texttt{none}}
-\labelarg{nested-link-check}
+\argsection{nested-link-check}
By default, \bibgls\ will parse certain fields for potential nested links.
(See the section \qt{Nested Links} in the \sty{glossaries-extra}
-user manual.)
+user manual~\cite{glossaries-extra}.)
The default set of fields to check are: \field{name}, \field{text},
\field{plural}, \field{first}, \field{firstplural}, \field{long},
@@ -1272,23 +1822,21 @@ You can change this set of fields using
\optfmt{none} (don't parse any of the fields) or a comma-separated
list of fields to be checked.
-\section{\longarg{no-nested-link-check}}
-\labelarg{no-nested-link-check}
+\argsection{no-nested-link-check}
Equivalent to \longarg{nested-link-check} \optfmt{none}.
-\section{\longarg{shortcuts} \meta{value}}
-\labelarg{shortcuts}
+\argsection{shortcuts}
Some entries may reference another entry within a field, using
-commands like \cs{gls}, so \bibgls\ parses the fields for these
+commands like \ics{gls}, so \bibgls\ parses the fields for these
commands to determine dependent entries to allow them to be selected
even if they haven't been used within the document.
The \styopt{shortcuts} package option provided by
-\styfmt{glossaries-extra} defines various synonyms, such as \cs{ac}
-which is equivalent to \cs{gls}. By default the value of the
+\styfmt{glossaries-extra} defines various synonyms, such as \ics{ac}
+which is equivalent to \ics{gls}. By default the value of the
\styopt{shortcuts} option will be picked up by \bibgls\ when parsing the
-\ext{aux} file. This then allows \bibgls\ to additionally search for
+\iext{aux} file. This then allows \bibgls\ to additionally search for
those shortcut commands while parsing the fields.
You can override the \styopt{shortcuts} setting using
@@ -1296,28 +1844,26 @@ You can override the \styopt{shortcuts} setting using
any of the allowed values for the \styopt{shortcuts} package option),
but in general there is little need to use this switch.
-\section{\longarg{map-format} \meta{format1}:\meta{format2}
-or \shortarg{m} \meta{format1}:\meta{format2}}
-\labelarg{map-format}
+\argsection{map-format}
This sets up the rule of precedence for partial location
-matches (see \sectionref{sec:locationopts}). For example,
+matches (see \sectionref{sec:locationopts}). The argument may be
+a comma-separated list of \meta{map}\code{:}\meta{value} pairs.
+Alternatively, you can have multiple instances of
+\longarg{map-format} \meta{map}\dcolon\meta{value} which have a
+cumulative effect.
+
+For example,
\begin{verbatim}
bib2gls --map-format "emph:hyperbf" mydoc
\end{verbatim}
This essentially means that if there's a record conflict
-involving \texttt{emph}, try replacing \texttt{emph} with
-\texttt{hyperbf} and see if that resolves the conflict.
+involving \encap{emph}, try replacing \encap{emph} with
+\encap{hyperbf} and see if that resolves the conflict.
Note that if the conflict includes a range formation, the
range takes precedence.
-
-If you have multiple mappings, you can either use a single
-\longarg{map-format} with a comma separated list of
-\meta{format1}\dcolon\meta{format2} or you can have multiple instances of
-\longarg{map-format} \meta{format1}\dcolon\meta{format2}.
-
-Note that the mapping tests are applied as the records are
+The mapping tests are applied as the records are
read. For example, suppose the records are listed in the \ext{aux}
file as:
\begin{verbatim}
@@ -1335,41 +1881,43 @@ bib2gls --map-format emph:hyperbf --map-format hypersf:hyperit mydoc
\end{verbatim}
then \bibgls\ will process these records as follows:
\begin{enumerate}
-\item Accept the first record (\texttt{emph}) since there's
+\item Accept the first record (\encap{emph}) since there's
currently no conflict. (This is the first record for page~3 for the
-entry given by \texttt{gls.sample}.)
-\item The second record (\texttt{hypersf}) conflicts
-with the existing record (\texttt{emph}). Neither has
-the format \texttt{glsnumberformat} or \texttt{glsignore} so \bibgls\ consults
+entry given by \code{gls.sample}.)
+\item The second record (\encap{hypersf}) conflicts
+with the existing record (\encap{emph}). Neither has
+the format \encap{glsnumberformat} or \encap{glsignore} so \bibgls\ consults
the mappings provided by \longargfmt{map-format}.
\begin{itemize}
-\item The \texttt{hypersf} format (from the new record) is mapped to \texttt{hyperit},
+\item The \encap{hypersf} format (from the new record) is mapped to
+\encap{hyperit},
so \bibgls\ checks if the existing record
has this format. In this case it doesn't (the format is
-\texttt{emph}). So \bibgls\ moves onto the next test:
+\code{emph}). So \bibgls\ moves on to the next test:
-\item The \texttt{emph} format (from the existing record) is mapped to \texttt{hyperbf},
+\item The \encap{emph} format (from the existing record) is mapped
+to \encap{hyperbf},
so \bibgls\ checks if the new record has this format.
-In this case it doesn't (the format is \texttt{hypersf}).
+In this case it doesn't (the format is \encap{hypersf}).
Since the provided mappings haven't resolved this conflict,
the new record is discarded with a warning. Note that there's
no look ahead to the next record. (There may be other
records for other entries also used on page~3 interspersed between these records.)
\end{itemize}
-\item The third record (\texttt{hyperbf}) conflicts
-with the existing record (\texttt{emph}). Neither has
-the format \texttt{glsnumberformat} or \texttt{glsignore} so \bibgls\ again consults
+\item The third record (\encap{hyperbf}) conflicts
+with the existing record (\encap{emph}). Neither has
+the format \encap{glsnumberformat} or \encap{glsignore} so \bibgls\ again consults
the mappings provided by \longargfmt{map-format}.
\begin{itemize}
-\item The new record's \texttt{hyperbf} format has no mapping provided,
-so \bibgls\ moves onto the next test:
+\item The new record's \encap{hyperbf} format has no mapping provided,
+so \bibgls\ moves on to the next test:
-\item The existing record's \texttt{emph} format has a mapping
-provided (\texttt{hyperbf}). This matches the new record's format,
+\item The existing record's \encap{emph} format has a mapping
+provided (\encap{hyperbf}). This matches the new record's format,
so the new record takes precedence.
-This means that the location list ends up with the \texttt{hyperbf}
+This means that the location list ends up with the \encap{hyperbf}
location for page~3.
\end{itemize}
\end{enumerate}
@@ -1378,55 +1926,91 @@ If, on the other hand, the mappings are given as
\begin{verbatim}
--map-format "emph:hyperit,hypersf:hyperit,hyperbf:hyperit"
\end{verbatim}
-then all the three conflicting records (\texttt{emph},
-\texttt{hypersf} and \texttt{hyperbf}) will end up being replaced
-by a single record with \texttt{hyperit} as the format.
+then all the three conflicting records (\encap{emph},
+\encap{hypersf} and \encap{hyperbf}) will end up being replaced
+by a single record with \encap{hyperit} as the format.
Multiple conflicts will typically be rare as there's usually little
reason for more than two or three different location formats within
-the same list. (For example, \texttt{glsnumberformat} as the default
-and \texttt{hyperbf} or \texttt{hyperit} for a primary reference.)
-
-\section{\longarg{group}}
-\labelarg{group}
-
-The \styfmt{glossaries-extra} \styopt{record} package option automatically creates a new field
-called \field{group}. If the \longarg{group} switch is used then, when
-sorting, \bibgls\ will try to determine the letter group for each
-entry and add it to the \field{group} field. (Some \optref{sort}
-options ignore this setting.) This value will be picked up by
-\cs{printunsrtglossary} if group headings are required (for
-example with the \glostyle{indexgroup} style). If you're not using
-a glossary style that displays the group headings, there's no need
-to use this switch. Note that this switch doesn't automatically
-select an appropriate glossary style.
-
-There are four basic types of groups:
-\begin{itemize}
-\item \keyword{letter groups} where the group title indicates the
-first letter of all the sort values within that group.
-The group title is set with \csref{bibglslettergroup}.
-
-\item \keyword{non-letter groups} (or \keyword{symbol groups})
-where the first characters of all the sort values within that group
-are non-alphabetical. The group title is set with \csref{bibglsothergroup}.
-
-\item \keyword{number groups} for all entries sorted by a numeric
-comparison (such as \optref[integer]{sort}).
-The group title is set with \csref{bibglsnumbergroup}.
+the same list. (For example, \encap{glsnumberformat} as the default
+and \encap{hyperbf} or \encap{hyperit} for a primary reference.)
+
+\argsection{group}
+
+The \styfmt{glossaries-extra} \styopt{record} package option
+automatically creates a new field called \field{group}. If the
+\longarg{group} switch is used then, when sorting, \bibgls\ will try
+to determine the letter group for each entry and add it to the
+\field{group} field. (Some \csopt{sort} options ignore this
+setting.) This value will be picked up by \ics{printunsrtglossary}
+if group headings are required (for example with the
+\glostyle{indexgroup} style) or if group separators are required
+(for example, the \glostyle{index} style with the default
+\styopt[false]{nogroupskip}). If you don't require grouping within
+the glossary, there's no need to use this switch. Note that this
+switch doesn't automatically select an appropriate glossary style.
+
+There are eight types of groups:
+\begin{description}
+\item[\idx{lettergroup}] The first non-ignored character of the
+sort value is alphabetic. This type of group occurs when using the
+alphabetic sort methods listed in \tableref{tab:sortoptionsrule} or
+with the letter sort methods listed in
+\tableref{tab:sortoptionsletter} or with the letter-number sort
+methods listed in \tableref{tab:sortoptionsletternumber}. The group
+label is obtained from \csref{bibglslettergroup}.
+
+\item[\idx{nonlettergroup} (or \idx{symbolgroup})]
+The first non-ignored character of all the sort values within this group
+are non-alphabetical. This type of group occurs when using the
+alphabetic sort methods listed in \tableref{tab:sortoptionsrule} or
+with the letter sort methods listed in
+\tableref{tab:sortoptionsletter} or with the letter-number sort
+methods listed in \tableref{tab:sortoptionsletternumber}.
+The alphabetic sort methods ignore many punctuation
+characters, so an entry that has a non-alphabetic initial
+character in the sort value may actually be placed in a
+\idx{lettergroup}.
+The group label is obtained from \csref{bibglsothergroup}.
+
+\item[\idx{emptygroup}] The sort value is empty when sorting with an
+alphabetical, letter or letter-number method, typically a
+result of the original value consisting solely of commands that \bibgls\
+can't interpret. The group label is obtained from \csref{bibglsemptygroup}.
+
+\item[\idx{numbergroup}] The entries were sorted by one of the
+numeric comparisons listed in \tableref{tab:sortoptionsnumerical}.
+The group label is obtained from \csref{bibglsnumbergroup}.
+
+\item[\idx{datetimegroup}] The entries were sorted by one of the date-time
+comparisons listed in \tableref{tab:sortoptionsdatetime} (where both
+date and time are present).
+The group label is obtained from \csref{bibglsdatetimegroup}.
+
+\item[\idx{dategroup}] The entries were sorted by one of the date
+comparisons (where the time is omitted).
+The group label is obtained from \csref{bibglsdategroup}.
+
+\item[\idx{timegroup}] The entries were sorted by one of the time
+comparisons (where the date is omitted).
+The group label is obtained from \csref{bibglstimegroup}.
+
+\item[\idx{customgroup}] The group label is explicitly set either in
+the \ext{bib} file or using the \csopt[\meta{label}]{group} resource
+option. You will need to use \ics{glsxtrsetgrouptitle} to provide an
+associated title if the \meta{label} isn't the same as the title.
+Remember that the label can't contain any active characters, so you
+can't use non-ASCII characters in \meta{label} with \sty{inputenc}
+(but you can with \sty{fontspec}).
-\item \keyword{custom groups} for all entries that have had the
-group title explicitly set using the \optref[\meta{title}]{group}
-resource option.
-\end{itemize}
+\end{description}
-The letter group titles will typically have the first character
-converted to upper case for the rule-based comparisons
-(\optref[custom]{sort} and \optref[\meta{lang-tag}]{sort}). A
-\qt{letter} may not necessarily be a single character (depending on
-the sort rule), but may be composed of multiple characters, such as
-a \keyword{digraph} (two characters) or \keyword{trigraph} (three
-characters).
+The \idx{lettergroup} titles will typically have the first character
+converted to upper case for the alphabet sort methods
+(\tableref{tab:sortoptionsrule}). A \qt{letter} may not necessarily
+be a single character (depending on the sort rule), but may be
+composed of multiple characters, such as a \idx{digraph} (two
+characters) or \idx{trigraph} (three characters).
For example, if the sort rule recognises the digraph \qt{dz} as a
letter, then it will be converted to \qt{Dz} for the group title.
@@ -1436,25 +2020,25 @@ by the following line in the \langxml:
\begin{verbatim}
<entry key="grouptitle.case.ij">IJ</entry>
\end{verbatim}
-If there isn't a \texttt{grouptitle.case.\meta{lc}} key (where
+If there isn't a \code{grouptitle.case.\meta{lc}} key (where
\meta{lc} is the lower case version), then only the first character
will be converted to upper case otherwise the value supplied by the
resource file is used. This resource key is only checked for
-the locale and custom rule comparisons. If the initial part of
-the sort value isn't recognised as a letter according to the sort rule,
-then the entry will be in a non-letter group (even if the character
-is alphabetical).
-
-The locale-independent character code comparisons (such as
-\optref[letter-nocase]{sort}) only select the first character of the
-sort value for the group. If the character is
+the alphabetical comparisons listed in
+\tableref{tab:sortoptionsrule}. If the initial part of the sort
+value isn't recognised as a letter according to the sort rule, then
+the entry will be in a \idx{nonlettergroup} (even if the character is
+alphabetical).
+
+The letter (\tableref{tab:sortoptionsletter}) and letter-number
+(\tableref{tab:sortoptionsletternumber}) methods only select the
+first character of the sort value for the group. If the character is
alphabetical\footnote{according to Java's
-\texttt{Character.isAlphabetic(int)} method} then it will be a
-letter group otherwise it's a non-letter group. The
-case-insensitive ordering (such as \optref[letter-nocase]{sort})
-will convert the letter group character to upper case. The
-case-sensitive ordering (such as \optref[letter-case]{sort}) won't
-change the case.
+\code{Character.isAlphabetic(int)} method} then it will be a
+\idx{lettergroup} otherwise it's a \idx{nonlettergroup}. The case-insensitive
+ordering (such as \csopt[letter-nocase]{sort}) will convert the
+letter group character to upper case. The case-sensitive ordering
+(such as \csopt[letter-case]{sort}) won't change the case.
Glossary styles with navigational links to groups (such as
\glostyle{indexhypergroup}) require an extra run for the ordinary
@@ -1469,17 +2053,15 @@ pdflatex myDoc
On the first \appfmt{pdflatex} call, there's no glossary. On the second
\appfmt{pdflatex}, there's a glossary but the glossary must be
processed to find the group information, which is written to the
-\ext{aux} file as
-\begin{alltt}
-\cs{@gls@hypergroup}\margm{type}\margm{group id}
-\end{alltt}
+\iext{aux} file as
+\nosecdef{@gls@hypergroup}
The third \appfmt{pdflatex} reads this information and is then able
to create the navigation links.
With \bibgls, if the \optfmt{type} is provided (through the
-\field{type} field or via options such as \optref{type} and
-\optref{dual-type}) then this information can be determined when
-\bibgls\ is ready to write the \ext{glstex} file, which means that
+\field{type} field or via options such as \csopt{type} and
+\csopt{dual-type}) then this information can be determined when
+\bibgls\ is ready to write the \iext{glstex} file, which means that
the extra \LaTeX\ run isn't necessary.
For example:
@@ -1496,8 +2078,8 @@ For example:
type={abbreviations}% put these entries in the 'abbreviations' glossary
]
\end{verbatim}
-Here the \optref{type} is set and \bibgls\ can detect that
-\sty{hyperref} has been loaded, so if the \longargfmt{group} switch
+Here the \csopt{type} is set and \bibgls\ can detect that
+\isty{hyperref} has been loaded, so if the \longargfmt{group} switch
is used, then the group hyperlinks can be set (using
\csref{bibglshypergroup}). This means that the build process is
just:
@@ -1506,12 +2088,12 @@ pdflatex myDoc
bibtex --group myDoc
pdflatex myDoc
\end{verbatim}
-Note that this requires \sty{glossaries} v4.32+. If your version of
+Note that this requires \isty{glossaries} v4.32+. If your version of
\sty{glossaries} is too old then \bibgls\ can't override
-the default behaviour of \sty{glossary-hypernav}'s
-\cs{glsnavhypertarget}.
+the default behaviour of \isty{glossary-hypernav}'s
+\ics{glsnavhypertarget}.
-If \sty{hyperref} isn't loaded or the \longargfmt{group} switch
+If \isty{hyperref} isn't loaded or the \longargfmt{group} switch
isn't used or the \field{type} isn't set or your version of
\sty{glossaries} is too old, then the information isn't saved.
@@ -1535,25 +2117,23 @@ pdflatex myDoc
because the group hyperlink information can't be determined by
\bibgls, so it's best to always set the \optfmt{type} if you want
hyper-group styles, and make sure you have an up-to-date version of
-\sty{glossaries} (and \sty{glossaries-extra}).
+\styfmt{glossaries} (and \styfmt{glossaries-extra}).
-\section{\longarg{no-group}}
-\labelarg{no-group}
+\argsection{no-group}
Don't use the \field{group} field. (Default.)
The glossary won't have groups even if a group style, such as
\glostyle{indexgroup}, is used.
-\section{\longarg{tex-encoding} \meta{name}}
-\labelarg{tex-encoding}
+\argsection{tex-encoding}
\bibgls\ tries to determine the character encoding to use for the
-output files. If the document has loaded the \sty{inputenc} package then
+output files. If the document has loaded the \isty{inputenc} package then
\bibgls\ can obtain the value of the encoding from the
-\ext{aux} file. This then needs to be converted to a name
-recognised by Java. For example, \texttt{utf8} will be mapped to
-\texttt{UTF-8}. If the \sty{fontspec} package has been loaded,
-\sty{glossaries-extra} will assume the encoding is \texttt{utf8} and
+\iext{aux} file. This then needs to be converted to a name
+recognised by Java. For example, \code{utf8} will be mapped to
+\code{UTF-8}. If the \isty{fontspec} package has been loaded,
+\styfmt{glossaries-extra} will assume the encoding is \code{utf8} and
write that value to the \ext{aux} file.
If neither package has been loaded, \bibgls\ will assume the
@@ -1562,8 +2142,34 @@ operating system's default encoding. If this is incorrect or if
the correct encoding using \longargfmt{tex-encoding} \meta{name}
where \meta{name} is the encoding name.
-\section{\longarg{trim-fields}}
-\labelarg{trim-fields}
+\argsection{no-expand-fields}
+
+By default, \gls{newglossaryentry} and similar commands expand field values
+(except for \field{name}, \field{symbol} and \field{description}).
+This is useful if constructing field values programmatically
+(for example in a loop) but can cause a problem if certain fragile
+commands are included in the field.
+
+The switch \longarg{no-expand-fields} makes \bibgls\ write
+\ics{glsnoexpandfields} to the \iext{glstex} file, which
+switches off the expansion. Since \bibgls\ is simply
+fetching the data from \iext{bib} files, it's unlikely
+that this automatic expansion is required and since it can
+also be problematic this option is on by default. You can
+switch it off with \longarg{expand-fields}.
+
+\argsection{expand-fields}
+
+Don't write \ics{glsnoexpandfields} to the \iext{glstex} file,
+allowing fields to expand when the entries are defined.
+Remember that this doesn't include the \field{name}, \field{symbol}
+or \field{description} fields, which need to have their
+expansion switched on with
+\nosecdef{glssetexpandfield}
+before the entries are defined (that is, before using
+\gls!{GlsXtrLoadResources}).
+
+\argsection{trim-fields}
Trim leading and trailing spaces from field values. For example,
if the \ext{bib} file contains:
@@ -1576,16 +2182,86 @@ if the \ext{bib} file contains:
}
\end{verbatim}
This will cause spurious spaces. Using \longarg{trim-fields} will
-automatically trim the values before writing the \ext{glstex} file.
+automatically trim the values before writing the \iext{glstex} file.
-\section{\longarg{no-trim-fields}}
-\labelarg{no-trim-fields}
+\argsection{no-trim-fields}
Don't trim any leading or trailing spaces from field values.
This is the default setting.
-\chapter{\ext{bib} Format}
+\argsection{record-count}
+
+Switch on record counting. This will ensure that when each entry
+is written to the \iext{glstex} file, \bibgls\ will additionally
+set the following fields
+\begin{itemize}
+\item \field{recordcount}: set to the total
+number of records found for the entry;
+\item \field{recordcount.counter}: set to the total
+number of records found for the entry for the given counter.
+\end{itemize}
+These fields can then be used with the \ics{rgls}-like commands.
+The default behaviour of
+\nosecdef{rgls}
+is to check the \field{recordcount} field against the \catattr{recordcount}
+attribute value. This attribute can be set with
+\nosecdef{GlsXtrSetRecordCountAttribute}
+where \meta{category list} is a comma-separated list
+of category labels and \meta{value} is a positive integer.
+If the value of the \field{recordcount} field is greater than
+\meta{value} then \ics{rgls} behaves like \ics{gls}, otherwise
+it does
+\nosecdef{rglsformat}
+instead.
+If the use of \ics{rglsformat} is triggered in this way,
+then \ics{rgls} writes a record to the \iext{aux} file
+with the \glsopt{format} set to \encap{glstriggerrecordformat}.
+This ensures that the record count is correct on the next run,
+but the record isn't added to the location list as
+\bibgls\ recognises it as a special ignored location.
+Note that the entry will still appear in the usual glossary unless
+you assign it to a different one with \csopt{trigger-type}.
+
+If the \catattr{recordcount} attribute hasn't been set
+\ics{rgls} behaves like \ics{gls}. (That is, \ics{rgls}
+uses the same internal command used by \ics{gls}.) You can use
+\ics{glsxtrenablerecordcount} to redefine \ics{gls}
+to \ics{rgls}, so that you can continue to use \ics{gls}
+without having to switch command name.
+
+For example:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=abbrevs,% entries defined in abbrevs.bib
+ trigger-type=ignored,
+ category=abbreviation
+]
+\glsxtrenablerecordcount
+\GlsXtrSetRecordCountAttribute{abbreviation}{1}
+\end{verbatim}
+See the \sty{glossaries-extra} user manual~\cite{glossaries-extra}
+for further details.
+
+\argsection{no-record-count}
+
+Switch off record counting. (Default.)
+
+\argsection{record-count-unit}
+
+Automatically implements \longarg{record-count} and additionally
+sets the \field{recordcount.counter.location} fields.
+These fields can then be used with the \ics{rgls}-like
+commands.
+
+\argsection{no-record-count-unit}
+
+Switches off unit record counting. (Default.)
+Note that you need \longarg{no-record-count} to completely
+switch off record counting.
+
+\chapter{\iext{bib} Format}
\label{sec:bib}
+\setcounter{secnumdepth}{1}
\bibgls\ recognises certain entry types. Any unrecognised types will
be ignored and a warning will be written to the transcript file.
@@ -1598,44 +2274,49 @@ Entries are defined in the usual \ext{bib} format:
}
\end{alltt}
where \meta{entry-type} is the entry type (listed below),
-\meta{field-name-1}, \ldots, \meta{field-name-n} are the field names
-(same as the keys available with \cs{newglossaryentry}) and
+\meta{field-name-1}, \ldots, \meta{field-name-n} are the field names and
\meta{id} is a unique label. The label can't contain any spaces or
commas. In general it's best to stick with alpha-numeric labels.
The field values may be delimited by braces \margm{text} or
-double-quotes \texttt{"\meta{text}"}.
-
-\bibgls\ allows you to insert prefixes to the labels when the data
-is read through the \optref{label-prefix} option. Remember to use
-these prefixes when you reference the entries in the document, but
-don't include them when you reference them in the \ext{bib} file.
-There are some special prefixes that have a particular meaning to
-\bibgls: \qt{\idprefix{dual}} and \qt{\idprefix{ext\meta{n}}} where
-\meta{n} is a positive integer. In the first case,
-\idprefix{dual} references the dual element of a dual entry (see
-\atentryref{dualentry}). This prefix will be replaced by the value of
-the \csopt{dual-prefix} option. The \idprefix{ext\meta{n}} prefix
-is used to reference an entry from a different set of resources
-(loaded by another \cs{GlsXtrLoadResources} command). This prefix is
-replaced by the corresponding element of the list supplied by
-\optref{ext-prefixes}.
+double-quotes \code{"\meta{text}"}.
+
+The \csopt{label-prefix} option can be used to instruct \bibgls\ to
+insert prefixes to the labels (\meta{id}) when the data is read.
+Remember to use these prefixes when you reference the entries in the
+document, but don't include them when you reference them in the
+\ext{bib} file. There are some special prefixes that have a
+particular meaning to \bibgls: \qt{\idprefix{dual}} and
+\qt{\idprefix{extn}} where \meta{n} is a positive integer.
+In the first case, \idprefix{dual} references the dual element of a
+dual entry (see \atentry{dualentry}). This prefix will be
+replaced by the value of the \csopt{dual-prefix} option. The
+\idprefix{extn} prefix is used to reference an entry from a
+different set of resources (loaded by another
+\gls{GlsXtrLoadResources} command). This prefix is replaced by the
+corresponding element of the list supplied by \csopt{ext-prefixes},
+but this is only supported if the \idx{crossresourceref} mode is enabled
+(see \sectionref{sec:resourcesets}).
In the event that the \field{sort} value falls back on the label,
the original label supplied in the \ext{bib} file is used, not the
prefixed label.
-Avoid non-ASCII characters in the \meta{id} if your document uses the
-\sty{inputenc} package.
-You can set the character encoding in the \ext{bib} file using:
-\begin{alltt}
-\% Encoding: \meta{encoding-name}
-\end{alltt}
+\section{Encoding}
+\label{sec:bibencoding}
+
+Avoid \idx{non-ASCII} characters in the \meta{id} if your document uses the
+\isty{inputenc} package. (This isn't a problem for \XeLaTeX\ or
+\LuaLaTeX, but you still need to avoid special characters.)
+You can set the character \idx{encoding} in the \ext{bib} file using:
+\begin{codeenv}
+\idx{commentchar} Encoding: \meta{encoding-name}
+\end{codeenv}
where \meta{encoding-name} is the name of the character encoding.
For example:
\begin{verbatim}
% Encoding: UTF-8
\end{verbatim}
-You can also set the encoding using the \optref{charset} option,
+You can also set the encoding using the \csopt{charset} option,
but it's simpler to include the above comment on the first line of
the \ext{bib} file. (This comment is also searched for by JabRef
to determine the encoding, so it works for both applications.)
@@ -1643,15 +2324,52 @@ If you don't use either method \bibgls\ will
have to search the entire \ext{bib} file, which is inefficient and
you may end up with a mismatched encoding.
-Each entry type may have required fields and optional fields. For the
-optional fields, any key recognised by \cs{newglossaryentry} may be
-used as a field. However, note that if you add
-any custom keys in your document using \cs{glsaddkey} or \cs{glsaddstoragekey}, those
-commands must be placed before the first use of
-\cs{GlsXtrLoadResources}.
-
-Any unrecognised fields will be ignored.
-This is more convenient than using \cs{input} or \cs{loadglsentries}, which
+\section{Comments}
+\label{sec:bibcomments}
+
+You may have comments within the \ext{bib} file provided they are
+outside of entry definitions. The most common type of comment is the
+encoding comment, described above.
+Avoid using comments within field values.
+
+\section{Fields}
+\label{sec:fields}
+
+Each entry type may have required fields, optional fields and
+ignored fields. These are set using a \keyvallist\ within
+\code{@\meta{entry-type}\marg{\meta{id},\meta{fields}}} in the
+\ext{bib} file. Most keys recognised by
+\gls{newglossaryentry} may be used as a field.
+
+Predefined fields for use in \ext{bib} files are listed in
+Tables~\ref{tab:fields}, \ref{tab:bib2glsfields},
+\ref{tab:prefixfields} and~\ref{tab:accsuppfields}. If you add any
+custom keys in your document using \ics{glsaddkey} or
+\ics{glsaddstoragekey}, those commands must be placed before the
+first use of \gls{GlsXtrLoadResources} to ensure that \bibgls\
+recognises them as a field name.
+
+Fields that may be set by \bibgls\ when it creates the \iext{glstex}
+files are listed in Table~\ref{tab:internalfields}. These typically
+shouldn't be set in the \ext{bib} file (although you may need
+\field{sort} for cases where \bibgls\ doesn't recognise any of the
+commands in the \field{name} field). Some of these fields can be set
+for a particular document using a resource option, such as
+\csopt{type} or \csopt{category}.
+
+There are also some fields that are set and used by
+\styfmt{glossaries} or \styfmt{glossaries-extra} listed in
+Table~\ref{tab:baseinternalfields} that are unrecognised by \bibgls.
+In most cases these fields don't have a designated key and are only
+intended for internal use by \bibgls\ or by the \styfmt{glossaries} or
+\styfmt{glossaries-extra} package. Note that the value of the \field{sort} field
+written to the \ext{bib} file doesn't always exactly match the sort
+value used by \bibgls\ (which is stored in \field{bib2gls@sort}).
+Any special characters found in sort value are always substituted
+before writing the \ext{bib} file to avoid syntax errors.
+
+Any unrecognised fields will be ignored by \bibgls. This is more
+convenient than using \ics{input} or \ics{loadglsentries}, which
requires all the keys used in the file to be defined, regardless of
whether or not you actually need them in the document.
@@ -1662,38 +2380,97 @@ entry type.
Other entries can be cross-referenced using the \field{see},
\field{seealso} or \field{alias} fields or
-by using commands like \cs{gls} or \cs{glsxtrp} in any of the
+by using commands like \ics{gls} or \ics{glsxtrp} in any of the
recognised fields. These will automatically be selected if the
\csopt{selection} setting includes dependencies, but you may need to
-rebuild the document to ensure the location lists are correct.
-If an entry has the \field{see} field set, any instance of
-\cs{glssee} in the document for that entry will be ignored,
-otherwise the reference from \cs{glssee} will be transferred to the
+rebuild the document to ensure the location lists are correct. Use
+of the \ics{glssee} command will create an ignored location and the
+\field{see} field will be set to the relevant information. If an
+entry has the \field{see} field already set, any instance of
+\ics{glssee} in the document for that entry will be appended to the
\field{see} field (provided you have at least v1.14 of
-\sty{glossaries-extra}). In general, it's best just to use the \field{see}
-field and not use \cs{glssee}.
+\sty{glossaries-extra}). In general, it's best just to use the
+\field{see} field and not use \ics{glssee}.
The \field{seealso} key was only added to \sty{glossaries-extra}
v1.16, but this field may be used with \bibgls\ even if you only
have version 1.14 or 1.15. If the key isn't available,
-\texttt{seealso=\margm{xr-list}} will be treated as
-\texttt{see=\marg{[\cs{seealsoname}]\meta{xr-list}}} (the resource
-option \optref{seealso} won't have an effect). You can't use both
+\code{seealso=\margm{xr-list}} will be treated as
+\code{see=\marg{[\ics{seealsoname}]\meta{xr-list}}} (the resource
+option \csopt{seealso} won't have an effect). You can't use both
\field{see} and \field{seealso} for the same entry with \bibgls.
Note that the \field{seealso} field doesn't allow for the optional
\oargm{tag} part. If you need a different tag, either use \field{see}
-or change the definition of \cs{seealsoname} or
-\cs{glsxtruseseealsoformat}. Note that, unless you are using
-\app{xindy}, \cs{glsxtrindexseealso} just does
-\cs{glssee}[\cs{seealsoname}], and so will be treated as \field{see}
+or change the definition of \ics{seealsoname} or
+\ics{glsxtruseseealsoformat}. Note that, unless you are using
+\idx{xindy}, \ics{glsxtrindexseealso} just does
+\ics{glssee}\oarg{\ics{seealsoname}}, and so will be treated as \field{see}
rather than \field{seealso} by \bibgls. Again, it's better to just
use the \field{seealso} field directly.
-\section{\atentry{string}}
-\labelatentry{string}
+\begin{table}[hbtp]
+\caption{Fields Provided by \styfmt{glossaries-extra}}\label{tab:fields}
+\centering
+\printfields{basefield,extrafield}%
+\end{table}
+
+\begin{table}[hbtp]
+\caption{Fields Provided by \bibgls}\label{tab:bib2glsfields}
+\centering
+\printfields{bib2glsfield}%
+\end{table}
+
+\begin{table}[hbtp]
+\caption[Fields Provided by \styfmt{glossaries-prefix}]{Fields
+Provided by \isty{glossaries-prefix}}\label{tab:prefixfields}
+\centering
+\printfields{prefixfield}%
+\end{table}
+
+\begin{table}[hbtp]
+\caption[Fields Provided by \styfmt{glossaries-accsupp}]{Fields
+Provided by \isty{glossaries-accsupp}}
+\label{tab:accsuppfields}
+{\centering
+\printfields{accessfield}%
+\par}
+\medskip
+Don't load \isty{glossaries-accsupp} directly (with \csfmt{usepackage}) when using
+\styfmt{glossaries-extra}. Load using the \styopt{accsupp} package
+option instead.
+\begin{verbatim}
+\usepackage[record,accsupp]{glossaries-extra}
+\end{verbatim}
+\end{table}
+
+\begin{table}[hbtp]
+\caption[Fields Set by \bibgls]{Fields Sometimes Set by \bibgls\ in
+the \iext{glstex} File}
+\label{tab:internalfields}
+\centering
+\printfields{internalfield}%
+\end{table}
+
+\begin{table}[hbtp]
+\caption[Internal Fields Set by \styfmt{glossaries} or
+\styfmt{glossaries-extra} or \bibgls]{Internal Fields Set by
+\styfmt{glossaries} or \styfmt{glossaries-extra} or \bibgls\
+(don't use in \ext{bib} files)}\label{tab:baseinternalfields}
+\centering
+\printfields{baseinternalfield}%
+\end{table}
+
+\clearpage
+
+\section{Standard Entry Types}
+\label{sec:standardentry}
+
+\entrysection{string}
The standard \atentry{string} is available and can be used to define
-variables that may be used in field values.
+variables that may be used in field values. Don't include braces or
+double-quote delimiters when referencing a variable. You can use
+\idx{stringconcat} to concatenate strings.
For example:
\begin{verbatim}
@string{ssi={server-side includes}}
@@ -1701,23 +2478,26 @@ For example:
@abbreviation{shtml,
short="shtml",
- long= ssi # " enabled " # html,
+ long=ssi # " enabled " # html,
see={ssi,html}
}
@abbreviation{html,
- short ="html",
- long = html
+ short="html",
+ long=html
}
@abbreviation{ssi,
short="ssi",
- long = ssi
+ long=ssi
}
\end{verbatim}
+Note the difference between \code{="ssi"} (a field value delimited by
+double-quotes), the undelimited \code{=ssi} (a reference to the
+variable), the grouped \code{=\marg{ssi,html}} (a field value
+delimited by braces) and \code{ssi} the entry label.
-\section{\atentry{preamble}}
-\labelatentry{preamble}
+\entrysection{preamble}
The standard \atentry{preamble} is available and can be used to
provide command definitions used within field values.
@@ -1735,7 +2515,7 @@ For example:
The \TeX\ parser library used by \bibgls\ will parse the contents of
\atentry{preamble} before trying to interpret the field value used
as a fallback when \field{sort} is omitted (unless
-\optref[false]{interpret-preamble} is set in the resource options).
+\csopt[false]{interpret-preamble} is set in the resource options).
For example:
\begin{verbatim}
@preamble{"\providecommand{\set}[1]{\mathcal{#1}}
@@ -1754,16 +2534,16 @@ For example:
\end{verbatim}
Neither entry has the \field{sort} field, so \bibgls\ has to fall
back on the \field{name} field and, since this contains the special
-characters \verb|\| \verb|$| \verb|{| and \verb|}|, the \TeX\ parser
-library is used to interpret it. The definitions provided by
-\atentry{preamble} allow \bibgls\ to deduce that the \field{sort}
-value of the \texttt{S} entry is just \texttt{S} and the \field{sort}
-value of the \texttt{card} entry is \verb"|S|" (see
-\sectionref{sec:texparserlib}).
+characters \idx{escchar} \idx{mshiftchar} \idx{bgroupchar}
+\idx{egroupchar}, the \TeX\ parser library is used to interpret it.
+The definitions provided by \atentry{preamble} allow \bibgls\ to
+deduce that the \field{sort} value of the \code{S} entry is just
+\code{S} and the \field{sort} value of the \code{card} entry is
+\verb"|S|" (see \sectionref{sec:texparserlib}).
What happens if you also need to use these commands in the document?
The definitions provided in \atentry{preamble} won't be available
-until the \ext{glstex} file has been created, which means the
+until the \iext{glstex} file has been created, which means the
commands won't be defined on the first \LaTeX\ run.
There are several approaches:
@@ -1791,11 +2571,10 @@ the document definitions will take precedence (but the interpreter
will use the \atentry{preamble} definitions) and in the second
example the \atentry{preamble} definitions will take precedence.
-\item Make use of \cs{glsxtrfmt} provided by
-\sty{glossaries-extra}\footnote{Introduced in version 1.12.}\ which
+\item Make use of \gls{glsxtrfmt} provided by \styfmt{glossaries-extra} which
allows you to store the name of the formatting command in a field.
The default is the \field{user1} field, but this can be changed to
-another field by redefining \cs{GlsXtrFmtField}.
+another field by redefining \ics{GlsXtrFmtField}.
The \ext{bib} file can now look like this:
\begin{verbatim}
@@ -1817,33 +2596,37 @@ The \ext{bib} file can now look like this:
\end{verbatim}
Within the document, you can format \meta{text} using the formatting
command provided in the \field{user1} field with:
-\begin{definition}
-\cs{glsxtrfmt}\oargm{options}\margm{label}\margm{text}
-\end{definition}
-(which internally uses \cs{glslink}) or
-\begin{definition}
-\cs{glsxtrentryfmt}\margm{label}\margm{text}
-\end{definition}
+\nosecformatdef{glsxtrfmt}
+(which internally uses \ics{glslink}) or
+\nosecformatdef{glsxtrentryfmt}
which just applies the appropriate formatting command to
-\meta{text}. If the entry given by \meta{label} hasn't been defined,
-then this just does \meta{text} and a warning is issued. (It
-just does \meta{text} without a warning if the field hasn't been set.)
-The \meta{options} are as for \cs{glslink} but \cs{glslink} will
+\meta{text}. Version 1.23+ of \sty{glossaries-extra} also provides a
+starred form of the linking command:
+\nosecformatdef{glsxtrfmt*}
+which inserts additional material inside the link text but outside
+the formatting command.
+
+If the entry given by \meta{label} hasn't been defined,
+then \csref{glsxtrfmt} just does \meta{text} (followed by \meta{insert} for
+the starred version) and a warning is issued. (There's no warning
+if the entry is defined but the field hasn't been set.)
+The \meta{options} are as for \ics{glslink} but \ics{glslink} will
actually be using
\begin{alltt}
-\cs{glslink}\oarg{\meta{def-options},\meta{options}}\margm{label}\marg{\csfmt{}\meta{csname}\margm{text}}
+\ics{glslink}\oarg{\meta{def-options},\meta{options}}\margm{label}\marg{\csfmt{}\meta{csname}\margm{text}\meta{insert}}
\end{alltt}
where the default options \meta{def-options} are given by
-\cs{GlsXtrFmtDefaultOptions}. The default definition of this is
-just \texttt{noindex} which suppresses the automatic indexing or
-recording action. (See the \sty{glossaries-extra} manual
-for further details.)
+\ics{GlsXtrFmtDefaultOptions}. The default definition of this is
+just \code{noindex} which suppresses the automatic indexing or
+recording action. (See the \sty{glossaries-extra}
+manual~\cite{glossaries-extra} for further details.) The
+\meta{insert} part is omitted for the unstarred form.
This means that the document doesn't need to actually provide
\verb|\set| or \verb|\card| but can instead use, for example,
\begin{alltt}
-\cs{glsxtrfmt}\marg{S}\marg{A}
-\cs{glsxtrentryfmt}\marg{cardS}\marg{B}
+\gls{glsxtrfmt}\marg{S}\marg{A}
+\gls{glsxtrentryfmt}\marg{cardS}\marg{B}
\end{alltt}
instead of
\begin{verbatim}
@@ -1864,9 +2647,9 @@ Whilst this doesn't seem a great deal different from simply
providing the definitions of \csfmt{set} and \csfmt{card} in the
document, this means you don't have to worry about remembering
the names of the actual commands provided in the \ext{bib} file
-(just the entry labels) and the use of \cs{glsxtrfmt} will
+(just the entry labels) and the use of \gls{glsxtrfmt} will
automatically produce a hyperlink to the glossary entry if the
-\sty{hyperref} package has been loaded.
+\isty{hyperref} package has been loaded.
\end{enumerate}
Here's an alternative \ext{bib} that defines entries with a term, a
@@ -1927,7 +2710,7 @@ This allows for code such as:
\begin{verbatim}
\[ \gcard{\gset{A} \cap \gset{B}} \]
\end{verbatim}
-which will link back to the \texttt{cardinality} entry in the
+which will link back to the \code{cardinality} entry in the
glossary and avoids any hyperlinking with \csfmt{gset}.
Alternatively to avoid links with \csfmt{gcard} as well:
\begin{verbatim}
@@ -1937,8 +2720,38 @@ Alternatively to avoid links with \csfmt{gcard} as well:
Now \csfmt{gset} and \csfmt{gcard} are simply formatting commands,
but their actual definitions are determined in the \ext{bib} file.
-\section{\atentry{entry}}
-\labelatentry{entry}
+\section{Single Entry Types}
+\label{sec:singleentry}
+
+The entry types described in this section create a single glossary
+definition per entry (from \styfmt{glossaries-extra}'s point of view).
+For example
+\begin{verbatim}
+@entry{matrix,
+ name={matrix},
+ plural={matrices},
+ description={rectangular array of values}
+}
+\end{verbatim}
+is analogous to
+\begin{verbatim}
+\newglossaryentry{matrix}% label
+{% fields
+ name={matrix},
+ plural={matrices},
+ description={rectangular array of values}
+}
+\end{verbatim}
+The \csopt{secondary} option allows the creation of a fake glossary
+with the entry labels in its internal list in a different order.
+This means that the same data can be displayed in two separate lists
+without duplicating the resources required by each glossary entry.
+
+\Sectionref{sec:dualentry} describes \bibgls\ entry types
+that create two separate (but related) \styfmt{glossaries-extra}
+definitions per \ext{bib} entry.
+
+\entrysection{entry}
Regular terms are defined by the \atentry{entry} field. This requires the
\field{description} field and either \field{name} or \field{parent}.
@@ -1973,17 +2786,16 @@ For example:
If the \field{name} field is omitted it will be set from the
parent's \field{name}. If the \field{sort} field is missing the
default is obtained from the \field{name} field.
-(This can be overridden with \optref{sort-field}.)
+(This can be overridden with \csopt{sort-field}.)
Terms defined using \atentry{entry} will be written to the output
(\ext{glstex}) file using the command \csref{bibglsnewentry}.
-\section{\atentry{symbol}}
-\labelatentry{symbol}
+\entrysection{symbol}
The \atentry{symbol} entry type is much like \atentry{entry}, but it's
designed specifically for symbols, so in the previous example, the
-\texttt{M} and \texttt{v} terms would be better defined using the
+\code{M} and \code{v} terms would be better defined using the
\atentry{symbol} entry type instead. For example:
\begin{verbatim}
@symbol{M,
@@ -1995,14 +2807,14 @@ designed specifically for symbols, so in the previous example, the
The required fields are \field{name} or \field{parent}. The
\field{description} field is required if the \field{name} field is
missing. If the \field{sort} field is omitted, the default sort is
-given by the entry label. Note that this is different from
+given by the entry label (unless overridden by
+\csopt{symbol-sort-fallback}). Note that this is different from
\atentry{entry} where the sort defaults to \field{name} if omitted.
Terms that are defined using \atentry{symbol} will be written to
the output file using the command \csref{bibglsnewsymbol}.
-\section{\atentry{number}}
-\labelatentry{number}
+\entrysection{number}
The \atentry{number} entry type is like \atentry{symbol}, but it's for
numbers. The numbers don't have to be explicit digits and may have a
@@ -2038,7 +2850,7 @@ values rather than the symbols:
sort-field={user1}% sort according to 'user1' field
]
\end{verbatim}
-The \optref[number]{category} option makes it easy to adjust the
+The \csopt[number]{category} option makes it easy to adjust the
glossary format to include the \field{user1} field:
\begin{verbatim}
\renewcommand{\glsxtrpostdescnumber}{%
@@ -2048,8 +2860,7 @@ glossary format to include the \field{user1} field:
}
\end{verbatim}
-\section{\atentry{index}}
-\labelatentry{index}
+\entrysection{index}
The \atentry{index} entry type is designed for entries that don't
have a description. Only the label is required. If \field{name} is
@@ -2075,16 +2886,19 @@ Example:
Terms that are defined using \atentry{index} will be written to the output
file using the command \csref{bibglsnewindex}.
-\section{\atentry{abbreviation}}
-\labelatentry{abbreviation}
+\entrysection{abbreviation}
The \atentry{abbreviation} entry type is designed for abbreviations.
The required fields are \field{short} and \field{long}. If the
-\field{sort} key is missing, \bibgls\ will use the value of the
-\field{short} field.
-You can also use \optref{short-case-change} to convert the case of
+\field{sort} key is missing, \bibgls\ will use the field given by
+\csopt{abbreviation-sort-fallback}, which defaults to the \field{short} field.
+You can also use \csopt{short-case-change} to convert the case of
the \field{short} field.
+If you use \csopt[name]{sort-field}, then the fallback for the
+\field{name} field is always the \field{short} field, regardless of
+the \csopt{abbreviation-sort-fallback} setting.
+
Note that you must set the abbreviation style before loading the
resource file to ensure that the abbreviations are defined
correctly, however \bibgls\ has no knowledge of the abbreviation
@@ -2093,8 +2907,8 @@ included or if the default \field{sort} value isn't simply the value
of the \field{short} field.
You can instruct \bibgls\ to sort by the \field{long} field instead
-using \optref[long]{sort-field}. You can also tell \bibgls\ to
-ignore certain fields using \optref{ignore-fields}, so you can
+using \csopt[long]{abbreviation-sort-fallback}. You can also tell \bibgls\ to
+ignore certain fields using \csopt{ignore-fields}, so you can
include a \field{description} field in the \ext{bib} file if
you sometimes need it, and then instruct \bibgls\ to ignore it when
you don't want it.
@@ -2112,7 +2926,8 @@ the following in your document (where the \ext{bib} file is called
\filefmt{entries-abbrv.bib}):
\begin{verbatim}
\setabbreviationstyle{long-noshort-desc}
-\GlsXtrLoadResources[src={entries-abbrv.bib},sort-field={long}]
+\GlsXtrLoadResources[src={entries-abbrv.bib},
+ abbreviation-sort-fallback={long}]
\end{verbatim}
Whereas, if you want the \abbrstyle{long-short-sc} style, then you can
instead do:
@@ -2129,33 +2944,368 @@ or to convert the short value to upper case and use the
ignore-fields={description}]
\end{verbatim}
(If you want an equivalent of \csfmt{newdualentry}, use
-\atentryref{dualentryabbreviation} instead.)
+\atentry{dualabbreviationentry} instead.)
Terms defined using \atentry{abbreviation} will be written to the output
file using the command \csref{bibglsnewabbreviation}.
-\section{\atentry{acronym}}
-\labelatentry{acronym}
+\entrysection{acronym}
The \atentry{acronym} entry type is like \atentry{abbreviation} except that
the term is written to the output file using the command
\csref{bibglsnewacronym}.
-\section{\atentry{dualentry}}
-\labelatentry{dualentry}
+\section{Dual Entry Types}
+\label{sec:dualentry}
+
+The entry types described in this section create two separate (but
+related) \styfmt{glossaries-extra} entry definitions per \ext{bib}
+entry. The first of these entries is considered the
+\idx{primary} entry, and the second is the \idx{dual} entry
+(also referred to as the \idx{secondary} entry, but is not
+related to the \csopt{secondary} option). The naming scheme is
+\code{@dual}\meta{entry-type} where both the primary and dual are
+considered to have the same type of entry (such as
+\atentry{dualsymbol} where both the primary and dual are
+functionally like \atentry{symbol}) or
+\code{@dual}\meta{primary}\meta{dual} where the primary
+is functionally like \code{@}\meta{primary} and the dual is
+functionally like \code{@}\meta{dual}.
-The \atentry{dualentry} entry type is similar to \atentry{entry} but
-actually defines two entries: the primary entry and the dual entry.
-The dual entry contains the same information as the primary entry
-but some of the fields are swapped around. The dual entry is given
-the prefix set by the \optref{dual-prefix} option.
+For example
+\begin{verbatim}
+@dualabbreviationentry{svm,
+ short = {SVM},
+ long = {support vector machine},
+ description = {statistical pattern recognition technique}
+}
+\end{verbatim}
+is like
+\begin{verbatim}
+@abbreviation{svm,
+ short = {SVM},
+ long = {support vector machine},
+}
+@entry{dual.svm,
+ text = {SVM},
+ name = {support vector machine},
+ description = {statistical pattern recognition technique}
+}
+\end{verbatim}
+and is analogous to
+\begin{verbatim}
+\newabbreviation{svm}{SVM}{support vector machine}
+\newglossaryentry{dual.svm}{name={support vector machine},text={SVM},
+ description={statistical pattern recognition technique}}
+\end{verbatim}
+but both entries are considered dependent on each other. This means
+that if you only reference the primary entry (using \ics{gls} etc)
+then the dual entry will still be selected if the \csopt{selection}
+setting includes dependencies.
+
+The creation of the dual entry involves mapping or copying fields
+from the primary entry. Each dual entry type has a set of mappings.
+If a field in the set of mappings is missing, its fallback value is
+used. Any fields that aren't listed in the mappings are simply copied,
+except for the \field{alias} field, which will never be copied to
+the dual entry, nor can it be mapped. The alias will only apply to
+the primary entry. The dual entry is given the label
+\meta{prefix}\meta{id} where \meta{prefix} is set by the
+\csopt{dual-prefix} option and \meta{id} is the label supplied in
+the \ext{bib} file.
+
+If \csopt[combine]{dual-sort} then the dual entries will be sorted
+along with the primary entries, otherwise the \csopt{dual-sort}
+indicates how to sort the dual entries and the dual entries will be
+appended to the end of the \ext{glstex} file. The
+\csopt{dual-sort-field} determines what field to use for the sort
+value if the dual entries should be sorted separately.
+
+Take care if you have a mixture of entry types (such as
+\atentry{dualindexentry}, \atentry{dualindexsymbol}
+and \atentry{index}) and you're not
+using the default \csopt[combine]{dual-sort}. Remember that the
+primary entries are all sorted together along with the single
+entries types described in \sectionref{sec:dualentry} (but they may
+be assigned to different glossary types), and then the dual entries
+are sorted together (but may be assigned to different glossary
+types). This may result in an odd ordering if some of the primaries
+and some of the duals are assigned to the same glossary. For
+example, don't mix \atentry{dualindexabbreviation} (duals are
+abbreviations) with \atentry{dualabbreviationentry} (primaries
+are abbreviations) when you aren't using \csopt[combine]{dual-sort}
+(unless you have two different glossaries for the primary vs dual
+abbreviations).
+
+Remember that \bibgls\ is designed to take advantage of
+\ics{printunsrtglossary}, which simply iterates over all defined
+entries in the order in which they were defined (or, more precisely,
+the order of the internal list of entry labels associated with that
+glossary). The aim of \bibgls\ is to write the entry definitions to
+the \ext{glstex} file so that the internal list of labels is in the
+appropriate order.
+
+For example, suppose the file \filefmt{entries.bib} contains:
+\begin{verbatim}
+@index{aardvark}
+@index{mouse}
+@index{zebra}
+@dualindexabbreviation{xml,
+ short={XML},
+ long={extensible markup language}
+}
+@dualabbreviationentry{ssi,
+ short={SSI},
+ long={server-side includes},
+ description={directives placed in \gls{html} pages
+ evaluated by the server}
+}
+@dualindexabbreviation{html,
+ short={HTML},
+ long={hypertext markup language}
+}
+@dualabbreviationentry{css,
+ short={CSS},
+ long={cascading stylesheets},
+ description={a language that describes the style of an
+ \gls{html} document}
+}
+\end{verbatim}
+This contains a mixture of entry types, including
+\atentry{dualindexabbreviation} (where the dual is the
+abbreviation) and \atentry{dualabbreviationentry} (where the
+primary is the abbreviation).
-Note that the \field{alias} field will never be copied to the dual
-entry, nor can it be mapped. The alias will only apply to the
-primary entry.
+Now consider the following document:
+\begin{verbatim}
+\documentclass{article}
-By default, the \field{name} and \field{description} fields and the
-\field{plural} and \field{descriptionplural} fields are swapped.
+\usepackage[record,abbreviations]{glossaries-extra}
+
+\GlsXtrLoadResources[selection=all,src=entries]
+
+\begin{document}
+\printunsrtglossaries
+\end{document}
+\end{verbatim}
+This uses the default \csopt[combine]{sort}, so all the entries are
+sorted together, resulting in the order:
+\code{aardvark},
+\code{dual.css},
+\code{css},
+\code{html},
+\code{dual.html},
+\code{mouse},
+\code{dual.ssi},
+\code{ssi},
+\code{xml},
+\code{dual.xml},
+\code{zebra}.
+
+The \LaTeX\ code written to the \iext{glstex} file is essentially
+(but not exactly):
+\begin{verbatim}
+% from @index{aardvark}:
+\newglossaryentry{aardvark}{name={aardvark},description={}}
+
+% dual of @dualabbreviationentry{css,...}:
+\newglossaryentry{dual.css}{name={cascading stylesheets},text={CSS},
+ description={a language that describes the style of an
+ \glsxtrshort{html} document}}
+
+% primary of @dualabbreviationentry{css,...}:
+\newabbreviation{css}{CSS}{cascading stylesheets}
+
+% primary of @dualindexabbreviation{html,...}:
+\newglossaryentry{html}{name={HTML},description={}}
+
+% dual of @dualindexabbreviation{html,...}:
+\newabbreviation{dual.html}{HTML}{hypertext markup language}
+
+% from @index{mouse}:
+\newglossaryentry{mouse}{name={mouse},description={}}
+
+% dual of @dualabbreviationentry{ssi,...}:
+\newglossaryentry{dual.ssi}{name={server-side includes},text={SSI},
+ description={directives placed in \glsxtrshort{html} pages
+ evaluated by the server}}
+
+% primary of @dualabbreviationentry{ssi,...}:
+\newabbreviation{ssi}{SSI}{server-side includes}
+
+% primary of @dualindexabbreviation{xml,...}:
+\newglossaryentry{xml}{name={XML},description={}}
+
+% dual of @dualindexabbreviation{xml,...}:
+\newabbreviation{dual.xml}{XML}{extensible markup language}
+
+% from @index{zebra}:
+\newglossaryentry{zebra}{name={zebra},description={}}
+\end{verbatim}
+Since the document uses the \styopt{abbreviations} package option,
+\gls{newabbreviation} automatically assigns the abbreviation
+to the \code{abbreviations} glossary (created through that package
+option). This means that the \code{main} (default) glossary
+contains the entries (in order):
+\begin{itemize}
+\item \code{aardvark} (name: aardvark),
+\item \code{dual.css} (name: cascading stylesheets),
+\item \code{html} (name: HTML),
+\item \code{mouse} (name: mouse),
+\item \code{dual.ssi} (name: server-side includes),
+\item \code{xml} (name: XML),
+\item \code{zebra} (name: zebra).
+\end{itemize}
+The \code{abbreviations} glossary contains:
+\begin{itemize}
+\item \code{css} (short: CSS),
+\item \code{dual.html} (short: HTML),
+\item \code{ssi} (short: SSI),
+\item \code{dual.xml} (short: XML).
+\end{itemize}
+
+Since all the entries were combined and sorted together, the
+resulting glossaries are both ordered alphabetically (using
+\field{short} for the abbreviations and \field{name} for the rest),
+but note that you need to take care when referencing the
+abbreviations if you want to make use of the abbreviation style. You
+need \verb|\gls{css}| and \verb|\gls{ssi}| for the primary
+abbreviations created with \atentry{dualabbreviationentry} and
+\verb|\gls{dual.html}| and \verb|\gls{dual.xml}| for the dual
+abbreviations created with \atentry{dualindexabbreviation}. Also
+the \field{name} of the primary\slash dual alternative of the
+abbreviations is also inconsistent (short form for \code{html} and
+\code{xml} and long form for \code{dual.css} and \code{dual.ssi}),
+as different field mappings are used.
+
+If the document is changed so that the dual entries are now
+sorted and written after all the primary entries have been dealt
+with:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=entries,
+ dual-sort={letter-nocase},
+ selection=all
+]
+\end{verbatim}
+then \bibgls\ first orders the primaries:
+\begin{itemize}
+\item \code{aardvark} (name: aardvark),
+\item \code{css} (short: CSS),
+\item \code{html} (name: HTML),
+\item \code{mouse} (name: mouse),
+\item \code{ssi} (short: SSI),
+\item \code{xml} (name: XML),
+\item \code{zebra} (name: zebra)
+\end{itemize}
+and writes them to the \ext{glstex} file
+(functionally like):
+\begin{verbatim}
+% from @index{aardvark}:
+\newglossaryentry{aardvark}{name={aardvark},description={}}
+
+% primary of @dualabbreviationentry{css,...}:
+\newabbreviation{css}{CSS}{cascading stylesheets}
+
+% primary of @dualindexabbreviation{html,...}:
+\newglossaryentry{html}{name={HTML},description={}}
+
+% from @index{mouse}:
+\newglossaryentry{mouse}{name={mouse},description={}}
+
+% primary of @dualabbreviationentry{ssi,...}:
+\newabbreviation{ssi}{SSI}{server-side includes}
+
+% primary of @dualindexabbreviation{xml,...}:
+\newglossaryentry{xml}{name={XML},description={}}
+
+% from @index{zebra}:
+\newglossaryentry{zebra}{name={zebra},description={}}
+\end{verbatim}
+Then \bibgls\ orders the duals:
+\begin{itemize}
+\item \code{dual.css} (name: cascading stylesheets),
+\item \code{dual.html} (short: HTML),
+\item \code{dual.ssi} (name: server-side includes),
+\item \code{dual.xml} (short: XML)
+\end{itemize}
+and writes them to the \ext{glstex} file
+(functionally like):
+\begin{verbatim}
+% dual of @dualabbreviationentry{css,...}:
+\newglossaryentry{dual.css}{name={cascading stylesheets},text={CSS},
+ description={a language that describes the style of an
+ \glsxtrshort{html} document}}
+
+% dual of @dualindexabbreviation{html,...}:
+\newabbreviation{dual.html}{HTML}{hypertext markup language}
+
+% dual of @dualabbreviationentry{ssi,...}:
+\newglossaryentry{dual.ssi}{name={server-side includes},text={SSI},
+ description={directives placed in \glsxtrshort{html} pages
+ evaluated by the server}}
+
+% dual of @dualindexabbreviation{xml,...}:
+\newabbreviation{dual.xml}{XML}{extensible markup language}
+\end{verbatim}
+When the \ext{glstex} file is input (during the next \LaTeX\ run)
+the entries are defined in the order:
+\begin{enumerate}
+\item \code{aardvark} (type: \code{main}),
+\item \code{css} (type: \code{abbreviations}),
+\item \code{html} (type: \code{main}),
+\item \code{mouse} (type: \code{main}),
+\item \code{ssi} (type: \code{abbreviations}),
+\item \code{xml} (type: \code{main}),
+\item \code{zebra} (type: \code{main}),
+\item \code{dual.css} (type: \code{main}),
+\item \code{dual.html} (type: \code{abbreviations}),
+\item \code{dual.ssi} (type: \code{main}),
+\item \code{dual.xml} (type: \code{abbreviations}).
+\end{enumerate}
+This means that the \code{main} glossary's internal list is in the
+order:
+\begin{itemize}
+\item \code{aardvark} (aardvark),
+\item \code{html} (HTML),
+\item \code{mouse} (mouse),
+\item \code{xml} (XML),
+\item \code{zebra} (zebra),
+\item \code{dual.css} (cascading stylesheets),
+\item \code{dual.ssi} (server-side includes)
+\end{itemize}
+and the \code{abbreviations} glossary's internal list is in the order:
+\begin{itemize}
+\item \code{css} (CSS),
+\item \code{ssi} (SSI),
+\item \code{dual.html} (HTML),
+\item \code{dual.xml} (XML).
+\end{itemize}
+The lists are no longer in alphabetical order as they have a mixture
+of primary and dual entries that were separated before sorting.
+
+The above is a fairly contrived example as it wouldn't make sense
+in a real document to have glossary terms (that include a
+description) mixed with index terms (that don't include a
+description).
+A better solution would be to use
+\atentry{tertiaryindexabbreviationentry} instead of
+\atentry{dualabbreviationentry}.
+
+\entrysection{dualentry}
+
+The \atentry{dualentry} entry type is similar to \atentry{entry} but
+actually defines two entries.
+The dual entry contains the same information as the primary entry
+but some of the fields are swapped around.
+The default mappings are:
+\begin{itemize}
+\item \field{name} $\mapsto$ \field{description}
+\item \field{plural} $\mapsto$ \field{descriptionplural}
+\item \field{description} $\mapsto$ \field{name}
+\item \field{descriptionplural} $\mapsto$ \field{plural}
+\end{itemize}
+The required fields are as for \atentry{entry}.
For example:
\begin{verbatim}
@@ -2186,14 +3336,7 @@ where \idprefix{dual} is replaced by the value of the
with \csfmt{bibglsnewentry} both the primary and dual entries are
defined using \csref{bibglsnewdualentry}. The \field{category}
and \field{type} fields can be set for the dual entry using the
-\optref{dual-category} and \optref{dual-type} options.
-
-If \optref[combine]{dual-sort} then the dual entries will be sorted
-along with the primary entries, otherwise the \csopt{dual-sort}
-indicates how to sort the dual entries and the dual entries will be
-appended to the end of the \ext{glstex} file. The
-\optref{dual-sort-field} determines what field to use for the sort
-value if the dual entries should be sorted separately.
+\csopt{dual-category} and \csopt{dual-type} options.
For example:
\begin{verbatim}
@@ -2211,35 +3354,349 @@ For example:
]
\end{verbatim}
-Note that there's no dual equivalent to \atentry{index}
-since that entry type doesn't have required fields and
-there's nothing obvious to swap with that type that would
-differentiate it from a normal entry.
+\entrysection{dualindexentry}
-\section{\atentry{dualentryabbreviation}}
-\labelatentry{dualentryabbreviation}
+There are no required fields. The primary
+entry behaves like \atentry{index} and the dual entry behaves
+like \atentry{entry}. The default field mapping is:
+\begin{itemize}
+\item \field{name} $\mapsto$ \field{name}
+\end{itemize}
+This doesn't actually perform any swapping of fields, but it
+provides the field used for backlinks (if
+\csopt{dual-indexentry-backlink} is set). The reason that the primary
+(rather than the dual) is like \atentry{index} is to allow the
+primaries to merge with any \atentry{index} entries found in the
+resource set, since glossary entries with descriptions are likely to
+be a subset of all indexed entries.
+
+If no \field{name} is given, the dual entry is assigned the
+(unprefixed) entry label. For example:
+\begin{verbatim}
+@dualindexentry{array,
+ description={ordered list of values}
+}
+\end{verbatim}
+This is effectively like
+\begin{verbatim}
+@index{array}
-The \atentry{dualentryabbreviation} entry type is similar to
+@entry{dual.array,
+ name={array},
+ description={ordered list of values}
+}
+\end{verbatim}
+The primary entries are defined using
+\csref{bibglsnewdualindexentry},
+which by default sets the \field{category} to \optfmt{index}
+(although this may be overridden, for example, by the \csopt{category} option).
+The dual entries are defined with
+\csref{bibglsnewdualindexentrysecondary}.
+
+This is the most convenient way of having an entry that's also
+automatically indexed. For example, suppose the file
+\filefmt{terms.bib} contains:
+\begin{verbatim}
+@index{duck}
+@index{zebra}
+@index{aardvark}
+\end{verbatim}
+and suppose the file \filefmt{entries.bib} contains:
+\begin{verbatim}
+@dualindexentry{array,
+ description={ordered list of values}
+}
+
+@dualindexentry{vector,
+ name={vector},
+ description={column or row of values}
+}
+
+@dualindexentry{set,
+ description={collection of values}
+}
+
+@dualindexentry{matrix,
+ plural={matrices},
+ description={rectangular array of values}
+}
+\end{verbatim}
+These entries can be used in an example document that has an
+index and a glossary:
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,index,stylemods=mcols]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={terms,entries},
+ type=index,
+ label-prefix={idx.},
+ dual-prefix={gls.},
+ combine-dual-locations={primary},
+ dual-type=main
+]
+
+\begin{document}
+\gls{gls.array}, \gls{gls.vector}, \gls{gls.set}, \gls{gls.matrix}.
+
+\gls{idx.duck}, \gls{idx.aardvark}, \gls{idx.zebra}.
+
+\renewcommand{\glstreenamefmt}[1]{\textsc{#1}}
+\printunsrtglossary[type=main,style=index,nogroupskip]
+
+\renewcommand{\glstreenamefmt}[1]{#1}
+\renewcommand{\glstreegroupheaderfmt}[1]{\textbf{#1}}
+\printunsrtglossary[type=index,style=mcolindexgroup]
+\end{document}
+\end{verbatim}
+This uses \csopt{combine-dual-locations} to combine the locations
+for the primary and dual entries so that they only appear in the
+index.
+
+\entrysection{dualindexabbreviation}
+
+The \atentry{dualindexabbreviation} entry type is similar to
+\atentry{dualindexentry} and again, by default, the
+field mapping is:
+\begin{itemize}
+\item \field{name} $\mapsto$ \field{name}
+\end{itemize}
+However in this case the required fields are \field{short} and
+\field{long}. The \field{name} for the primary entry defaults to
+\field{short} if omitted. (This may be changed with the
+\csopt{abbreviation-name-fallback} option) The fallback for the
+\field{sort} field is given by \csopt{abbreviation-sort-fallback},
+which defaults to the \field{short} field.
+
+For example:
+\begin{verbatim}
+@dualindexabbreviation{html,
+ short={html},
+ long = {hypertext markup language}
+}
+\end{verbatim}
+is like
+\begin{verbatim}
+@index{html}
+
+@abbreviation{dual.html,
+ short={html},
+ long = {hypertext markup language}
+}
+\end{verbatim}
+The primary term is defined using
+\csref{bibglsnewdualindexabbreviation}, which encapsulates the
+\field{name} to match the font used by
+the dual abbreviation. The encapsulation command depends
+on the \csopt{abbreviation-name-fallback} value. If it's
+the \field{short} field then \gls{bibglsuseabbrvfont} is
+used, otherwise \gls{bibglsuselongfont} is used.
+
+The primary definition also
+by default sets the \field{category} to \optfmt{index} (although
+this again may be overridden).
+The dual term is defined using
+\csref{bibglsnewdualindexabbreviationsecondary}.
+
+\entrysection{dualindexsymbol}
+
+The \atentry{dualindexsymbol} entry type is similar to
+\atentry{dualindexentry}, but by default the
+field mappings are:
+\begin{itemize}
+\item \field{symbol} $\mapsto$ \field{name}
+\item \field{name} $\mapsto$ \field{symbol}
+\item \field{symbolplural} $\mapsto$ \field{plural}
+\item \field{plural} $\mapsto$ \field{symbolplural}
+\end{itemize}
+The required field is: \field{symbol}.
+If the \field{name} field is omitted, the dual entry is assigned a
+symbol from the original (unprefixed) label.
+The primary entries are defined using
+\csref{bibglsnewdualindexsymbol},
+which by default sets the \field{category} to \optfmt{index},
+and the dual entries are defined using
+\csref{bibglsnewdualindexsymbolsecondary},
+which by default sets the \field{category} to \optfmt{symbol}.
+For example:
+\begin{verbatim}
+@dualindexsymbol{pi,
+ symbol={\ensuremath{\pi}},
+ description={ratio of a circle's circumference to its diameter}
+}
+\end{verbatim}
+is like
+\begin{verbatim}
+@index{pi,symbol={\ensuremath{\pi}}}
+
+@symbol{dual.pi,
+ name={\ensuremath{\pi}},
+ symbol={pi},
+ description={ratio of a circle's circumference to its diameter}
+}
+\end{verbatim}
+
+For example, suppose I have a file called \filefmt{symbols.bib} that
+contains:
+\begin{verbatim}
+@dualindexsymbol{pi,
+ symbol={\ensuremath{\pi}},
+ description={ratio of a circle's circumference to its diameter}
+}
+
+@dualindexsymbol{e,
+ name={Euler's number},
+ symbol={\ensuremath{e}},
+ description={base of the natural logarithm}
+}
+\end{verbatim}
+Then the previous example document can be modified to have an index,
+a glossary and a list of symbols:
+\begin{verbatim}
+\documentclass{report}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,symbols,index,stylemods=mcols]{glossaries-extra}
+
+\newcommand{\bibglsnewdualindexsymbolsecondary}[5]{%
+ \longnewglossaryentry*{#1}{name={#3},category=symbol,%
+ symbol={#4},#2,type={symbols}}{#5}%
+}
+
+\newcommand{\indexprimary}[1]{\glsadd[format=hyperbf]{idx.#1}}
+
+\renewcommand{\glsxtrpostdescsymbol}{%
+ \indexprimary{\glscurrententrylabel}%
+}
+
+\renewcommand{\glsxtrpostdescgeneral}{%
+ \indexprimary{\glscurrententrylabel}%
+}
+
+\GlsXtrLoadResources[
+ src={entries,terms,symbols},
+ type=index,
+ set-widest,
+ label-prefix={idx.},
+ dual-prefix={},
+ combine-dual-locations={primary},
+ dual-sort={letter-case},
+ dual-type=main
+]
+
+\glsxtrnewglslike[hyper=false]{idx.}{\idx}{\idxpl}{\Idx}{\Idxpl}
+
+\begin{document}
+\gls{array}, \gls{vector}, \gls{set}, \glspl{matrix}.
+
+\idx{duck}, \idx{aardvark}, \idx{zebra}.
+
+\gls{e} and \gls{pi}.
+
+\newpage
+\gls{array}, \idx{vector}, \idx{set}, \gls{matrix}.
+
+\newpage
+\gls{array}, \gls{vector}, \gls{set}, \gls{matrix}.
+
+
+\renewcommand{\glstreenamefmt}[1]{\textsc{#1}}
+\printunsrtglossary[type=main,nogroupskip,style=alttree]
+
+\renewcommand{\glstreenamefmt}[1]{#1}
+\printunsrtglossary[type=symbols,nogroupskip,style=index]
+
+\renewcommand{\glstreenamefmt}[1]{#1}
+\renewcommand{\glstreegroupheaderfmt}[1]{\textbf{#1}}
+\printunsrtglossary[type=index,style=mcolindexgroup]
+
+\end{document}
+\end{verbatim}
+Here I've provided some convenient commands for referencing the
+primary (index) terms (\csfmt{idx}, \csfmt{idxpl}, \csfmt{Idx}
+and \csfmt{Idxpl}). This means I don't need to worry about the
+label prefix and it also switches off the hyperlinks. These custom
+commands are defined using
+\nosecformatdef{glsxtrnewglslike}
+which, in this case, essentially does
+\begin{verbatim}
+\newcommand{\idx}[2][]{\gls[hyper=false,#1]{idx.#2}}
+\newcommand{\Idx}[2][]{\Gls[hyper=false,#1]{idx.#2}}
+\newcommand{\idxpl}[2][]{\glspl[hyper=false,#1]{idx.#2}}
+\newcommand{\Idxpl}[2][]{\Glspl[hyper=false,#1]{idx.#2}}
+\end{verbatim}
+but the new commands will also recognise the \ics{gls} modifiers, so
+\verb|\idx+| will behave like \verb|\gls+| which wouldn't be
+possible if \csfmt{idx} was defined using \ics{newcommand} in the
+above manner.
+
+I've also redefined \csref{bibglsnewdualindexsymbolsecondary} to put
+the dual entries created with \atentry{dualindexsymbol} into
+the \code{symbols} glossary (which is created with the
+\styopt{symbols} package option), so it overrides the
+\csopt[main]{dual-type} setting.
+
+This command also sets the \field{category}
+to \code{symbol}, so I can redefine the post-description hook
+for symbols (\ics{glsxtrpostdescsymbol}) to automatically index
+the symbol definition. Similarly for the \code{general}
+post-description hook \ics{glsxtrpostdescgeneral}.
+
+Since the post-description hook isn't done until the glossary has
+been created, this requires a slightly longer build process. If the
+document file is called \filefmt{myDoc.tex}, then the complete
+document build is:
+\begin{verbatim}
+pdflatex myDoc
+bib2gls -g myDoc
+pdflatex myDoc
+bib2gls -g myDoc
+pdflatex myDoc
+\end{verbatim}
+
+\entrysection{dualindexnumber}
+
+The \atentry{dualindexnumber} entry type is almost identical to
+\atentry{dualindexsymbol}, but the primary entries are defined using
+\csref{bibglsnewdualindexnumber},
+which by default sets the \field{category} to \optfmt{index},
+and the dual entries are defined using
+\csref{bibglsnewdualindexnumbersecondary},
+which by default sets the \field{category} to \optfmt{number}.
+
+\entrysection{dualabbreviationentry}
+
+The \atentry{dualabbreviationentry} entry type is similar to
\atentry{dualentry}, but by default the
field mappings are:
\begin{itemize}
\item \field{long} $\mapsto$ \field{name}
+\item \field{longplural} $\mapsto$ \field{plural}
\item \field{short} $\mapsto$ \field{text}
\end{itemize}
You may need to add a mapping from \field{shortplural} to
\field{plural} if the default is inappropriate.
+(In \bibgls\ version 1.0 this entry type was originally called
+\atentry{dualentryabbreviation}. In version 1.1, it was renamed
+\atentry{dualabbreviationentry} which makes for a more consistent naming scheme
+\code{@dual}\meta{primary}\meta{dual}.)
The required fields are: \field{short}, \field{long} and
\field{description}. This entry type is designed to emulate the
-example \cs{newdualentry} command given in the \sty{glossaries}
-user manual. The primary entry is an abbreviation with the given
+example \gls{newdualentry} command given in the \sty{glossaries}
+user manual~\cite{glossaries}. The primary entry is an abbreviation with the given
\field{short} and \field{long} fields (but not the
\field{description}) and the secondary entry is a regular entry with
the \field{name} copied from the \field{long} field.
+The fallback for the \field{sort} is given by
+\csopt{abbreviation-sort-fallback}, which defaults to the
+\field{short} field.
For example:
\begin{verbatim}
-@dualentryabbreviation{svm,
+@dualabbreviationentry{svm,
long = {support vector machine},
short = {SVM},
description = {statistical pattern recognition technique}
@@ -2257,50 +3714,50 @@ is rather like doing
description = {statistical pattern recognition technique}
}
\end{verbatim}
-but \texttt{dual.svm} will automatically be selected if \texttt{svm}
-is indexed in the document. If \texttt{dual.svm} isn't explicitly
+but \code{dual.svm} will automatically be selected if \code{svm}
+is indexed in the document. If \code{dual.svm} isn't explicitly
indexed, it won't have a location list.
-As with \atentry{dualentry}, the \field{alias} field will never
-be copied to the dual entry, nor can it be mapped. The alias will
-only apply to the primary entry.
-
If the \field{sort} field is missing \bibgls\ by default falls back
on the \field{name} field. If this is missing, this sort value will
fallback on the \field{short} field. This means that if \field{name}
-isn't explicitly given in \atentry{dualentryabbreviation}, then the
+isn't explicitly given in \atentry{dualabbreviationentry}, then the
primary entry will be sorted according to \field{short} but the dual
will be sorted according its \field{name} (which has been copied
from the primary \field{long}).
-Entries provided using \atentry{dualentryabbreviation} will be defined
+Entries provided using \atentry{dualabbreviationentry} will be defined
with
\begin{alltt}
-\csref{bibglsnewdualentryabbreviation}
+\csref{bibglsnewdualabbreviationentry}
\end{alltt}
-(which uses \cs{newabbreviation}) for the primary entries and with
+(which uses \gls{newabbreviation}) for the primary entries and with
\begin{alltt}
-\csref{bibglsnewdualentryabbreviationsecondary}
+\csref{bibglsnewdualabbreviationentrysecondary}
\end{alltt}
-(which uses \cs{longnewglossaryentry}) for the secondary entries.
+(which uses \gls{longnewglossaryentry}) for the secondary entries.
This means that if the \styopt{abbreviations}
package option is used, this will put the primary entry in the
\optfmt{abbreviations} glossary and the secondary entry in the
-\optfmt{main} glossary. Use the \optref{type} and
-\optref{dual-type} options to override this.
+\optfmt{main} glossary. Use the \csopt{type} and
+\csopt{dual-type} options to override this.
-\section{\atentry{dualsymbol}}
-\labelatentry{dualsymbol}
+\entrysection{dualentryabbreviation}
-This is like \atentryref{dualentry} but the default mappings
-swap the \field{name} and \field{symbol} fields (and the
-\field{plural} and \field{symbolplural} fields). The \field{name}
-and \field{symbol} are required.
+This entry type is deprecated as from \bibgls\ version 1.1. It's functionally
+equivalent to \atentry{dualabbreviationentry} but its name
+doesn't fit the general dual entry naming scheme.
-As with \atentry{dualentry}, the \field{alias} field will never
-be copied to the dual entry, nor can it be mapped. The alias will
-only apply to the primary entry.
+\entrysection{dualsymbol}
+This is like \atentry{dualentry} but the default mappings are:
+\begin{itemize}
+\item \field{name} $\mapsto$ \field{symbol}
+\item \field{plural} $\mapsto$ \field{symbolplural}
+\item \field{symbol} $\mapsto$ \field{name}
+\item \field{symbolplural} $\mapsto$ \field{plural}
+\end{itemize}
+The \field{name} and \field{symbol} fields are required.
For example:
\begin{verbatim}
@dualsymbol{pi,
@@ -2314,10 +3771,9 @@ For example:
Entries are defined using \csref{bibglsnewdualsymbol}, which by
default sets the \field{category} to \optfmt{symbol}.
-\section{\atentry{dualnumber}}
-\labelatentry{dualnumber}
+\entrysection{dualnumber}
-This is much the same as \atentryref{dualsymbol} but entries are
+This is almost identical to \atentry{dualsymbol} but entries are
defined using \csref{bibglsnewdualnumber}, which by default sets
the \field{category} to \optfmt{number}.
@@ -2356,53 +3812,46 @@ could be sorted numerically according to the approximate value:
]
\end{verbatim}
-\section{\atentry{dualabbreviation}}
-\labelatentry{dualabbreviation}
+\entrysection{dualabbreviation}
+The \atentry{dualabbreviation} entry type is similar to
+\atentry{dualentry}, but by default the
+field mappings are:
+\begin{itemize}
+\item \field{short} $\mapsto$ \field{dualshort}
+\item \field{shortplural} $\mapsto$ \field{dualshortplural}
+\item \field{long} $\mapsto$ \field{duallong}
+\item \field{longplural} $\mapsto$ \field{duallongplural}
+\item \field{dualshort} $\mapsto$ \field{short}
+\item \field{dualshortplural} $\mapsto$ \field{shortplural}
+\item \field{duallong} $\mapsto$ \field{long}
+\item \field{duallongplural} $\mapsto$ \field{longplural}
+\end{itemize}
The required fields are: \field{short}, \field{long},
\field{dualshort} and \field{duallong}.
This includes some new fields: \field{dualshort},
\field{dualshortplural}, \field{duallong} and
\field{duallongplural}. If these aren't already defined, they
-will be provided in the \ext{glstex} file with
+will be provided in the \iext{glstex} file with
\begin{alltt}
-\cs{glsxtrprovidestoragekey}\margm{key}\marg{}\marg{}
+\ics{glsxtrprovidestoragekey}\margm{key}\marg{}\marg{}
\end{alltt}
-This command is defined by the \sty{glossaries-extra} package.
Note that this use with an empty third argument prevents
the creation of a field access command (analogous to
-\cs{glsentrytext}). You can fetch the value with
-\cs{glsxtrusefield}. (See the \sty{glossaries-extra} manual for
-further details.) Remember that the field won't be
+\ics{glsentrytext}). The value can be accessed with
+\ics{glsxtrusefield} instead. Remember that the field won't be
available until the \ext{glstex} file has been created.
-As with \atentry{dualentry}, the \field{alias} field will never
-be copied to the dual entry, nor can it be mapped. The alias will
-only apply to the primary entry.
-
Note that \bibgls\ doesn't know what abbreviation styles
are in used, so if the \field{sort} field is missing
it will fallback on the \field{short} field. If the abbreviations
need to be sorted according to the \field{long} field instead,
-use \optref[long]{sort-field}.
+use \csopt[long]{abbreviation-sort-fallback}.
-The \atentry{dualabbreviation} entry type is similar to
-\atentry{dualentry}, but by default the
-field mappings are:
-\begin{itemize}
-\item \field{short} $\mapsto$ \field{dualshort}
-\item \field{shortplural} $\mapsto$ \field{dualshortplural}
-\item \field{long} $\mapsto$ \field{duallong}
-\item \field{longplural} $\mapsto$ \field{duallongplural}
-\item \field{dualshort} $\mapsto$ \field{short}
-\item \field{dualshortplural} $\mapsto$ \field{shortplural}
-\item \field{duallong} $\mapsto$ \field{long}
-\item \field{duallongplural} $\mapsto$ \field{longplural}
-\end{itemize}
Terms that are defined using \atentry{dualabbreviation} will be
written to the output file using \csref{bibglsnewdualabbreviation}.
-If the \optref{dual-abbrv-backlink} option is on, the default field
+If the \csopt{dual-abbrv-backlink} option is on, the default field
used for the backlinks is the \field{dualshort} field, so you'll need
to make sure you adapt the glossary style to show that field. The
simplest way to do this is through the category post description
@@ -2410,7 +3859,7 @@ hook.
For example, if the entries all have the \field{category} set
to \optfmt{abbreviation}, then this requires redefining
-\cs{glsxtrpostdescabbreviation}.
+\ics{glsxtrpostdescabbreviation}.
Here's an example dual abbreviation for a document where English is
the primary language and German is the secondary language:
@@ -2469,7 +3918,7 @@ German: \gls{de.rna}; \gls{de.rna}.
\printunsrtglossaries
\end{document}
\end{verbatim}
-If the \optref{label-prefix} is omitted, then only the dual entries
+If the \csopt{label-prefix} is omitted, then only the dual entries
will have a prefix:
\begin{verbatim}
English: \gls{rna}; \gls{rna}.
@@ -2477,7 +3926,7 @@ English: \gls{rna}; \gls{rna}.
German: \gls{de.rna}; \gls{de.rna}.
\end{verbatim}
Another variation is to use the \abbrstyle{long-short-user}
-abbreviation style and modify the associated \cs{glsxtruserfield} so that
+abbreviation style and modify the associated \ics{glsxtruserfield} so that
the \field{duallong} field is selected for the parenthetical
material:
\begin{verbatim}
@@ -2507,7 +3956,7 @@ style:
This stores the dual description in the \field{user1} field,
so this needs a mapping.
The new example document is much the same as the previous one, except
-that the \optref{dual-abbrv-map} option is needed to include the
+that the \csopt{dual-abbrv-map} option is needed to include the
mapping between the \field{description} and \field{user1} fields:
\begin{verbatim}
\documentclass{article}
@@ -2539,7 +3988,7 @@ mapping between the \field{description} and \field{user1} fields:
label-prefix={en.},% primary label prefix
dual-prefix={de.},% dual label prefix
sort=en,% sort primary entries according to language 'en'
- sort-field={long},% sort by the 'long' field
+ abbreviation-sort-fallback={long},% fallback on 'long' field
dual-sort=de-1996,% sort dual entries according to 'de-1996'
% (German new orthography)
dual-abbrv-backlink,% add links in the glossary to the opposite
@@ -2563,9 +4012,8 @@ German: \gls{de.rna}; \gls{de.rna}.
\end{document}
\end{verbatim}
Note that since this document uses the \abbrstyle{long-short-desc}
-abbreviation style, the \optref{sort-field} needs to be changed
-to \optfmt{long}, since the fallback if the \field{sort} field is
-missing is the \field{short} field.
+abbreviation style, the \csopt{abbreviation-sort-fallback} needs to be changed
+to \optfmt{long}.
If I change the order of the mapping to:
\begin{verbatim}
@@ -2606,46 +4054,124 @@ parenthetical material until after the link-text:
If the back-link field has been switched to \field{duallong} then
the post-description hook is no longer required.
-\section{\atentry{dualacronym}}
-\labelatentry{dualacronym}
+\entrysection{dualacronym}
As \atentry{dualabbreviation} but defines the entries with
\csref{bibglsnewdualacronym}.
+\section{Tertiary Entry Types}
+\label{sec:tertiaryentry}
+
+A tertiary entry type is essentially a dual entry that creates three
+separate (but related) \styfmt{glossaries-extra} entry definitions per
+\ext{bib} entry. As with dual entries, the first and second of these
+are the primary and secondary. The third of these is the
+\idx{tertiary} which is effectively an appendage of the
+secondary, and is defined by the same associated
+\csfmt{bibglsnew\ldots secondary} command that defines the secondary
+entry. Therefore the secondary and tertiary are both considered the
+dual and are treated as a single entry for the purposes of sorting
+and collating.
+
+The tertiary entry will never have any locations. Any records found
+will be assigned to the secondary (and may then be moved to the
+primary with \csopt[primary]{combine-dual-locations}). The tertiary
+will always have the same order as the secondary and will have the same
+\field{group} value. You can set the \field{type} for the tertiary
+with \csopt{tertiary-type} and the \field{category} with
+\csopt{tertiary-category}. The label prefix defaults to
+\idprefix{tertiary} and can be changed with \csopt{tertiary-prefix}.
+
+\entrysection{tertiaryindexabbreviationentry}
+
+This entry type is very similar to
+\atentry{dualindexabbreviation} but creates a tertiary entry as
+well. The required fields are: \field{short} and \field{long} (as for
+\atentry{dualindexabbreviation}) and also \field{description}. The
+mappings are shared by both entry types. For example:
+\begin{verbatim}
+@tertiaryindexabbreviationentry{html,
+ short={HTML},
+ long = {hypertext markup language},
+ description={a markup language for creating web pages}
+}
+\end{verbatim}
+is analogous to
+\begin{verbatim}
+\newglossaryentry{html,name={HTML},description={}}
+
+\newabbreviation{dual.html}{HTML}{hypertext markup language}
+
+\newglossaryentry{tertiary.html,
+ name={hypertext markup language},
+ description={a markup language for creating web pages}
+}
+\end{verbatim}
+The last two are actually defined using one command:
+\begin{verbatim}
+\bibglsnewtertiaryindexabbreviationentrysecondary
+ {dual.html}% secondary label
+ {tertiary.html}% tertiary label
+ {...}% secondary fields
+ {...}% tertiary fields
+ {HTML}% primary name
+ {HTML}% short
+ {hypertext markup language}% long
+ {a markup language for creating web pages}% description
+\end{verbatim}
+The \csref{bibglsnewtertiaryindexabbreviationentrysecondary}
+command is provided in the \iext{glstex} file as:
+\begin{verbatim}
+\providecommand{\bibglsnewtertiaryindexabbreviationentrysecondary}[8]{%
+ \newabbreviation[#3]{#1}{#6}{#7}%
+ \longnewglossaryentry*{#2}%
+ {name={\protect\bibglsuselongfont{#7}{\glscategory{#1}}},#4}%
+ {#8}%
+}
+\end{verbatim}
+which defines the secondary as an abbreviation using
+\csfmt{newabbreviation} and the tertiary as a regular entry using
+\csfmt{longnewglossaryentry}. This means that the tertiary entry is
+always defined immediately after the corresponding secondary entry.
+The primary may be defined earlier or later in the file depending on the
+way the entries are sorted and on the \csopt{dual-sort} setting.
+
\chapter{Resource File Options}
\label{sec:resourceopts}
-\setcounter{secnumdepth}{1}
-Make sure that you load \sty{glossaries-extra} with the
+Make sure that you use \isty{glossaries-extra} with the
\styopt{record} package option. This ensures that \bibgls\ can pick
-up the required information from the \ext{aux} file. (You may omit
-this option if you use \optref[all]{selection} and you don't require
-the location lists.)
-
-The \ext{glstex} resource files created by \bibgls\ are loaded in
+up the required information from the \iext{aux} file. It also
+switches on the \styopt[none]{sort} package option (if you have a new
+enough version of the base \isty{glossaries} package), which means
+that there's no attempt to assign or process the \field{sort} key if
+it's omitted from \gls{newglossaryentry} (or similar commands). The
+\field{sort} key will be provided by \bibgls\ for informational
+purposes, but there's no need for \LaTeX\ to write it to any
+external files (unless you use \styopt[alsoindex]{record}).
+
+The \iext{glstex} resource files created by \bibgls\ are loaded in
the document using
-\begin{definition}\plabelcs{glsxtrresourcefile}
-\cs{glsxtrresourcefile}\oargm{options}\margm{filename}
-\end{definition}
+\nosecformatdef{glsxtrresourcefile}
where \meta{filename} is the name of the resource file without the
\ext{glstex} extension.
-You can have multiple \cs{glsxtrresourcefile} commands within your
+You can have multiple \gls{glsxtrresourcefile} commands within your
document, but each \meta{filename} must be unique, otherwise \LaTeX\
-would attempt to input the same \ext{glstex} file multiple times.
-\bibgls\ checks for non-unique file names.
+would attempt to input the same \ext{glstex} file multiple times
+(\bibgls\ checks for non-unique file names). The associated data for each
+resource file is called the \idx{resourceset} (see
+\sectionref{sec:resourcesets}).
There's a shortcut command that uses
-\cs{jobname} in the \meta{filename}:
-\begin{definition}
-\cs{GlsXtrLoadResources}\oargm{options}
-\end{definition}
+\ics{jobname} in the \meta{filename}:
+\nosecformatdef{GlsXtrLoadResources}
The first instance of this command is equivalent to
\begin{alltt}
-\cs{glsxtrresourcefile}\oargm{options}\marg{\cs{jobname}}
+\gls{glsxtrresourcefile}\oargm{options}\marg{\ics{jobname}}
\end{alltt}
-Any additional use of \cs{GlsXtrLoadResources} is equivalent to
+Any additional use of \gls{GlsXtrLoadResources} is equivalent to
\begin{alltt}
-\cs{glsxtrresourcefile}\oargm{options}\marg{\cs{jobname}-\meta{n}}
+\gls{glsxtrresourcefile}\oargm{options}\marg{\ics{jobname}-\meta{n}}
\end{alltt}
where \meta{n} is number. For example:
\begin{verbatim}
@@ -2659,20 +4185,24 @@ This is equivalent to:
\glsxtrresourcefile[src=entries-fr,sort={fr}]{\jobname-1}
\glsxtrresourcefile[src=entries-de,sort={de-1996}]{\jobname-2}
\end{verbatim}
-In general, it's simplest just to use \cs{GlsXtrLoadResources}.
-
-The optional argument \meta{options} is a comma-separated \keyvallist.
-Allowed options are listed below.
-The option list applies only to that specific
-\meta{filename}\ext{glstex} and are not carried over to the next
-instance of \cs{glsxtrresourcefile}. The \sty{glossaries-extra}
-package doesn't parse the options, but just writes the information to the
+In general, it's simplest just to use \gls{GlsXtrLoadResources}.
+
+The optional argument \meta{options} is a comma-separated
+\keyvallist. Allowed options are listed below. The option list
+applies only to that specific \meta{filename}\ext{glstex} and are
+not carried over to the next instance of \gls{glsxtrresourcefile}.
+Only the definitions provided in \atentry{preamble} (if the
+interpreter is on and \csopt[true]{interpret-preamble}) are carried
+over to the next resource set and, possibly,
+\idxpl{crossresourceref} if permitted (see
+\sectionref{sec:resourcesets}). The \sty{glossaries-extra} package
+doesn't parse the options, but just writes the information to the
\ext{aux} file. This means that any invalid options will be reported
by \bibgls\ not by \sty{glossaries-extra}.
If you have multiple \ext{bib} files you can either select them all
-using \optref[\meta{bib list}]{src} in a single
-\cs{glsxtrresourcefile} call, if they all require the same settings,
+using \csopt[\meta{bib list}]{src} in a single
+\gls{glsxtrresourcefile} call, if they all require the same settings,
or you can load them separately with different settings applied.
For example, if the files \filefmt{entries-terms.bib} and
@@ -2686,9 +4216,9 @@ Alternatively, if they have different settings:
\GlsXtrLoadResources[src={entries-symbols},sort=use,type=symbols]
\end{verbatim}
-Note that the sorting is applied to each resource call independently
-of other resources. This means that if you have multiple instances
-of \cs{glsxtrresourcefile} but only one glossary type, the glossary
+Note that the sorting is applied to each \idx{resourceset} independently
+of other \idxpl{resourceset}. This means that if you have multiple instances
+of \gls{glsxtrresourcefile} but only one glossary type, the glossary
will effectively contain blocks of sorted entries. For example, if
\filefmt{file1.bib} contains:
\begin{verbatim}
@@ -2718,19 +4248,31 @@ will result in the list: aardvark, duck, zebra, bee, caterpillar,
wombat. The first three (aardvark, duck, zebra) are defined when
\csfmt{jobname}\filefmt{.glstex} is read. The second three (bee,
caterpillar, wombat) are defined when \csfmt{jobname}\filefmt{-1.glstex}
-is read. Since \cs{printunsrtglossary} simply iterates over all
+is read. Since \ics{printunsrtglossary} simply iterates over all
defined entries, this is the ordering used.
-\plabelcs{strong}%
-Note \bibgls\ allows \ext{bib} files that don't provide any entries.
-This can be used to provide commands in \atentryref{preamble}.
+Abbreviation styles must be set (using \ics{setabbreviationstyle})
+before the resource command that selects the abbreviations from the
+appropriate \ext{bib} file, since the entries are defined (through
+\gls{newabbreviation} or \cs{newacronym}) when
+\gls{glsxtrresourcefile} inputs the \ext{glstex} file. (Similarly for any
+associated abbreviation style commands that must be set before
+abbreviations are defined, such as \cs{glsxtrlongshortdescname}.)
+
+Note \bibgls\ allows \iext{bib} files that don't provide any entries.
+This can be used to provide commands in \atentry{preamble}.
For example, suppose I have \filefmt{defs.bib} that just contains
\begin{verbatim}
@preamble{"\providecommand{\strong}[1]{\textbf{\color{red}#1}}
\providecommand{\test}[2]{#2 (#1)}"}
\end{verbatim}
-This provides two commands: \csfmt{strong} (which sets the font
-weight and colour) and \csfmt{test} (which just displays its second
+This provides two commands:
+\nosecdef{strong}
+(which sets the font weight and colour) and
+\begin{alltt}
+\csfmt{test}\margm{first}\margm{second}
+\end{alltt}
+(which just displays its second
argument followed by the first in parentheses).
Suppose I also have \filefmt{entries.bib} that contains:
@@ -2749,8 +4291,8 @@ do:
\begin{verbatim}
\GlsXtrLoadResources[src={defs,entries}]
\end{verbatim}
-Unfortunately this results in the sort value for \texttt{example} being
-set to \texttt{redexample (stuff)} because the interpreter has
+Unfortunately this results in the sort value for \code{example} being
+set to \code{redexample (stuff)} because the interpreter has
detected the provided commands and expanded
\begin{verbatim}
\strong{\test{stuff}{example}}
@@ -2760,28 +4302,28 @@ to
\textbf{\color{red}example (stuff)}
\end{verbatim}
It discards font changes, so \csfmt{textbf} is ignored, but it doesn't
-recognise \cs{color} and so doesn't know that the first argument is
+recognise \csfmt{color} and so doesn't know that the first argument is
just the colour specifier and therefore doesn't discard it.
This means that \qt{\textbf{\color{red}example (stuff)}} is placed
between \qt{foo} and \qt{sample} instead of between \qt{bar} and
\qt{foo}.
-I can prevent the interpreter from parsing \atentryref{preamble}:
+I can prevent the interpreter from parsing \atentry{preamble}:
\begin{verbatim}
\GlsXtrLoadResources[src={defs,entries},interpret-preamble=false]
\end{verbatim}
-Now when the sort value for \texttt{example} is obtained from
+Now when the sort value for \code{example} is obtained from
\begin{verbatim}
\strong{\test{stuff}{example}}
\end{verbatim}
no expansion occurs (since \csfmt{strong} and \csfmt{test} are
unrecognised) so the sort value ends up as
-\texttt{stuffexample}
+\code{stuffexample}
which places \qt{\textbf{\color{red}example (stuff)}} between
\qt{sample} and \qt{test}, which is again incorrect.
The best thing to do in this situation is to split the provided
-commands into two \ext{bib} files: one that shouldn't be interpreted
+commands into two \iext{bib} files: one that shouldn't be interpreted
and one that should.
For example, \filefmt{defs-nointerpret.bib}:
@@ -2792,13 +4334,13 @@ and \filefmt{defs-interpret.bib}:
\begin{verbatim}
@preamble{"\providecommand{\test}[2]{#2 (#1)}"}
\end{verbatim}
-Now the first one can be loaded with \optref[false]{interpret-preamble}:
+Now the first one can be loaded with \csopt[false]{interpret-preamble}:
\begin{verbatim}
\GlsXtrLoadResources[src={defs-nointerpret},interpret-preamble=false]
\end{verbatim}
-This creates a \ext{glstex} file that provides \csfmt{strong} but
+This creates a \iext{glstex} file that provides \csfmt{strong} but
doesn't define any entries. The other file \filefmt{defs-interpret.bib} can
-then be loaded with the default \optref[true]{interpret-preamble}:
+then be loaded with the default \csopt[true]{interpret-preamble}:
\begin{verbatim}
\GlsXtrLoadResources[src={defs-interpret,entries}]
\end{verbatim}
@@ -2808,209 +4350,342 @@ also do:
\GlsXtrLoadResources[src={defs-interpret}]
\GlsXtrLoadResources[src={entries}]
\end{verbatim}
-The \emph{contents} of \atentryref{preamble} are only written to the
-associated \ext{glstex} file, but the definitions contained within
+The \emph{contents} of \atentry{preamble} are only written to the
+associated \iext{glstex} file, but the definitions contained within
the \atentry{preamble} are retained by the interpreter for subsequent
-resource sets.
+\idxpl{resourceset}.
\section{General Options}
\label{sec:generalopts}
-\subsection{\csoptnv{charset}\csopteqval{encoding-name}}
-\labelopt{charset}
+\optsection{charset}
-If the character encoding hasn't been supplied in the \ext{bib} file
+If the character \idx{encoding} hasn't been supplied in the \iext{bib} file
with the encoding comment
\begin{alltt}
-\% Encoding: \meta{encoding-name}
+\idx{commentchar} Encoding: \meta{encoding-name}
\end{alltt}
then you can supply the correct encoding using
\csopt[encoding-name]{charset}. In general, it's better to include
the encoding in the \ext{bib} file where it can also be read by
a \ext{bib} managing systems, such as JabRef.
-See \argref{tex-encoding} for the encoding used to write the \ext{glstex}
+See \longarg{tex-encoding} for the encoding used to write the \ext{glstex}
file.
-\subsection{\csoptnv{interpret-preamble}\csopteqval{boolean}}
-\labelopt{interpret-preamble}
+\optsection{interpret-preamble}
This is a boolean option that determines whether or not the
-interpreter should parse the contents of \atentryref{preamble}.
+interpreter should parse the contents of \atentry{preamble}.
The default is \optfmt{true}. If \optfmt{false}, the preamble
-contents will still be written to the \ext{glstex} file, but any
+contents will still be written to the \iext{glstex} file, but any
commands provided in the preamble won't be recognised if the
interpreter is needed to determine an entry's sort value.
-\subsection{\csoptnv{set-widest}\csopteqval{boolean}}
-\labelopt{set-widest}
+A related option is \csopt{interpret-label-fields} which governs
+whether or not fields that must only contain a label should be
+interpreted.
+
+\optsection{write-preamble}
+
+This is a boolean option that determines whether or not the
+preamble should be written to the \ext{glstex} file. The default
+is \optfmt{true}. Note that the preamble will
+still be parsed if \csopt[true]{interpret-preamble} even if
+\csopt[false]{write-preamble}. This means it's possible to
+provide \bibgls\ command definitions in \atentry{preamble}
+that don't get seen by \LaTeX.
+
+\optsection{set-widest}
The \glostyle{alttree} glossary style needs to know the widest
-\field{name} (for each level, if hierarchical). This can
-be set using \cs{glssetwidest} provided by the \sty{glossaries}
-package, but this requires knowing which name is the widest.
+\field{name} (for each level, if hierarchical). This can be set
+using \ics{glssetwidest} provided by the \styfmt{glossary-tree}
+package (or similar commands like \ics{glsupdatewidest} provided by
+\styfmt{glossaries-extra-stylemods}), but this requires knowing
+which name is the widest. Alternative one of the iterative commands
+such as \ics{glsFindWidestTopLevelName} can be used, which slows the
+document build as it has to iterate over all defined entries.
The boolean option \csopt[true]{set-widest} will try to calculate
-the widest names for each hierarchical level. Since it doesn't know
-the fonts that will be used in the document or if there are any
-non-standard commands that aren't provided in the \ext{bib} files
-preamble, this option may not work. The transcript file will
-include the message
+the widest names for each hierarchical level to help remove the need
+to determine the correct value within the document.
+Since \bibgls\ doesn't know the fonts that will be used
+in the document or if there are any non-standard commands that
+aren't provided in the \ext{bib} files preamble, \emph{this option may not
+work}. For example, if one entry has the \field{name} defined as
+\begin{verbatim}
+name={some {\Huge huge} text}
+\end{verbatim}
+and another entry has the \field{name} defined as
+\begin{verbatim}
+name={some {\small small} text}
+\end{verbatim}
+then \bibgls\ will determine that the second name is the widest
+although the first will actually be wider when it's rendered in the
+document.
+
+When using this option, the transcript file will include the message
\begin{alltt}
Calculated width of '\meta{text}': \meta{number}
\end{alltt}
-where \meta{text} is \bibgls's interpretation of the contents
-of the \field{name} field and \meta{number} is a rough guide
-to the width of \meta{text} assuming the operating system's
-default serif font. The entry that has the largest \meta{number}
-is the one that will be selected. This will then be implemented
-using:
-\begin{alltt}
-\cs{glssetwidest}\oargm{level}\marg{\cs{glsentryname}\margm{id}}
-\end{alltt}
-where \meta{id} is the entry's label. This leaves \TeX\ to
-compute the width according to the document fonts.
-
-If \optref{type} has been set, the \cs{glssetwidest} command
-will be appended to the glossary preamble for that type, otherwise
-it's simply set in the \ext{glstex} file and may be overridden
-later in the document if required.
+where \meta{text} is \bibgls's interpretation of the contents of the
+\field{name} field and \meta{number} is a rough guide to the width
+of \meta{text} assuming the operating system's default serif font.
+The entry that has the largest \meta{number} is the one that will be
+selected. This will then be implemented as follows:
+\begin{itemize}
+\item If the \field{type} is unknown then:
+ \begin{itemize}
+ \item if the interpreter resolves all \field{name} fields to the
+ empty string (that is the \field{name} fields all consist of
+ unknown commands) then
+ \begin{itemize}
+ \item if there are child entries \gls{bibglssetwidestfallback}
+ is used,
+ \item otherwise \gls{bibglssetwidesttoplevelfallback} is used;
+ \end{itemize}
+ \item otherwise \gls{bibglssetwidest} is used.
+ \end{itemize}
+\item If the \field{type} is known then:
+ \begin{itemize}
+ \item if the interpret resolves all \field{name} fields for that
+ type to the empty string (that is the \field{name} fields all consist of
+ unknown commands) then
+ \begin{itemize}
+ \item if there are child entries \gls{bibglssetwidestfortypefallback}
+ is used,
+ \item otherwise
+ \gls{bibglssetwidesttoplevelfortypefallback} is used;
+ \end{itemize}
+ \item otherwise \gls{bibglssetwidestfortype} is used.
+ \end{itemize}
+\end{itemize}
+This leaves \TeX\ to compute the width according to the document
+fonts. If \bibgls\ can't correctly determine the widest entry then
+you will need to use one of the commands provided by
+\sty{glossary-tree} or \sty{glossaries-extra-stylemods} to set it.
-\subsection{\csoptnv{secondary}\csopteqval{list}}
-\labelopt{secondary}
+In general, if you have more than one glossary it's best to
+set the \field{type} using options like \csopt{type} and
+\csopt{dual-type} if you use \csopt{set-widest}.
-It may be that you want to display a glossary multiple times
-but with a different order. For example, the first time
-alphabetically and the second time by category.
+\optsection{entry-type-aliases}
-You can do this with the \csopt{secondary} option. The value
-(which must be supplied) is a comma-separated list where each
-item in the list is in the format
-\begin{definition}
-\meta{sort}:\meta{field}:\meta{type}
-\end{definition}
-or
-\begin{definition}
-\meta{sort}:\meta{type}
-\end{definition}
-If the
-\meta{field} is omitted, the value of \optref{sort-field} is used.
-The value of \meta{sort} is as for \optref{sort}, but note that in this case the sort value \optfmt{unsrt} or
-\optfmt{none} means to use the same ordering as the primary
-entries. So with \optref[de-CH-1996]{sort},
-\optref[none:copies]{secondary} the \texttt{copies}
-list will be ordered according to \texttt{de-CH-1996} and not
-according to the order in which they were read when the \ext{bib}
-file or files were parsed.
-If \meta{sort} is \optfmt{custom}, then the rule should be
-provided with \optref{secondary-sort-rule}.
-
-This will copy all the selected entries into the glossary labelled
-\meta{type} sorted according to \meta{sort} using \meta{field} as
-the sort value.
-
-(If the glossary \meta{type} doesn't exist, it will be
-defined with \cs{provideignoredglossary*}\margm{type}.)
-Note that if the glossary already exists and contains entries,
-the existing entries aren't re-ordered. The new entries are
-simply appended to the list.
-
-For example, suppose the \ext{bib} file contains entries like:
+In the \ext{bib} file, the data is identified by
+\code{@\meta{entry-type}}, such as \code{@abbreviation}.
+It may be that you want to replace all instances of
+\code{@\meta{entry-type}} with a different
+type of entry. For example, suppose my \ext{bib} file
+contains abbreviations defined in the form:
\begin{verbatim}
-@entry{quartz,
- name={quartz},
- description={hard mineral consisting of silica},
- category={mineral}
-}
-
-@entry{cabbage,
- name={cabbage},
- description={vegetable with thick green or purple leaves},
- category={vegetable}
-}
-
-@entry{waterfowl,
- name={waterfowl},
- description={any bird that lives in or about water},
- category={animal}
+@abbreviation{html,
+ short ={html},
+ long = {hypertext markup language},
+ description={a markup language for creating web pages}
}
\end{verbatim}
-and the document preamble contains:
+but suppose in one of my documents I actually want all these
+abbreviations defined with \atentry{dualabbreviationentry}
+instead of \atentry{abbreviation}. Instead of editing
+the \ext{bib} file I can just supply a mapping:
\begin{verbatim}
-\GlsXtrLoadResources[src={entries},sort={en-GB},
- secondary={en-GB:category:topic}
+\GlsXtrLoadResources[
+ src=entries,% data in entries.bib
+ entry-type-aliases={abbreviation=dualabbreviationentry}
]
\end{verbatim}
-This sorts the primary entries according to the default
-\optref{sort-field} and then sorts the entries according
-to the \field{category} field and copies this list to
-the \texttt{topic} glossary (which will be provided if not defined.)
-
-The secondary list can be displayed with the hypertargets switched
-off to prevent duplicates. The cross-references will link to the
-original glossary.
-
-For example:
+This makes all instances of \code{@abbreviation}
+behave as \code{@dualabbreviationentry}. You can have more than
+one mapping. For example:
\begin{verbatim}
-\printunsrtglossary[title={Summary (alphabetical)}]
-\printunsrtglossary[title={Summary (by topic)},target=false]
+\GlsXtrLoadResources[
+ src=entries,% data in entries.bib
+ entry-type-aliases={
+ % @abbreviation -> @dualabbreviationentry:
+ abbreviation=dualabbreviationentry,
+ % @entry -> @index:
+ entry=index
+ }
+]
\end{verbatim}
+This option isn't cumulative. Multiple instances of
+\csopt{entry-type-aliases} override previous instances.
+If \meta{\keyvallist} is empty there will be no mappings.
-The alternative (or if more than two lists are required) is to
-reload the same \ext{bib} file with different label prefixes.
-For example, if the entries are stored in \filefmt{entries.bib}:
+Here's another example entry in a \ext{bib} file:
+\begin{verbatim}
+@foo{html,
+ name={HTML},
+ short={HTML},
+ long={hypertext markup language},
+ description={hypertext markup language}
+}
+\end{verbatim}
+Ordinarily this entry would be ignored since \code{@foo}
+isn't recognised, but it can be mapped like this:
\begin{verbatim}
-\newglossary*{nosort}{Symbols (Unsorted)}
-\newglossary*{byname}{Symbols (Letter Order)}
-\newglossary*{bydesc}{Symbols (Ordered by Description)}
-\newglossary*{byid}{Symbols (Ordered by Label)}
-
\GlsXtrLoadResources[
- src={entries},% entries.bib
- sort={unsrt},
- type={nosort}
+ src=entries,% data in entries.bib
+ ignore-fields={short,long},
+ entry-type-aliases={foo=entry}
]
-
+\end{verbatim}
+This treats the entry as though it had been defined as:
+\begin{verbatim}
+@entry{html,
+ name={HTML},
+ description={hypertext markup language}
+}
+\end{verbatim}
+whereas
+\begin{verbatim}
\GlsXtrLoadResources[
- src={entries},% entries.bib
- sort={letter-case},
- type={byname},
- label-prefix={byname.}
+ src=entries,% data in entries.bib
+ ignore-fields={name,description},
+ entry-type-aliases={foo=abbreviation}
]
+\end{verbatim}
+treats the entry as though it had been defined as:
+\begin{verbatim}
+@abbreviation{html,
+ short={HTML},
+ long={hypertext markup language}
+}
+\end{verbatim}
-\GlsXtrLoadResources[
- src={entries},% entries.bib
- sort={locale},
- sort-field={description},
- type={bydesc},
- label-prefix={bydesc.}
-]
+\optsection{action}
+
+This governs how the entries are written in the \iext{glstex} file.
+The \meta{value} may be one of:
+\begin{itemize}
+\item\code{define}: define the entries;
+\item\code{copy}: copy the entries;
+\item\code{define or copy}: copy existing entries and define
+non-existing entries.
+\end{itemize}
+The default setting is \csopt[define]{action}, which writes the entry
+definition to the \ext{glstex} file using one of the commands
+described in \sectionref{sec:newentrydefs}. Since the \styopt{record}
+package option automatically switches on the \styopt[warn]{undefaction}
+option, any attempt at defining an entry that's already been defined
+will generate a warning rather than an error. The duplicate
+definition will be ignored. (The warnings can be found in the
+\ext{log} file since they are warnings produce by
+\sty{glossaries-extra} not by \bibgls.)
+
+For example, if you try:
+\begin{verbatim}
+\newglossary*{copies}{Copies}
+\GlsXtrLoadResources[src={entries}]
+\GlsXtrLoadResources[sort=use,type=copies,src={entries}]
+\end{verbatim}
+you'll find that the \code{copies} glossary is empty and there will
+be warnings in the \ext{log} file when the second resource file is
+loaded.
+
+There are various ways of having the same entries in multiple
+glossaries. The simplest method is to use \csopt{secondary}, but
+another method is to use \csopt[copy]{action} which simply writes
+\nosecformatdef{glsxtrcopytoglossary}
+instead of using one of the commands listed in
+\sectionref{sec:newentrydefs}. This copies the entries rather than
+defining them, which means the entries must already have been
+defined. The \meta{type} is determined as follows:
+\begin{itemize}
+\item if the entry has the \field{type} field set, that's used;
+\item if the entry is a tertiary and \csopt{tertiary-type} is set, that's
+used;
+\item if the entry is a dual and \csopt{dual-type} is set, that's
+used;
+\item otherwise the value of the \csopt{type} option is used.
+\end{itemize}
+If you're not sure whether the entries may already be defined, you
+can use \csopt[define or copy]{action} which will use
+\ics{ifglsentryexists} in the resource file to determine whether to
+define or copy the entry.
+
+Options that set or modify fields, such as \csopt{category},
+\csopt{group}, \csopt{save-locations}, \csopt{flatten} or
+\csopt{name-case-change}, will be ignored if entries are copied.
+However the \csopt{copy-action-group-field} may be used to copy
+the \field{group} field (which may have been locally set by the
+\csopt{sort} method) to another field. This ensures that the
+original \field{group} value from the entry definition in an earlier
+resource set won't be overwritten (unless you set
+\csopt[group]{copy-action-group-field}).
+
+Remember that \gls{glsxtrcopytoglossary} simply copies the entry's
+label to the glossary's internal list. The only checks that \bibgls\
+performs if \csopt{action} is not \code{define} is to ensure that
+the \csopt{master} or \csopt{secondary} options have not been used,
+since they're incompatible, and that the \csopt{type} option is set,
+since it's required as a fallback for any entries that don't have
+the \field{type} field set. (There are too many options that alter
+field values to check them all and some may be used to alter the
+sorting.) The purpose of the copy action is simply to provide a
+duplicate list in a different order.
+
+Remember that if you are using \sty{hyperref}, you need to use
+\code{target=false} in the optional argument of
+\ics{printunsrtglossary} for the glossary containing the copies to
+prevent duplicate hypertargets. Commands like \cs{gls} will link to
+the original entries. For example, in the preamble:
+\begin{verbatim}
+\newignoredglossary{copies}
+
+\GlsXtrLoadResources[src={entries}]
\GlsXtrLoadResources[
- src={entries},% entries.bib
- sort={letter},
- sort-field={id},
- type={byid},
- label-prefix={byid.}
-]
+ sort=use,
+ action={copy},
+ type=copies,
+ src={entries}]
+\end{verbatim}
+and later in the document:
+\begin{verbatim}
+\printunsrtglossary[title={Glossary (Alphabetical)},style=indexgroup]
+\printunsrtglossary[type=copies,title={Glossary (Order of Use)},
+ style=index,nogroupskip,
+ target=false]
+\end{verbatim}
+Note also the need to use \code{nogroupskip} and a non-group style
+for the duplicates since the \field{group} field will have been
+assigned in the first resource set if \bibgls\ was invoked with
+\longarg{group}. The grouping is appropriate for alphabetical
+ordering but not for order of use.
+
+If you want different grouping for the duplicates, you can specify
+the field name to use in which to store the group information using
+\csopt{copy-action-group-field}. Unlike \csopt{secondary}, you
+will need to redefine \ics{glsxtrgroupfield} to the relevant field
+before you display the glossary. The simplest way to do this is with
+the starred form of \cs{printunsrtglossary}.
+For example, if \csopt[dupgroup]{copy-action-group-field} is added to
+the options for the second resource set:
+\begin{alltt}
+\ics{printunsrtglossary*}\oarg{type=copies,title={Duplicates},style=indexgroup}
+ \marg{\cs{renewcommand}\marg{\cs{glsxtrgroupfield}}\marg{dupgroup}}
+\end{alltt}
+This just does:
+\begin{verbatim}
+\begingroup
+ \renewcommand{\glsxtrgroupfield}{dupgroup}%
+ \printunsrtglossary[type=copies,title={Duplicates},style=indexgroup]
+\endgroup
\end{verbatim}
-\subsection{\csoptnv{secondary-sort-rule}\csopteqval{value}}
-\labelopt{secondary-sort-rule}
-
-As \optref{sort-rule} but for secondary custom sorting.
\section{Selection Options}
\label{sec:selectionopts}
-\subsection{\csoptnv{src}\csopteqval{list}}
-\labelopt{src}
+\optsection{src}
-This identifies the \ext{bib} files containing the entry
+This identifies the \iext{bib} files containing the entry
definitions. The value should be a comma-separated list of the
required \ext{bib} files. These may either be in the current working
-directory or in the directory given by the \argref{dir} switch or on
-\TeX's path (in which case \app{kpsewhich} will be used to find
+directory or in the directory given by the \longarg{dir} switch or on
+\TeX's path (in which case \idx{kpsewhich} will be used to find
them). The \ext{bib} extension may be omitted. Remember that if
\meta{list} contains multiple files it must be grouped to protect
the comma from the \meta{options} list.
@@ -3021,8 +4696,8 @@ For example
\end{verbatim}
indicates that \bibgls\ must read the files
\filefmt{entries-terms.bib} and \filefmt{entries-symbols.bib} and
-create the file given by \cs{jobname}\ext{glstex} on the first
-instance or \cs{jobname}\texttt{-}\meta{n}\ext{glstex} on subsequent
+create the file given by \ics{jobname}\iext{glstex} on the first
+instance or \ics{jobname}\code{-}\meta{n}\ext{glstex} on subsequent
use.
With \csref{glsxtrresourcefile}\oargm{options}\margm{filename}, if
@@ -3037,32 +4712,31 @@ indicates that \bibgls\ needs to read the file
different or if you have multiple \ext{bib} files, you need to use
the \csopt{src} option.
-\cs{GlsXtrLoadResources} uses \cs{jobname} as the argument of
-\cs{glsxtrresourcefile} on the first instance, so
+\gls{GlsXtrLoadResources} uses \ics{jobname} as the argument of
+\gls{glsxtrresourcefile} on the first instance, so
\begin{verbatim}
\GlsXtrLoadResources[]
\end{verbatim}
-will assume \optfmt{src=\cs{jobname}}. Remember that subsequent uses
-of \cs{GlsXtrLoadResources} append a suffix, so in general it's
+will assume \optfmt{src=\ics{jobname}}. Remember that subsequent uses
+of \gls{GlsXtrLoadResources} append a suffix, so in general it's
best to always supply \csopt{src}.
-\subsection{\csoptnv{selection}\csopteqval{value}}
-\labelopt{selection}
+\optsection{selection}
-By default all entries that have records in the \ext{aux} file will
+By default all entries that have records in the \iext{aux} file will
be selected as well as all their dependent entries. The dependent
entries that don't have corresponding records on the first \LaTeX\
run, may need an additional build to ensure their location lists
are updated.
-Remember that on the first \LaTeX\ run the \ext{glstex} files don't
+Remember that on the first \LaTeX\ run the \iext{glstex} files don't
exist. This means that the entries can't be defined. The
\styopt{record} package option additionally switches on the
\styopt[warn]{undefaction} option, which means that you'll only get
warnings rather than errors when you reference entries in the
-document. This means that you can't use \cs{glsaddall} with
+document. This means that you can't use \ics{glsaddall} with
\bibgls\ because the glossary lists are empty on the first run, so
-there's nothing for \cs{glsaddall} to iterate over.
+there's nothing for \ics{glsaddall} to iterate over.
Instead, if you want to add all defined entries, you need to
instruct \bibgls\ to do this with the \csopt{selection} option. The
following values are allowed:
@@ -3074,9 +4748,9 @@ add unrecorded entries whose \field{see} or \field{seealso} field refers to a re
\item \optfmt{recorded no deps}: add all recorded entries but not
their dependencies. The dependencies include those referenced in the
\field{see} or \field{seealso} field, \field{parent} entries and those found referenced
-with commands like \cs{gls} in the field values that are parsed by
+with commands like \ics{gls} in the field values that are parsed by
\bibgls. With this setting, parents will be omitted unless they've
-been referenced in the document through commands like \cs{gls}.
+been referenced in the document through commands like \ics{gls}.
\item \optfmt{recorded and ancestors}: this is like the previous
setting but parents are added even if they haven't been referenced
in the document. The other dependent entries are omitted if they
@@ -3124,30 +4798,35 @@ is best avoided. A better method would be:
The \csopt[recorded and deps and see]{selection} in this case will
select all three entries, and the document won't send the reader on a
long-winded detour.
-\subsection{\csoptnv{match}\csopteqval{\keyvallist}}
-\labelopt{match}
+
+\optsection{match}
It's possible to filter the selection by matching field values.
If \meta{\keyvallist} is empty no filtering will be applied, otherwise
\meta{\keyvallist} should be a \meta{key}=\meta{regexp} list, where
\meta{key} is the name of a field or \optfmt{id} for the entry's
-label or \optfmt{entrytype} for the entry's \ext{bib} type (as in
-the part after \verb|@| in the \ext{bib} file not the \field{type}
-field identifying the glossary label).
+label or \optfmt{entrytype} for the entry type (as in
+the part after \verb|@| identifying the entry not the \field{type}
+field identifying the glossary label). If you've used
+\csopt{entry-type-aliases}, this refers to the target entry type not
+the original entry type specified in the \ext{bib} file.
The \meta{regex} part should be a regular expression conforming
to
\href{http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html}{Java's
-Pattern class}. The pattern is anchored (\texttt{oo.*} matches
-\texttt{oops} but not \texttt{loops}) and \meta{regexp} can't be
+Pattern class}~\cite{pattern}. The pattern is anchored
+(\code{oo\idx{matchanydot}\idx{zeroormore}} matches
+\code{oops} but not \code{loops}) and \meta{regexp} can't be
empty. Remember that \TeX\ will expand the option list as
it writes the information to the \ext{aux} file so take
care with special characters. For example, to match a literal
-period use \verb|\string\.| not \verb|\.| (backslash dot).
+period use \cs{cs.string}\ics{cs.period} not \ics{cs.period} (backslash dot).
If the field is missing its value it is assumed to be empty for
the purposes of the pattern match even if it will be assigned a
-non-empty default value when the entry is defined.
+non-empty default value when the entry is defined. If the field is
+unrecognised by \bibgls\ any reference to it in \meta{\keyvallist} will
+be ignored.
If a field is listed multiple times, the pattern for that
field is concatenated using
@@ -3157,14 +4836,14 @@ field is concatenated using
where \meta{pattern-1} is the current pattern for that field
and \meta{pattern-2} is the new pattern. This means it performs a
logical OR\@. For the non-duplicate
-fields the logical operator is given by \optref{match-op}.
+fields the logical operator is given by \csopt{match-op}.
For example:
\begin{verbatim}
match-op={and},
match={
- {category=animals},
- {topic=biology},
- {category=vegetables}
+ category=animals,
+ topic=biology,
+ category=vegetables
}
\end{verbatim}
This will keep all the selected entries that satisfy:
@@ -3176,7 +4855,7 @@ This will keep all the selected entries that satisfy:
\item[AND]
-\item \field{topic} is \texttt{biology}.
+\item \fieldfmt{topic} (custom key provided by user) is \code{biology}.
\end{itemize}
and will discard any entries that don't satisfy this condition.
A message will be written to the log file for each entry
@@ -3185,43 +4864,95 @@ that's discarded.
Patterns for unknown fields will be ignored. If the entire
list consists of patterns for unknown fields it will be
treated as \csopt[\empty]{match}. That is, no filtering will be
-applied.
+applied. In the above example, the custom \fieldfmt{topic} key must
+be provided before the first \gls{GlsXtrLoadResources} with
+\ics{glsaddkey} or \ics{glsaddstoragekey}.
-\subsection{\csoptnv{match-op}\csopteqval{value}}
-\labelopt{match-op}
+\optsection{match-op}
-If the value of \optref{match} contains more than one
+If the value of \csopt{match} contains more than one
\meta{key}=\meta{pattern} element, the \csopt{match-op}
determines whether to apply a logical AND or a logical OR.
The \meta{value} may be either \optfmt{and} or \optfmt{or}.
The default is \csopt[and]{match-op}.
-\subsection{\csoptnv{flatten}\csopteqval{boolean}}
-\labelopt{flatten}
+\optsection{not-match}
-This is a boolean option. The default value is
-\csopt[false]{flatten}.
+If \csopt[\meta{\keyvallist}]{match} would cause an entry to be
+selected then \csopt[\meta{\keyvallist}]{not-match} would cause
+that entry to be ignored. If \meta{\keyvallist} is missing, the
+filtering is removed. If you have both \csopt{match} and
+\csopt{not-match} in the same resource set, the last one listed
+takes precedence.
+
+\optsection{match-action}
+
+The default behaviour with \csopt{match} or \csopt{not-match}
+is to filter the selection. This may be changed to append to the
+selection instead. The \meta{value} may be one of:
+\begin{itemize}
+\item\optfmt{filter}: (default) filter selection;
+\item\optfmt{add}: append any matches (with \csopt{match}) or
+non-matches (with \csopt{not-match}) to the selection.
+This setting can't be used with \csopt[use]{sort}.
+\end{itemize}
+For example, if I want to select all record entries and their
+dependencies, but I also want to make sure that any entries with
+the category set to \code{important} are always selected regardless
+of whether or not they have any records:
+\begin{verbatim}
+\GlsXtrLoadResource[
+ src=entries,% data in entries.bib
+ match-action={add},
+ match={category=important}
+]
+\end{verbatim}
+
+\optsection{limit}
+
+If \meta{number} is greater than 0 then this will truncate the
+list of selected entries after sorting to \meta{number} (if the list
+size is greater than that value). The transcript will show the
+message:
+\begin{alltt}
+Truncating according to limit=\meta{number}
+\end{alltt}
+When used with \csopt{shuffle}, this provides a means of randomly
+selecting at most \meta{number} entries. The default setting is
+\csopt[0]{limit} (no truncation). A negative value of \meta{number} is not
+permitted.
+
+If you have any dual entries, then the truncation will be applied to
+the combined list of primary and duals if \csopt[combine]{dual-sort}
+otherwise each list will be truncated separately by \meta{number},
+which results in a maximum of $2 \times \meta{number}$. Remember
+that tertiary entries are created when dual entries are defined in
+the \ext{glstex} file, so this will increase the total number of
+entries.
+
+\optsection{flatten}
+
+This is a boolean option. The default value is \csopt[false]{flatten}.
If \csopt[true]{flatten}, the sorting will ignore hierarchy and
the \field{parent} field will be omitted when writing
the definitions to the \ext{glstex} file, but the parent entries
will still be considered a dependent ancestor from the
-\optref{selection} point of view.
+\csopt{selection} point of view.
Note the difference between this option and using
\csopt[parent]{ignore-fields} which will remove the dependency
(unless a dependency is established through another field).
-\subsection{\csoptnv{flatten-lonely}\csopteqval{value}}
-\labelopt{flatten-lonely}
+\optsection{flatten-lonely}
This may take one of three values: \optfmt{false} (default),
\optfmt{presort} and \optfmt{postsort}. The value must be supplied.
-Unlike the \optref{flatten} option, which completely
+Unlike the \csopt{flatten} option, which completely
removes the hierarchy, the \csopt{flatten-lonely} option can be used
to selectively alter the hierarchy. In this case only those entries
that have a parent but have no siblings are checked. This option
-is affected by the \optref{flatten-lonely-rule} setting. The conditions for
+is affected by the \csopt{flatten-lonely-rule} setting. The conditions for
moving a child up one hierarchical level are as follows:
\begin{itemize}
\item The child must have a parent, and
@@ -3258,7 +4989,7 @@ For example, suppose the file \filefmt{entries.bib} contains:
@index{minerals}
@index{quartz,parent={minerals}}
@index{corundum,parent={minerals}}
-@index{amber,parent={minerals}}
+@index{amethyst,parent={minerals}}
@index{gypsum,parent={minerals}}
@index{aardvark}
@@ -3279,7 +5010,7 @@ and suppose the document contains:
\begin{document}
\gls{duck}.
-\gls{quartz}, \gls{corundum}, \gls{amber}.
+\gls{quartz}, \gls{corundum}, \gls{amethyst}.
\gls{aardvark}, \gls{bard}, \gls{buzz}.
\gls{vegetable}, \gls{cabbage}.
\gls{subsubitem}.
@@ -3287,9 +5018,9 @@ and suppose the document contains:
\printunsrtglossaries
\end{document}
\end{verbatim}
-Although the \texttt{duck} entry has siblings in the
+Although the \code{duck} entry has siblings in the
\filefmt{entries.bib} file, none of them have been recorded
-(indexed) in the document, nor has the parent \texttt{birds} entry.
+(indexed) in the document, nor has the parent \code{birds} entry.
This document hasn't used \csopt{flatten-lonely}, so the default
\csopt[false]{flatten-lonely} is assumed. This results in the
@@ -3315,7 +5046,7 @@ hierarchical structure:
\item[M] \null
\item[minerals] \mbox{}
\begin{description}\setlength\itemsep{0pt}%
- \item[amber] 1
+ \item[amethyst] 1
\item[corundum] 1
\item[quartz] 1
\end{description}
@@ -3326,10 +5057,10 @@ hierarchical structure:
\end{description}
\end{description}
(The \qt{1} in the above indicates the page number.)
-There are some entries here that look a little odd: \texttt{duck},
-\texttt{cabbage} and \texttt{subsubitem}. In each case they are a
+There are some entries here that look a little odd: \code{duck},
+\code{cabbage} and \code{subsubitem}. In each case they are a
lone child entry. It would look better if they could be compressed,
-but I don't want to use the \optref{flatten} option, as I still want
+but I don't want to use the \csopt{flatten} option, as I still want
to keep the mineral hierarchy.
If I now add \csopt[postsort]{flatten-lonely}:
@@ -3349,7 +5080,7 @@ the hierarchy becomes:
\item[M] \null
\item[minerals] \mbox{}
\begin{description}\setlength\itemsep{0pt}%
- \item[amber] 1
+ \item[amethyst] 1
\item[corundum] 1
\item[quartz] 1
\end{description}
@@ -3359,7 +5090,7 @@ the hierarchy becomes:
\item[cabbage] 1
\end{description}
\end{description}
-The \field{name} field of the \texttt{duck} entry has been
+The \field{name} field of the \code{duck} entry has been
set to
\begin{verbatim}
name={\bibglsflattenedchildpostsort{birds}{duck}}
@@ -3369,36 +5100,36 @@ the \field{text} field has been set to
text={duck}
\end{verbatim}
the \field{group} field is copied over from the parent entry (\qt{B}),
-and the \field{parent} field has been adjusted, moving \texttt{duck}
+and the \field{parent} field has been adjusted, moving \code{duck}
up one hierarchical level.
-Finally, the former parent \texttt{birds} entry has been removed (the default
-\optref[only unrecorded parents]{flatten-lonely-rule} is in effect).
+Finally, the former parent \code{birds} entry has been removed (the default
+\csopt[only unrecorded parents]{flatten-lonely-rule} is in effect).
The default definition of \csref{bibglsflattenedchildpostsort}
formats its arguments so that they are separated by a comma and
space (\qt{birds, duck}). If the \field{text} field had been set
-in the original \atentryref{index} definition of \text{duck}, it
+in the original \atentry{index} definition of \text{duck}, it
wouldn't have been altered. This adjustment ensures that in the
document \verb|\gls{duck}| still produces \qt{duck} rather than
\qt{birds, duck}.
(If the child and parent \field{name} fields are identical,
the terms are considered homographs. See below for further details.)
-The \texttt{subsubitem} entry has also been adjusted. This was done
+The \code{subsubitem} entry has also been adjusted. This was done
in a multi-stage process, starting with sub-items and then moving down
the hierarchical levels:
\begin{itemize}
-\item The \texttt{subitem} entry was adjusted, moving it from a
+\item The \code{subitem} entry was adjusted, moving it from a
sub-entry to a top-level entry. The \field{name} field was then
modified to
\begin{verbatim}
name={\bibglsflattenedchildpostsort{item}{subitem}}
\end{verbatim}
-This now means that the \texttt{subsubitem} entry is now a sub-entry
-(rather than a sub-sub-entry). The \texttt{subitem} entry now has no
-parent, but at this stage the \texttt{subsubitem} entry still has
-\texttt{subitem} as its parent.
-\item The \texttt{subsubitem} entry is then adjusted moving from a
+This now means that the \code{subsubitem} entry is now a sub-entry
+(rather than a sub-sub-entry). The \code{subitem} entry now has no
+parent, but at this stage the \code{subsubitem} entry still has
+\code{subitem} as its parent.
+\item The \code{subsubitem} entry is then adjusted moving from a
sub-entry to a top-level entry. The \field{name} field was then
modified to
\begin{verbatim}
@@ -3418,16 +5149,16 @@ obtained from the \field{name} field of the entry's former parent
value was changed in the previous step, and the change is
reflected here.
-This means that the name for \texttt{subitem} will be displayed as
-\qt{item, subitem} and the name for \texttt{subsubitem} will be
+This means that the name for \code{subitem} will be displayed as
+\qt{item, subitem} and the name for \code{subsubitem} will be
displayed as \qt{item, subitem, subsubitem}.
-\item The parent entries \texttt{item} and \texttt{subitem}
+\item The parent entries \code{item} and \code{subitem}
are removed from the selection as they have no location lists.
\end{itemize}
-Note that the \texttt{cabbage} sub-entry hasn't been adjusted. It
-doesn't have any siblings but its parent entry (\texttt{vegetable})
+Note that the \code{cabbage} sub-entry hasn't been adjusted. It
+doesn't have any siblings but its parent entry (\code{vegetable})
has a location list so it can't be discarded.
If I change the rule:
\begin{verbatim}
@@ -3435,8 +5166,8 @@ If I change the rule:
flatten-lonely-rule=discard unrecorded,
flatten-lonely=postsort]
\end{verbatim}
-then this will move the \texttt{cabbage} entry up a level but the
-original parent entry \texttt{vegetable} will remain:
+then this will move the \code{cabbage} entry up a level but the
+original parent entry \code{vegetable} will remain:
\begin{description}\setlength\itemsep{0pt}%
\item[A] \null
\item[aardvark] 1
@@ -3449,7 +5180,7 @@ original parent entry \texttt{vegetable} will remain:
\item[M] \null
\item[minerals] \mbox{}
\begin{description}\setlength\itemsep{0pt}%
- \item[amber] 1
+ \item[amethyst] 1
\item[corundum] 1
\item[quartz] 1
\end{description}
@@ -3461,7 +5192,7 @@ original parent entry \texttt{vegetable} will remain:
Remember that \csopt[postsort]{flatten-lonely} performs the
adjustment after sorting. This means that the entries are still in
the same relative location that they were in with the original
-\csopt[false]{flatten-lonely} setting. For example, \texttt{duck}
+\csopt[false]{flatten-lonely} setting. For example, \code{duck}
remains in the B letter group before \qt{buzz}.
With \csopt[presort]{flatten-lonely} the adjustments are made before
@@ -3485,7 +5216,7 @@ the hierarchical order is now:
\item[M] \null
\item[minerals] \mbox{}
\begin{description}\setlength\itemsep{0pt}%
- \item[amber] 1
+ \item[amethyst] 1
\item[corundum] 1
\item[quartz] 1
\end{description}
@@ -3495,18 +5226,18 @@ the hierarchical order is now:
\item[vegetable] 1
\end{description}
This method uses a different format for the modified \field{name}
-field. For example, the \texttt{duck} entry now has:
+field. For example, the \code{duck} entry now has:
\begin{verbatim}
name={\bibglsflattenedchildpresort{duck}{birds}}
\end{verbatim}
-The default definition of \csref{bibglsflattenedchildpresort} simply
+The default definition of \gls{bibglsflattenedchildpresort} simply
does the first argument and ignores the second. The sorting is then
performed, but the interpreter recognises this command and can
-deduce that the sort value for this entry should be \texttt{duck},
+deduce that the sort value for this entry should be \code{duck},
so \qt{duck} now ends up in the D letter group.
-If you provide a definition of \cs{bibglsflattenedchildpresort} in
-the \atentryref{preamble}, it will be picked up by the interpreter.
+If you provide a definition of \gls{bibglsflattenedchildpresort} in
+the \atentry{preamble}, it will be picked up by the interpreter.
For example:
\begin{verbatim}
@preamble{"\providecommand{\bibglsflattenedchildpresort}[2]{#1 (#2)}"}
@@ -3520,7 +5251,7 @@ if the parent entry doesn't have a location list and the rule isn't
set to \optfmt{no discard} then the parent entry will be discarded
after all relevant entries and their dependencies have been
selected, so any cross-references within the parent entry (such as
-\cs{gls} occurring in the description) may end up being selected
+\ics{gls} occurring in the description) may end up being selected
even if they wouldn't be selected if the parent entry didn't exist.
With both \optfmt{presort} and \optfmt{postsort},
@@ -3534,8 +5265,7 @@ instead of the corresponding \csfmt{bibglsflattenedchild...sort}.
This defaults to just \meta{name}.
-\subsection{\csoptnv{flatten-lonely-rule}\csopteqval{value}}
-\labelopt{flatten-lonely-rule}
+\optsection{flatten-lonely-rule}
This option governs the rule used by \csopt{flatten-lonely} to
determine which sub-entries (that have no siblings) to adjust and
@@ -3551,14 +5281,14 @@ parent has a location list.
Only the parent entries that don't have a location list will be
removed from the selection.
\item[\optfmt{no discard}] This setting will adjust all
-sub-entries that have no siblings regardless of whether or not the
+sub-entries that don't have siblings regardless of whether or not the
parent has a location list. No entries will be discarded, so parent
entries that don't have a location list will still appear in the
glossary.
\end{description}
In the above, the location list includes records and
cross-references obtained from the \field{see} or \field{seealso}
-fields. See \optref{flatten-lonely} for further details.
+fields. See \csopt{flatten-lonely} for further details.
\section{Master Documents}
\label{sec:master}
@@ -3566,7 +5296,7 @@ fields. See \optref{flatten-lonely} for further details.
Suppose you have two documents \filefmt{mybook.tex} and
\filefmt{myarticle.tex} that share a common glossary that's shown
in \filefmt{mybook.pdf} but not in \filefmt{myarticle.pdf}.
-Furthermore, you'd like to use \sty{hyperref} and be able to click
+Furthermore, you'd like to use \isty{hyperref} and be able to click
on a term in \filefmt{myarticle.pdf} and be taken to the relevant
page in \filefmt{mybook.pdf} where the term is listed in the
glossary.
@@ -3663,33 +5393,34 @@ Most of the options related to sorting and the glossary format are
unneeded here since the glossary isn't being displayed. This may be
sufficient for your needs, but it may be that the book has changed
various settings that have been written to \filefmt{mybook.glstex}
-but aren't present in the \ext{bib} file (such as
-\optref[uc]{short-case-change}). In this case, you could just remember to copy
+but aren't present in the \iext{bib} file (such as
+\csopt[uc]{short-case-change}). In this case, you could just remember to copy
over the settings from \filefmt{mybook.tex} to
\filefmt{myarticle.tex}, but
another possibility is to simply make \filefmt{myarticle.tex} input
-\filefmt{mybook.glstex} instead of using \cs{GlsXtrLoadResources}. This
+\filefmt{mybook.glstex} instead of using \gls{GlsXtrLoadResources}. This
can work but it's not so convenient to set the label prefix, the
type and the category. The \optfmt{master} option allows this, but
it has limitations (see below), so in complex cases (in particular
different label prefixes combined with hierarchical entries or cross-references) you'll have to use
the method shown in the example code above.
-\subsection{\csoptnv{master}\csopteqval{name}}
-\labelopt{master}
+\optsection{master}
This option will disable most of the options that relate to
-parsing and processing data contained in \ext{bib} files
+parsing and processing data contained in \iext{bib} files
(since this option doesn't actually read any \ext{bib} files).
+It also can't be used with \csopt[copy]{action} or \csopt[define
+or copy]{action}.
The use of \optfmt{master} isn't always suitable. In particular
if any of the terms cross-reference each other, such as through
the \field{see} or \field{seealso} field or the \field{parent} field or
-using commands like \cs{gls} in any of the other fields when
+using commands like \ics{gls} in any of the other fields when
the labels have been assigned prefixes. In this
case you will need to use the method described in the example above.
-The \meta{name} is the name of the \ext{aux} file for the master
+The \meta{name} is the name of the \iext{aux} file for the master
document without the extension (in this case, \filefmt{mybook}). It
needs to be relative to the document referencing it or an absolute
path using forward slashes as the directory divider. Remember that
@@ -3699,17 +5430,17 @@ relative position.
When \bibgls\ detects the \csopt{master} option, it won't search for
entries in any \ext{bib} files (for that particular resource set)
-but will create a \ext{glstex} file that inputs the master
+but will create a \iext{glstex} file that inputs the master
document's
\ext{glstex} files, but it will additionally temporarily
adjust the internal commands used to define entries so that
-the prefix given by \optref{label-prefix}, the glossary type and the
-category type are all automatically inserted. If the \optref{type}
-or \optref{category} options haven't been used, the corresponding
+the prefix given by \csopt{label-prefix}, the glossary type and the
+category type are all automatically inserted. If the \csopt{type}
+or \csopt{category} options haven't been used, the corresponding
value will default to \optfmt{master}. The \catattr{targeturl}
and \catattr{targetname} category attributes will automatically be
set, and the glossary type will be provided using
-\cs{provideignoredglossary*}\margm{type}.
+\ics{provideignoredglossary*}\margm{type}.
The above \filefmt{myarticle.tex} can be changed to:
\begin{verbatim}
@@ -3733,7 +5464,7 @@ the resource files, and any settings in the master document
that relate to the master document's entries.
For example, if the master document loaded a resource file
-with \optref[term.]{label-prefix} then you also need this
+with \csopt[term.]{label-prefix} then you also need this
prefix when you reference the entries in the dependent document
in addition to the \optfmt{label-prefix} for the dependent document.
Suppose \filefmt{mybook.tex} loads the resources using
@@ -3764,24 +5495,23 @@ then \filefmt{myarticle.tex} will need:
\setabbreviationstyle[master]{long-short-sc}
\end{verbatim}
(change \optfmt{master} to \meta{value} if you have used
-\optref[\meta{value}]{category}). You can, of course, choose
+\csopt[\meta{value}]{category}). You can, of course, choose
a different abbreviation style for the dependent document,
but the category in the optional argument needs to be correct.
-\subsection{\csoptnv{master-resources}\csopteqval{list}}
-\labelopt{master-resources}
+\optsection{master-resources}
If the master document has multiple resource files
-then by default all that document's
-\ext{glstex} files will be input. If you don't want them all
+then by default all the master document's
+\iext{glstex} files will be input. If you don't want them all
you can use \optfmt{master-resources} to specify
only those files that should be included. The value \meta{list} is
a comma-separated list of names, where each name corresponds
to the final argument of \csref{glsxtrresourcefile}.
-Remember that \cs{GlsXtrLoadResources} is just a shortcut
-for \cs{glsxtrresourcefile} that bases the name on \cs{jobname}.
-(Note that, as with the argument of \cs{glsxtrresourcefile},
-the \ext{glstex} extension should not be included.) The file
+Remember that \gls{GlsXtrLoadResources} is just a shortcut
+for \gls{glsxtrresourcefile} that bases the name on \ics{jobname}.
+(Note that, as with the argument of \gls{glsxtrresourcefile},
+the \ext{glstex} extension should not be included in \meta{list}.) The file
\primaryresourcefmt\ is considered the primary
resource file and the files \suppresourcefmt{\meta{n}}
(starting with \meta{n} equal to 1) are considered the supplementary resource files.
@@ -3799,8 +5529,56 @@ supplementary resource files (omitting the primary
\section{Field and Label Options}
\label{sec:labelopts}
-\subsection{\csoptnv{ignore-fields}\csopteqval{list}}
-\labelopt{ignore-fields}
+\optsection{interpret-label-fields}
+
+This is a boolean option that determines whether or not the fields
+that may only contain labels should have their values interpreted
+(\field{parent}, \field{category}, \field{type}, \field{group},
+\field{seealso} and \field{alias}).
+The default setting is \csopt[false]{interpret-label-fields}.
+Note that if this setting is on, cross-resource references aren't
+permitted. This setting has no effect if the interpreter has been
+disabled.
+
+\optsection{strip-missing-parents}
+
+The \sty{glossaries} package requires that all child entries must be
+defined after the parent entry. An error occurs otherwise, so
+\bibgls\ will omit the \field{parent} field if it can't be found in
+the given \idx{resourceset}. However, when the default
+\csopt[false]{strip-missing-parents} is on, this omission only occurs
+while writing the definitions in the \ext{glstex} file (after
+selection and sorting).
+
+Sorting is performed hierarchically and the \field{group} field is set
+accordingly for the top-level entries (but not for child entries),
+which means that an entry with a \field{parent} field will be
+treated by the sort method as a child entry. This can lead to a
+strange result, which \bibgls\ warns about:
+\begin{alltt}
+Parent '\meta{parent id}' not found for entry \meta{child-id}
+\end{alltt}
+
+This is the default behaviour as it may simply be a result of a
+typing mistake in the \field{parent} field. If you actually want
+missing parents to be stripped before sorting (but after the
+selection process) then use \csopt[true]{strip-missing-parents}. If
+you want all parents stripped then use \csopt{flatten} or
+\csopt[parent]{ignore-fields} instead.
+
+\optsection{abbreviation-name-fallback}
+
+The entry types that define abbreviations (such as
+\atentry{abbreviation} and \atentry{acronym}) will, by default,
+fallback on the \field{short} field if the \field{name} field is
+missing and it's required for some reason (for example, with
+\csopt[name]{sort-field}). If you prefer to
+fallback on a different field, then you can use this option to
+specify the field. For example,
+\csopt[long]{abbreviation-name-fallback}.
+The \meta{field} value must be a known field label.
+
+\optsection{ignore-fields}
The \csopt{ignore-fields} key indicates that you want \bibgls\ to
skip the fields listed in the supplied comma-separated \meta{list} of field
@@ -3821,16 +5599,343 @@ the cross-referenced term, then I can use
Note that \csopt[parent]{ignore-fields} removes the \field{parent}
before determining the dependency lists. This means that
-\optref[recorded and deps]{selection} and
-\optref[recorded and ancestors]{selection} won't pick up the
+\csopt[recorded and deps]{selection} and
+\csopt[recorded and ancestors]{selection} won't pick up the
label in the \field{parent} field.
If you want to maintain the dependency and ancestor relationship but
omit the \field{parent} field when writing the entries to the
-\ext{glstex} file, you need to use \optref{flatten} instead.
+\ext{glstex} file, you need to use \csopt{flatten} instead.
+
+\optsection{field-aliases}
+
+You can instruct \bibgls\ to treat one field as though it
+was another using this option. The value should be a comma-separated
+list of \meta{field1}\dequals\meta{field2} pairs, where
+\meta{field1} and \meta{field2} are field names. Identical
+mappings and trails aren't permitted. (That is, \meta{field1}
+and \meta{field2} can't be the same nor can you have both
+\meta{field1}\dequals\meta{field2} and
+\meta{field2}\dequals\meta{field3}.) If you want to swap
+fields you need to use one of the dual entry types instead.
+Field aliases are performed before \csopt{ignore-fields},
+so if \meta{field1} is listed in \csopt{ignore-fields} it won't
+be ignored (unless \meta{field2} is in \csopt{ignore-fields}).
+
+For example, suppose \filefmt{people.bib} contains:
+\begin{verbatim}
+@entry{alexander,
+ name={Alexander III of Macedon},
+ description={Ancient Greek king of Macedon},
+ born={20 July 356 BC},
+ died={10 June 323 BC},
+ othername={Alexander the Great}
+}
+\end{verbatim}
+This contains three non-standard fields: \fieldfmt{born},
+\fieldfmt{died} and \fieldfmt{othername}. I could define
+these fields using \ics{glsaddkey}, but another possibility
+is to map these onto the user keys \field{user1}, \field{user2}
+and \field{user3}, which saves the overhead of providing new
+keys:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ field-aliases={born=user1,died=user2,othername=user3}
+]
+\end{verbatim}
+
+\optsection{replicate-fields}
+
+The value of one field can be copied to other fields using
+this option where each \meta{key}\dequals\meta{value} pair
+is in the form
+\meta{field1}\dequals\marg{\meta{field2},\meta{field3},\ldots}
+where all values are field names. This copies the contents
+of \meta{field1} to \meta{field2}, \meta{field3}, \ldots\
+(only if the target field isn't already set with
+\csopt[false]{replicate-override}). This action is
+performed after \csopt{ignore-fields} (see
+\sectionref{sec:resourcesets}).
+
+For example, suppose \filefmt{people.bib} contains:
+\begin{verbatim}
+@entry{alexander,
+ name={Alexander III of Macedon (Alexander the Great)},
+ text={Alexander},
+ description={Ancient Greek king of Macedon}
+}
+\end{verbatim}
+Since the \field{first} field hasn't been supplied, it
+will default to the value of the \field{text} field, but
+perhaps for one of my documents I'd like the \field{first}
+field to be the same as the \field{name} field. Rather than
+editing the \ext{bib} file, I can just do:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ replicate-fields={name=first}
+]
+\end{verbatim}
+This copies the contents of the \field{name} field into the
+\field{first} field. If you have more than one field
+in the list take care to brace the lists to avoid confusion.
+For example, if for some reason I want to copy the value
+of the \field{name} field to both \field{first} and
+\field{firstplural} and copy the value of the \field{text}
+field to the \field{plural} field, then this requires braces
+for the inner list:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ replicate-fields={name={first,firstplural},text=plural}
+]
+\end{verbatim}
+
+If my \filefmt{people.bib} file instead contained:
+\begin{verbatim}
+@entry{alexander,
+ name={Alexander III of Macedon (Alexander the Great)},
+ first={Alexander the Great},
+ text={Alexander},
+ description={Ancient Greek king of Macedon}
+}
+\end{verbatim}
+then
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ replicate-fields={name=first}
+]
+\end{verbatim}
+won't alter the \field{first} field since \csopt{replicate-fields}
+never overrides values. However, since \csopt{replicate-fields}
+is always performed after \csopt{ignore-fields} it's possible to
+ignore the \field{first} field which means that the \field{name}
+value can then be copied into it:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ ignore-fields={first},
+ replicate-fields={name=first}
+]
+\end{verbatim}
+Note that the ordering within the resource options doesn't
+make a difference. The same result occurs with:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src=people,% data in people.bib
+ replicate-fields={name=first},
+ ignore-fields={first}
+]
+\end{verbatim}
+
+\optsection{replicate-override}
+
+This is a boolean option. The default setting is
+\csopt[false]{replicate-override}. If \optfmt{true},
+\csopt{replicate-fields} will override the existing value if the
+target field is already set.
+
+\optsection{bibtex-contributor-fields}
+
+This option indicates that the listed fields all use \BibTeX's name
+syntax (as used in \BibTeX's \code{author} and \code{editor} fields).
+The values of these fields will be converted into the form:
+\begin{alltt}
+\gls{bibglscontributorlist}\margm{contributor list}\margm{n}
+\end{alltt}
+where \meta{n} is the number of names in the list and
+\meta{contributor-list} is a comma-separated list of names in the
+form:
+\begin{alltt}
+\gls{bibglscontributor}\margm{forenames}\margm{von-part}\margm{surname}\margm{suffix}
+\end{alltt}
+
+The \gls{bibglscontributorlist} commands is initially defined in
+\bibgls's interpreter to just do the first argument and ignore the
+second. This means that if you're sorting on this field, the \qt{and}
+part between the final names doesn't appear in the sort value.
+The actual definition of \gls{bibglscontributorlist} provided in the
+\ext{glstex} file depends on whether or not \ics{DTLformatlist} is defined.
+(Note that \styfmt{glossaries} automatically loads \sty{datatool-base}
+so this command will be defined if you have at least v2.28 of
+\sty{datatool-base}.)
+
+For example, if the \field{name} field is specified as:
+\begin{verbatim}
+name={John Smith and Jane Doe and Dickie von Duck}
+\end{verbatim}
+then \csopt[name]{bibtex-contributor-fields} will convert the
+\field{name} field value to
+\begin{verbatim}
+\bibglscontributorlist{%
+ \bibglscontributor{John}{}{Smith}{},%
+ \bibglscontributor{Jane}{}{Doe}{},%
+ \bibglscontributor{Dickie}{von}{Duck}{}}{3}
+\end{verbatim}
+With \csopt[von]{contributor-order} the sort value obtained from
+this field will be:
+\begin{verbatim}
+Smith, John,Doe, Jane,von Duck, Dickie
+\end{verbatim}
+With one of the locale sort methods and with the default
+\csopt[word]{break-at}, this will end up as:
+\begin{verbatim}
+Smith|John|Doe|Jane|von|Duck|Dickie
+\end{verbatim}
+
+\optsection{contributor-order}
+
+The \gls{bibglscontributor} command is defined in
+\bibgls's interpreter and its definition is dependent on this
+setting. The \meta{value} may be one of (where the parts in square
+brackets are omitted if that argument is empty):
+\begin{itemize}
+\item \optfmt{surname}: \gls{bibglscontributor} expands to
+\meta{surname}\oarg{, \meta{suffix}}\oarg{, \meta{forenames}}\oarg{,
+\meta{von-part}};
+\item \optfmt{von}: \gls{bibglscontributor} expands to
+\oarg{\meta{von-part} }\meta{surname}\oarg{, \meta{suffix}}\oarg{, \meta{forenames}};
+\item \optfmt{forenames}: \gls{bibglscontributor} expands to
+\oarg{\meta{forenames} }\oarg{\meta{von-part} }\meta{surname}\oarg{,
+\meta{suffix}}.
+\end{itemize}
+The default value is \optfmt{von}. Note that if you have multiple
+resource sets, this option governs the way \bibgls's version of
+\gls{bibglscontributor} behaves. The actual definition is written to
+the \ext{glstex} using \cs{providecommand}, which means that \LaTeX\
+will only pick up the first definition.
+
+For example:
+\begin{verbatim}
+\newcommand*{\bibglscontributor}[4]{%
+ #1\ifstrempty{#2}{}{ #2} #3\ifstrempty{#4}{}{, #4}%
+}
+
+\GlsXtrLoadResources[
+ src={entries},% data in entries.bib
+ bibtex-contributor-fields={name}
+]
+\end{verbatim}
+This will display the names in the glossary with the forenames
+first, but \bibgls\ will sort according to surname.
+
+An alternative approach, if you need an initial resource set
+such as with the \exfile{no-interpret-preamble.bib} file:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src={no-interpret-preamble},
+ interpret-preamble=false,
+ bibtex-contributor-fields={name},
+ contributor-order={forenames}
+]
+
+\GlsXtrLoadResources[
+ src={entries},% data in entries.bib
+ bibtex-contributor-fields={name}
+]
+\end{verbatim}
+Note the need to use \csopt[name]{bibtex-contributor-fields}
+in the first resource set even though there are no entries in
+the \ext{bib} file. This is because the definition of
+\gls{bibglscontributor} is only written to the \ext{glstex} file if
+\csopt{bibtex-contributor-fields} has been set to a non-empty list.
+The second resource set will use the default
+\csopt[von]{bibtex-contributor-fields} setting when obtaining the
+sort value.
+
+\optsection{date-time-fields}
+
+This option indicates that the listed fields all contain
+date and time information. Primary entries will have these fields
+parsed according to \csopt{date-time-field-format} and
+\csopt{date-time-field-locale} and dual entries will have these
+fields parsed according to \csopt{dual-date-time-field-format} and
+\csopt{dual-date-time-field-locale}. If the field value is missing
+or doesn't match the given pattern it remains unchanged, otherwise
+it's converted into the form
+\nosecdef{bibglsdatetime}
+where \meta{original} is the value of the field before conversion.
+If the interpreter is on, the value will be interpreted before
+being parsed if it contains \idx{escchar}, \idx{mshiftchar},
+\idx{bgroupchar}, \idx{egroupchar} or \idx{nbspchar}. (Remember that
+\idx{nbspchar} is converted to the non-breaking space character
+\hex{A0} unless \longarg{break-space} is used.)
+
+\optsection{date-fields}
+
+As \csopt{date-time-fields} but for fields that only contain date
+(not time) information. If parsed correctly, the field is converted
+to
+\nosecdef{bibglsdate}
+The fields are parsed according to
+\csopt{date-field-format} and
+\csopt{date-field-locale} for primary entries and according to
+\csopt{dual-date-field-format} and
+\csopt{dual-date-field-locale} for dual entries.
+
+\optsection{time-fields}
+
+As \csopt{date-time-fields} but for fields that only contain time
+(not date) information. If parsed correctly, the field is converted
+to
+\nosecdef{bibglstime}
+The fields are parsed according to
+\csopt{time-field-format} and
+\csopt{time-field-locale} for primary entries and according to
+\csopt{dual-time-field-format} and
+\csopt{dual-time-field-locale} for dual entries.
+
+\optsection{date-time-field-format}
+
+This option also sets
+\csopt[\meta{value}]{dual-date-time-field-format}.
+The value is the format pattern used when parsing fields identified
+by \csopt{date-time-fields}. The \meta{value} is as for
+\csopt{date-sort-format}.
-\subsection{\csoptnv{category}\csopteqval{value}}
-\labelopt{category}
+\optsection{date-field-format}
+
+This option also sets
+\csopt[\meta{value}]{dual-date-field-format}.
+The value is the format pattern used when parsing fields identified
+by \csopt{date-fields}. The \meta{value} is as for
+\csopt{date-sort-format}.
+
+\optsection{time-field-format}
+
+This option also sets
+\csopt[\meta{value}]{dual-time-field-format}.
+The value is the format pattern used when parsing fields identified
+by \csopt{time-fields}. The \meta{value} is as for
+\csopt{date-sort-format}.
+
+\optsection{date-time-field-locale}
+
+This option also sets
+\csopt[\meta{value}]{dual-date-time-field-locale}.
+The value is the locale used when parsing fields identified
+by \csopt{date-time-fields}. The \meta{value} is as for
+\csopt{date-sort-locale}.
+
+\optsection{date-field-locale}
+
+This option also sets
+\csopt[\meta{value}]{dual-date-field-locale}.
+The value is the locale used when parsing fields identified
+by \csopt{date-fields}. The \meta{value} is as for
+\csopt{date-sort-locale}.
+
+\optsection{time-field-locale}
+
+This option also sets
+\csopt[\meta{value}]{dual-time-field-locale}.
+The value is the locale used when parsing fields identified
+by \csopt{time-fields}. The \meta{value} is as for
+\csopt{date-sort-locale}.
+
+\optsection{category}
The selected entries may all have their \field{category} field
changed before writing their definitions to the \ext{glstex} file.
@@ -3838,16 +5943,26 @@ The \meta{value} may be:
\begin{itemize}
\item \optfmt{same as entry}: set the
\field{category} to the \ext{bib} entry type used to define it
-(without the leading \texttt{@});
+(without the leading \code{@});
+
+\item \optfmt{same as base}: set the \field{category}
+to the base name of the \ext{bib} file (without the extension)
+that provided the entry definition (new to v1.1);
+
\item \optfmt{same as type}: set the \field{category} to the same
value as the \field{type} field (if that field has been provided
-either in the \ext{bib} file or through the \optref{type} option);
+either in the \ext{bib} file or through the \csopt{type} option);
+
\item \meta{label}: the \field{category} is set to
\meta{label} (which mustn't contain any special characters).
\end{itemize}
This will override any
\field{category} fields supplied in the \ext{bib} file.
+Note that if you've used \csopt{entry-type-aliases}, \optfmt{same as
+entry} refers to the target entry type not the original entry type
+provided in the \ext{bib} file.
+
For example, if the \ext{bib} file contains:
\begin{verbatim}
@entry{bird,
@@ -3868,21 +5983,21 @@ then if the document contains
\begin{verbatim}
\GlsXtrLoadResources[category={same as entry},src={entries}]
\end{verbatim}
-this will set the \field{category} of the \texttt{bird} field to
-\optfmt{entry} (since it was defined with \cs{entry}), the \field{category} of the \texttt{duck} and
-\texttt{goose} entries to \optfmt{index} (since they were defined
-with \atentry{index}), and the \field{category} of the \texttt{dog}
+this will set the \field{category} of the \code{bird} field to
+\optfmt{entry} (since it was defined with \atentry{entry}), the \field{category} of the \code{duck} and
+\code{goose} entries to \optfmt{index} (since they were defined
+with \atentry{index}), and the \field{category} of the \code{dog}
entry to \optfmt{dualentry} (since it was
defined with \atentry{dualentry}). Note that the dual entry
-\texttt{dual.dog} doesn't have the category set, since that's
-governed by \optref{dual-category} instead.
+\code{dual.dog} doesn't have the category set, since that's
+governed by \csopt{dual-category} instead.
If, instead, the document contains
\begin{verbatim}
\GlsXtrLoadResources[category={animals},src={entries}]
\end{verbatim}
then the \field{category} of all the primary selected entries will
-be set to \optfmt{animals}. Again the dual entry \texttt{dual.dog}
+be set to \optfmt{animals}. Again the dual entry \code{dual.dog}
doesn't have the \field{category} set.
Note that the categories may be overridden by the commands,
@@ -3897,25 +6012,33 @@ For example, if the document contains
\GlsXtrLoadResources[category={animals},src={entries}]
\end{verbatim}
-then both the \texttt{dog} and \texttt{dual.dog} entries will
+then both the \code{dog} and \code{dual.dog} entries will
have their \field{category} field set to \optfmt{dual} since the
-new definition of \cs{bibglsnewdualentry} has overridden
+new definition of \gls{bibglsnewdualentry} has overridden
the \csopt[animals]{category} option.
-\subsection{\csoptnv{type}\csopteqval{value}}
-\labelopt{type}
+\optsection{type}
-The \meta{value} may be \optfmt{same as entry} or a glossary label.
-This is similar to the \optref{category} option except that
-it sets the \field{type} field. As with the \csopt{category} option,
-\csopt[same as entry]{type} indicates that the entry
-type should be used. There is no \meta{value} analogous to
-\csopt[same as type]{category}.
+The \meta{value} may be one of:
+\begin{itemize}
+ \item \optfmt{same as entry} set the \field{type} field
+ to the entry type (without the initial \code{@});
+ \optfmt{same as base} set the \field{type} field
+ to the base name of the corresponding \ext{bib} file
+ (without the extension);
+ \item \optfmt{same as category} set the \field{type} field
+ to the same value as the \field{category} field
+ (\field{type} unchanged if \field{category} not set);
+ \item\meta{label} sets the \field{type} field to the glossary
+ identified by \meta{label}.
+\end{itemize}
+If you've used \csopt{entry-type-aliases}, \optfmt{same as
+entry} refers to the target entry type not the original entry type
+provided in the \ext{bib} file.
-Make sure that the glossary type has already been defined.
Note that this setting only changes the \field{type} field for
-primary entries. Use \optref{dual-type} for dual entries.
+primary entries. Use \csopt{dual-type} for dual entries.
For example:
\begin{verbatim}
@@ -3924,9 +6047,11 @@ For example:
\GlsXtrLoadResources[src={entries-symbols},type=symbols]
\end{verbatim}
-Remember that you can use the starred version of \cs{newglossary}
-if you don't want to worry about the extensions needed by
-\app{makeindex} or \app{xindy}. For example:
+Make sure that the glossary type has already been defined
+(see \sectionref{sec:newglossary}). In the above, the
+\styopt{symbols} option defines the \code{symbols} glossary.
+If you want to use a custom glossary, you need to provide it. For
+example:
\begin{verbatim}
\usepackage[record,nomain]{glossaries-extra}
@@ -3935,19 +6060,50 @@ if you don't want to worry about the extensions needed by
\GlsXtrLoadResources[src={entries-symbols},type=dictionary]
\end{verbatim}
(The \styopt{nomain} option was added to suppress the
-creation of the default \texttt{main} glossary.)
-
-Alternatively you can use \cs{newignoredglossary} if you don't
-want the glossary picked up by \cs{printunsrtglossaries}.
-
-
-\subsection{\csoptnv{label-prefix}\csopteqval{tag}}
-\labelopt{label\dhyphen prefix}
+creation of the default \code{main} glossary.)
+
+\optsection{trigger-type}
+
+The record counting commands, such as \ics{rgls}, use the special
+format \ics{glstriggerrecordformat}, which \bibgls\ also treats
+as an ignored location. This means the entry will still be
+identified as having a record for selection purposes, which is
+necessary for the entry to be defined for use in the document, but
+in order to prevent it from appearing in the glossary you need to
+transfer the entry with \csopt[\meta{type}]{trigger-type}.
+This will override the \csopt{type}, \csopt{dual-type},
+\csopt{tertiary-type} and the type specification in
+\csopt{secondary}.
+
+The provided value \meta{type} must be a glossary label (not one of
+the keywords allowed by \csopt{type}).
+You can define the glossary before loading the resource, but
+it's not required as \bibgls\ will write
+\ics{provideignoredglossary*}\margm{type} to the \ext{glstex} file
+(see \sectionref{sec:newglossary}).
+
+\optsection{counter}
+
+The \csopt{counter} option assigns the default counter to use
+for the selected entries. (This can be overridden with the
+\glsopt{counter} key when using commands like \csfmt{gls}.)
+The value must be the name of a counter. Since \bibgls\ doesn't know
+which counters are defined within the document, there's no check to
+determine if the value is valid (except for ensuring that
+\meta{value} is non-empty).
+
+Note that this will require an extra \LaTeX\ and \bibgls\ call since
+the counter can't be used for the indexing until the entry has been
+defined.
+
+\optsection{label-prefix}
The \csopt{label-prefix} option prepends \meta{tag} to each
entry's label. This \meta{tag} will also be inserted in front of any
cross-references, unless they start with \idprefix{dual} or
-\idprefix{ext\meta{n}} (where \meta{n} is an integer).
+\idprefix{extn} (where \meta{n} is an integer). Use
+\csopt{dual-prefix} to change the dual label prefixes and
+\csopt{ext-prefixes} to change the external label prefixes.
For example, if the \ext{bib} file contains
\begin{verbatim}
@@ -3987,17 +6143,123 @@ it's as though the entries had been defined as:
\end{verbatim}
Remember to use this prefix when you reference the terms in the
-document with commands like \cs{gls}.
+document with commands like \ics{gls}.
+
+\optsection{duplicate-label-suffix}
+
+The \sty{glossaries} package doesn't permit entries with duplicate
+labels (even if they're in different glossaries). If you
+have multiple \idxpl{resourceset} and an entry that's selected
+in one \idx{resourceset} is also selected in another, by
+default, \bibgls\ will issue a warning, but it will still write the
+entry definition to the \ext{glstex} file, which means you'll also
+get a warning from \sty{glossaries-extra} and the duplicate
+definition will be ignored, but associated internal fields
+set with commands like \cs{GlsXtrSetField} may still be set.
+
+If you actually want the duplicate, you need to specify a
+suffix with \csopt{duplicate-label-suffix}. This suffix is only
+set just before writing the entry definition to the \ext{glstex}
+file, so it doesn't affect selection criteria nor can label
+substitutions be performed in any cross-references. Options such as
+\csopt{set-widest} that reference entry labels are incompatible
+as they will use the unsuffixed label.
+
+The actual suffix is formed from \meta{value}\meta{n} where \meta{n}
+is an integer that's incremented in the event of multiple
+duplicates. For example, \csopt[.copy]{duplicate-label-suffix} will
+change the label to \meta{id}\code{.copy1} for the first duplicate
+of the entry whose label is \meta{id}, \meta{id}\code{.copy2} for
+the second duplicate, etc.
+
+\optsection{record-label-prefix}
+
+If set, this option will cause \bibgls\ to pretend that each record
+label starts with \meta{tag}, if it doesn't already. For example, suppose
+the records in the \ext{aux} file are:
+\begin{verbatim}
+\glsxtr@record{bird}{}{page}{glsnumberformat}{1}
+\glsxtr@record{waterfowl}{}{page}{glsnumberformat}{1}
+\glsxtr@record{idx.duck}{}{page}{glsnumberformat}{1}
+\glsxtr@record{idx.goose}{}{page}{glsnumberformat}{1}
+\end{verbatim}
+The use of \csopt[idx.]{record-label-prefix} makes \bibgls\ act as
+though the records were given as:
+\begin{verbatim}
+\glsxtr@record{idx.bird}{}{page}{glsnumberformat}{1}
+\glsxtr@record{idx.waterfowl}{}{page}{glsnumberformat}{1}
+\glsxtr@record{idx.duck}{}{page}{glsnumberformat}{1}
+\glsxtr@record{idx.goose}{}{page}{glsnumberformat}{1}
+\end{verbatim}
+
+
+\optsection{cs-label-prefix}
+
+If you have commands such as \ics{gls}\margm{label} or
+\ics{glstext}\marg{label} in field
+values (in situations where nested link text won't cause a problem)
+the \meta{label} will be converted as follows:
+\begin{itemize}
+\item if \meta{label} starts with \idprefix{dual} then
+\idprefix{dual} will be replaced by the \csopt{dual-prefix} value;
+\item if \meta{label} starts with \idprefix{tertiary} then
+\idprefix{tertiary} will be replaced by the \csopt{tertiary-prefix} value;
+\item if \meta{label} starts with \idprefix{extn} then
+\idprefix{extn} will be replaced by the corresponding
+\csopt{ext-prefixes} setting (if \idx{crossresourceref} mode is
+enabled, see \sectionref{sec:resourcesets});
+\item if \meta{label} doesn't start with one of the above recognised
+prefixes then, if \csopt{cs-label-prefix} has been used the supplied
+value will be inserted otherwise the \csopt{label-prefix} setting
+will be inserted.
+\end{itemize}
+For example, given
+\begin{verbatim}
+@entry{bird,
+ name={bird},
+ description = {feathered animal, such as a \gls{duck} or \gls{goose}}
+}
+\end{verbatim}
+then if \csopt[idx.]{label-prefix} is set but \csopt{cs-label-prefix}
+isn't included in the resource option list this will convert the
+\field{description} field to:
+\begin{verbatim}
+description = {feathered animal, such as a \gls{idx.duck} or
+\gls{idx.goose}}
+\end{verbatim}
+However with \csopt[gls.]{cs-label-prefix} the \field{description}
+field will be converted to
+\begin{verbatim}
+description = {feathered animal, such as a \gls{gls.duck} or
+\gls{gls.goose}}
+\end{verbatim}
+regardless of the \csopt{label-prefix} setting. Whereas if the
+original entry definition is
+\begin{verbatim}
+@entry{bird,
+ name={bird},
+ description = {feathered animal, such as a \gls{dual.duck} or
+\gls{dual.goose}}
+}
+\end{verbatim}
+then \idprefix{dual} will be replaced by the value of the
+\csopt{dual-prefix} option regardless of the \csopt{cs-label-prefix}
+setting.
+
+The \csopt{cs-label-prefix} setting doesn't affect labels in the
+fields that have an entry label or label list as the value
+(\field{parent}, \field{alias}, \field{see} and \field{seealso}).
-\subsection{\csoptnv{ext-prefixes}\csopteqval{list}}
-\labelopt{ext-prefixes}
+\optsection{ext-prefixes}
-Any cross-references in the \ext{bib} file that start with
-\idprefix{ext\meta{n}} (where \meta{n} is a positive integer) will be
+Any cross-references in the \iext{bib} file that start with
+\idprefix{extn} (where \meta{n} is a positive integer) will be
substituted with the \meta{n}th tag listed in the comma-separated
\meta{list}. If there aren't that many items in the list, the
-\idprefix{ext\meta{n}} will simply be removed. The default setting is
-an empty list, which will strip all \idprefix{ext\meta{n}} prefixes.
+\idprefix{extn} will simply be removed. The default setting is
+an empty list, which will strip all \idprefix{extn} prefixes.
+Remember that \idx{crossresourceref} mode needs to be enabled for
+this option to work (see \sectionref{sec:resourcesets}).
For example, suppose the file \filefmt{entries-terms.bib} contains:
\begin{verbatim}
@@ -4014,8 +6276,8 @@ and the file \filefmt{entries-symbols.bib} contains:
}
\end{verbatim}
-These files both contain an entry with the label \texttt{set}
-but the description includes \verb|\gls{ext1.set}| which is
+These files both contain an entry with the label \code{set}
+but the \field{description} field includes \verb|\gls{ext1.set}| which is
referencing the entry from the other file. These
two files can be loaded without conflict using:
\begin{verbatim}
@@ -4033,22 +6295,22 @@ two files can be loaded without conflict using:
]
\end{verbatim}
-Now the \texttt{set} entry from \filefmt{entries-terms.bib}
-will be defined with the label \texttt{gls.set} and the
+Now the \code{set} entry from \filefmt{entries-terms.bib}
+will be defined with the label \code{gls.set} and the
description will be
\begin{verbatim}
collection of values, denoted \gls{sym.set}
\end{verbatim}
-The \texttt{set} entry
+The \code{set} entry
from \filefmt{entries-symbols.bib} will be defined with the label
-\texttt{sym.set} and the description will be
+\code{sym.set} and the description will be
\begin{verbatim}
a \gls{gls.set}
\end{verbatim}
Note that in this case the \ext{bib} files have to be loaded
as two separate resources. They can't be combined into a
-single \optref{src} list as the labels aren't unique.
+single \csopt{src} list as the labels aren't unique.
If you want to allow the flexibility to choose between
loading them together or separately, you'll have to give them
@@ -4071,33 +6333,54 @@ Now they can be combined with:
\begin{verbatim}
\GlsXtrLoadResources[src={entries-terms,entries-symbols}]
\end{verbatim}
-which will simply strip the \idprefixfmt{ext1} prefix from the
-cross-references. Alternatively:
+which will simply strip the \glsdisp{idx.idprefix.extn}{\idprefixfmt{ext1}}
+prefix from the cross-references. Alternatively:
\begin{verbatim}
\GlsXtrLoadResources[src={entries-terms,entries-symbols},
label-prefix={gls.},
ext-prefixes={gls.}
]
\end{verbatim}
-which will insert the supplied \optref{label-prefix} at the
+which will insert the supplied \csopt{label-prefix} at the
start of the labels in the entry definitions and will replace
-the \idprefix{ext1} prefix with \idprefixfmt{gls} in the
+the \idprefixfmt{ext1} prefix with \idprefixfmt{gls} in the
cross-references.
-\subsection{\csoptnv{short-case-change}\csopteqval{value}}
-\labelopt{short-case-change}
+\optsection{short-case-change}
The value of the \field{short} field may be automatically converted
to upper or lower case. This option may take one of the following
values:
\begin{itemize}
\item \optfmt{none}: don't apply any case-changing (default);
-\item \optfmt{lc}: convert to lower case;
-\item \optfmt{uc}: convert to upper case;
+\item \optfmt{lc}: convert to lower case (ignoring
+\idx{mshiftchar}\meta{maths}\idx{mshiftchar}, \ics{ensuremath}\margm{maths}
+and \ics{si}\margm{text});
+\item \optfmt{uc}: convert to upper case (ignoring
+\idx{mshiftchar}\meta{maths}\idx{mshiftchar}, \ics{ensuremath}\margm{maths}
+and \ics{si}\margm{text});
\item \optfmt{lc-cs}: convert to lower case using
-\cs{MakeTextLowercase};
+\ics{MakeTextLowercase};
\item \optfmt{uc-cs}: convert to upper case using
-\cs{MakeTextUppercase}.
+\ics{MakeTextUppercase};
+\item \optfmt{firstuc-cs}: convert to first letter upper case using
+\ics{makefirstuc};
+\item \optfmt{firstuc}: convert the first alphabetical letter (or
+group) to upper case. This uses the following rules:
+\begin{enumerate}
+\item if \idx{mshiftchar}\meta{maths}\idx{mshiftchar} then stop (no case change);
+\item if \ics{NoCaseChange}\margm{text} or
+\ics{ensuremath}\margm{maths} or \ics{si}\margm{text} or \ics{protect} then skip;
+\item if \csfmt{}\meta{csname}\margm{text} then apply the case change to
+\meta{text} and stop;
+\item if \csfmt{}\meta{csname} isn't followed by a group (and it's
+not \ics{protect}), then stop (no case change applied);
+\item if \margm{text} (a group) then convert the entire contents of
+\meta{text} to upper case and stop;
+\item if \meta{character} is an alphabetic character then change it
+to its title case and stop;
+\item otherwise skip and move on to the next token.
+\end{enumerate}
\end{itemize}
For example, if the \ext{bib} file contains
@@ -4130,7 +6413,7 @@ then \csopt[uc]{short-case-change} would convert the value of the
\begin{verbatim}
HT\emph{ML}
\end{verbatim}
-Note that \cs{emph} isn't modified as it's recognised as a command.
+Note that \csfmt{emph} isn't modified as it's recognised as a command.
There's no attempt at interpreting the contents at this point (but
the value may later be interpreted during sorting).
@@ -4144,7 +6427,7 @@ Z\ae\oe
\end{verbatim}
since the interpreter isn't being used at this stage. If the
interpreter is later used during sorting, the sort value will be set to
-\texttt{Z\ae\oe}.
+\code{Z\ae\oe}.
However, with \csopt[uc-cs]{short-case-change}, the \field{short}
value would be converted to
@@ -4152,9 +6435,9 @@ value would be converted to
\MakeTextUppercase{z\ae\oe}
\end{verbatim}
If the interpreter is used during sorting, the sort value will be set to
-\texttt{Z\AE\OE}.
+\code{Z\AE\OE}.
-You can use \cs{NoCaseChange}\margm{text} to prevent the given \meta{text}
+You can use \ics{NoCaseChange}\margm{text} to prevent the given \meta{text}
from having the case changed. For example, if the \field{short}
field is defined as
\begin{verbatim}
@@ -4164,8 +6447,8 @@ then with \csopt[uc]{short-case-change}, this would be converted to
\begin{verbatim}
A\NoCaseChange{bc}D
\end{verbatim}
-(This command is provided by \sty{textcase}, which is automatically
-loaded by \sty{glossaries}.)
+(This command is provided by \isty{textcase}, which is automatically
+loaded by \styfmt{glossaries}.)
If you have a command that takes a label or identifier as an argument then it's
best to hide the label in a custom command. For example, if the
@@ -4178,15 +6461,248 @@ then with \csopt[uc]{short-case-change} this would end up as:
HT\textcolor{RED}{ML}
\end{verbatim}
which is incorrect. Instead, provide a command that hides the label
-(such as the \csfmt{strong} example described on page~\pageref{cs.strong}).
+(such as the \csfmt{strong} example described on page~\glsxtrpageref{strong}).
-See \optref{dual-short-case-change} to adjust the \field{dualplural}
+The first letter upper casing \csopt[firstuc]{short-case-change}
+is slightly more complicated. The simplest case is where
+the field only contains alphabetical characters. For example,
+suppose the \field{short} field is defined as:
+\begin{verbatim}
+short={html}
+\end{verbatim}
+then with \csopt[firstuc]{short-case-change} this would end up as
+\code{Html} whereas
+\begin{verbatim}
+short={{ht}ml}
+\end{verbatim}
+would end up as \code{HTml} since it detects the grouping.
+(You'll need to do this for the Dutch digraph \qt{ij}.)
+Note that \ics{NoCaseChange} is skipped, and the case change is
+applied to the material following its argument. For example,
+suppose the \field{short} field is defined as:
+\begin{verbatim}
+short={\NoCaseChange{h}tml}
+\end{verbatim}
+then the result is
+\begin{verbatim}
+\NoCaseChange{h}Tml
+\end{verbatim}
+whereas with
+\begin{verbatim}
+short={{}html}
+\end{verbatim}
+then the result is just \code{html}. If a command is followed by
+a group then the case change is applied to the group (unless the
+command is \ics{NoCaseChange}, \ics{ensuremath} or \ics{si}). For
+example,
+suppose the \field{short} field is defined as:
+\begin{verbatim}
+short={\emph{ht}ml}
+\end{verbatim}
+then the result is
+\begin{verbatim}
+\emph{Ht}ml
+\end{verbatim}
+If a command isn't followed by a group (and it's not \ics{protect})
+then no change occurs. For example,
+suppose the \field{short} field is defined as:
+\begin{verbatim}
+short={\ae html}
+\end{verbatim}
+then the result is
+\begin{verbatim}
+\ae html
+\end{verbatim}
+whereas with
+\begin{verbatim}
+short={\protect html}
+\end{verbatim}
+the result is
+\begin{verbatim}
+\protect Html
+\end{verbatim}
+
+See \csopt{dual-short-case-change} to adjust the \field{dualshort}
field.
-\subsection{\csoptnv{group}\csopteqval{value}}
-\labelopt{group}
+\optsection{name-case-change}
+
+As \csopt{short-case-change} but is applied to the \field{name}
+field. If the \field{text} field hasn't been set, the \field{name}
+value is first copied to the \field{text} field.
-This option may only be used with the \argref{group} switch.
+\optsection{description-case-change}
+
+As \csopt{short-case-change} but is applied to the
+\field{description} field.
+
+\optsection{post-description-dot}
+
+The \styopt{postdot} package option (or \styopt[false]{nopostdot})
+can be used to append a \idx{full-stop} (\idx{periodchar})\ to the
+end of all the descriptions. This can be awkward if some of the
+descriptions end with punctuation characters. This resource option
+can be used instead. The \meta{value} may be one of:
+\begin{itemize}
+\item\optfmt{none}: don't append a \idx{full-stop} (default);
+\item\optfmt{all}: append a \idx{full-stop} to all \field{description}
+ fields in this resource set;
+\item\optfmt{check}: selectively append a \idx{full-stop} (see below).
+\end{itemize}
+Note that if you have dual entries and you use this option to
+append a \idx{full-stop}, then it will be copied over to the mapped field.
+This is different to the \styopt{postdot} option which doesn't
+add the dot to the field but incorporates it in the
+\idx{postdescriptionhook}. This means that a dot inserted with
+\csopt{post-description-dot} will come before the
+\idx{postdescriptionhook} whereas with \styopt{postdot} the
+punctuation comes after any category-specific hook.
+
+The \csopt[check]{post-description-dot} setting determines whether
+to append the dot as follows:
+\begin{itemize}
+\item If the \field{description} field ends with
+\ics{nopostdesc} or \ics{glsxtrnopostpunc}, then a dot isn't appended.
+\item If the \field{description} field doesn't end with a regular
+(ungrouped letter or other) character, then a dot is appended.
+(For example, if the description ends with a control sequence
+or an end group token.)
+\item If the \field{description} field ends with a character
+that belongs to the Unicode category \idx{punctuationclose}
+or \idx{punctuationfinalquote} then the token preceding
+that character is checked.
+\item If the \field{description} field doesn't end with
+a character that belongs to the Unicode category
+\idx{punctuationother} then the dot is added.
+\end{itemize}
+Note that the interpreter isn't used during the check.
+If the \field{description} ends with a command then a dot will be
+appended (unless it's \cs{glsxtrnopostpunc} or \cs{nopostdesc}) even if
+that command expands in such a way that it ends with a terminating
+punctuation character. This option only applies to the
+\field{description} field.
+
+\optsection{strip-trailing-nopost}
+
+This option is always performed before \csopt{post-description-dot}
+when adjusting the \field{description} field. The default
+setting is \csopt[false]{strip-trailing-nopost}. If
+\optfmt{true} any trailing ungrouped \ics{nopostdesc} or \ics{glsxtrnopostpunc}
+found in the \field{description} field will be removed.
+Note that the command (possibly followed by ignored space) must be
+at the very end of the description for it to be removed. A
+description should not contain both commands. This option
+only applies to the \field{description} field.
+
+For example, \cs{nopostdesc} will be stripped from:
+\begin{verbatim}
+description={sample\nopostdesc}
+\end{verbatim}
+since it's at the end. It will also be stripped from
+\begin{verbatim}
+description={sample\nopostdesc }
+\end{verbatim}
+since the trailing space is ignored as it follows a control
+word. It won't be stripped from
+\begin{verbatim}
+description={sample\nopostdesc{} }
+\end{verbatim}
+because the final space is now significant, but even without the
+space it still won't be stripped as the field ends with
+an empty group not with \cs{nopostdesc}. Similarly it won't be
+stripped from
+\begin{verbatim}
+description={sample\nopostdesc\relax}
+\end{verbatim}
+because again it's not at the end.
+
+\optsection{check-end-punctuation}
+
+This options checks the end of all the fields given in \meta{list} for
+end of sentence punctuation. This is determined as follows, for each
+\meta{field} in the comma-separated \meta{list}:
+\begin{itemize}
+\item if the last character is of type \idx{punctuationclose}
+or \idx{punctuationfinalquote}, check the character that comes
+before it;
+\item if the character is of type \idx{punctuationother}, then check
+if it's listed in the entry given by \code{sentence.terminators}
+in \bibgls's \langxml.
+\end{itemize}
+If a sentence terminator is found, an internal field is created
+called \field{fieldendpunc} that contains the punctuation
+character. Fields whose values must be labels (such as
+\field{parent}, \field{category} and \field{type}) aren't checked,
+even if they're included in \meta{list}.
+
+The default \code{sentence.terminators} is defined in \file{bib2gls-en.xml}
+as:
+\begin{verbatim}
+<entry key="sentence.terminators">.?!</entry>
+\end{verbatim}
+Any character that isn't of type \idx{punctuationother} won't
+match.
+
+For example, the sample \exfile{books.bib} file contains:
+\begin{verbatim}
+@entry{whydidnttheyaskevans,
+ name={Why Didn't They Ask Evans?},
+ description={novel by Agatha Christie},
+ identifier={book},
+ author={\sortmediacreator{Agatha}{Christie}},
+ year={1934}
+}
+\end{verbatim}
+With \csopt[name]{check-end-punctuation}, this entry will be
+assigned an internal field called
+\fielddisp{fieldendpunc}{namendpunc} set to \code{?}\
+as that's included in \code{sentence.terminators} and is found
+at the end of the \field{name} field:
+\begin{verbatim}
+\GlsXtrSetField{whydidnttheyaskevans}{nameendpunc}{?}
+\end{verbatim}
+(Note that \csopt[first,text]{check-end-punctuation} won't match
+as there's no \field{first} or \field{text} field supplied.)
+
+If you have a field that ends with an abbreviation followed by a
+\idx{full-stop}, this will be considered an end of sentence terminator, but
+the main purpose of this option is to provide a way to deal with
+cases like
+\begin{verbatim}
+Agatha Christie wrote \gls{whydidnttheyaskevans}.
+\end{verbatim}
+where the end of sentence punctuation following \cs{gls} needs to be
+discarded. This is needed regardless of whether or not
+the link text ends with an abbreviation or is a complete sentence.
+
+It's then possible to hook into the \idx{postlinkhook} \qt{discard
+period} check. By default this just checks the category attributes
+that govern whether or not to discard a following period, but
+(with \styfmt{glossaries-extra} v1.23+) it's possible to provide
+an additional check by redefining
+\nosecdef{glsxtrifcustomdiscardperiod}
+This should expand to \meta{true} if the check should be performed
+otherwise it should expand to \meta{false}. You can reference the
+label using \cs{glslabel}. For example:
+\begin{verbatim}
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+}
+\end{verbatim}
+This uses \ics{GlsXtrIfFieldUndef} rather than
+\ics{glsxtrifhasfield*} since there's no need to access the field's
+value. (The unstarred form \ics{glsxtrifhasfield} can't be used
+as it introduces implicit scoping, which would interfere with the
+punctuation lookahead.) The other difference between
+\ics{GlsXtrIfFieldUndef} and the other \csfmt{\ldots hasfield} tests
+is the case where the field is set to an empty value. In this case
+the field is defined (so \ics{GlsXtrIfFieldUndef} does the
+\meta{false} argument) but it's considered unset (so commands like
+\ics{ifglshasfield} do the \meta{false} argument).
+
+\optsection{group}
+
+This option may only be used with the \longarg{group} switch.
This will set the \field{group} field to \meta{value} unless
\meta{value} is \optfmt{auto}, in which case the value is
set automatically during the sorting.
@@ -4201,21 +6717,56 @@ For example:
\end{verbatim}
If the \field{type} field hasn't been set in the \ext{bib} files,
these entries will be added to the same glossary, but will
-be grouped according to each instance of \cs{GlsXtrLoadResources},
+be grouped according to each instance of \gls{GlsXtrLoadResources},
with the provided group label.
The default behaviour is \csopt[auto]{group}.
-\subsection{\csoptnv{save-child-count}\csopteqval{boolean}}
-\labelopt{save-child-count}
+\optsection{copy-action-group-field}
+
+This option may only be used when invoking \bibgls\ with the
+\longarg{group} (or \shortargfmt{g}) switch. If an action
+other than the default \csopt[define]{action} is set,
+this option can be used to identify a field in which to save
+the letter group information
+where \meta{value} is the name of the field. This just uses
+\cs{GlsXtrSetField}. You will need to redefine
+\ics{glsxtrgroupfield} to \meta{value} before displaying the glossary.
+For example, if \csopt[dupgroup]{copy-action-group-field},
+\csopt[copy]{action} and \csopt[copies]{type} are set in
+the resource options and \code{copies} identifies a custom
+glossary:
+\begin{alltt}
+\ics{printunsrtglossary*}\oarg{type=copies,style=indexgroup}
+ \marg{\cs{renewcommand}\marg{\cs{glsxtrgroupfield}}\marg{dupgroup}}
+\end{alltt}
+
+This option is ignored when used with \csopt[define]{action}.
+This option is not used by \csopt{secondary} which will
+always save the group information in the \field{secondarygroup}
+field. When used with \csopt[define or copy]{action}, entries
+that are defined will have both \field{group} and
+the field given by \csopt{copy-action-group-field} set.
+
+Note that you may do \csopt[group]{copy-action-group-field} which
+will override the \field{group} field from the original definition.
+This may be useful if you don't use grouping in the primary
+glossary. That is, you use \code{nogroupskip} and a non-group
+style. For example:
+\begin{verbatim}
+\printunsrtglossary[nogroupskip,style=index]
+\printunsrtglossary[type=copies,style=indexgroup]
+\end{verbatim}
+
+\optsection{save-child-count}
This is a boolean option. The default setting is
\csopt[false]{save-child-count}.
-If \csopt[true]{save\dhyphen child\dhyphen count},
-each entry will be assigned a field called \texttt{childcount} with
+If \csopt[true]{save-child-count},
+each entry will be assigned a field called \field{childcount} with
the value equal to the number of child entries that have been
selected.
-The assignment is done using \cs{GlsXtrSetField} so there's
+The assignment is done using \ics{GlsXtrSetField} so there's
no associated key.
For example, suppose \filefmt{entries.bib} contains:
\begin{verbatim}
@@ -4227,7 +6778,7 @@ For example, suppose \filefmt{entries.bib} contains:
@index{minerals}
@index{quartz,parent={minerals}}
@index{corundum,parent={minerals}}
-@index{amber,parent={minerals}}
+@index{amethyst,parent={minerals}}
@index{gypsum,parent={minerals}}
@index{gold,parent={minerals}}
\end{verbatim}
@@ -4241,7 +6792,7 @@ and the document contains:
\begin{document}
\gls{duck} and \gls{goose}.
-\gls{quartz}, \gls{corundum}, \gls{amber}.
+\gls{quartz}, \gls{corundum}, \gls{amethyst}.
\printunsrtglossaries
\end{document}
@@ -4252,13 +6803,13 @@ Then the \ext{glstex} file will contain:
\GlsXtrSetField{duck}{childcount}{0}
\GlsXtrSetField{goose}{childcount}{0}
\GlsXtrSetField{minerals}{childcount}{3}
-\GlsXtrSetField{amber}{childcount}{0}
+\GlsXtrSetField{amethyst}{childcount}{0}
\GlsXtrSetField{corundum}{childcount}{0}
\GlsXtrSetField{quartz}{childcount}{0}
\end{verbatim}
-Note that although \texttt{birds} has three children defined in the
+Note that although \code{birds} has three children defined in the
\ext{bib} file, only two have been selected, so the child count is
-set to 2. Similarly the \texttt{minerals} entry has five children
+set to 2. Similarly the \code{minerals} entry has five children
defined in the \ext{bib} file, but only three have been selected, so
the child count is 3.
@@ -4273,13 +6824,30 @@ in parentheses:
{}%
}
\end{verbatim}
-(\cs{glsxtrifhasfield} requires at least \sty{glossaries-extra} v1.19.
-It's slightly more efficient that \cs{ifglshasfield} provided by
-the base \sty{glossaries} package, and it doesn't complain if the
-entry or field don't exist, but note that \cs{glsxtrifhasfield}
+(\ics{glsxtrifhasfield} requires at least \sty{glossaries-extra} v1.19.
+It's slightly more efficient that \ics{ifglshasfield} provided by
+the base \styfmt{glossaries} package, and it doesn't complain if the
+entry or field don't exist, but note that \ics{glsxtrifhasfield}
implicitly scopes its content. Use the starred version to omit the
grouping.)
+\optsection{save-original-id}
+
+The \meta{value} may be either the keyword \code{false} or
+the name of an internal field in which to store the entry's original
+label (as given in the \ext{bib} file). The default setting is
+\csopt[false]{save-original-id}. If \meta{value} is omitted,
+\csopt[originalid]{save-original-id} is assumed.
+
+If \meta{value} is a known field, it will be set after the field
+aliases, otherwise it will simply be added to the \ext{glstex} file
+using \ics{GlsXtrSetField} after the entry definition.
+
+\optsection{copy-alias-to-see}
+
+If set, the value of the \field{alias} field is copied to
+the \field{see} field. The default setting is \csopt[false]{copy-alias-to-see}.
+
\section{Plurals}
\label{sec:plurals}
@@ -4287,17 +6855,17 @@ 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, mice), so a
-simplistic approach of just doing \texttt{\cs{gls}\margm{label}[s]}
-will sometimes produce inappropriate results, so the \sty{glossaries}
+simplistic approach of just doing \code{\ics{gls}\margm{label}[s]}
+will sometimes produce inappropriate results, so the \styfmt{glossaries}
package provides a \field{plural} key with the corresponding command
-\cs{glspl}.
+\ics{glspl}.
In some cases a plural may not make any sense (for example, if the
term is a verb or symbol), so the \field{plural} key is optional, but to
make life easier for languages where the majority of plurals can
simply be formed by appending a suffix to the singular, the
-\sty{glossaries} package lets the \field{plural} field default
-to the value of the \field{text} field with \cs{glspluralsuffix}
+\styfmt{glossaries} package lets the \field{plural} field default
+to the value of the \field{text} field with \ics{glspluralsuffix}
appended. This command is defined to be just the letter \qt{s}.
This means that the majority of terms in such languages don't need to have the
\field{plural} supplied as well, and you only need to use it for the
@@ -4312,40 +6880,40 @@ 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 \sty{glossaries} package follows
+If these fields are omitted, the \styfmt{glossaries} package follows
these rules:
\begin{itemize}
-\item If \field{firstplural} is missing, then \cs{glspluralsuffix}
+\item If \field{firstplural} is missing, then \ics{glspluralsuffix}
is appended to the \field{first} field, if that field has been
supplied. If the \field{first} field hasn't been supplied but the
\field{plural} field has been supplied, then the \field{firstplural}
field defaults to the \field{plural} field. If the \field{plural}
field hasn't been supplied, then both the \field{plural} and
\field{firstplural} fields default to the \field{text} field (or
-\field{name}, if no \field{text} field) with \cs{glspluralsuffix}
+\field{name}, if no \field{text} field) with \ics{glspluralsuffix}
appended.
\item If the \field{longplural} field is missing, then
-\cs{glspluralsuffix} is appended to the \field{long} field, if the
+\ics{glspluralsuffix} is appended to the \field{long} field, if the
\field{long} field has been supplied.
\item If the \field{shortplural} field is missing then, \emph{with
-the base \sty{glossaries} acronym mechanism}, \cs{acrpluralsuffix}
+the base \styfmt{glossaries} acronym mechanism}, \ics{acrpluralsuffix}
is appended to the \field{short} field.
\end{itemize}
-The last case is different with the \sty{glossaries-extra} extension
+The last case is different with the \isty{glossaries-extra} extension
package. The \field{shortplural} field defaults to the \field{short}
-field with \cs{abbrvpluralsuffix} appended \emph{unless overridden
+field with \ics{abbrvpluralsuffix} appended \emph{unless overridden
by category attributes}. This suffix command is set by the
abbreviation styles. This means that every time an abbreviation
-style is implemented, \cs{abbrvpluralsuffix} is redefined. Most
+style is implemented, \ics{abbrvpluralsuffix} is redefined. Most
styles simply define this command as:
\begin{verbatim}
\renewcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}
\end{verbatim}
-where \cs{glsxtrabbrvpluralsuffix} expands to \cs{glspluralsuffix}.
+where \ics{glsxtrabbrvpluralsuffix} expands to \ics{glspluralsuffix}.
The \qt{sc} styles (such as \abbrstyle{long-short-sc}) use a different
definition:
\begin{verbatim}
@@ -4356,9 +6924,9 @@ counter-acting the affect of the small-caps font.
This means that if you want to change or strip the suffix used for
the plural short form, it's usually not sufficient to redefine
-\cs{abbrvpluralsuffix}, as the change will be undone the next time
+\ics{abbrvpluralsuffix}, as the change will be undone the next time
the style is applied. Instead, for a document-wide solution, you
-need to redefine \cs{glsxtrabbrvpluralsuffix}. Alternatively you can
+need to redefine \ics{glsxtrabbrvpluralsuffix}. Alternatively you can
use the category attributes.
There are two attributes that affect the short plural suffix
@@ -4366,7 +6934,7 @@ formation. The first is \catattr{aposplural} which uses the suffix
\begin{verbatim}
'\abbrvpluralsuffix
\end{verbatim}
-That is, an apostrophe followed by \cs{abbrvpluralsuffix} is
+That is, an apostrophe followed by \ics{abbrvpluralsuffix} is
appended. The second attribute is \catattr{noshortplural} which
suppresses the suffix and simply sets \field{shortplural} to the
same as \field{short}.
@@ -4388,22 +6956,20 @@ Now just make sure all the French abbreviations are have their
The other approach is to use the options listed below.
-\subsection{\csoptnv{short-plural-suffix}\csopteqval{value}}
-\labelopt{short-plural-suffix}
+\optsection{short-plural-suffix}
Sets the plural suffix for the default \field{shortplural} to \meta{value}. If
this option is omitted or if
-\csopt[use-default]{short\dhyphen plural-suffix}, then \bibgls\ will leave
-it to \sty{glossaries-extra} to determine the appropriate default.
+\csopt[use-default]{short-plural-suffix}, then \bibgls\ will leave
+it to \styfmt{glossaries-extra} to determine the appropriate default.
If the \meta{value} is omitted or empty, the suffix is set to empty.
-\subsection{\csoptnv{dual-short-plural-suffix}\csopteqval{value}}
-\labelopt{dual-short-plural-suffix}
+\optsection{dual-short-plural-suffix}
Sets the plural suffix for the default \field{dualshortplural} field to
\meta{value}. If this option is omitted or if
\csopt[use-default]{dual-short-plural-suffix}, then \bibgls\ will leave it to
-\sty{glossaries-extra} to determine the appropriate default.
+\styfmt{glossaries-extra} to determine the appropriate default.
If the \meta{value} is omitted or empty, the suffix is set to empty.
\section{Location List Options}
@@ -4411,44 +6977,41 @@ If the \meta{value} is omitted or empty, the suffix is set to empty.
The \styopt{record} package option automatically adds two new keys:
\field{loclist} and \field{location}. These two fields are set by
-\bibgls\ from the information supplied in the \ext{aux} file (unless
-the option \optref[false]{save-locations} is used). The
-\field{loclist} field has the syntax of an \sty{etoolbox} internal list
+\bibgls\ from the information supplied in the \iext{aux} file (unless
+the option \csopt[false]{save-locations} is used). The
+\field{loclist} field has the syntax of an \isty{etoolbox} internal list
and includes every location (except for the discarded duplicates and
ignored formats).
Each item in the list is provided in the form
\begin{alltt}
-\cs{glsseeformat}\oargm{tag}\margm{label list}\marg{}
+\ics{glsseeformat}\oargm{tag}\margm{label list}\marg{}
\end{alltt}
for the cross-reference supplied by the \field{see} field,
\begin{alltt}
-\cs{glsxtruseseealsoformat}\margm{label list}
+\ics{glsxtruseseealsoformat}\margm{label list}
\end{alltt}
for the cross-reference supplied by the \field{seealso} field,
and
-\begin{alltt}
-\cs{glsnoidxdisplayloc}\margm{prefix}\margm{counter}\margm{format}\margm{location}
-\end{alltt}
+\nosecdef{glsnoidxdisplayloc}
for the locations. You can iterate through the \field{loclist} value
using one of \sty{etoolbox}'s internal list loops (either
-by first fetching the list using \cs{glsfieldfetch}
-or through \sty{glossaries-extra}'s \cs{glsxtrfielddolistloop}
-or \cs{glsxtrfieldforlistloop} shortcuts).
+by first fetching the list using \ics{glsfieldfetch}
+or through \styfmt{glossaries-extra}'s \ics{glsxtrfielddolistloop}
+or \ics{glsxtrfieldforlistloop} shortcuts).
-The \meta{format} is that supplied by the \gencsopt{gls}{format} key
-when using commands like \cs{gls} or \cs{glsadd} (the encapsulator or encap in
-\appfmt{makeindex} parlance). If omitted,
-\gencsopt[glsnumberformat]{gls}{format} is assumed (unless this
-default value is changed with \cs{GlsXtrSetDefaultNumberFormat},
-provided by \sty{glossaries-extra} v1.19+).
+The \meta{format} is that supplied by the \glsopt{format} key
+when using commands like \ics{gls} or \ics{glsadd} (the encapsulator or encap in
+\idx!{makeindex} parlance). If omitted, the default
+\glsopt[glsnumberformat]{format} is assumed (unless this
+default value is changed with \ics{GlsXtrSetDefaultNumberFormat}.
Ranges can be explicitly formed using the parenthetical encap
syntax \glsopt[(]{format} and
\glsopt[)]{format} or \glsopt[(\meta{csname}]{format} and
\glsopt[)\meta{csname}]{format} (where \meta{csname} is the name of
a text-block command without the initial backslash) in the optional
-argument of commands like \cs{gls} or \cs{glsadd}. These will always
-form a range, regardless of \optref{min-loc-range}, and will be
+argument of commands like \ics{gls} or \ics{glsadd}. These will always
+form a range, regardless of \csopt{min-loc-range}, and will be
encapsulated by \csref{bibglsrange}. (This command is not used with
ranges that are formed by collating consecutive locations.)
@@ -4466,9 +7029,9 @@ for example \verb|\gls[format=textbf]{sample}| then it would cause a
warning and be moved before the start of the range so that the
location list would then be 1, \textbf{3}, 2--4.
-The special format \gencsopt[glsignore]{glsadd}{format} is provided
+The special format \glsaddopt[glsignore]{format} is provided
by the \styfmt{glossaries} package for cases where the location
-should be ignored. (The command \cs{glsignore} simply ignores its
+should be ignored. (The command \ics{glsignore} simply ignores its
argument.) This works reasonably well if an entry only has the one
location, but if the entry happens to be indexed again, it can lead
to an odd empty gap in the location list with a spurious comma. If
@@ -4476,74 +7039,77 @@ to an odd empty gap in the location list with a spurious comma. If
will be selected but the record will be discarded.
This means that the location list will be empty if the entry was
-only indexed with \optfmt{glsignore}, but if the entry was also
+only indexed with the special ignored format, but if the entry was also
indexed with another format then the location list won't include the
-ignored record. (This format is used by \cs{glsaddallunused} but
+ignored records. (This format is used by \ics{glsaddallunused} but
remember that iterative commands like this don't work with \bibgls.
-Instead, just use \optref[all]{selection} to select all entries.)
+Instead, just use \csopt[all]{selection} to select all entries.
+Those that don't have records won't have a location list.)
For example, suppose you only want main matter locations in the
number list, but you want entries that only appear in the back matter
to still appear in the glossary (without a location list), then you could do:
-\begin{verbatim}
-\backmatter
-\GlsXtrSetDefaultNumberFormat{glsignore}
-\end{verbatim}
-(This command requires v1.19 of \sty{glossaries-extra}.) If you also
-want to drop front matter locations as well:
-\begin{verbatim}
-\frontmatter
-\GlsXtrSetDefaultNumberFormat{glsignore}
-...
-\mainmatter
-\GlsXtrSetDefaultNumberFormat{glsnumberformat}
-...
-\backmatter
-\GlsXtrSetDefaultNumberFormat{glsignore}
-\end{verbatim}
+\begin{alltt}
+\ics{backmatter}
+\ics{GlsXtrSetDefaultNumberFormat}\marg{glsignore}
+\end{alltt}
+If you also want to drop front matter locations as well:
+\begin{alltt}
+\ics{frontmatter}
+\cs{GlsXtrSetDefaultNumberFormat}\marg{glsignore}
+\ldots
+\ics{mainmatter}
+\cs{GlsXtrSetDefaultNumberFormat}\marg{glsnumberformat}
+\ldots
+\cs{backmatter}
+\cs{GlsXtrSetDefaultNumberFormat}\marg{glsignore}
+\end{alltt}
Note that explicit range formations aren't discarded, so if
-\optfmt{glsignore} is used in a range, such as
+\encap{glsignore} is used in a range, such as
\begin{verbatim}
\glsadd[format=(glsignore]{sample}
...
\glsadd[format=)glsignore]{sample}
\end{verbatim}
then the range will be included in the location list (encapsulated
-with \cs{glsignore}), but this case would be a rather odd use of
+with \ics{glsignore}), but this case would be a rather odd use of
this special format and is not recommended.
+The record counting commands, such as \ics{rgls}, use the special
+format \encap{glstriggerrecordformat}, which \bibgls\ also treats
+as an ignored location and the same rules as for \encap{glsignore} apply.
+
The locations are always listed in the order in which they were indexed,
(except for the cross-reference which may be placed at the start or
end of the list or omitted).
-This is different to \app{xindy} and \app{makeindex} where you can
+This is different to \idx!{xindy} and \idx!{makeindex} where you can
specify the ordering (such as lower case Roman first, then digits,
etc), but unlike those applications, \bibgls\ allows any location,
although it may not be able to work out an integer representation.
-(With \app{xindy}, you can define new location formats, but you need
+(With \idx!{xindy}, you can define new location formats, but you need
to remember to add the appropriate code to the custom module.)
It's possible to define a custom glossary style where
-\cs{glossentry} (and the child form \cs{subglossentry}) ignore the
+\ics{glossentry} (and the child form \ics{subglossentry}) ignore the
final argument (which will be the \field{location} field)
and instead parse the \field{loclist} field and re-order the
-locations or process them in some other way. Remember that you can also use \cs{glsnoidxloclist}
-provided by \sty{glossaries}. For example:
+locations or process them in some other way. Remember that you can
+also use \ics{glsnoidxloclist}
+provided by \styfmt{glossaries}. For example:
\begin{verbatim}
\glsfieldfetch{gls.sample}{loclist}{\loclist}% fetch location list
\glsnoidxloclist{\loclist}% iterate over locations
\end{verbatim}
-This uses \cs{glsnoidxloclisthandler} as the list's handler
-macro, which simply displays each location separated by \cs{delimN}.
+This uses \ics{glsnoidxloclisthandler} as the list's handler
+macro, which simply displays each location separated by \ics{delimN}.
(See also
\href{http://www.dickimaw-books.com/latex/admin/html/foreachtips.shtml}{Iteration
-Tips and Tricks}.)
+Tips and Tricks}~\cite{iterationtips}.)
-Each location is listed in the \ext{aux} file in the form:
-\begin{alltt}
-\cs{glsxtr@record}\margm{label}\margm{prefix}\margm{counter}\margm{format}\margm{location}
-\end{alltt}
-Exact duplicates are discarded. For example, if \texttt{cat}
+Each location is listed in the \iext{aux} file in the form:
+\nosecdef{glsxtr@record}
+Exact duplicates are discarded. For example, if \code{cat}
is indexed twice on page 1:
\begin{verbatim}
\glsxtr@record{cat}{}{page}{glsnumberformat}{1}
@@ -4567,15 +7133,15 @@ makes the following tests:
\item If one of the formats includes a range formation, the
range takes precedence.
-\item If one of the formats is \texttt{glsnumberformat} (as in the
-above example) or \texttt{glsignore}, that format will be skipped.
+\item If one of the formats is \encap{glsnumberformat} (as in the
+above example) or \encap{glsignore}, that format will be skipped.
So in the above example, the second record will be added to the
location list, but not the first. (A message will only be written to
the transcript if the \longarg{debug} switch is used.) The default
-\texttt{glsnumberformat} will take precedence over the ignored
-format \texttt{glsignore}.
+\encap{glsnumberformat} will take precedence over the ignored
+format \encap{glsignore}.
-\item If a mapping has been set with the \argref{map-format}
+\item If a mapping has been set with the \longarg{map-format}
switch that mapping will be checked.
\item Otherwise the duplicate record will be discarded with a
warning.
@@ -4583,40 +7149,43 @@ warning.
The \field{location} field is used to store the formatted location
list. The code for this list is generated by \bibgls\ based on the
-information provided in the \ext{aux} file, the presence of the
+information provided in the \iext{aux} file, the presence of the
\field{see} or \field{seealso} field and the various settings described in this
-chapter. When you display the glossary using \cs{printunsrtglossary},
+chapter. When you display the glossary using \ics{printunsrtglossary},
if the \field{location} field is present it will be displayed
according to the glossary style (and other factors, such as whether the
\styopt{nonumberlist} option has been used, either as a package
-option or supplied in the optional argument of \cs{printunsrtglossary}).
+option or supplied in the optional argument of \ics{printunsrtglossary}).
For more information on adjusting the formatting see the
-\sty{glossaries} and \sty{glossaries-extra} user manuals.
+\styfmt{glossaries}~\cite{glossaries} and
+\styfmt{glossaries-extra}~\cite{glossaries-extra} user manuals.
-\subsection{\csoptnv{save-locations}\csopteqval{boolean}}
-\labelopt{save-locations}
+\optsection{save-locations}
By default, the locations will be processed and stored in the
\field{location} and \field{loclist} fields. However, if you don't
want the location lists (for example, you are using the
-\styopt{nonumberlist} option or you are using \app{xindy} with a
+\styopt{nonumberlist} option or you are using \idx{xindy} with a
custom location rule), then there's no need for \bibgls\ to process
the locations. To switch this function off, just use
\csopt[false]{save-locations}. Note that with this setting, if
-you're not additionally using \app{makeindex} or \app{xindy}, then
+you're not additionally using \idx{makeindex} or \idx{xindy}, then
the locations won't be available even if you don't have the
\styopt{nonumberlist} option set.
-\subsection{\csoptnv{min-loc-range}\csopteqval{value}}
-\labelopt{min-loc-range}
+\optsection{save-loclist}
+
+If you want the \field{location} field but don't need
+\field{loclist}, you can use \csopt[false]{save-loclist}.
+This can help to save resources and build time.
+
+\optsection{min-loc-range}
By default, three or more consecutive locations \meta{loc-1},
\meta{loc-2}, \ldots, \meta{loc-n} are compressed into
-the range \texttt{\meta{loc-1}\cs{delimR} \meta{loc-n}} (where
-\cs{delimR} is provided by the \sty{glossaries} package). Otherwise
-the locations are separated by \cs{delimN} (again provided by
-\sty{glossaries}). As mentioned above, these aren't merged with
-explicit range formations.
+the range \code{\meta{loc-1}\ics{delimR} \meta{loc-n}}. Otherwise
+the locations are separated by \csref{bibglsdelimN}. As mentioned
+above, these aren't merged with explicit range formations.
You can change this with the \csopt{min-loc-range} setting where
\meta{value} is either \optfmt{none} (don't form ranges) or an
@@ -4636,11 +7205,9 @@ considered consecutive.
\item\label{itm:emptyloc} If either \meta{location-1} or \meta{location-2} are empty,
then the locations aren't considered consecutive.
\item\label{itm.csmatch} If both \meta{location-1} and \meta{location-2} match the
-pattern (line break for clarity only)\footnote{The Java class \texttt{\csfmt{p}\marg{javaDigit}}
-used in the regular expression will not only match the Western
-Arabic digits 0,\ldots, 9 but also digits in other scripts.
-Similarly the alphabetic classes will match alphabetic characters
-outside the Basic Latin set.}
+pattern (line break for clarity only)\footnote{The Java class \code{\csfmt{p}\marg{javaDigit}}
+used in the regular expression will match any digits in the
+Unicode \idx{numberdecimaldigit} category not just the digits in the Basic Latin set.}
\begin{verbatim}
(.*?)(?:\\protect\s*)?(\\[\p{javaAlphabetic}@]+)\s*\{([\p{javaDigit}
\p{javaAlphabetic}]+)\}
@@ -4703,8 +7270,8 @@ where \meta{n} is an upper case Roman numeral, which is converted to
a decimal value and the test is performed
in the same way as the above \hyperref[itm:decmatch]{decimal test}.
\item\label{itm:alphmatch} The next pattern matches for \meta{prefix}\meta{sep}\meta{c}
-where \meta{c} is either a lower case letter from \texttt{a} to
-\texttt{z} or an upper case letter from \texttt{A} to \texttt{Z}.
+where \meta{c} is either a lower case letter from \code{a} to
+\code{z} or an upper case letter from \code{A} to \code{Z}.
The character is converted to its code point and the test is
performed in the same way as the \hyperref[itm:decmatch]{decimal pattern} above.
\item\label{itm:nomatch} If none of the above, the locations aren't considered
@@ -4738,7 +7305,7 @@ These records aren't consecutive since the formats are different.
These records are consecutive. The prefix, counter and format are
identical (so it passes step~\ref{itm:pre}). The locations match
the \hyperref[itm:rommatch]{lower case Roman numeral pattern}, where
-\texttt{A} is considered a prefix and the dot is consider a
+\code{A} is considered a prefix and the dot is consider a
separator. The Roman numerals i and ii are converted to decimal and
the test is retried with the locations set to 1 and 2, respectively.
This now passes the decimal pattern test (step~\ref{itm:decgrp3}).
@@ -4750,10 +7317,10 @@ This now passes the decimal pattern test (step~\ref{itm:decgrp3}).
\end{verbatim}
These records aren't consecutive. They match the
\hyperref[itm:alphmatch]{alpha pattern}. The first location is
-considered to consist of the prefix \texttt{i}, the separator
-\texttt{.} (dot) and the number given by the character code of A.
+considered to consist of the prefix \code{i}, the separator
+\code{.}\ (dot) and the number given by the character code of A.
The second location is considered to consist of the prefix
-\texttt{ii}, the separator \texttt{.} (dot) and the number
+\code{ii}, the separator \code{.}\ (dot) and the number
given by the character code of A.
The test fails because the numbers are equal and the prefixes are
@@ -4766,7 +7333,7 @@ different.
\end{verbatim}
These records are consecutive. They match the \hyperref[itm:decmatch]{decimal
pattern}, and then step~\ref{itm:decgrp3eq} followed by
-step~\ref{itm:decgrp3eqsepeq}. The \texttt{.0} part is discarded and
+step~\ref{itm:decgrp3eqsepeq}. The \code{.0} part is discarded and
the test is retried with the first location set to 1 and the second
location set to 2.
@@ -4788,11 +7355,10 @@ These records are consecutive. The locations match the
sequences are the same, so the test is retried with the first
location set to 1 and the second location set to 2.
(Note that \csref{glsxtrresourcefile} changes the category code of
-\texttt{@} to allow for internal commands in locations.)
+\code{@} to allow for internal commands in locations.)
\end{enumerate}
-\subsection{\csoptnv{max-loc-diff}\csopteqval{value}}
-\labelopt{max-loc-diff}
+\optsection{max-loc-diff}
This setting is used to determine whether two locations are
considered consecutive.
@@ -4818,7 +7384,7 @@ So, for example, the list \qt{1, 2, 3, 5, 7, 8, 10, 11, 12, 58, 59,
61} becomes
\qt{1--3, 5, 7, 8, 10--12, 58, 59, 61}.
-The automatically indexing of commands like \cs{gls} means that
+The automatically indexing of commands like \ics{gls} means that
the location lists can become long and ragged. You could
deal with this by switching off the automatic indexing and
only explicitly index pertinent use or you can adjust
@@ -4834,8 +7400,7 @@ the list becomes \qt{1--12 passim, 58--61 passim} which now highlights that
there are two blocks within the document related to that
term.
-\subsection{\csoptnv{suffixF}\csopteqval{value}}
-\labelopt{suffixF}
+\optsection{suffixF}
If set, a range consisting of two consecutive locations
\meta{loc-1} and \meta{loc-2} will be
@@ -4847,8 +7412,7 @@ empty string. To remove the suffix formation use
The default is \csopt[none]{suffixF}.
-\subsection{\csoptnv{suffixFF}\csopteqval{value}}
-\labelopt{suffixFF}
+\optsection{suffixFF}
If set, a range consisting of three or more consecutive locations
\meta{loc-1} and \meta{loc-2} will be
@@ -4860,13 +7424,12 @@ empty string. To remove the suffix formation use
The default is \csopt[none]{suffixFF}.
-\subsection{\csoptnv{see}\csopteqval{value}}
-\labelopt{see}
+\optsection{see}
If an entry has a \field{see} field, this can be placed before or
after the location list, or completely omitted (but the value will
still be available in the \field{see} field for use with
-\cs{glsxtrusesee}). This option may take the following values:
+\ics{glsxtrusesee}). This option may take the following values:
\begin{itemize}
\item \optfmt{omit}: omit the see reference from the location
list.
@@ -4880,20 +7443,25 @@ The \meta{value} part is required.
The separator between the location list and the cross-reference is
provided by \csref{bibglsseesep}. This separator is omitted if the
location list is empty. The cross-reference is written to the
-\field{location} field using \cs{glsxtrusesee}\margm{label}.
+\field{location} field using \gls{bibglsusesee}\margm{label}.
-\subsection{\csoptnv{seealso}\csopteqval{value}}
-\labelopt{seealso}
+\optsection{seealso}
-This is like \optref{see} but governs the location of the cross-references
+This is like \csopt{see} but governs the location of the cross-references
provided by the \field{seealso} field. You need at least v1.16
of \sty{glossaries-extra} for this option. The values are the
-same as for \optref{see} but the separator is given by
+same as for \csopt{see} but the separator is given by
\csref{bibglsseealsosep}. The cross-reference is written to the
-\field{location} field using \cs{glsxtruseseealso}\margm{label}.
+\field{location} field using \gls{bibglsuseseealso}\margm{label}.
+
+\optsection{alias}
+
+This is like \csopt{alias} but governs the location of the cross-references
+provided by the \field{alias} field. The separator is given by
+\csref{bibglsaliassep}. The cross-reference is written to the
+\field{location} field using \gls{bibglsusealias}\margm{label}.
-\subsection{\csoptnv{alias-loc}\csopteqval{value}}
-\labelopt{alias-loc}
+\optsection{alias-loc}
If an entry has an \field{alias} field, the location list
may be retained or omitted or transferred to the target entry.
@@ -4913,27 +7481,26 @@ Note that with \csopt[transfer]{alias-loc}, both the aliased
entry and the target entry must be in the same resource set.
(That is, both entries have been selected by the same instance of
\csref{glsxtrresourcefile}.) If you have \sty{glossaries-extra} version
-1.12, you may need to redefine \cs{glsxtrsetaliasnoindex} to do
+1.12, you may need to redefine \ics{glsxtrsetaliasnoindex} to do
nothing if the location lists aren't showing correctly
with aliased entries. (This was corrected in version 1.13.)
-\subsection{\csoptnv{loc-prefix}\csopteqval{value}}
-\labelopt{loc-prefix}
+\optsection{loc-prefix}
The \csopt{loc-prefix} setting indicates that the location lists
should begin with \csref{bibglslocprefix}\margm{n}. The \meta{value} may
be one of the following:
\begin{itemize}
-\item \optfmt{false}: don't insert \cs{bibglslocprefix}\margm{n} at the start
+\item \optfmt{false}: don't insert \gls{bibglslocprefix}\margm{n} at the start
of the location lists (default).
\item \optfmt{\margm{prefix-1},\margm{prefix-2},\ldots,\margm{prefix-n}}:
-insert \cs{bibglslocprefix}\margm{n} (where \meta{n} is the number of
+insert \gls{bibglslocprefix}\margm{n} (where \meta{n} is the number of
locations in the list) at the start of each location list and the
-definition of \cs{bibglslocprefix} will be appended to the glossary
-preamble providing an \cs{ifcase} condition:
+definition of \gls{bibglslocprefix} will be appended to the glossary
+preamble providing an \ics{ifcase} condition:
\begin{alltt}
-\cs{providecommand}\marg{\cs{bibglslocprefix}}[1]\marg{\%
- \cs{ifcase}\string#1
+\csfmt{providecommand}\marg{\gls{bibglslocprefix}}[1]\marg{\%
+ \ics{ifcase}\string#1
\csfmt{or} \meta{prefix-1}\csref{bibglspostlocprefix}
\csfmt{or} \meta{prefix-2}\csfmt{bibglspostlocprefix}
\ldots
@@ -4942,12 +7509,15 @@ preamble providing an \cs{ifcase} condition:
}
\end{alltt}
-\item \optfmt{list}: equivalent to \csopt[\cs{pagelistname} ]{loc-prefix}.
+\item \optfmt{comma}:
+essentially equivalent to \csopt[\marg{,~}]{loc-prefix} but
+avoids confusion with the list format.
+\item \optfmt{list}: equivalent to \csopt[\ics{pagelistname} ]{loc-prefix}.
\item \optfmt{true}: equivalent to
\csopt[\csref{bibglspagename},\csref{bibglspagesname}]{loc-prefix},
-where the definitions of \cs{bibglspagename} and
-\cs{bibglspagesname} are obtained from the \texttt{tag.page} and
-\texttt{tag.pages} entries in \bibgls's \langxml.
+where the definitions of \gls{bibglspagename} and
+\gls{bibglspagesname} are obtained from the \code{tag.page} and
+\code{tag.pages} entries in \bibgls's \langxml.
This setting works best if the document's language matches the
language file. However, you can redefine these commands within
the document's language hooks or in the glossary preamble.
@@ -4968,11 +7538,11 @@ For example:
\end{verbatim}
This works since the conflicting \csopt[p.,pp.]{loc-prefix} and
\csopt[true]{loc-prefix} are in different glossaries (assigned through the
-\optref{type} key). The entries fetched from \texttt{entries1.bib}
+\csopt{type} key). The entries fetched from \filefmt{entries1.bib}
won't have a location prefix. The entries fetched from
-\texttt{entries2.bib} will have the location prefix obtained from
+\filefmt{entries2.bib} will have the location prefix obtained from
the language resource file. The entries fetched from
-\texttt{entries3.bib} will have the location prefix \qt{p.}\ or
+\filefmt{entries3.bib} will have the location prefix \qt{p.}\ or
\qt{pp.} (Note that using the \csopt{type} option isn't the same as
setting the \field{type} field for each entry in the \ext{bib}
file.)
@@ -4985,14 +7555,13 @@ If the \csopt{type} option isn't used:
\end{verbatim}
then \csopt[true]{loc-prefix} takes precedence over
\csopt[p.,pp.]{loc-prefix} (since it was used first). The entries fetched from
-\texttt{entries1.bib} still won't have a location prefix, but the entries
-fetched from both \texttt{entries2.bib} and \texttt{entries3.bib}
+\filefmt{entries1.bib} still won't have a location prefix, but the entries
+fetched from both \filefmt{entries2.bib} and \filefmt{entries3.bib}
have the location prefixes obtained from the language resource file.
-\subsection{\csoptnv{loc-suffix}\csopteqval{value}}
-\labelopt{loc-suffix}
+\optsection{loc-suffix}
-This is similar to \optref{loc-prefix} but there are some subtle
+This is similar to \csopt{loc-prefix} but there are some subtle
differences. In this case \meta{value} may either be the keyword
\optfmt{false} (in which case the location suffix is omitted)
or a comma-separated list
@@ -5006,21 +7575,20 @@ is the suffix when the location list has \meta{n} or more locations
This option will append \csref{bibglslocsuffix}\margm{n} to location
lists that either have a cross-reference or have at least one location.
-Unlike \cs{bibglslocprefix}, this command isn't used when the
+Unlike \gls{bibglslocprefix}, this command isn't used when the
location list is completely empty. Also, unlike
-\cs{bibglslocprefix}, this suffix command doesn't have an equivalent
-to \cs{bibglspostlocprefix}.
+\gls{bibglslocprefix}, this suffix command doesn't have an equivalent
+to \gls{bibglspostlocprefix}.
-If \meta{value} omitted, \csopt[\cs{@}.]{loc-suffix} is assumed.
-The default is \csopt[false]{loc-suffix}.
+If \meta{value} omitted, \csopt[\ics{at}\idx{periodchar}]{loc-suffix}
+is assumed. The default is \csopt[false]{loc-suffix}.
-As with \optref{loc-prefix}, take care not to mix different values
+As with \csopt{loc-prefix}, take care not to mix different values
of \csopt{loc-suffix} for entries in the same glossary type.
-\subsection{\csoptnv{loc-counters}\csopteqval{list}}
-\labelopt{loc-counters}
+\optsection{loc-counters}
-Commands like \cs{gls} allow you to select a different
+Commands like \ics{gls} allow you to select a different
counter to use for the location for that specific instance
(overriding the default counter for the entry's glossary type).
This is done with the \glsopt{counter} option. For example,
@@ -5038,36 +7606,28 @@ consider the following document:
\begin{document}
\gls{pi}.
-
\begin{equation}
\gls[counter=equation]{pi}
\end{equation}
-
\begin{equation}
\gls[counter=equation]{pi}
\end{equation}
\newpage
-
\begin{equation}
\gls[counter=equation]{pi}
\end{equation}
-
\newpage
-
\gls{pi}.
\newpage
-
\gls{pi}.
\newpage
-
\gls{pi}.
\newpage
-
\printunsrtglossaries
\end{document}
\end{verbatim}
@@ -5093,8 +7653,7 @@ This will first list the locations for the \counter{equation}
counter and then the locations for the \counter{page} counter.
Each group of locations is encapsulated within the command
\csref{bibglslocationgroup}\margm{n}\margm{counter}\margm{locations}.
-The groups are separated by \csref{bibglslocationgroupsep}
-(which defaults to \cs{delimN}).
+The groups are separated by \csref{bibglslocationgroupsep}.
The \meta{list} value must be non-empty. Use
\csopt[as-use]{loc-counters} to restore the default behaviour, where
@@ -5106,15 +7665,14 @@ you can't form counter groups from
\section{Supplemental Locations}
\label{sec:supplementalopts}
-\emph{These options require at least version 1.14 of \sty{glossaries-extra}.}
+\emph{These options require at least version 1.14 of \isty{glossaries-extra}.}
-\subsection{\csoptnv{supplemental-locations}\csopteqval{basename}}
-\labelopt{supplemental-locations}
+\optsection{supplemental-locations}
The \sty{glossaries-extra} package (from v1.14) provides a way of
manually adding locations in supplemental documents through the use
of the \glsaddopt{thevalue} option in the optional argument of
-\cs{glsadd}. Setting values manually is inconvenient and can result
+\ics{glsadd}. Setting values manually is inconvenient and can result
in errors, so \bibgls\ provides a way of doing this automatically.
Both the main document and the supplementary document need to use
the \styopt{record} option. The entries provided in the \csopt{src}
@@ -5170,11 +7728,11 @@ This uses the \counter{section} counter for the locations and has a
prefix (\verb|\thepart.|) for the section hyperlinks.
Now let's suppose I have another document called \filefmt{main.tex}
-that uses the \texttt{sample} entry, but also needs to include the
+that uses the \code{sample} entry, but also needs to include the
location (S1) from the supplementary document. The manual approached
-offered by \sty{glossaries-extra} is quite cumbersome and requires
+offered by \styfmt{glossaries-extra} is quite cumbersome and requires
setting the \catattr{externallocation} attribute and using
-\cs{glsadd} with \glsaddopt[S1]{thevalue}, \glsaddopt[I.S1]{theHvalue}
+\ics{glsadd} with \glsaddopt[S1]{thevalue}, \glsaddopt[I.S1]{theHvalue}
and \glsaddopt[glsxtrsupphypernumber]{format}.
This can be simplified with \bibgls\ by using the
@@ -5198,27 +7756,26 @@ name (without the extension) of the supplementary document
\end{document}
\end{verbatim}
-The location list for \texttt{sample} will now be \qt{1, S1} (page~1
+The location list for \code{sample} will now be \qt{1, S1} (page~1
from the main document and S1 from the supplementary document). Note
that the original location format from the supplementary document
will be replaced by \optfmt{glsxtrsupphypernumber}, which will
produce an external hyperlink if the main document loads the
-\sty{hyperref} package. (Note that not all PDF viewers can handle
+\isty{hyperref} package. (Note that not all PDF viewers can handle
external hyperlinks, and some that can open the external PDF file may not
recognise the destination within that file.)
The supplementary locations lists are encapsulated within
-\cs{bibglssupplemental}.
+\gls{bibglssupplemental}.
-\subsection{\csoptnv{supplemental-selection}\csopteqval{value}}
-\labelopt{supplemental-selection}
+\optsection{supplemental-selection}
-In the above example, only the \texttt{sample} entry is listed in
+In the above example, only the \code{sample} entry is listed in
the main document, even though the supplementary document also
-references the \texttt{goose}, \texttt{html} and \texttt{ssi}
+references the \code{goose}, \code{html} and \code{ssi}
entries. By default, only those entries that are referenced in the
main document will have supplementary locations added (if found in
-the supplementary document's \ext{aux} file). You can additionally
+the supplementary document's \iext{aux} file). You can additionally
include other entries that are referenced in the supplementary
document but not in the main document using
\optfmt{supplemental-selection}. The \meta{value} may be one of the
@@ -5226,7 +7783,7 @@ following:
\begin{itemize}
\item \optfmt{all}: add all the entries in the supplementary
document that have been defined in the \ext{bib} files listed in
-\optref{src} for this resource set in the main document.
+\csopt{src} for this resource set in the main document.
\item \optfmt{selected}: only add supplemental locations for entries
that have already been selected by this resource set.
\item \meta{label-1},\ldots,\meta{label-2}: in addition to all those
@@ -5237,7 +7794,7 @@ in this list doesn't have a record in the supplementary document's
\end{itemize}
Any records in the supplementary \ext{aux} file that aren't defined
by the current resource set (through the \ext{bib} files listed in
-\optref{src}) will be ignored. Entry aliases aren't taken into
+\csopt{src}) will be ignored. Entry aliases aren't taken into
account when including supplementary locations.
For example:
@@ -5259,23 +7816,22 @@ For example:
\end{document}
\end{verbatim}
-This will additionally add the \texttt{html} and \texttt{ssi} entries
+This will additionally add the \code{html} and \code{ssi} entries
even though they haven't been used in this document. The
-\texttt{goose} entry used in the supplementary document won't be
+\code{goose} entry used in the supplementary document won't be
included.
If an entry has both a main location list and a supplementary
-location list (such as the \texttt{sample} entry above), the lists
+location list (such as the \code{sample} entry above), the lists
will be separated by \csref{bibglssupplementalsep}.
-\subsection{\csoptnv{supplemental-category}\csopteqval{value}}
-\labelopt{supplemental-category}
+\optsection{supplemental-category}
-The \optfmt{category} for entries containing supplemental location
-lists may be set using \optfmt{supplemental\dhyphen category}. If unset,
+The \field{category} field for entries containing supplemental location
+lists may be set using this option. If unset,
\meta{value} defaults to the same as that given by the
-\optref{category} option. The \meta{value} may either be a known
-identifier (as per \optref{category}) or the category label. For example:
+\csopt{category} option. The \meta{value} may either be a known
+identifier (as per \csopt{category}) or the category label. For example:
\begin{verbatim}
\documentclass{article}
@@ -5300,7 +7856,7 @@ identifier (as per \optref{category}) or the category label. For example:
\label{sec:sortingopts}
Entries are typically sorted (for example, alphabetically
-or in order of use), but the \sty{glossaries-extra} package
+or in order of use), but the \styfmt{glossaries-extra} package
is versatile enough to be used in wider contexts than simple
terms, symbols or abbreviations. For example, entries could
contain theorems or problems where the \field{name} supplies
@@ -5310,11 +7866,189 @@ the proof or solution. Therefore, somewhat unusually for
an indexing application, \bibgls\ also provides the option
to shuffle the entries instead of sorting them.
-\subsection{\csoptnv{sort}\csopteqval{value}}
-\labelopt{sort}
+\optsection{sort}
+
+The \csopt{sort} key indicates how entries should be sorted.
+If the \meta{value} is omitted, \csopt[doc]{sort} is assumed. If the
+\csopt{sort} option isn't used then \csopt[locale]{sort} is assumed.
+The reverse sort methods reverse the algorithm used by the
+comparators. This means that
+\optfmt{\meta{method}\dhyphen reverse}
+may not produce a list that's the exact reverse of the
+underlying non-reversed \meta{method}. The reverse sorts maintain
+hierarchy, so sub-entries will still be listed after the parent
+entry.
+
+Remember that you can have \atentry{preamble} definitions that
+can be hidden from \bibgls's interpreter. For example,
+\exfile{no-interpret-preamble.bib} might contain:
+\begin{verbatim}
+@preamble{"\providecommand{\sortop}[2]{#1 #2}"}
+\end{verbatim}
+which is loaded using
+\begin{verbatim}
+\GlsXtrLoadResources[src={no-interpret-preamble},
+ interpret-preamble=false]
+\end{verbatim}
+This provides a custom command
+\nosecdef{sortop}
+for internal use in the document. (Remember it won't be defined on
+the first \LaTeX\ run before the \iext{glstex} file has been
+created and so is only used within entry fields.)
-The \csopt{sort} key indicates how entries should be sorted. The
-\meta{value} may be one of:
+Another file, say, \filefmt{interpret-preamble.bib} may provide
+a definition for \bibgls:
+\begin{verbatim}
+@preamble{"\providecommand{\sortop}[2]{#2, #1}"}
+\end{verbatim}
+which can be identified with:
+\begin{verbatim}
+\GlsXtrLoadResources[src={interpret-preamble}]
+\end{verbatim}
+This definition swaps the two arguments around for the sorting, but
+doesn't affect the document since \LaTeX\ has already defined
+\csfmt{sortop} from the first resource set.
+
+For example:
+\begin{verbatim}
+@entry{caesar,
+ name={\sortop{Gaius Julius}{Caesar}},
+ first={Julius Caesar},
+ text={Caesar},
+ description={Roman politician and general}
+}
+\end{verbatim}
+If \bibgls\ only recognises the second definition of \csfmt{sortop} then
+the sort value becomes \code{Caesar, Gaius Julius}.
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: No Actual Sorting}
+\label{tab:sortoptionsnosort}
+\centering
+\begin{tabular}{ll}
+\optfmt{none} or \optfmt{unsrt} & don't sort\tabularnewline
+\optfmt{random} & shuffle entries\tabularnewline
+\optfmt{use} & order of use
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: Alphabet}
+\label{tab:sortoptionsrule}
+\centering
+\begin{tabular}{ll}
+\meta{lang tag} & sort according to this language tag\tabularnewline
+\meta{lang tag}\optfmt{-reverse} & reverse sort according to this language tag\tabularnewline
+\optfmt{doc} & sort according to the document
+language\tabularnewline
+\optfmt{doc-reverse} & reverse sort according to the document
+language\tabularnewline
+\optfmt{locale} & sort according to the default
+locale\tabularnewline
+\optfmt{locale-reverse} & reverse sort according to the default
+locale\tabularnewline
+\optfmt{custom} & sort according to \csopt[\meta{custom
+rule}]{sort-rule}\tabularnewline
+\optfmt{custom-reverse} & reverse sort according to \csopt[\meta{custom rule}]{sort-rule}
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: Letter (Unicode Order)}
+\label{tab:sortoptionsletter}
+\centering
+\begin{tabular}{ll}
+\optfmt{letter-case} & case-sensitive letter sort\tabularnewline
+\optfmt{letter-case-reverse} & reverse case-sensitive letter
+sort\tabularnewline
+\optfmt{letter-nocase} & case-insensitive letter sort\tabularnewline
+\optfmt{letter-nocase-reverse} & reverse case-insensitive letter
+sort\tabularnewline
+\optfmt{letter-upperlower} & upper-lower letter sort\tabularnewline
+\optfmt{letter-upperlower-reverse} & reverse upper-lower letter
+sort\tabularnewline
+\optfmt{letter-lowerupper} & lower-upper letter sort\tabularnewline
+\optfmt{letter-lowerupper-reverse} & reverse lower-upper letter sort
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: Letter-Number}
+\label{tab:sortoptionsletternumber}
+\centering
+\begin{tabular}{ll}
+\optfmt{letternumber-case} & case-sensitive letter-number
+sort\tabularnewline
+\optfmt{letternumber-case-reverse} & reverse case-sensitive
+letter-number sort\tabularnewline
+\optfmt{letternumber-nocase} & case-insensitive letter-number
+sort\tabularnewline
+\optfmt{letternumber-nocase-reverse} & reverse case-insensitive
+letter-number sort\tabularnewline
+\optfmt{letternumber-upperlower} & upper-lower letter-number
+sort\tabularnewline
+\optfmt{letternumber-upperlower-reverse} & reverse upper-lower
+letter-number sort\tabularnewline
+\optfmt{letternumber-lowerupper} & lower-upper letter-number
+sort\tabularnewline
+\optfmt{letternumber-lowerupper-reverse} & reverse lower-upper letter-number sort
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: Numerical}
+\label{tab:sortoptionsnumerical}
+\centering
+\begin{tabular}{ll}
+\optfmt{integer} & integer sort\tabularnewline
+\optfmt{integer-reverse} & reverse integer sort\tabularnewline
+\optfmt{hex} & hexadecimal sort\tabularnewline
+\optfmt{hex-reverse} & reverse hexadecimal sort\tabularnewline
+\optfmt{octal} & octal sort\tabularnewline
+\optfmt{octal-reverse} & reverse octal sort\tabularnewline
+\optfmt{binary} & binary sort\tabularnewline
+\optfmt{binary-reverse} & reverse binary sort\tabularnewline
+\optfmt{float} & float sort\tabularnewline
+\optfmt{float-reverse} & reverse float sort\tabularnewline
+\optfmt{double} & double sort\tabularnewline
+\optfmt{double-reverse} & reverse double sort\tabularnewline
+\optfmt{numeric} & locale-sensitive numeric sort\tabularnewline
+\optfmt{numeric-reverse} & reverse locale-sensitive numeric
+sort\tabularnewline
+\optfmt{currency} & locale-sensitive currency sort\tabularnewline
+\optfmt{currency-reverse} & reverse locale-sensitive currency
+sort\tabularnewline
+\optfmt{percent} & locale-sensitive percent sort\tabularnewline
+\optfmt{percent-reverse} & reverse locale-sensitive percent
+sort\tabularnewline
+\optfmt{numberformat} & locale-sensitive custom numeric
+sort\tabularnewline
+\optfmt{numberformat-reverse} & reverse locale-sensitive custom numeric sort
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\caption{Summary of Available Sort Options: Date-Time}
+\label{tab:sortoptionsdatetime}
+\centering
+\begin{tabular}{ll}
+\optfmt{date} & locale-sensitive date sort\tabularnewline
+\optfmt{date-reverse} & reverse locale-sensitive date
+sort\tabularnewline
+\optfmt{datetime} & locale-sensitive date-time sort\tabularnewline
+\optfmt{datetime-reverse} & reverse locale-sensitive date-time
+sort\tabularnewline
+\optfmt{time} & locale-sensitive time sort\tabularnewline
+\optfmt{time-reverse} & reverse locale-sensitive time sort
+\end{tabular}
+\end{table}
+
+\subsubsection{No Sort}
+
+The sort methods listed in \tableref{tab:sortoptionsnosort}
+don't actually perform any sorting. This may cause a problem for
+hierarchical entries. In some cases this can lead to detached child
+entries or an attempt to define a child entry before its parent.
\begin{itemize}
\item \optfmt{none} (or \optfmt{unsrt}): don't sort the entries.
@@ -5323,125 +8057,774 @@ the data.)
\item \optfmt{random}: shuffles rather than sorts the entries.
This won't work if there are hierarchical entries, so it's best
-to use this option with \optref{flatten}. The seed for the
-random generator can be set using \optref{shuffle} (which
+to use this option with \csopt{flatten}. The seed for the
+random generator can be set using \csopt{shuffle} (which
also automatically sets \csopt[random]{sort} and \csopt{flatten}).
+\item \optfmt{use}: order of use. This order is determined
+by the records written to the \iext{aux} file by the \styopt{record}
+package option. Dependencies and cross-references (including those
+identified with \ics{glssee}) come after entries with records.
+
+\end{itemize}
+
+\subsubsection{Alphabet}
+
+The sort methods listed in \tableref{tab:sortoptionsrule} are for
+alphabets that are defined by a rule. These usually ignore most
+punctuation and may ignore modifiers (such as accents). Use with
+\csopt{break-at} to determine whether or not to split at word
+boundaries.
+
+Note that \csopt[locale]{sort} can provide more detail about the
+locale than \csopt[doc]{sort}, depending on how the document
+language has been specified. For example, with:
+\begin{verbatim}
+\documentclass{article}
+\usepackage[ngerman]{babel}
+\usepackage[record]{glossaries}
+\GlsXtrLoadResources[src={german-terms}]
+\end{verbatim}
+the language tag will be \code{de-1996}, which doesn't have an
+associated region. Whereas with
+\begin{verbatim}
+\documentclass[de-DE-1996]{article}
+\usepackage[ngerman]{babel}
+\usepackage[record]{glossaries}
+\GlsXtrLoadResources[src={german-terms}]
+\end{verbatim}
+the language tag will be \code{de-DE-1996} because \isty{tracklang}
+has picked up the locale from the document class options. This is
+only likely to cause a difference if a language has different
+sorting rules according to the region or if the language may be
+written in multiple scripts.
+
+A multilingual document will need to have the \csopt{sort} specified
+when loading the resource to ensure the correct language is chosen.
+For example:
+\begin{verbatim}
+\GlsXtrLoadResources[src={english-terms},sort={en-GB}]
+\GlsXtrLoadResources[src={german-terms},sort={de-DE-1996}]
+\end{verbatim}
+
+\begin{itemize}
\item \meta{lang tag}: sort according to the rules of the locale
-given by the \gls{IETF} language tag \meta{lang tag}. (Use with
-\optref{break-at} to determine whether or not to split at word
-boundaries.)
+given by the \idx{IETF} language tag \meta{lang tag}.
+
+\item \meta{lang tag}\optfmt{-reverse}: reverse sort according to the rules of the locale
+given by the \idx{IETF} language tag \meta{lang tag}.
\item \optfmt{locale}: equivalent to
\csopt[\meta{lang tag}]{sort} where \meta{lang tag} is obtained
-from the operating system (or Java Runtime Environment).
+from the \idx{JRE} (which usually matches the
+operating system's locale).
+
+\item \optfmt{locale-reverse}: equivalent to
+\csopt[\meta{lang tag}-reverse]{sort} where \meta{lang tag} is obtained
+from the \idx{JRE}.
\item \optfmt{doc}: sort the entries according to the document
-language. This is equivalent to \optref[\meta{lang tag}]{sort}
+language. This is equivalent to \csopt[\meta{lang tag}]{sort}
where \meta{lang tag} is the locale associated with the document
language. In the case of a multi-lingual document, \meta{lang tag}
is the locale of the last language resource file to be loaded through
-\sty{tracklang}'s interface. It's best to explicitly set the locale
+\isty{tracklang}'s interface. It's best to explicitly set the locale
for multi-lingual documents to avoid confusion. If no languages have been tracked, this
option is equivalent to \csopt[locale]{sort}.
-\item \optfmt{custom}: sort the entries according to the
-rule provided by \optref{sort-rule}.
+\item \optfmt{doc-reverse}: as \optfmt{doc} but in reverse order.
-\item \optfmt{use}: sort in order of use. (This order is determined
-by the records written to the \ext{aux} file by the \styopt{record}
-package option.)
+\item \optfmt{custom}: sort the entries according to the
+rule provided by \csopt{sort-rule}.
-\item \optfmt{letter-case}: case-sensitive letter (character code) sort.
+\item \optfmt{custom-reverse}: reverse sort the entries according to the
+rule provided by \csopt{sort-rule}.
+\end{itemize}
-\item \optfmt{letter-case-reverse}: reverse case-sensitive letter (character code) sort.
+\subsubsection{Letter Case (Unicode Order)}
-\item \optfmt{letter-nocase}: case-insensitive letter (character code) sort.
+The sort methods listed in \tableref{tab:sortoptionsletter}
+use letter case comparators. These simply compare the
+character codes. The \optfmt{-nocase} options first convert the
+\field{sort} field to lower case before performing the sort.
+Punctuation isn't ignored.
Use \csopt[\meta{lang tag}]{sort} with \csopt[none]{break-at} to
-emulate \app{xindy}'s locale letter ordering.
+emulate \idx!{xindy}['s] locale letter ordering. The examples below
+show the ordering of the list \code{antelope}, \code{bee}, \code{Africa},
+\code{aardvark} and \code{Brazil}.
+\begin{itemize}
+\item \optfmt{letter-case}: case-sensitive letter sort. Upper case
+and lower case are in separate letter groups.
+Example:
+
+\code{Africa} (letter group \qt{A}), \code{Brazil}
+(letter group \qt{B}), \code{aardvark} (letter group \qt{a}),
+\code{antelope} (letter group \qt{a}), \code{bee} (letter group \qt{b}).
+
+\item \optfmt{letter-case-reverse}: reverse case-sensitive letter sort.
+
+\item \optfmt{letter-nocase}: case-insensitive letter sort. (All
+upper case characters will have first been converted to lower case.)
+Example:
+
+\code{aardvark} (letter group \qt{A}), \code{Africa}
+(letter group \qt{A}), \code{antelope} (letter group \qt{A}),
+\code{bee} (letter group \qt{B}),
+\code{Brazil} (letter group \qt{B}).
+
+\item \optfmt{letter-nocase-reverse}: reverse case-insensitive letter sort.
-\item \optfmt{letter-nocase-reverse}: reverse case-insensitive letter (character code) sort.
+\item \optfmt{letter-upperlower}: each character pair is first
+compared according to their lower case values. If these are equal,
+then they are compared according to case. This puts upper and lower
+case in the same letter group but the upper case comes first.
+Example:
+
+\code{Africa} (letter group \qt{A}), \code{aardvark} (letter group
+\qt{A}), \code{antelope} (letter group \qt{A}), \code{Brazil}
+(letter group \qt{B}), \code{bee} (letter group \qt{B}).
+
+\item \optfmt{letter-upperlower-reverse}: reverse upper-lower letter sort.
+
+\item \optfmt{letter-lowerupper}: each character pair is first
+compared according to their lower case values. If these are equal,
+then they are compared according to case. This puts upper and lower
+case in the same letter group but the lower case comes first.
+Example:
-\item \optfmt{integer}: integer sort. This is for integer sort
-values. Any value that isn't an integer is treated as 0.
+\code{aardvark} (letter group \qt{A}), \code{antelope} (letter group \qt{A}),
+ \code{Africa} (letter group \qt{A}), \code{bee} (letter group
+\qt{B}), \code{Brazil} (letter group \qt{B}).
+
+\item \optfmt{letter-lowerupper-reverse}: reverse lower-upper letter sort.
+\end{itemize}
+
+\subsubsection{Letter-Number}
+
+The sort methods listed in \tableref{tab:sortoptionsletternumber}
+use a letter-integer hybrid. They behave in a similar way to the
+above letter sort methods, but if an integer number pattern is detected in
+the string then the sub-string containing the number will be compared.
+This only detects base 10 integers (unlike the numeric methods
+such as \csopt[hexadecimal]{sort} or \csopt[float]{sort}) but in
+addition to recognising all the digits in the Unicode \idx{numberdecimaldigit}
+category it also recognises the subscript and
+superscript digits, such as \textsuperscript{1} (0x00B9)
+and \textsuperscript{2} (0x00B2).
+
+As with the letter sort methods, letters are compared using a
+character code comparison not by a locale alphabet. The closest
+locale-sensitive equivalent is to use \csopt{sort-number-pad} with a
+locale sort method.
+
+\begin{figure}
+\figcontents
+{%
+\begin{tikzpicture}[every node/.style={minimum size=9mm},
+ ampersand replacement=\&]
+\matrix[font={\Large\ttfamily}]
+{
+ \node[draw]{a\hexsb{61}}; \& \node{$=$}; \& \node[draw]{a\hexsb{61}}; \&[20mm]
+ \node[draw]{a\hexsb{61}}; \& \node{$=$}; \& \node[draw]{a\hexsb{61}};
+ \\
+ \node[draw]{b\hexsb{62}}; \& \node{$=$}; \& \node[draw]{b\hexsb{62}}; \&
+ \node[draw]{b\hexsb{62}}; \& \node{$=$}; \& \node[draw]{b\hexsb{62}};
+ \\
+ \node[draw]{c\hexsb{63}}; \& \node{$=$}; \& \node[draw]{c\hexsb{63}}; \&
+ \node[draw]{c\hexsb{63}}; \& \node{$=$}; \& \node[draw]{c\hexsb{63}};
+ \\
+ \node[draw,ultra thick]{1\hexsb{31}}; \& \node{$<$}; \&
+ \node[draw,ultra thick]{6\hexsb{36}}; \&
+ \node (n1) {1}; \& \node{$>$}; \& \node[draw,ultra thick]{6};
+ \\
+ \node[draw]{2\hexsb{32}}; \& \& \node[draw]{b\hexsb{62}}; \&
+ \node (n2) {2}; \& \& \node[draw]{b\hexsb{62}};
+ \\
+ \node[draw]{f\hexsb{66}}; \& \& \node[draw]{a\hexsb{61}}; \&
+ \node[draw]{f\hexsb{66}}; \& \& \node[draw]{a\hexsb{61}};
+ \\
+ \node[draw]{o\hexsb{6f}}; \& \& \node[draw]{r\hexsb{72}}; \&
+ \node[draw]{o\hexsb{6f}}; \& \& \node[draw]{r\hexsb{72}};
+ \\
+ \node[draw]{o\hexsb{6f}}; \& \& \&
+ \node[draw]{o\hexsb{6f}}; \& \&
+ \\[10pt]
+ \& \node[font=\rmfamily]{\subfigfmt{a}}; \& \&
+ \& \node[font=\rmfamily]{\subfigfmt{b}}; \&
+ \\
+};
+\draw[ultra thick] (n1.north east) rectangle (n2.south west);
+\end{tikzpicture}%
+}
+{%
+ \caption[Regular letter comparison vs letter-number
+ comparison]{Regular letter comparison vs letter-number comparison.
+ Comparing the strings \code{abc12foo} and \code{abc6bar}:
+ \subfigfmt{a} \optfmt{letter-case}; \subfigfmt{b}
+ \optfmt{letternumber-case}.}%
+}
+{fig:letternumber}
+\end{figure}
+
+For example, suppose the first string is \code{abc12foo}
+and the second string is \code{abc6bar}.
+\Figureref{fig:letternumber}\subfigfmt{a} shows the regular letter
+comparison using \csopt[letter-case]{sort}, where the subscript
+indicates the hexadecimal character code. The first three characters
+from each string are identical (\code{abc}). At this point there's
+no difference detected, so the comparator moves on to the next
+character, \code{1\hexsb{31}} for the first string and
+\code{6\hexsb{36}} for the second string. Since 0x31 is less than
+0x36, the first string (\code{abc12foo}) is considered less than the second
+(\code{abc6bar}).
+
+With the letter-number comparison using
+\csopt[letternumber-case]{sort}, the comparator starts in much the
+same way. The first three characters from each string are still
+identical, so the comparator moves on to the next character,
+\code{1} for the first string and \code{6} for the second.
+These are now both recognised as digits, so the comparator
+looks ahead and reads in any following digits (if present). For the
+first case, this is the sub-string \code{12} and, for the second
+case, \code{6} (\figureref{fig:letternumber}\subfigfmt{b}). These
+are both compared according to their integer representation $12 >
+6$, so \code{abc12bar} is considered greater than \code{abc6foo}
+(that is, \code{abc12bar} comes after \code{abc6foo}).
+
+The same result occurs for other numbering systems, for example if
+the Basic Latin digits 1, 2 and 6 are replaced with the
+corresponding Devanagari digits \devone, \devtwo\ and
+\devsix. (But note that the letter comparisons will still be
+based on their Unicode values not according to a particular locale.
+This type of sort method is intended primarily for symbolic values,
+such as chemical formulae, rather than for words or phrases.)
+
+Signed integers are also recognised, so \code{abc-12foo} is less
+than \code{abc+6bar}, which is again different from the result
+obtained with a straight letter comparator where the character~\code{+} (0x2B)
+comes before the character~\code{-} (0x2D). The sign must be followed by at
+least one digit for it to be recognised as a number otherwise it's
+treated as a punctuation character.
+
+If only one sub-string is numeric
+then the \csopt{letter-number-rule} is used to determine the
+result. Where both sub-strings are non-numeric, then the
+\csopt{letter-number-punc-rule} setting is used to determine the result
+according to the category of the characters, which may be one of the
+following:
+\begin{itemize}
+\item white space: belongs to the Unicode \idx{separatorspace}
+category. If both characters are white space, then they are compared
+according to their Unicode values otherwise they are ordered according to
+the \csopt{letter-number-punc-rule} setting.
+\item letter: belongs to one of the Unicode categories \idx{letteruppercase},
+\idx{letterlowercase}, \idx{lettertitlecase},
+\idx{lettermodifier} or \idx{letterother}. If both characters
+are letters, then they are compared in the same way as the
+corresponding \optfmt{letter-\meta{modifier}} sort method otherwise
+they are ordered according to the
+\csopt{letter-number-punc-rule} setting.
+\item punctuation: everything else. If both characters are
+punctuation, then they are compared according to their Unicode value
+otherwise they are ordered according to
+the \csopt{letter-number-punc-rule} setting.
+\end{itemize}
+
+The examples below show the ordering of the list:
+\code{CH\textsubscript{2}O},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{CO}, \code{Cl},
+\code{Co}, \code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoMoO\textsubscript{4}} and \code{CoCl\textsubscript{2}},
+for the setting
+\csopt[between]{letter-number-rule}, where the subscripts are
+the Unicode subscript characters.
+
+\begin{itemize}
+\item \optfmt{letternumber-case}: case-sensitive
+letter-number sort. Example:
+
+\code{CH\textsubscript{2}O},
+\code{CO},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{Cl},
+\code{Co},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}},
+\code{Co\textsubscript{2}O\textsubscript{3}}.
+
+\item \optfmt{letternumber-case-reverse}: reverse case-sensitive
+letter-number sort.
+
+\item \optfmt{letternumber-nocase}: case-insensitive
+letter-number sort. The sort value is first converted to lower
+case. Note that \csopt[between]{letter-number-rule} doesn't make
+sense in this context as there won't be any upper case characters in
+the sort value, so numbers will always come before letters. Example:
+
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{CH\textsubscript{2}O},
+\code{Cl},
+\code{Co},
+\code{CO},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}}.
+
+\item \optfmt{letternumber-nocase-reverse}: reverse case-insensitive
+letter-number sort.
+
+\item \optfmt{letternumber-upperlower}: upper-lower
+letter-number sort. This behaves slightly differently to
+\optfmt{letter-upperlower} when used with \csopt[between]{letter-number-rule}
+as it will segregate the upper and lower case characters if there
+are any numerical sub-strings. Example:
+
+\code{CH\textsubscript{2}O},
+\code{CO},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{Cl},
+\code{Co},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}},
+\code{Co\textsubscript{2}O\textsubscript{3}}.
+
+The \csopt[between]{letter-number-rule} setting enforces numbers
+after upper-case (for the case-sensitive and upper-lower methods)
+which makes the \code{\textsubscript{5}} come after the upper case
+\code{O} and forces the lower case characters to come after it.
+
+Compare this with \csopt[before letter]{letter-number-rule} which
+results in the order:
+
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{CH\textsubscript{2}O},
+\code{Cl},
+\code{CO},
+\code{Co},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}}.
+
+
+\item \optfmt{letternumber-upperlower-reverse}: reverse upper-lower
+letter-number sort. Note that with
+\csopt[between]{letter-number-rule}, this can result in an order
+that isn't the actual reverse of \optfmt{letternumber-upperlower}.
+Example:
+
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoMoO\textsubscript{4}},
+\code{CoCl\textsubscript{2}},
+\code{Co},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{CO},
+\code{Cl},
+\code{CH\textsubscript{2}O}.
+
+The algorithm is reversed which means that when two letters are
+compared then, if both letters have the same lower case version,
+the upper-lower rule is reversed and lower case comes before
+upper case. This means that \code{o} comes before \code{O}.
+If their lower case versions aren't identical, the letter
+with the higher lower case Unicode value comes first. This means
+that both \code{o} and \code{O} come before \code{l} which comes
+before \code{H}. So far, this gives the order:
+\code{o}, \code{O}, \code{l}, \code{H}.
+The \csopt[between]{letter-number-rule} setting inserts numbers between
+upper and lower case letters. This puts the numbers (in reverse
+order) between \code{o} and \code{O}.
+
+Compare this with \csopt[before letter]{letter-number-rule} which
+results in the order:
+
+\code{CoMoO\textsubscript{4}},
+\code{CoCl\textsubscript{2}},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{Co},
+\code{CO},
+\code{Cl},
+\code{CH\textsubscript{2}O},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH}.
+
+Remember that the associated settings as reversed
+well. So \csopt[before letter]{letter-number-rule} is
+results in numbers \emph{after} letters.
+
+\item \optfmt{letternumber-lowerupper}: lower-upper
+letter-number sort. As with the upper-lower version, this behaves
+slightly differently to the corresponding
+\optfmt{letter-lowerupper} when used with \csopt[between]{letter-number-rule}.
+Example:
+
+\code{Cl},
+\code{Co},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{CH\textsubscript{2}O},
+\code{CO}.
+
+The \csopt[between]{letter-number-rule} setting enforces numbers
+after lower-case (for the lower-upper method)
+so the \code{\textsubscript{5}} is put after \code{o}, and forces
+the upper case characters after the numbers.
+
+Compare this with \csopt[before letter]{letter-number-rule} which
+results in the order:
+
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{CH\textsubscript{2}O},
+\code{Cl},
+\code{Co},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{CoCl\textsubscript{2}},
+\code{CoMoO\textsubscript{4}},
+\code{CO}.
+
+\item \optfmt{letternumber-lowerupper-reverse}: reverse lower-upper
+letter-number sort. Again with
+\csopt[between]{letter-number-rule}, this can result in an order
+that isn't the actual reverse of \optfmt{letternumber-lowerupper},
+although for this example it does happen to be the actual reverse:
+
+\code{CO},
+\code{CH\textsubscript{2}O},
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}},
+\code{C\textsubscript{5}H\textsubscript{4}NCOOH},
+\code{CoMoO\textsubscript{4}},
+\code{CoCl\textsubscript{2}},
+\code{Co\textsubscript{2}O\textsubscript{3}},
+\code{Co},
+\code{Cl}.
+
+\end{itemize}
+
+\subsubsection{Numerical}
+
+The sort methods listed in \tableref{tab:sortoptionsnumerical}
+use numeric comparisons. The sort value is expected to
+be a numeric value. If it can't be parsed then it's treated as 0
+(and a warning will be written to the transcript).
+These all recognise the digits in the Unicode \qt{Number,
+Decimal Digit} category but, unlike the hybrid letter-number
+comparators above, they don't recognise the superscript or subscript
+digits.
+\begin{itemize}
+\item \optfmt{integer}: integer sort. This is for non-locale integer sort
+values.
\item \optfmt{integer-reverse}: as above but reverses the order.
-\item \optfmt{hex}: hexadecimal integer sort. This is for
-hexadecimal sort values. Any value that isn't a hexadecimal number
-is treated as 0.
+\item \optfmt{hex}: hexadecimal integer sort. This is for non-locale
+hexadecimal sort values.
\item \optfmt{hex-reverse}: as above but reverses the order.
-\item \optfmt{octal}: octal integer sort. This is for
-octal sort values. Any value that isn't a octal number
-is treated as 0.
+\item \optfmt{octal}: octal integer sort. This is for non-locale
+octal sort values.
\item \optfmt{octal-reverse}: as above but reverses the order.
-\item \optfmt{binary}: binary integer sort. This is for binary sort
-values. Any value that isn't a binary number is treated as 0.
+\item \optfmt{binary}: binary integer sort. This is for non-locale binary sort
+values.
\item \optfmt{binary-reverse}: as above but reverses the order.
-\item \optfmt{float}: single-precision sort. This is for
-decimal sort values. Any value that isn't a decimal is treated as 0.0.
+\item \optfmt{float}: single-precision sort. This is for non-locale
+decimal sort values.
\item \optfmt{float-reverse}: as above but reverses the order.
-\item \optfmt{double}: double-precision sort. This is for
-decimal sort values. Any value that isn't a decimal is treated as 0.0.
+\item \optfmt{double}: double-precision sort. This is for non-locale
+decimal sort values.
\item \optfmt{float-reverse}: as above but reverses the order.
+\item \optfmt{numeric}: locale-sensitive numeric sort. Use
+\csopt{numeric-locale} to set the locale.
+
+\item \optfmt{numeric-reverse}: as above but reverses the order.
+
+\item \optfmt{currency}: locale-sensitive currency sort. Use
+\csopt{numeric-locale} to set the locale.
+
+\item \optfmt{currency-reverse}: as above but reverses the order.
+
+\item \optfmt{percent}: locale-sensitive percent sort. Use
+\csopt{numeric-locale} to set the locale.
+
+\item \optfmt{percent-reverse}: as above but reverses the order.
+
+\item \optfmt{numberformat}: locale-sensitive custom numeric sort. Use
+\csopt{numeric-locale} to set the locale and
+\csopt{numeric-sort-pattern} to set the number pattern.
+
+\item \optfmt{numberformat-reverse}: as above but reverses the order.
+
\end{itemize}
-If the \meta{value} is omitted, \csopt[doc]{sort} is assumed. If the
-\csopt{sort} option isn't used then \csopt[locale]{sort} is assumed.
-Note that \csopt[locale]{sort} can provide more detail about the
-locale than \csopt[doc]{sort}, depending on how the document
-language has been specified.
+In general, it doesn't make much sense to have hierarchical entries
+that need to be sorted by a number, but it is possible as long as each
+level uses the same type of numbering.
+
+\subsubsection{Date-Time}
+
+The sort methods listed in \tableref{tab:sortoptionsdatetime}
+are for dates and times. Use \csopt{date-sort-format}
+and \csopt{date-sort-locale} to specify the date format and locale.
+\begin{itemize}
+\item \optfmt{date}: sort dates.
+
+\item \optfmt{date-reverse}: as above but reverses the order.
+
+\item \optfmt{datetime}: sort date and time information.
+
+\item \optfmt{datetime-reverse}: as above but reverses the order.
-For example, with:
+\item \optfmt{time}: sort times.
+
+\item \optfmt{time-reverse}: as above but reverses the order.
+
+\end{itemize}
+
+If the field you want to sort by contains a date then the
+simplest way to sort is to ensure the date is in ISO format
+and then just use a letter sort. However it may be that
+the date is in the format particular to your locale or you have a
+mix of \era{AD} and \era{BC}. In which
+case you can use one of the date/time sort options (such as
+\csopt[date]{sort} or \csopt[date-reverse]{sort}). The locale
+is assumed to be your default locale (as given by the \idx{JVM})
+but if you are using a different locale this can
+be set with \csopt{date-sort-locale}. The pattern is assumed
+to be the default for that locale but you can change this with
+\csopt{date-sort-format}. If you provide your
+own custom pattern you must make sure that it matches the selected
+\optfmt{sort} option.
+
+The locale and pattern information is used by \bibgls\ to parse the
+field. If the field value can't be parsed then \bibgls\ will issue
+a warning and assume the current date (or time).
+
+The actual sort value that's used by the comparator is numeric. In
+the case of the time-based \csopt[datetime]{sort} and
+\csopt[time]{sort} (or their \optfmt{-reverse} versions), this value
+is the number of milliseconds since 1st~January, 1970. In the case
+of \csopt[date]{sort} (or \csopt[date-reverse]{sort}), this value is
+obtained from $a(y\times10000 + m\times100 + d)$ where $y$ is the
+year, $m$ is the month number, $d$ is the day of month number, and
+$a$ is an integer representation of the era ($-1$ for \era{BC} and
+$+1$ for \era{AD}).
+
+Unlike the numeric sort methods (such as \csopt[integer]{sort})
+the date-time sort methods set the \field{sort} field to a value
+that can be more easily parsed within the document and that should
+mostly achieve the same ordering if a letter comparator were to be used
+with it (except for \era{BC} dates, where the order needs to be
+reversed). This has the by-product of providing a field that
+you can access within the document that can be more easily parsed by
+\LaTeX.
+
+In general, it doesn't make much sense to have hierarchical entries
+that need to be sorted by date, but it is possible as long as each
+level uses the same date format.
+
+For example, suppose my \ext{bib} file contains
\begin{verbatim}
-\documentclass{article}
-\usepackage[ngerman]{babel}
-\usepackage[record]{glossaries}
-\GlsXtrLoadResources[src={german-terms}]
+@entry{journalentry,
+ name={10 Jan 2017},
+ description={an interesting journal entry}
+}
\end{verbatim}
-the language tag will be \texttt{de-1996}, which doesn't have an
-associated region. Whereas with
+The \field{name} field uses an abbreviated UK date format.
+If all my other entries also use this format in the \field{name}
+then I can sort them chronologically:
\begin{verbatim}
-\documentclass[de-DE-1996]{article}
-\usepackage[ngerman]{babel}
-\usepackage[record]{glossaries}
-\GlsXtrLoadResources[src={german-terms}]
+\GlsXtrLoadResources[
+ src=entries,% data in entries.bib
+ sort=date,
+ date-sort-locale={en-GB},
+ date-sort-format={medium}
+]
\end{verbatim}
-the language tag will be \texttt{de-DE-1996} because \sty{tracklang}
-has picked up the locale from the document class options. This is
-only likely to cause a difference if a language has different
-sorting rules according to the region or if the language may be
-written in multiple scripts.
+(The medium format is actually the default for this locale,
+and the locale matches my system locale, so I could omit
+both \csopt{date-sort-locale} and \csopt{date-sort-format}.)
-A multilingual document will need to have the \csopt{sort} specified
-when loading the resource to ensure the correct language is chosen.
-For example:
+If \longarg{verbose} mode is on, the transcript will show
+the label, sort value and numeric value for each entry.
+In this case, the information is:
\begin{verbatim}
-\GlsXtrLoadResources[src={english-terms},sort={en-GB}]
-\GlsXtrLoadResources[src={german-terms},sort={de-DE-1996}]
+journalentry -> '+1 2017-01-10' [20170110]
\end{verbatim}
+The first value is the label (\code{journalentry}), the second
+value is assigned to the \field{sort} field
+(\code{+1 2017-01-10}) and the number in square brackets
+is the actual numeric value used by the comparator. The signed
+number at the start of the sort field \code{+1} is the numeric
+representation of the era as used for the $a$ variable in the
+computation of the numeric value (as described earlier).
-\subsection{\csoptnv{sort-rule}\csopteqval{value}}
-\labelopt{sort-rule}
+If I change the format to \csopt[short]{date-sort-format},
+then the date can't be parsed correctly and \bibgls\ will
+issue the following warning:
+\begin{verbatim}
+Warning: Can't parse sort value '10 Jan 2017' for 'journalentry'
+(pattern: 'dd/MM/yyyy')
+\end{verbatim}
+This shows the value that \bibgls\ is trying to
+parse (\code{10 Jan 2017}) for the entry identified by
+the given label (\code{journalentry}). The pattern \bibgls\
+expects is also given (\code{dd/MM/yyyy}).
+
+\optsection{shuffle}
-If the \optref[custom]{sort} option is used, the sort rule
-must be provided with \optfmt{sort-rule}. In this case
-the collation is performed using Java's
+Automatically sets \csopt[random]{sort} and \csopt{flatten}.
+The value \meta{seed} may be omitted. If present, it should
+be an integer used as a seed for the random number generator.
+
+\optsection{sort-field}
+
+The \csopt{sort-field} key indicates which field provides the sort
+value. The default is the \field{sort} field. For example
+\begin{codeenv}
+\gls!{GlsXtrLoadResources}\oarg{
+ \csopt[entries-terms]{src},\idx!{commentchar} data in entries-terms.bib
+ \csopt[category]{sort-field},\idx!{commentchar} sort by 'category' field
+ \csopt[letter-case]{sort}\idx!{commentchar} case-sensitive letter sort
+}
+\end{codeenv}
+This sorts the entries according to the \field{category} field using
+a case-sensitive letter comparison.
+You may also use \csopt[id]{sort-field} to sort according to
+the label.
+
+If an entry is missing a value for \meta{field}, then the value of
+the fallback field will be used instead. If \csopt{missing-sort-fallback} is
+set, then that's used as the fallback, otherwise it depends on the
+entry type.
+
+For example, with the default \csopt[sort]{sort-field}, then for an
+entry defined with \atentry{entry}, if the \field{sort} field is
+missing the fallback field will be the \field{name} (or the
+\field{parent} field if the \field{name} field is missing).
+
+If the entry is instead defined with an abbreviation type (for
+example, \atentry{abbreviation} or
+\atentry{acronym}) then if the \field{sort} field is missing,
+\bibgls\ will fallback on the field given by
+\csopt{abbreviation-sort-fallback}. This is only used with
+\csopt[sort]{sort-field}.
+
+The symbol-like entry types fallback on the field given by
+\csopt{symbol-sort-fallback} if the \field{sort} is missing. This
+is only used with \csopt[sort]{sort-field}.
+
+If no fallback field can be found, the entry's label will be used.
+
+\optsection{missing-sort-fallback}
+
+With \csopt[\meta{sort-field}]{sort-field}, if the value of the field
+identified by \meta{sort-field} is missing, then \bibgls\ behaves as
+follows:
+\begin{enumerate}
+\item If \csopt[\meta{fallback-field}]{missing-sort-fallback} is set, then
+\bibgls\ will fallback on the value provided by the field
+\meta{fallback-field}. If \meta{fallback-field} is
+missing, then \bibgls\ will query the entry type's fallback for
+\meta{fallback-field} (not for \meta{sort-field}).
+\item If the entry type has a fallback rule for \meta{sort-field},
+then that rule is used. When \csopt[sort]{sort-field} this means:
+\begin{itemize}
+\item If the entry was defined using
+one of the symbol types, then \bibgls\
+will fallback on the value given by \csopt{symbol-sort-fallback}.
+\item If the entry was defined using
+one of the abbreviation types, then \bibgls\
+will fallback on the value given by
+\csopt{abbreviation-sort-fallback}.
+\end{itemize}
+If \meta{sort-field} is not \field{sort}, then there may not be a
+fallback, in which case the next condition applies:
+\item Otherwise the sort value will be set to the entry label and \bibgls\
+will issue a warning.
+\end{enumerate}
+The default setting is \csopt[\empty]{missing-sort-fallback}, which
+means that step~1 above is omitted.
+
+Use \csopt{dual-missing-sort-fallback} when sorting dual entries
+separately from primaries, and use
+\csopt{secondary-missing-sort-fallback} for \csopt{secondary}
+sorting.
+
+\optsection{abbreviation-sort-fallback}
+
+The entry types that define abbreviations (such as
+\atentry{abbreviation} and \atentry{acronym}) will, by default,
+fallback on the \field{short} field if the \field{sort} field is
+missing (assuming \csopt[sort]{sort-field}). If you prefer to
+fallback on a different field, then you can use this option to
+specify the field. For example,
+\csopt[long]{abbreviation-sort-fallback}. Note that if you use
+\csopt[name]{sort-field}, then the fallback field will be given by
+\csopt{abbreviation-name-fallback} if the \field{name} field is
+omitted. The \meta{field} value must be a known field label.
+
+Note that \csopt{missing-sort-fallback} overrides this setting.
+
+\optsection{symbol-sort-fallback}
+
+The entry types that define symbols (such as \atentry{symbol} and
+\atentry{number}) will, by default, fallback on the label if the
+\field{sort} field is missing (assuming the default
+\csopt[sort]{sort-field}). If you prefer to fallback on a different
+field, then you can use this option to specify the field. For
+example, \csopt[name]{symbol-sort-fallback}. The \meta{field} value
+must be a known field label.
+
+Note that \csopt{missing-sort-fallback} overrides this setting.
+
+\optsection{trim-sort}
+
+If the interpreter is used to determine the sort value, this setting
+governs whether or not the interpreter should trim leading and
+trailing spaces. The default setting is \csopt[true]{trim-sort}.
+
+This option automatically sets \csopt[\meta{boolean}]{dual-trim-sort}
+and \csopt[\meta{boolean}]{secondary-trim-sort}.
+
+\optsection{sort-rule}
+
+If the \csopt[custom]{sort} option is used, the sort rule must be
+provided with \optfmt{sort-rule}. In this case the collation is
+performed using Java's
\href{http://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html}{RuleBasedCollator}
-class. Remember that the options will be expanded as they
-are written to the \ext{aux} file, so be careful of
-any special characters that occur in the rule. You can
-use \cs{string}\cs{u}\meta{hex} (where \meta{hex} is a hexadecimal
+class~\cite{rulebasedcollator}. Remember that the options will be
+expanded as they are written to the \iext{aux} file, so be careful
+of any special characters that occur in the rule. For the special
+characters \idx{param} \idx{commentchar} \idx{sbchar} \idx{colsep}
+\idx{bgroupchar} and \idx{egroupchar} you can use \ics{cs.hash},
+\ics{cs.percent}, \ics{cs.underscore}, \ics{cs.amp}, \ics{cs.openbrace}
+and \ics{cs.closebrace}. These will be written to the \ext{aux} file
+with the leading backslash, but \bibgls\ will remove it for this
+resource option. Remember that the \styfmt{glossaries} package
+provides \ics{glsbackslash} and \ics{glstildechar} which can be used
+to produce a literal backslash (\idx{backslashchar}) and tilde
+(\idx{tildechar}).
+
+You can also
+use \stringu\meta{hex} (where \meta{hex} is a hexadecimal
code) to represent a Unicode character. For example:
\begin{verbatim}
\GlsXtrLoadResources[
@@ -5455,55 +8838,83 @@ code) to represent a Unicode character. For example:
< \string\u00E6,\string\u00C6}
]
\end{verbatim}
-You can also use \cs{protect} instead of \cs{string}. This will
-cause a space to appear between \cs{u} and the hexadecimal
-value in the \ext{aux} file (if \meta{hex} starts with a decimal
-digit), but \bibgls\ will accept a single space between \cs{u} and
-\meta{hex} to allow for this. However it's safer to just use
-\cs{string} (in case \meta{hex} start with a letter).
+It's best to use \ics{cs.string} rather than \ics{protect} to avoid
+unwanted spaces interfering with \meta{hex}. Note that
+\sty{glossaries-extra} v1.21+ provides \ics{glshex}
+which just does \stringu\ so you can do
+\verb|\glshex 00E6| instead of \verb|\string\u00E6|.
+This is only one character different, but you can redefine
+\ics{glsxtrresourceinit} to locally set \ics{u} to \ics{glshex} while
+the protected write is performed. For example:
+\begin{verbatim}
+\renewcommand*{\glsxtrresourceinit}{\let\u\glshex}
+\end{verbatim}
+Then you can just do \verb|\u00E6| instead of \verb|\string\u00E6|.
-If \optref{sort} is not set to \optfmt{custom}, the
+If \csopt{sort} is not set to \optfmt{custom}, the
\optfmt{sort-rule} setting will be ignored.
-\subsection{\csoptnv{break-at}\csopteqval{option}}
-\labelopt{break-at}
+\optsection{break-at}
-The rule-based sort options (\csopt[\meta{lang tag}]{sort}
-and \csopt[custom]{sort}) typically list punctuation characters
-(such as space) before alphabetical characters. This means that
-the rule-based sort options are naturally in a letter order, similar
-to \app{xindy}'s \texttt{ord/letorder} module. This isn't the same
-as \csopt[letter-nocase]{sort} as the locale letter ordering is rule-based
-rather than according to the Unicode value.
+This option automatically implements
+\csopt[\meta{option}]{dual-break-at} and
+\csopt[\meta{option}]{secondary-break-at}.
-In order to replicate \app{makeindex} and \app{xindy}'s default word
-order, \bibgls\ splits up the sort value at word boundaries and
-inserts a marker (identified by \optref{break-marker}).
+The alphabet sort options (\tableref{tab:sortoptionsrule}) typically
+list non-letter characters before alphabetical characters and spaces
+are quite often in the ignored set. This means that the alphabet
+sort options are naturally in a letter order, similar to
+\idx{xindy}['s] \code{ord/letorder} module. (This isn't the same as
+\csopt[letter-nocase]{sort}, which just sorts according to the
+Unicode value not according to a particular alphabet.)
+In order to replicate \idx{makeindex} and \idx{xindy}['s] default word
+order, \bibgls\ splits up the sort value at word boundaries and
+inserts a marker (identified by \csopt{break-marker}).
For example, if the sort value is \qt{sea lion} then it's actually
converted to \verb"sea|lion|" whereas \qt{sea} becomes \verb"sea|"
and \qt{seal} becomes \verb"seal|". The default marker is \verb"|"
which is commonly placed in collation rules before digits but
after the ignored characters, such as spaces and hyphens.
-You can change where the break points are inserted with
+You can change the construction of the break points with
\csopt[\meta{option}]{break-at} where \meta{option} may be one of:
\begin{itemize}
\item \optfmt{word}: break at word boundaries (default).
+Note that what constitutes a word varies
+according to the locale but usually anything that's not alphanumeric
+will designate a word-boundary. The characters between words are
+discarded.
For example, the sort value \qt{Tom, Dick, and Harry} becomes
-\verb"Tom|Dick|and|Harry".
+\verb"Tom|Dick|and|Harry", which has discarded the comma and space
+characters.
\item \optfmt{character}: break after each character.
\item \optfmt{sentence}: break after each sentence.
+\item \optfmt{upper-notlower}: break after any upper case character
+that's not followed by a lower case character. For example,
+\qt{MathML} becomes \verb"MathM|L|" and \qt{W3C} becomes
+\verb"W|3C|".
+\item \optfmt{upper-upper}: break after any upper case character
+that's followed by an upper case character.
+\item \optfmt{upper-notlower-word}: first applies break-points
+according to \optfmt{upper-notlower} and then according to
+\optfmt{word}.
+\item \optfmt{upper-upper-word}: first applies break-points
+according to \optfmt{upper-upper} and then according to
+\optfmt{word}.
\item \optfmt{none}: don't create break points. Use this option to
-emulate \app{makeindex} or \app{xindy}'s letter ordering.
+emulate \idx{makeindex} or \idx{xindy}'s letter ordering.
\end{itemize}
-This option is ignored when used with the non-locale \csopt{sort} options.
-Use the \argref{debug} switch to show the break points.
+This option is ignored when used with the non-alphabetic \csopt{sort} options.
+Use the \longarg{debug} switch to show the break points.
(This will also show the collation rule.)
-\subsection{\csoptnv{break-marker}\csopteqval{marker}}
-\labelopt{break-marker}
+\optsection{break-marker}
+
+This option automatically implements the dual and secondary settings
+\csopt[\meta{marker}]{dual-break-marker} and
+\csopt[\meta{marker}]{secondary-break-marker}.
The break marker can be changed using
\csopt[\meta{marker}]{break-marker}, where \meta{marker} is
@@ -5511,60 +8922,414 @@ the character to use. For example, \csopt[-]{break-marker} will use a
hyphen. The marker may be empty, which effectively strips the
inter-word punctuation. For example, with
\csopt[\empty]{break-marker}, \qt{Tom, Dick, and Harry} becomes
-\texttt{TomDickandHarry} and \qt{sea lion} simply becomes
-\texttt{sealion}. If \meta{marker} is omitted,
+\code{TomDickandHarry} and \qt{sea lion} simply becomes
+\code{sealion}. If \meta{marker} is omitted,
\csopt[\empty]{break-marker} is assumed.
-\subsection{\csoptnv{sort-field}\csopteqval{field}}
-\labelopt{sort-field}
+\optsection{sort-number-pad}
-The \csopt{sort-field} key indicates which field provides the sort
-value. The default is the \field{sort} field. For example
+This option automatically implements the dual and secondary settings
+\csopt[\meta{number}]{dual-sort-number-pad},
+\csopt[\meta{number}]{secondary-sort-number-pad}.
+
+If \meta{number} is greater than 1, any integer sub-strings found
+in the sort value will be zero-padded up to this value. Since the
+\code{-} character is often ignored by rule-based sort methods,
+any signs found will be replaced with the markers given by
+\csopt{sort-pad-plus} and \csopt{sort-pad-minus}, which should be
+chosen to ensure that negative numbers are ordered before positive
+numbers (if this is desired). An unsigned number will have the
+\csopt{sort-pad-plus} marker inserted before it. The default value
+is \csopt[0]{sort-number-pad}, which doesn't implement any padding.
+
+If you use this with a locale sort method, it's best to also set
+\csopt[none]{break-at}, as the default word boundary break points
+will likely be confused by a mix of alphanumerics.
+
+\optsection{sort-pad-plus}
+
+This option automatically implements the dual and secondary settings
+\csopt[\meta{marker}]{dual-sort-pad-plus},
+\csopt[\meta{marker}]{secondary-sort-pad-plus}.
+
+This option only has an effect when used with
+\csopt[\meta{number}]{sort-number-pad} where \meta{number} is
+greater than 1. Positive numbers will have their sign replaced with
+\meta{marker}. The default setting is \csopt[>]{sort-pad-plus}.
+
+\optsection{sort-pad-minus}
+
+This option automatically implements the dual and secondary settings
+\csopt[\meta{marker}]{dual-sort-pad-minus},
+\csopt[\meta{marker}]{secondary-sort-pad-minus}.
+
+This option only has an effect when used with
+\csopt[\meta{number}]{sort-number-pad} where \meta{number} is
+greater than 1. Negative numbers will have their sign replaced with
+\meta{marker}. The default setting is \csopt[<]{sort-pad-plus}.
+
+\optsection{identical-sort-action}
+
+This option automatically implements the dual and secondary settings
+\csopt[\meta{value}]{dual-identical-sort-action} and
+\csopt[\meta{value}]{secondary-identical-sort-action}.
+
+This option determines what the comparator should do if
+two entries at the same hierarchical level are considered
+equal. The \meta{value} may be one of:
+\begin{itemize}
+\item\optfmt{none}: don't take any further action if sort values are
+identical;
+\item\optfmt{id}: if sort values are identical, compare
+the entry labels;
+\item\optfmt{original id}: if sort values are identical, compare the
+original unprefixed entry labels (as given in the \ext{bib} file);
+\item\meta{field}: if sort values are identical, compare
+the values from the given \meta{field}.
+\end{itemize}
+In each case (other than \csopt[none]{identical-sort-action}) a
+simple case-sensitive string comparison is used. If \meta{value}
+isn't a recognised keyword or valid field an error will occur. The
+default setting is \csopt[id]{identical-sort-action}. If you're
+using one of the sort rules listed in \tableref{tab:sortoptionsrule}
+and you also want a locale-sensitive sort used on the fallback, then
+you need to use \csopt{sort-suffix} instead.
+
+\bibgls\ allows duplicate sort values, but this can cause a problem
+for hierarchical entries where parent entries with duplicate sort
+fields are clumped together and their children follow. To prevent
+this from happening, the \csopt[id]{identical-sort-action}
+setting will fallback on comparing the labels. Since all labels
+must be unique, this means comparisons between two different entries
+are all either strictly higher or strictly lower.
+
+This action occurs after any suffixes have been appended through
+\csopt{sort-suffix}.
+
+\optsection{sort-suffix}
+
+This option automatically implements the dual and secondary settings
+\csopt[\meta{value}]{dual-sort-suffix} and
+\csopt[\meta{value}]{secondary-sort-suffix}.
+The value may be one of:
+\begin{itemize}
+\item\optfmt{none}: don't append a suffix to any \field{sort} value;
+\item\optfmt{non-unique}: append a numeric suffix to non-unique
+ \field{sort} values;
+\item\meta{field}: append the value of the given field (if set) to
+ the \field{sort} field. The given field must be defined (has an
+ associated key for use in \gls{newglossaryentry}) but may be unset.
+ If the interpreter is on, the field contents will be interpreted.
+ If the field is just a label (such as the \field{category} field)
+ you may find it simpler to use
+ \csopt[\meta{field}]{identical-sort-action} instead.
+\end{itemize}
+The default setting is \csopt[none]{sort-suffix}.
+
+This option only affects the alphabetic
+(\tableref{tab:sortoptionsrule}), letter
+(\tableref{tab:sortoptionsletter}) and letter-number
+(\tableref{tab:sortoptionsletternumber}) sort rules. For the other
+types of sort methods (not including the no-sort options listed in
+\tableref{tab:sortoptionsnosort}) you'll need to use
+\csopt{identical-sort-action} to prevent problems occurring with
+duplicate sort values.
+
+In the case of \csopt[non-unique]{sort-suffix}, this will only append a
+suffix to the duplicate sort values (within the same hierarchical
+level). The first sort value to be encountered isn't given a suffix.
+
+The \csopt[\meta{field}]{sort-suffix} setting will only append a suffix
+if that field is set, but (if set) it will apply the suffix to all
+\field{sort} values, even those that are unique.
+
+If you use \longarg{verbose}, then \bibgls\ will write information
+in the transcript when it appends a suffix to the sort value. The
+message:
+\begin{alltt}
+Sort value '\meta{sort}' (entry '\meta{id}') not unique for the entry's
+hierarchical level.
+\end{alltt}
+indicates that an entry with the given \meta{sort} value has already
+been found within the same hierarchical level as the currently
+processed entry (whose label is given by \meta{id}). The same
+hierarchical level in this context means that either both entries
+don't have a parent or both entries have the same parent. (That is,
+the entries are considered siblings.)
+
+This message will then be followed by
+\begin{alltt}
+Appending suffix '\meta{suffix}' to the sort value '\meta{sort}'
+for entry '\meta{id}'.
+\end{alltt}
+which indicates that the entry (identified by the label \meta{id})
+has been assigned the sort value given by \meta{sort}\meta{suffix}.
+If any break markers are applied, this is done after the suffix has
+been appended.
+
+For example, suppose in my document I want to write about \appfmt{makeglossaries}
+(the application) and \csfmt{makeglossaries} (the command). I might
+decide to define semantic commands:
\begin{verbatim}
-\GlsXtrLoadResources[
- src={entries-terms},% data in entries-terms.bib
- sort-label=category,% sort by 'category' field
- sort=letter-case% case-sensitive letter sort
-]
+\newcommand*{\application}[1]{\texttt{#1}}
+\newcommand*{\command}[1]{\texttt{\char92 #1}}
\end{verbatim}
-This sorts the entries according to the \field{category} field using
-a case-sensitive letter comparison.
-You may also use \csopt[id]{sort-field} to sort according to
-the label.
+In my \ext{bib} file I might have:
+\begin{verbatim}
+@entry{cs.makeglossaries,
+ name={\command{makeglossaries}},
+ category={command},
+ description={opens glossary files}
+}
-If an entry is missing a value for \meta{field}, then the value of
-the fallback field will be used instead. For example, with the
-default \csopt[sort]{sort-field}, then for an entry defined with
-\atentry{entry}, if the \field{sort} field is missing the fallback
-field will be the \field{name} or the \field{parent} field if the
-\field{name} field is missing. If the entry is instead defined with
-\atentry{abbreviation} (or \atentry{acronym}) then if the
-\field{sort} field is missing, \bibgls\ will start with the same
-fallback as for \atentry{entry} but if neither the \field{name} or
-\field{parent} field is set, it will fallback on the \field{short}
-field.
+@entry{ap.makeglossaries,
+ name={\application{makeglossaries}},
+ category={application},
+ description={Perl script}
+}
+\end{verbatim}
+If \bibgls\ is provided with the definitions of \csfmt{application}
+and \csfmt{command} (by interpreting the \atentry{preamble}) then it will
+determine that the sort value for \code{cs.makeglossaries} is
+\verb|\makeglossaries| and the sort value for
+\code{ap.makeglossaries} is just \code{makeglossaries}. These are
+two distinct sort values from \bibgls's point of view although the
+sort rule may consider them identical if the rule ignores the
+\verb|\| character (such as the locale sort methods), in which case,
+\bibgls\ will then act according to \csopt{identical-sort-action}.
+
+If \bibgls\ isn't provided with these custom definitions, then it
+will ignore them and both entries will end up with the sort value
+\code{makeglossaries}. The second instance will be recognised as a
+duplicate and the sort value will be converted to
+\code{makeglossaries1} (where the automated suffix is \code{1} and
+the suffix marker, see below, is the empty string). With
+\csopt[.]{sort-suffix-marker} then the sort value would become
+\code{makeglossaries.1}.
+
+For comparison, consider the following document:
+\begin{verbatim}
+\documentclass{article}
-If no fallback field can be found, the entry's label will be used.
+\usepackage[style=indexgroup]{glossaries}
-\subsection{\csoptnv{shuffle}\csopteqval{seed}}
-\labelopt{shuffle}
+\makeglossaries
-Automatically sets \csopt[random]{sort} and \csopt{flatten}.
-The value \meta{seed} may be omitted. If present, it should
-be an integer used as a seed for the random number generator.
+\newcommand*{\application}[1]{\texttt{#1}}
+\newcommand*{\command}[1]{\texttt{\char92 #1}}
+
+\newglossaryentry{cs.makeglossaries}{%
+ name={\command{makeglossaries}},
+ description={opens glossary files}}
+
+\newglossaryentry{ap.makeglossaries}{%
+ name={\application{makeglossaries}},
+ description={Perl script}}
+
+\begin{document}
+
+\gls{cs.makeglossaries} and \gls{ap.makeglossaries}.
+
+\printglossaries
+\end{document}
+\end{verbatim}
-\subsection{\csoptnv{strength}\csopteqval{value}}
-\labelopt{strength}
+This uses \idx{makeindex}, which puts both entries in the
+\qt{Symbols} group (since they both start with \verb|\| from the
+start of \verb|\command| and \verb|\application|, respectively).
+The ordering is \appfmt{makeglossaries}, \csfmt{makeglossaries}
+because \qt{a} (second character of \csfmt{application}) comes
+before \qt{c} (second character of \csfmt{command}).
-The collation strength used by \csopt[\meta{locale}]{sort} can be set
+The switch to \idx{xindy} just involves adding the \styoptfmt{xindy}
+package option:
+\begin{verbatim}
+\usepackage[xindy,style=indexgroup]{glossaries}
+\end{verbatim}
+This results in a glossary that only contains one entry,
+\csfmt{makeglossaries}, because \idx{xindy} merges entries with
+duplicate sort values and the sort values end up as duplicates
+because \idx{xindy} discards the control sequences. Although
+\bibgls\ also ignores unknown control sequences, it doesn't perform
+this merger.
+
+If I add
+\begin{verbatim}
+@preamble{"\providecommand*{\application}[1]{\texttt{#1}}
+\providecommand{\command}[1]{\texttt{\char92 #1}}"}
+\end{verbatim}
+to the earlier \ext{bib} file (called, say, \filefmt{entries.bib})
+then the document can be altered to use \bibgls:
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage[record,style=indexgroup]{glossaries-extra}
+
+\GlsXtrLoadResources{src=entries.bib,
+ sort-suffix=non-unique,
+ identical-sort-action=none
+}
+
+\begin{document}
+
+\gls{cs.makeglossaries} and \gls{ap.makeglossaries}.
+
+\printunsrtglossaries
+\end{document}
+\end{verbatim}
+This uses the default \csopt[locale]{sort} which considers \verb|\|
+an ignored (punctuation) character, so both \csfmt{makeglossaries} and
+\appfmt{makeglossaries} are listed in the \qt{M} letter group, even
+though the interpreter has determined that the sort value for
+\code{cs.makeglossaries} is the literal string \verb|\makeglossaries|.
+Note that in this case \bibgls\ doesn't detect duplicate sort values
+since it only uses a simple string comparison to detect duplicates
+rather than using the collator.
+
+If I switch to using a letter-based sort rule instead, for example
+\csopt[letter-nocase]{sort}, then \csfmt{makeglossaries} will be
+listed in the \qt{Symbols} letter group since the leading \verb|\|
+from the sort value \csfmt{makeglossaries} isn't ignored with this
+rule.
+
+Now let's suppose I use \csopt[false]{interpret-preamble} to prevent
+\bibgls\ from interpreting the preamble:
+\begin{verbatim}
+\GlsXtrLoadResources{src=entries.bib,interpret-preamble=false}
+\end{verbatim}
+This means that the custom commands won't be recognised and will
+therefore be ignored, so both entries will have their sort values reduced to
+\code{makeglosssaries}.
+
+The first entry to be processed is \code{cs.makeglossaries} because
+it's the first to be selected. This is assigned the sort value
+\code{makeglossaries}. (Note that, unless you use
+\csopt[unsrt]{sort}, the initial selection order is based on the record
+order. In this example, \code{cs.makeglossaries} has the first
+record in the \ext{aux} file.)
+
+The next entry to be processed is \code{ap.makeglossaries}. This
+also ends up with the sort value \code{makeglossaries} so \bibgls\
+converts this to \code{makeglossaries1} and (with verbose mode on)
+the following messages are written to the transcript:
+\begin{verbatim}
+Sort value 'makeglossaries' (entry 'ap.makeglossaries') not unique
+for the entry's hierarchical level.
+Appending suffix '1' to the sort value 'makeglossaries' for entry
+'ap.makeglossaries'.
+\end{verbatim}
+Both entries are listed in the \qt{M} letter group in the order
+\csfmt{makeglossaries}, \appfmt{makeglossaries}.
+
+If the records are reversed:
+\begin{verbatim}
+\gls{ap.makeglossaries} and \gls{cs.makeglossaries}.
+\end{verbatim}
+then the sort value for \code{cs.makeglossaries} is now considered
+the duplicate and the order is reversed: \appfmt{makeglossaries},
+\csfmt{makeglossaries}.
+
+Suppose now I modify the \ext{bib} file so that
+\code{ap.makeglossaries} is defined as:
+\begin{verbatim}
+@entry{ap.makeglossaries,
+ name={\application{makeglossaries}},
+ category={application},
+ description={Perl script (must be used with \gls{cs.makeglossaries})}
+}
+\end{verbatim}
+and suppose the document only contains an explicit reference to
+\code{ap.makeglossaries}:
+\begin{verbatim}
+\begin{document}
+\gls{ap.makeglossaries}
+\printunsrtglossaries
+\end{document}
+\end{verbatim}
+Now \code{ap.makeglossaries} is the first entry to be selected
+because entries with records are always selected before any
+(unrecorded) dependencies. In this case \code{cs.makeglossaries} is
+only selected because it's required by \code{ap.makeglossaries}. Now
+\code{ap.makeglossaries} is the first to have its sort value
+assigned, and it's \code{cs.makeglossaries} that has the duplicate.
+This means that the ordering in the glossary is now:
+\appfmt{makeglossaries}, \csfmt{makeglossaries}.
+
+An oddity occurs if the glossary is moved to the start of the
+document:
+\begin{verbatim}
+\begin{document}
+\printunsrtglossaries
+\gls{ap.makeglossaries}
+\end{document}
+\end{verbatim}
+In this case, the first document build
+\begin{verbatim}
+pdflatex myDoc
+bibgls --group --verbose myDoc
+pdflatex myDoc
+\end{verbatim}
+leads to the ordering described above:
+\appfmt{makeglossaries}, \csfmt{makeglossaries}.
+However, the next document build has a new record for
+\code{cs.makeglossaries} occurring in the glossary (within the
+description of \code{ap.makeglossaries}) which means it's now the
+first entry to be selected so the ordering switches to:
+\csfmt{makeglossaries}, \appfmt{makeglossaries}.
+In this type of situation you might be better off with the
+\csopt[id]{identical-sort-action} option instead.
+
+Remember that you can temporarily switch off the indexing by locally
+setting
+\begin{alltt}
+\ics{GlsXtrSetDefaultGlsOpts}\marg{noindex}
+\end{alltt}
+Since the glossary preamble is scoped, you can simply do
+\begin{verbatim}
+\appto\glossarypreamble{\GlsXtrSetDefaultGlsOpts{noindex}}
+\end{verbatim}
+to switch off the indexing within the glossary (or use
+\ics{apptoglossarypreamble}). Note that this is
+different to using
+\begin{alltt}
+\ics{GlsXtrSetDefaultNumberFormat}\marg{glsignore}
+\end{alltt}
+which creates an ignored record. Even though the record is ignored
+(and so won't show in the location list) the record still influences
+the selection order and the record count.
+
+\optsection{sort-suffix-marker}
+
+This automatically implements the dual and secondary settings
+\csopt[\meta{value}]{dual-sort-suffix-marker} and
+\csopt[\meta{value}]{secondary-sort-suffix-marker}.
+
+If a suffix is appended to the sort value (see above) then it will
+be separated by the suffix marker, which can be set with
+\csopt[\meta{value}]{sort-suffix-marker} where \meta{value} is the
+marker. By default the marker is empty. You can use \stringu\meta{hex}
+to indicate Unicode characters outside the ASCII range.
+If, for some reason, you want to use a special character, such as
+\idx{param}, you will need to precede it with \ics{cs.string} (for example
+\verb|\string#|). If you use \ics{cs.hash} it will be treated as a
+literal string containing a backslash followed by a hash character.
+
+\optsection{strength}
+
+This option automatically implements
+\csopt[\meta{value}]{dual-strength} and
+\csopt[\meta{value}]{secondary-strength}.
+
+The collation strength used by the alphabet sort methods
+(\tableref{tab:sortoptionsrule}) can be set
to the following values: \optfmt{primary} (default),
\optfmt{secondary}, \optfmt{tertiary} or \optfmt{identical}. These
indicate the difference between two characters, but the exact
assignment is locale dependent. See the documentation for Java's
-\href{http://docs.oracle.com/javase/8/docs/api/java/text/Collator.html}{\texttt{Collator}
-class} for further details.
+\href{http://docs.oracle.com/javase/8/docs/api/java/text/Collator.html}{\code{Collator}
+class}~\cite{collator} for further details.
-For example, suppose the file \filefmt{entries.bib} contained:
+For example, suppose the file \filefmt{entries.bib} contains:
\begin{verbatim}
@index{resume}
@@ -5581,7 +9346,7 @@ For example, suppose the file \filefmt{entries.bib} contained:
@index{zoo}
\end{verbatim}
-and the document contained:
+and the document contains:
\begin{verbatim}
\documentclass{article}
@@ -5610,81 +9375,559 @@ If the strength is changed to \optfmt{tertiary} or
\optfmt{identical}, there's no difference from
\csopt[secondary]{strength} for this particular example.
-This option is ignored by non-locale sorts (such as letter or numeric).
+This option is ignored by non-alphabet sorts (such as letter or numeric).
-\subsection{\csoptnv{decomposition}\csopteqval{value}}
-\labelopt{decomposition}
+\optsection{decomposition}
-The collation decomposition used by \csopt[\meta{locale}]{sort} can be set
+This option automatically implements the dual and secondary settings
+\csopt[\meta{value}]{dual-decomposition} and
+\csopt[\meta{value}]{secondary-decomposition}.
+
+The collation decomposition used by alphabet sort methods
+(\tableref{tab:sortoptionsrule}) can be set
to the following values: \optfmt{canonical} (default),
\optfmt{full} or \optfmt{none}. This determines how Unicode composed
characters are handled. The fastest mode is \optfmt{none} but is
only appropriate for languages without accents. The slowest mode is
-\optfmt{full} but is the most complete for languages with non-ASCII
+\optfmt{full} but is the most complete for languages with \idx{non-ASCII}
characters. See the documentation for Java's
-\href{http://docs.oracle.com/javase/8/docs/api/java/text/Collator.html}{\texttt{Collator}
-class} for further details.
-This option is ignored by non-locale sorts (such as letter or numeric).
+\href{http://docs.oracle.com/javase/8/docs/api/java/text/Collator.html}{\code{Collator}
+class}~\cite{collator} for further details.
+This option is ignored by non-alphabet sorts (such as letter or numeric).
-\section{Dual Entries}
+\optsection{letter-number-rule}
-\subsection{\csoptnv{dual-sort}\csopteqval{value}}
-\labelopt{dual-sort}
+This automatically implements the dual and secondary settings
+\csopt[\meta{value}]{dual-letter-number-rule}
+and
+\csopt[\meta{value}]{secondary-letter-number-rule}.
-This option indicates how to sort the dual entries. The primary
-entries are sorted with the normal entries according to
-\optref{sort}, and the dual entries are sorted according to
-\csopt{dual-sort} unless \csopt[combine]{dual-sort} in which case the dual
-entries will be combined with the primary entries and all the
-entries will sorted together according to the \optref{sort} option.
+If you use one of the letter-number sort methods
+(\tableref{tab:sortoptionsletternumber}), then you can determine the
+comparison between a number and letter. The \meta{value} may be
+one of:
+\begin{itemize}
+\item\optfmt{before letter}: numbers are considered less than any
+letter.
+\item\optfmt{after letter}: numbers are considered greater than any
+letter.
+\item\optfmt{between}: (default) numbers come between letter cases.
+With the \optfmt{-case} or \optfmt{-upperlower} sort options,
+this will put numbers after upper case and before lower case.
+With the \optfmt{-lowerupper} sort option, this will put numbers
+after lower case and before upper case. This setting doesn't make
+much sense with the \optfmt{-nocase} option but, if used, this will put
+numbers before letters.
+\item\optfmt{first}: numbers are considered less than all
+characters (including punctuation and spaces).
+\item\optfmt{last}: numbers are considered greater than all
+characters (including punctuation and spaces).
+\end{itemize}
+Note that the reverse sort methods will invert this setting.
+Remember also that the case-insensitive letter-number sort methods always
+first convert the \field{sort} field to lower case, which means that
+if you use one of them then there won't be any upper case
+characters.
-If \meta{value} isn't set to \optfmt{combine} then the dual
-entries are sorted separately according to \meta{value} (as per
-\optref{sort}) and the dual entries will be appended at the end of
-the \ext{glstex} file. The field used by the comparator is given by
-\optref{dual-sort-field}.
-If \csopt[custom]{dual-sort}, then the dual entries according to the
-rule provided by \optref{dual-sort-rule}.
+Use \csopt{letter-number-punc-rule} to determine the relative
+position of white space and punctuation.
+\optsection{letter-number-punc-rule}
-For example:
+This automatically implements the dual and secondary
+\csopt[\meta{value}]{dual-letter-number-punc-rule}
+and
+\csopt[\meta{value}]{secondary-letter-number-punc-rule}.
+
+If you use one of the letter-number sort methods
+(\tableref{tab:sortoptionsletternumber}), then you can determine the
+order of white space and punctuation. In this context, punctuation
+means any character that's not considered a letter, a number
+or white space. This means that characters such as combining marks
+are considered punctuation.
+
+The \meta{value} may be one of the following:
+\begin{itemize}
+\item\optfmt{punc-space-first}: punctuation comes first, followed by
+white space (then letters and optionally numbers according to the letter-number
+rule);
+\item\optfmt{punc-space-last}: punctuation followed by white space
+come last (after letters and optionally numbers according to the letter-number
+rule);
+\item\optfmt{space-punc-first}: white space comes first, followed by
+punctuation (then letters and optionally numbers according to the letter-number
+rule);
+\item\optfmt{space-punc-last}: white space followed by punctuation
+come last (after letters and optionally numbers according to the letter-number
+rule);
+\item\optfmt{space-first-punc-last}: white space comes first
+(followed by letters and optionally numbers according to the letter-number
+rule) and punctuation comes last;
+\item\optfmt{punc-first-space-last}: punctuation comes first
+(followed by letters and optionally numbers according to the letter-number
+rule) and white space comes last;
+\item\optfmt{punc-first-space-zero}: punctuation comes first
+(although numbers may come before)
+and white space is replaced by the digit~\code{0} (0x30);
+\item\optfmt{punc-last-space-zero}: punctuation comes last
+(although numbers may come after)
+and white space is replaced by the digit~\code{0} (0x30).
+\item\optfmt{punc-first-space-zero-match-next}: punctuation comes first
+(although numbers may come before)
+and white space is replaced by zero;
+\item\optfmt{punc-last-space-zero-match-next}: punctuation comes last
+(although numbers may come after)
+and white space is replaced by zero.
+\end{itemize}
+Remember that the reverse sort methods will invert order governed by this setting.
+
+For the \optfmt{space-zero-match-next} settings, the sort value will
+have all spaces replaced with a digit that represents zero. If the
+space isn't followed by a digit, the basic Latin \code{0} (0x30)
+will be used, otherwise \bibgls\ will try to match the zero with the
+following digit group. For example, if the space is followed by
+\textsuperscript{1} (0xB9) the space will be replaced by
+\textsuperscript{0} (0x2070), resulting in the sub-string
+\code{\textsuperscript{01}} (0xB9 0x2070).
+
+If just the \optfmt{space-zero}
+(without the \optfmt{-match-next}) is used then the space will just
+be replaced with \code{0} resulting in the sub-string
+\code{0\textsuperscript{1}} (0x30 0x2070). In this case, the
+\code{0} will be distinct from \textsuperscript{1} (rather than
+being considered a leading zero). However, for
+other numbering systems the \code{0} will be treated as a leading
+zero. For example, if the space is followed by the Devanagari digit
+one (0x0967) then the sub-string will be 0x30 0x0967 but here the
+mixture is allowed to form a number (with a leading zero) as both
+characters belong to the Unicode category \idx{numberdecimaldigit}.
+
+This means that the \optfmt{-match-next} settings are only really
+needed if the sort string contains the superscript or subscript
+digits that don't belong to the \qt{Number, Decimal Digit} category.
+The plain \optfmt{space-zero} alternatives are more efficient as
+they just perform a simple substitution.
+
+The \TeX\ parser library used by \bibgls\ recognises the standard
+\LaTeX\ text-mode commands \ics{textsuperscript}\margm{text} and
+\ics{textsubscript}\margm{text}
+and will use the Unicode superscript or subscript characters if they cover every
+character in \meta{text}, otherwise HTML markup is used, but that's
+then stripped by \bibgls. This means that
+\begin{verbatim}
+C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}
+\end{verbatim}
+will be converted to
+\code{C\textsubscript{10}H\textsubscript{10}O\textsubscript{4}} but
+\begin{verbatim}
+X\textsubscript{1, 2}
+\end{verbatim}
+will be converted to
+\begin{verbatim}
+X<sub>1, 2</sub>
+\end{verbatim}
+which ends up as \code{X1, 2}.
+
+
+Note that \csopt[first]{letter-number-rule} and
+\csopt[last]{letter-number-rule} overrides this option when
+comparing a number with white space or punctuation.
+
+\optsection{numeric-sort-pattern}
+
+If you use the custom \csopt[numberformat]{sort} or
+\csopt[numberformat-reverse]{sort}, you need to
+specify the format pattern with this option where
+\meta{value} is a pattern recognised by Java's
+\href{http://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html}{\code{java.text.DecimalFormat}}
+class~\cite{decimalformat}. You can use \stringu\meta{hex} to
+indicate Unicode characters by their hexadecimal code. You can also
+use \ics{cs.hash}, \ics{cs.percent}, \ics{cs.underscore}, \ics{cs.amp},
+\ics{cs.openbrace} and \ics{cs.closebrace} to indicate
+\idx{hashchar}, \idx{percentchar}, \idx{underscorechar},
+\idx{ampchar}, \idx{openbracechar} and \idx{closebracechar}.
+
+Where the dual or secondary sort uses \optfmt{numberformat}
+or \optfmt{numberformat-reverse}, use \csopt{dual-numeric-sort-pattern} for
+\csopt{dual-sort} and \csopt{secondary-numeric-sort-pattern}
+for \csopt{secondary}.
+
+\optsection{numeric-locale}
+
+If you use any of the locale-sensitive numeric sort methods
+(\tableref{tab:sortoptionsnumerical}),
+such as \csopt[numeric]{sort}, use this option to set
+the locale. The value may be:
+\begin{itemize}
+\item\optfmt{locale}: use Java's default locale (which is usually
+the operating system's locale);
+\item\optfmt{doc}: use the document's locale or, if not set, assume
+\csopt[locale]{numeric-locale};
+\item\meta{lang-tag}: set to the locale identified by the given
+a valid language tag \meta{lang-tag}.
+\end{itemize}
+Use \csopt{dual-numeric-locale} for
+\csopt{dual-sort} and \csopt{secondary-numeric-locale}
+for \csopt{secondary}.
+
+\optsection{date-sort-locale}
+
+If you use a date/time sort method (\tableref{tab:sortoptionsdatetime}),
+then you can set the locale used by Java's date-time parser.
+The default setting is \csopt[locale]{date-sort-locale}.
+
+The value may be \optfmt{locale} (use Java's default locale),
+\optfmt{doc} (use the document's locale) or a valid language tag
+\meta{lang-tag} identifying the locale.
+
+Use \csopt{dual-date-sort-locale} and \csopt{secondary-date-sort-locale}
+for the dual and secondary.
+
+\optsection{date-sort-format}
+
+If you use a date/time sort method (\tableref{tab:sortoptionsdatetime}),
+then you can set the format used by Java's date-time parser.
+If omitted, \csopt[default]{date-sort-format} is assumed.
+The \meta{value} may be one of:
+\begin{itemize}
+\item\optfmt{default}: use the locale's default format.
+\item\optfmt{short}: use the locale's short format.
+\item\optfmt{medium}: use the locale's medium format.
+\item\optfmt{long}: use the locale's long format.
+\item\optfmt{full}: use the locale's full format.
+\item\meta{pattern}: provide a custom pattern.
+This should match the specifications for Java's
+\href{http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html}{\code{SimpleDateFormat}}
+class~\cite{simpledateformat}. You may use \stringu\meta{hex} to indicate Unicode characters
+or \ics{cs.hash}, \ics{cs.percent}, \ics{cs.underscore}, \ics{cs.amp},
+\ics{cs.openbrace} and \ics{cs.closebrace} to indicate
+\idx{hashchar}, \idx{percentchar}, \idx{underscorechar},
+\idx{ampchar}, \idx{openbracechar} and \idx{closebracechar}.
+\end{itemize}
+
+With the custom setting, if the pattern only contains date (but not
+time) information, then it must be used with \csopt[date]{sort}
+or \csopt[date-reverse]{sort}. If the pattern only contains time
+(but not date) information, then it must be used with
+\csopt[time]{sort} or \csopt[time-reverse]{sort}. If the pattern
+contains date and time information, then it must be used with
+\csopt[datetime]{sort} or \csopt[datetime-reverse]{sort}.
+
+For example, suppose each entry provides information about a person
+and the \field{user1} field is used to store their date of birth:
+\begin{verbatim}
+@entry{caesar,
+ name={Gaius Julius Caesar},
+ first={Julius Caesar},
+ text={Caesar},
+ description={Roman politician and general},
+ user1={13 July 100 BC}
+}
+
+@entry{wellington,
+ name={Arthur Wellesley, 1st Duke of Wellington},
+ first={Arthur Wellesley (Duke of Wellington)},
+ text={Wellington},
+ description={Anglo-Irish soldier and statesman},
+ user1={1 May 1769 AD}
+}
+\end{verbatim}
+Then the entries can be sorted by date of birth using:
\begin{verbatim}
\GlsXtrLoadResources[
- src={entries-dual},
- sort={en},
- dual-sort={de-CH-1996}
+ src={entries}, % data in entries.bib
+ sort-field={user1},
+ sort={date},
+ date-sort-format={d MMM y G}
]
\end{verbatim}
-This will sort the primary entries according to \optfmt{en}
-(English) and the secondary entries according to \optfmt{de-CH-1996}
-(Swiss German new orthography) whereas:
+
+The \code{G} (era) date pattern specifier expects a string, such as
+\qt{AD}. It will match lower case forms, such as \qt{ad}, so if you
+have \verb|\textsc{ad}| the interpreter will convert this to
+\code{ad} (stripping the text-block command). However, in general
+it's best to supply a semantic command that ensures that the
+interpreted result matches the required format.
+
+For example, if \csfmt{era} is provided with:
\begin{verbatim}
+@preamble{"\providecommand{\era}[1]{\textsc{\MakeLowercase{#1}}}"}
+\end{verbatim}
+If the definition is hidden from the interpreter
+(\csopt[false]{interpret-preamble}) and the field
+value contains \verb|\era{AD}| then the custom command will simply be stripped
+leaving \code{AD} which can be matched by \code{G}.
+
+If the definition is picked up by the interpreter then the field
+value will contain \code{ad} (from \ics{MakeLowercase}) but this can
+be matched by \code{G}, so it isn't a problem.
+However, if the definition of \csfmt{era} is changed so that the era label
+supplied in the argument is converted to something that doesn't
+match \code{G} then the definition should be hidden from the
+interpreter.
+
+Here's a complete document that changes the \field{group} fields to use
+the year and era:
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage[record,style=indexgroup]{glossaries-extra}
+
+\newcommand{\bibglsdategroup}[7]{#1#4#7}
+\newcommand{\bibglsdategrouptitle}[7]{\number#1\ #4}
+
\GlsXtrLoadResources[
- src={entries-dual},
- sort={en-GB},
- dual-sort={combine}
+ src={entries},
+ sort-field={user1},
+ sort={date},
+ date-sort-format={d MMM y G},
+ selection=all
]
+
+\begin{document}
+\printunsrtglossaries
+\end{document}
\end{verbatim}
-will combine the dual entries with the primary entries and sort them
-all according to the \optfmt{en-GB} locale (British English).
+(The use of \csfmt{number} strips the leading zero from the year.)
-If not set, \csopt{dual-sort} defaults to \optfmt{combine}. If
-\meta{value} is omitted, \optfmt{locale} is assumed.
+\section{Secondary Glossary}
+\label{sec:secondaryopts}
-\subsection{\csoptnv{dual-sort-field}\csopteqval{value}}
-\labelopt{dual-sort-field}
+The secondary glossary may only be used with \csopt[define]{action}
+(within the same resource set) since it's incompatible with the copy actions.
+You may use \csopt{secondary} in the first resource set and a copy
+action in a subsequent resource set.
-This option indicates the field to use when sorting dual entries
-(when they haven't been combined with the primary entries). The
-default value is the same as the \optref{sort-field} value.
+\optsection{secondary}
+
+It may be that you want to display a glossary twice but with a
+different order. For example, the first time alphabetically and the
+second time by category. One way to do this is to have two
+\gls{GlsXtrLoadResources} that both load the same \ext{bib} file with
+different \csopt{label-prefix} and \csopt{sort} settings, but this
+is only possible with \csopt[all]{selection} or by ensuring you
+reference each entry with both label prefixes. Another method is
+to use \csopt[copy]{action} but this requires a second resource
+command with the same selection criteria.
+
+A simpler method is to use a single \gls{GlsXtrLoadResources}
+with the \csopt{secondary} option. The value
+(which must be supplied) should be in the format
+\begin{definition}
+\meta{sort}:\meta{field}:\meta{type}
+\end{definition}
+or
+\begin{definition}
+\meta{sort}:\meta{type}
+\end{definition}
+If the \meta{field} is omitted, the value of \csopt{sort-field} is
+used. Remember that when the primary entries are sorted, the
+\field{sort} field will be set, which means that the fallback field
+(such as \field{name}) won't be used in the secondary sort. In
+general it's best to supply the field unless one type is sorted and the
+other isn't. (The actual sort value obtained by the secondary sort
+will be saved in the \field{secondarysort} field in case you require it.)
+
+The value of \meta{sort} is as for \csopt{sort}, but note
+that in this case the sort value \optfmt{unsrt} or \optfmt{none}
+means to use the same ordering as the primary entries. For
+example, with \csopt[de-CH-1996]{sort},
+\csopt[none:copies]{secondary} the \code{copies} list will be
+ordered according to \code{de-CH-1996} and not according to the
+order in which they were read when the \ext{bib} file or files were
+parsed. If \meta{sort} is \optfmt{custom}, then the rule should be
+provided with \csopt{secondary-sort-rule}.
+
+This option will copy all the selected entries into the glossary labelled
+\meta{type} sorted according to \meta{sort} (using \meta{field} as
+the sort value). Note that this \emph{just copies the entry's label}
+to the second glossary list rather than creating a duplicate entry,
+which saves resources but it means that all the fields will be
+identical. If you want groups in your glossary, the group
+information for the secondary glossary will be stored in the
+internal \field{secondarygroup} field. The \field{group} field will
+contain the group for the primary glossary.
+
+In order to switch fields in \ics{printunsrtglossary}, you need at
+least v1.21 of \sty{glossaries-extra} which provides
+\ics{glsxtrgroupfield} to keep track of the appropriate field label.
+If this command is defined, the preamble for the secondary glossary
+will be adjusted to locally change the field to
+\field{secondarygroup}. With older versions, the group information
+in the secondary glossary will be the same as for the primary
+glossary.
+
+(If the glossary \meta{type} doesn't exist, it will be
+defined with \ics{provideignoredglossary*}\margm{type}.)
+Note that if the glossary already exists and contains entries,
+the existing entries aren't re-ordered. The new entries are
+simply appended to the list.
+
+For example, suppose the \ext{bib} file contains entries like:
+\begin{verbatim}
+@entry{quartz,
+ name={quartz},
+ description={hard mineral consisting of silica},
+ category={mineral}
+}
+
+@entry{cabbage,
+ name={cabbage},
+ description={vegetable with thick green or purple leaves},
+ category={vegetable}
+}
+
+@entry{waterfowl,
+ name={waterfowl},
+ description={any bird that lives in or about water},
+ category={animal}
+}
+\end{verbatim}
+and the document preamble contains:
+\begin{verbatim}
+\GlsXtrLoadResources[src={entries},sort={en-GB},
+ secondary={en-GB:category:topic}
+]
+\end{verbatim}
+This sorts the primary entries according to the default
+\csopt{sort-field} and then sorts the entries according
+to the \field{category} field and copies this list to
+the \code{topic} glossary (which will be provided if not defined.)
+
+The secondary list can be displayed with the hypertargets switched
+off to prevent duplicates. The cross-references will link to the
+original glossary.
+
+For example:
+\begin{verbatim}
+\printunsrtglossary[title={Summary (alphabetical)}]
+\printunsrtglossary[title={Summary (by topic)},target=false]
+\end{verbatim}
+
+The alternative (or if more than two lists are required) is to
+reload the same \ext{bib} file with different label prefixes.
+For example, if the entries are stored in \filefmt{entries.bib}:
+\begin{verbatim}
+\newglossary*{nosort}{Symbols (Unsorted)}
+\newglossary*{byname}{Symbols (Letter Order)}
+\newglossary*{bydesc}{Symbols (Ordered by Description)}
+\newglossary*{byid}{Symbols (Ordered by Label)}
+
+\GlsXtrLoadResources[
+ src={entries},% entries.bib
+ sort={unsrt},
+ type={nosort}
+]
+
+\GlsXtrLoadResources[
+ src={entries},% entries.bib
+ sort={letter-case},
+ type={byname},
+ label-prefix={byname.}
+]
+
+\GlsXtrLoadResources[
+ src={entries},% entries.bib
+ sort={locale},
+ sort-field={description},
+ type={bydesc},
+ label-prefix={bydesc.}
+]
+
+\GlsXtrLoadResources[
+ src={entries},% entries.bib
+ sort={letter},
+ sort-field={id},
+ type={byid},
+ label-prefix={byid.}
+]
+\end{verbatim}
+
+\optsection{secondary-missing-sort-fallback}
+
+As \csopt{missing-sort-fallback} but for secondary sorting.
+
+\optsection{secondary-trim-sort}
+
+As \csopt{trim-sort} but for secondary sorting.
+
+\optsection{secondary-sort-rule}
+
+As \csopt{sort-rule} but for secondary custom sorting.
+
+\optsection{secondary-break-at}
+
+As \csopt{break-at} but for secondary entries.
+
+\optsection{secondary-break-marker}
+
+As \csopt{break-marker} but for secondary entries.
-\subsection{\csoptnv{dual-sort-rule}\csopteqval{value}}
-\labelopt{dual-sort-rule}
+\optsection{secondary-sort-number-pad}
-As \optref{sort-rule} but for \csopt[custom]{dual-sort}.
+As \csopt{sort-number-pad} but for secondary entries.
-\subsection{\csoptnv{dual-prefix}\csopteqval{value}}
-\labelopt{dual-prefix}
+\optsection{secondary-sort-pad-plus}
+
+As \csopt{sort-pad-plus} but for secondary entries.
+
+\optsection{secondary-sort-pad-minus}
+
+As \csopt{sort-pad-minus} but for secondary entries.
+
+\optsection{secondary-identical-sort-action}
+
+As \csopt{identical-sort-action} but for secondary entries.
+
+\optsection{secondary-sort-suffix}
+
+As \csopt{sort-suffix} but for secondary entries.
+
+\optsection{secondary-sort-suffix-marker}
+
+As \csopt{sort-suffix-marker} but for secondary entries.
+
+\optsection{secondary-strength}
+
+As \csopt{strength} but for secondary entries.
+
+\optsection{secondary-decomposition}
+
+As \csopt{decomposition} but for secondary entries.
+
+\optsection{secondary-letter-number-rule}
+
+As \csopt{letter-number-rule} but for secondary letter-number sorting.
+
+\optsection{secondary-letter-number-punc-rule}
+
+As \csopt{letter-number-punc-rule} but for secondary letter-number sorting.
+
+\optsection{secondary-numeric-sort-pattern}
+
+As \csopt{numeric-sort-pattern} but for secondary
+locale-sensitive numeric sorting.
+
+\optsection{secondary-numeric-locale}
+
+As \csopt{numeric-locale} but for secondary
+locale-sensitive numeric sorting.
+
+\optsection{secondary-date-sort-locale}
+
+As \csopt{date-sort-locale} but for secondary date-time sorting.
+
+\optsection{secondary-date-sort-format}
+
+As \csopt{date-sort-format} but for secondary date-time sorting.
+
+\section{Dual Entries}
+\label{sec:dualopts}
+
+\subsection{General Dual Settings}
+\label{sec:dualoptsgeneral}
+
+\optsection[\subsubsection]{dual-prefix}
This option indicates the prefix to use for the dual entries. The
default value is \idprefix{dual} (including the terminating period).
@@ -5692,30 +9935,145 @@ Any references to dual entries within the \ext{bib} file should use
the prefix \idprefix{dual} which will be replaced by \meta{value}
when the \ext{bib} file is parsed.
-\subsection{\csoptnv{dual-type}\csopteqval{value}}
-\labelopt{dual-type}
+\optsection[\subsubsection]{primary-dual-dependency}
+
+This is a boolean setting that determines whether or not primary and
+dual entries should be considered mutual dependencies. The default value is
+\csopt[true]{primary-dual-dependency}, which means that if a primary
+has records then the dual is added as a dependency and vice versa.
+
+\optsection[\subsubsection]{combine-dual-locations}
+
+You can merge the location lists for each primary entry
+with that of the corresponding dual entry. This setting
+allows you to specify this and determine whether both primary and
+dual entries should have the combined location list or
+whether only the primary or the dual should be assigned the
+combined list.
+
+The \meta{value} may be one of:
+\begin{itemize}
+\item\optfmt{false} This is the default setting. The location lists
+aren't combined.
+\item\optfmt{both} Both the primary and dual are given the combined
+location list.
+\item\optfmt{dual} Only the dual is given the combined location
+list. The primary's location list is emptied.
+\item\optfmt{primary} Only the primary is given the combined
+location list. The dual's location list is emptied.
+\end{itemize}
+
+For example, suppose the file \filefmt{entries.bib} contains:
+\begin{verbatim}
+@dualindexentry{array,
+ description={ordered list of values}
+}
+
+@dualindexentry{vector,
+ name={vector},
+ description={column or row of values}
+}
+
+@dualindexentry{set,
+ description={collection of values}
+}
+
+@dualindexentry{matrix,
+ plural={matrices},
+ description={rectangular array of values}
+}
+\end{verbatim}
+and the document contains:
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage[record,index,style=indexgroup]{glossaries-extra}
+
+\GlsXtrLoadResources[
+ src={entries},
+ type=index,
+ label-prefix={idx.},
+ dual-prefix={gls.},
+ dual-type=main
+]
+
+\begin{document}
+\gls{gls.array}, \gls{gls.vector}, \gls{gls.set}, \gls{gls.matrix}.
+
+\newpage
+\gls{gls.array}, \gls{idx.vector}, \gls{idx.set}, \gls{gls.matrix}.
+
+\newpage
+\gls{gls.array}, \gls{gls.vector}, \gls{gls.set}, \gls{gls.matrix}.
+
+\printunsrtglossaries
+\end{document}
+\end{verbatim}
+In this case, the primary entries are placed in the \code{index}
+glossary type and are assigned the prefix \idprefixfmt{idx} but only
+two of the primary entries have been used in the document (both on
+page~2).
+
+The dual entries are assigned the prefix \idprefixfmt{gls} and are
+placed in the \code{main} glossary. The \code{gls.array}
+and \code{gls.matrix} entries have been indexed on pages~1, 2 and~3.
+The \code{gls.vector} and \code{gls.set} entries have been indexed
+on pages~1 and~3.
+
+With the default setting, some of the locations are in the
+\code{main} glossary (corresponding to \verb|\gls{gls.array}|,
+\verb|\gls{gls.vector}|, \verb|\gls{gls.set}| and
+\verb|\gls{gls.matrix}|) and some of the locations are in the
+\code{index} glossary (corresponding to \verb|\gls{idx.vector}|
+and \verb|\gls{idx.set}|).
+
+If the option \csopt[primary]{combine-dual-locations} is added to
+the resource set, then all the locations are moved to the
+\code{index} glossary. The entries in the \code{main} glossary no
+longer have locations. This is actually preferable for this type
+of document and it's best not to reference the primary (index)
+entries as the hyperlink created by \ics{gls} will point to the
+index, but these entries don't have descriptions, so it's less
+useful than referencing the dual (main) entries as then the
+hyperlink can point to the definition in the \code{main} glossary.
+
+
+\subsection{Dual Fields}
+\label{sec:dualoptsfields}
+
+\optsection[\subsubsection]{dual-type}
This option sets the \field{type} field for all dual
-entries. (The primary entries obey the \optref{type} option.) This
+entries. (The primary entries obey the \csopt{type} option.) This
will override any value of \field{type} provided in the \ext{bib}
file (or created through a mapping). The \meta{value} is required.
The \meta{value} may be:
\begin{itemize}
-\item \optfmt{same as entry}: sets the
-\field{type} to the entry type. For example, if the entry
-was defined with \atentryref{dualentry}, the \field{type} will be
-set to \optfmt{dualentry}.
-\item \optfmt{same as primary}: sets the \field{type} to the same
-as the corresponding primary entry's \field{type} (which may
-have been set with \optref{type}). If the primary entry doesn't
-have the \field{type} field set, the dual's \field{type} will
-remain unchanged.
+\item \optfmt{same as entry}: sets the \field{type} to the entry
+type. For example, if the entry was defined with
+\atentry{dualentry}, the \field{type} will be set to
+\optfmt{dualentry}.
+If you've used \csopt{entry-type-aliases}, this refers to the target
+entry type not the original entry type provided in the \ext{bib}
+file.
+
+\item \optfmt{same as base}: sets the \field{type} to the base name
+of the \ext{bib} file (without the extension) that provided the
+entry definition (new to v1.1);
+
+\item \optfmt{same as primary}: sets the \field{type} to the same as
+the corresponding primary entry's \field{type} (which may have been
+set with \csopt{type}). If the primary entry doesn't have the
+\field{type} field set, the dual's \field{type} will remain
+unchanged.
+
\item \meta{label}: sets the \field{type} field to \meta{label}.
\end{itemize}
Remember that the glossary with that label must have already
-been defined.
+been defined (see \sectionref{sec:newglossary}).
For example:
\begin{verbatim}
@@ -5736,41 +10094,258 @@ Alternatively:
dual-type={same as primary}]
\end{verbatim}
-\subsection{\csoptnv{dual-category}\csopteqval{value}}
-\labelopt{dual-category}
+\optsection[\subsubsection]{dual-category}
This option sets the \field{category} field for all dual
-entries. (The primary entries obey the \optref{category} option.) This
+entries. (The primary entries obey the \csopt{category} option.) This
will override any value of \field{category} provided in the \ext{bib}
file (or created through a mapping). The \meta{value} may be empty.
The \meta{value} may be:
\begin{itemize}
-\item \optfmt{same as entry}: sets the
-\field{category} to the entry type. For example, if the entry
-was defined with \atentryref{dualentry}, the \field{category} will be
-set to \optfmt{dualentry}.
-\item \optfmt{same as primary}: sets the \field{category} to the same
-as the corresponding primary entry's \field{category} (which may
-have been set with \optref{category}). If the primary entry doesn't
-have the \field{category} field set, the dual's \field{category} will
-remain unchanged.
+\item \optfmt{same as entry}: sets the \field{category} to the entry
+type. For example, if the entry was defined with
+\atentry{dualentry}, the \field{category} will be set to
+\optfmt{dualentry}.
+If you've used \csopt{entry-type-aliases}, this refers to the target
+entry type not the original entry type provided in the \ext{bib}
+file.
+
+\item \optfmt{same as base}: sets the \field{category} to the base
+name of the \ext{bib} file (without the extension) that provided the
+entry definition (new to v1.1);
+
+\item \optfmt{same as primary}: sets the \field{category} to the
+same as the corresponding primary entry's \field{category} (which
+may have been set with \csopt{category}). If the primary entry
+doesn't have the \field{category} field set, the dual's
+\field{category} will remain unchanged.
+
\item \optfmt{same as type}: sets the \field{category} to the same
as the value of the entry's \field{type} field (which may have been
-set with \optref{dual-type}). If the entry doesn't
-have the \field{type} field set, the \field{category} will
-remain unchanged.
+set with \csopt{dual-type}). If the entry doesn't have the
+\field{type} field set, the \field{category} will remain unchanged.
+
\item \meta{label}: sets the \field{category} field to \meta{label}.
\end{itemize}
-\subsection{\csoptnv{dual-short-case-change}\csopteqval{value}}
-\labelopt{dual-short-case-change}
+\optsection[\subsubsection]{dual-counter}
+
+As \csopt{counter} but for the dual entries. In this case
+\meta{value} may be the name of the counter or
+\optfmt{same as primary} which uses the counter for the primary
+entry.
+
+\optsection[\subsubsection]{dual-short-case-change}
-As \optref{short-case-change} but applies to the \field{dualshort}
+As \csopt{short-case-change} but applies to the \field{dualshort}
field instead.
-\subsection{\csoptnv{dual-entry-map}=\marg{\margm{list1},\margm{list2}}}
-\labelopt{dual-entry-map}
+\optsection[\subsubsection]{dual-field}
+
+If this option is used, this will add \ics{glsxtrprovidestoragekey}
+to the start of the \iext{glstex} file providing the key given by
+\meta{value}. Any entries defined using \atentry{dualentry}
+will be written to the \ext{glstex} file with an extra field called
+\meta{value} that is set to the mirror entry. If \meta{value} is
+omitted \code{dual} is assumed.
+
+For example, if the \ext{bib} file contains
+\begin{verbatim}
+@dualentry{child,
+ name={child},
+ plural={children},
+ description={enfant}
+}
+\end{verbatim}
+Then with \csopt[dualid]{dual-field} this will first add the line
+\begin{verbatim}
+\glsxtrprovidestoragekey{dualid}{}{}
+\end{verbatim}
+at the start of the file and will include the line
+\begin{verbatim}
+dualid={dual.child},
+\end{verbatim}
+for the primary entry (\code{child}) and the line
+\begin{verbatim}
+dualid={child},
+\end{verbatim}
+for the dual entry (\code{dual.child}). It's then possible to
+reference one entry from the other. For example, the post-description
+hook could contain:
+\begin{verbatim}
+ \ifglshasfield{dualid}{\glscurrententrylabel}
+ {%
+ \space
+ (\glshyperlink{\glsxtrusefield{\glscurrententrylabel}{dualid}})%
+ }%
+ {}%
+\end{verbatim}
+Note that this new field won't be available for use within the
+\iext{bib} file (unless it was previously defined in the document
+before \csref{glsxtrresourcefile}).
+
+\optsection[\subsubsection]{dual-date-time-field-format}
+
+As \csopt{date-time-field-format} but is used for dual entries.
+
+\optsection[\subsubsection]{dual-date-field-format}
+
+As \csopt{date-field-format} but is used for dual entries.
+
+\optsection[\subsubsection]{dual-time-field-format}
+
+As \csopt{time-field-format} but is used for dual entries.
+
+\optsection[\subsubsection]{dual-date-time-field-locale}
+
+As \csopt{date-time-field-locale} but is used for dual entries.
+
+\optsection[\subsubsection]{dual-date-field-locale}
+
+As \csopt{date-field-locale} but is used for dual entries.
+
+\optsection[\subsubsection]{dual-time-field-locale}
+
+As \csopt{time-field-locale} but is used for dual entries.
+
+\subsection{Dual Sorting}
+\label{sec:dualoptssort}
+
+\optsection[\subsubsection]{dual-sort}
+
+This option indicates how to sort the dual entries. The primary
+entries are sorted with the normal entries according to
+\csopt{sort}, and the dual entries are sorted according to
+\csopt{dual-sort} unless \csopt[combine]{dual-sort} in which case the dual
+entries will be combined with the primary entries and all the
+entries will sorted together according to the \csopt{sort} option.
+
+If \meta{value} isn't set to \optfmt{combine} then the dual
+entries are sorted separately according to \meta{value} (as per
+\csopt{sort}) and the dual entries will be appended at the end of
+the \iext{glstex} file. The field used by the comparator is given by
+\csopt{dual-sort-field}.
+If \csopt[custom]{dual-sort}, then the dual entries according to the
+rule provided by \csopt{dual-sort-rule}.
+
+
+For example:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src={entries-dual},
+ sort={en},
+ dual-sort={de-CH-1996}
+]
+\end{verbatim}
+This will sort the primary entries according to \optfmt{en}
+(English) and the secondary entries according to \optfmt{de-CH-1996}
+(Swiss German new orthography) whereas:
+\begin{verbatim}
+\GlsXtrLoadResources[
+ src={entries-dual},
+ sort={en-GB},
+ dual-sort={combine}
+]
+\end{verbatim}
+will combine the dual entries with the primary entries and sort them
+all according to the \optfmt{en-GB} locale (British English).
+
+If not set, \csopt{dual-sort} defaults to \optfmt{combine}. If
+\meta{value} is omitted, \optfmt{locale} is assumed.
+
+\optsection[\subsubsection]{dual-sort-field}
+
+This option indicates the field to use when sorting dual entries
+(when they haven't been combined with the primary entries). The
+default value is the same as the \csopt{sort-field} value.
+
+\optsection[\subsubsection]{dual-missing-sort-fallback}
+
+As \csopt{missing-sort-fallback} but for dual sorting.
+
+\optsection[\subsubsection]{dual-trim-sort}
+
+As \csopt{trim-sort} but for dual sorting.
+
+\optsection[\subsubsection]{dual-sort-rule}
+
+As \csopt{sort-rule} but for \csopt[custom]{dual-sort}.
+
+\optsection[\subsubsection]{dual-break-at}
+
+As \csopt{break-at} but for dual entries.
+
+\optsection[\subsubsection]{dual-break-marker}
+
+As \csopt{break-marker} but for dual entries.
+
+\optsection[\subsubsection]{dual-sort-number-pad}
+
+As \csopt{sort-number-pad} but for dual entries.
+
+\optsection[\subsubsection]{dual-sort-pad-plus}
+
+As \csopt{sort-pad-plus} but for dual entries.
+
+\optsection[\subsubsection]{dual-sort-pad-minus}
+
+As \csopt{sort-pad-minus} but for dual entries.
+
+\optsection[\subsubsection]{dual-identical-sort-action}
+
+As \csopt{identical-sort-action} but for dual entries.
+
+\optsection[\subsubsection]{dual-sort-suffix}
+
+As \csopt{sort-suffix} but for dual entries.
+
+\optsection[\subsubsection]{dual-sort-suffix-marker}
+
+As \csopt{sort-suffix-marker} but for dual entries.
+
+\optsection[\subsubsection]{dual-strength}
+
+As \csopt{strength} but for dual entries.
+
+\optsection[\subsubsection]{dual-decomposition}
+
+As \csopt{decomposition} but for dual entries.
+
+\optsection[\subsubsection]{dual-letter-number-rule}
+
+As \csopt{letter-number-rule} but for dual entries that use a
+letter-number sort.
+
+\optsection[\subsubsection]{dual-letter-number-punc-rule}
+
+As \csopt{letter-number-punc-rule} but for dual entries that use a
+letter-number sort.
+
+\optsection[\subsubsection]{dual-numeric-sort-pattern}
+
+As \csopt{numeric-sort-pattern} but for dual entries that use a
+locale-sensitive numeric sort.
+
+\optsection[\subsubsection]{dual-numeric-locale}
+
+As \csopt{numeric-locale} but for dual entries that use a
+locale-sensitive numeric sort.
+
+\optsection[\subsubsection]{dual-date-sort-locale}
+
+As \csopt{date-sort-locale} but for dual entries that
+use a date/time sort.
+
+\optsection[\subsubsection]{dual-date-sort-format}
+
+As \csopt{date-sort-format} but for dual entries that
+use a date/time sort.
+
+\subsection{Dual Mappings}
+\label{sec:dualoptsmap}
+
+\optsection[\subsubsection]{dual-entry-map}
This setting governs the behaviour of \atentry{dualentry}
definitions. The value consists of two comma-separated lists of
@@ -5819,8 +10394,8 @@ and the dual entry is essentially like
see={dog}
}
\end{verbatim}
-(except they're defined using \cs{bibglsnewdualentry} instead of
-\cs{bibglsnewentry}, and each is considered dependent on the other.)
+(except they're defined using \gls{bibglsnewdualentry} instead of
+\gls{bibglsnewentry}, and each is considered dependent on the other.)
The \field{see} field isn't listed in \csopt{dual-entry-map} so its
value is simply copied directly over to the \field{see} field in the
@@ -5830,12 +10405,11 @@ dual entry. Note that the missing plural fields (\field{plural} and
In general \bibgls\ doesn't try to supply missing fields, but in the
dual entry cases it needs to do this for the mapped fields. This is
because the shuffled fields might have different default values from
-the \sty{glossaries-extra} package's point of view. For example,
-\cs{longnewglossaryentry} doesn't provide a default for
+the \styfmt{glossaries-extra} package's point of view. For example,
+\gls{longnewglossaryentry} doesn't provide a default for
\field{descriptionplural} if if hasn't been set.
-\subsection{\csoptnv{dual-abbrv-map}=\marg{\margm{list1},\margm{list2}}}
-\labelopt{dual-abbrv-map}
+\optsection[\subsubsection]{dual-abbrv-map}
This is like \csopt{dual-entry-map} but applies to
\atentry{dualabbreviation} rather than \atentry{dualentry}.
@@ -5853,28 +10427,26 @@ dual-abbrv-map=
This essentially flips the \field{short} field with the
\field{dualshort} field and the \field{long} field with the
-\field{duallong} field. See \atentryref{dualabbreviation}
+\field{duallong} field. See \atentry{dualabbreviation}
for further details.
-\subsection{\csoptnv{dual-entryabbrv-map}=\marg{\margm{list1},\margm{list2}}}
-\labelopt{dual-entryabbrv-map}
+\optsection[\subsubsection]{dual-abbrventry-map}
This is like \csopt{dual-entry-map} but applies to
-\atentry{dualentryabbreviation} rather than \atentry{dualentry}.
+\atentry{dualabbreviationentry} rather than \atentry{dualentry}.
Note that the \field{alias} field can't be mapped. The
default setting is:
\begin{verbatim}
-dual-entryabbrv-map=
+dual-abbrventry-map=
{
{long,short,shortplural},
{name,text,plural}
}
\end{verbatim}
-See \atentryref{dualentryabbreviation} for further details.
+See \atentry{dualabbreviationentry} for further details.
-\subsection{\csoptnv{dual-symbol-map}=\marg{\margm{list1},\margm{list2}}}
-\labelopt{dual-symbol-map}
+\optsection[\subsubsection]{dual-symbol-map}
This is like \csopt{dual-entry-map} but applies to
\atentry{dualsymbol} rather than \atentry{dualentry}.
@@ -5891,26 +10463,43 @@ dual-symbol-map=
This essentially flips the \field{name} field with the
\field{symbol} field.
-\subsection{\csoptnv{dual-entry-backlink}\csopteqval{boolean}}
-\labelopt{dual-entry-backlink}
+\optsection[\subsubsection]{dual-indexentry-map}
-This is a boolean setting.
-When used with \atentry{dualentry}, if \meta{boolean} is
-\optfmt{true}, this will wrap the contents of first mapped field
-with \cs{glshyperlink}. If \meta{boolean} is missing \optfmt{true}
+This is like \csopt{dual-entry-map} but applies to
+\atentry{dualindexentry} rather than \atentry{dualentry}.
+
+\optsection[\subsubsection]{dual-indexsymbol-map}
+
+This is like \csopt{dual-entry-map} but applies to both
+\atentry{dualindexsymbol} and \atentry{dualindexnumber}.
+
+\optsection[\subsubsection]{dual-indexabbrv-map}
+
+This is like \csopt{dual-entry-map} but applies to both the dual
+\atentry{dualindexabbreviation} and tertiary
+\atentry{tertiaryindexabbreviationentry} entry types.
+
+\subsection{Dual Back-Links}
+\label{sec:dualoptsbacklinks}
+
+\optsection[\subsubsection]{dual-entry-backlink}
+
+This is a boolean setting. If \meta{boolean} is missing \optfmt{true}
is assumed.
-The field is obtained from the first mapping
-listed in \csopt{dual-entry-map}.
+When used with \atentry{dualentry}, if \meta{boolean} is
+\optfmt{true}, this will wrap the contents of the first mapped field
+with \gls{bibglshyperlink}. The field is obtained from the first
+mapping listed in \csopt{dual-entry-map}.
For example, if the document contains:
\begin{verbatim}
\GlsXtrLoadResource[dual-entry-backlink,
-dual-entry-map={
- {name,plural,description,descriptionplural},
- {description,descriptionplural,name,plural}
-},
-src={entries-dual}]
+ dual-entry-map={
+ {name,plural,description,descriptionplural},
+ {description,descriptionplural,name,plural}
+ },
+ src={entries-dual}]
\end{verbatim}
and if the \ext{bib} file contains
\begin{verbatim}
@@ -5920,21 +10509,25 @@ and if the \ext{bib} file contains
description={enfant}
}
\end{verbatim}
-Then the definition of the primary entry (\texttt{child}) in the
-\ext{glstex} file will have the \field{description} field set to
+Then the definition of the primary entry (\code{child}) in the
+\ext{glstex} file will set the \field{description} field to
\begin{verbatim}
-{\glshyperlink[enfant]{dual.child}}
+\bibglshyperlink{enfant}{dual.child}
\end{verbatim}
-and the dual entry (\texttt{dual.child}) will have the
+and the dual entry (\code{dual.child}) will have the
\field{description} field set to
\begin{verbatim}
-{\glshyperlink[child]{child}}
+\bibglshyperlink{child}{child}
\end{verbatim}
+This use of the wrapper \gls{bibglshyperlink} (rather than explicitly
+using \ics{glshyperlink}) and inserting the actual field value
+(rather than using commands like \ics{glsentryname}) allows it
+to work with \ics{makefirstuc} if the field requires a case-change.
The reason the \field{description} field is chosen for the modification is
-because the first field listed in the first list in \csopt{dual-entry-map}
+because the first field listed in \meta{list1} of \csopt{dual-entry-map}
is the \field{name} field which maps to \field{description} (the
-first field in the second list). This means that the hyperlink for
+first field in the second list \meta{list2}). This means that the hyperlink for
the dual entry should be put in the \field{description} field.
For the primary entry, the \field{name} field is looked up in the
@@ -5944,87 +10537,91 @@ is selected, which also happens to be the \field{description} field,
so the hyperlink for the primary entry is put in the
\field{description} field.
-\subsection{\csoptnv{dual-abbrv-backlink}\csopteqval{boolean}}
-\labelopt{dual-abbrv-backlink}
+\optsection[\subsubsection]{dual-abbrv-backlink}
This is analogous to \csopt{dual-entry-backlink} but for entries
defined with \atentry{dualabbreviation} instead of
\atentry{dualentry}.
-\subsection{\csoptnv{dual-symbol-backlink}\csopteqval{boolean}}
-\labelopt{dual-symbol-backlink}
+\optsection[\subsubsection]{dual-symbol-backlink}
This is analogous to \csopt{dual-entry-backlink} but for entries
defined with \atentry{dualsymbol} instead of \atentry{dualentry}.
-\subsection{\csoptnv{dual-entryabbrv-backlink}\csopteqval{boolean}}
-\labelopt{dual-entryabbrv-backlink}
+\optsection[\subsubsection]{dual-abbrventry-backlink}
-This is analogous to \csopt{dual-entry-backlink} but for entries
+Analogous to \csopt{dual-entry-backlink} but for entries
+defined with \atentry{dualabbreviationentry} instead of
+\atentry{dualentry}.
+
+\optsection[\subsubsection]{dual-entryabbrv-backlink}
+
+Analogous to \csopt{dual-entry-backlink} but for entries
defined with \atentry{dualentryabbreviation} instead of
\atentry{dualentry}.
-\subsection{\csoptnv{dual-backlink}\csopteqval{boolean}}
-\labelopt{dual-backlink}
+\optsection[\subsubsection]{dual-indexentry-backlink}
-Shortcut for \csopt[\meta{boolean}]{dual-entry-backlink},
-\csopt[\meta{boolean}]{dual-entryabbrv-backlink},
-\csopt[\meta{boolean}]{dual-abbrv-backlink}, and
-\csopt[\meta{boolean}]{dual-symbol-backlink}.
+This is analogous to \csopt{dual-entry-backlink} but for entries
+defined with \atentry{dualindexentry} instead of
+\atentry{dualentry}.
-\subsection{\csoptnv{dual-field}\csopteqval{value}}
-\labelopt{dual-field}
+\optsection[\subsubsection]{dual-indexsymbol-backlink}
-If this option is used, this will add \cs{glsxtrprovidestoragekey}
-to the start of the \ext{glstex} file providing the key given by
-\meta{value}. Any entries defined using \atentry{dualentry}
-will be written to the \ext{glstex} file with an extra field called
-\meta{value} that is set to the mirror entry. If \meta{value} is
-omitted \texttt{dual} is assumed.
+This is analogous to \csopt{dual-entry-backlink} but for entries
+defined with \atentry{dualindexsymbol} and
+\atentry{dualindexnumber}.
-For example, if the \ext{bib} file contains
-\begin{verbatim}
-@dualentry{child,
- name={child},
- plural={children},
- description={enfant}
-}
-\end{verbatim}
-Then with \csopt[dualid]{dual-field} this will first add the line
-\begin{verbatim}
-\glsxtrprovidestoragekey{dualid}{}{}
-\end{verbatim}
-at the start of the file and will include the line
-\begin{verbatim}
-dualid={dual.child},
-\end{verbatim}
-for the primary entry (\texttt{child}) and the line
-\begin{verbatim}
-dualid={child},
-\end{verbatim}
-for the dual entry (\texttt{dual.child}). It's then possible to
-reference one entry from the other. For example, the post-description
-hook could contain:
-\begin{verbatim}
- \ifglshasfield{dualid}{\glscurrententrylabel}
- {%
- \space
- (\glshyperlink{\glsxtrusefield{\glscurrententrylabel}{dualid}})%
- }%
- {}%
-\end{verbatim}
-Note that this new field won't be available for use within the
-\ext{bib} file (unless it was previously defined in the document
-before \csref{glsxtrresourcefile}).
+\optsection[\subsubsection]{dual-indexabbrv-backlink}
+
+This is analogous to \csopt{dual-entry-backlink} but for entries
+defined with \atentry{dualindexabbreviation} and
+\atentry{tertiaryindexabbreviationentry}.
+
+\optsection[\subsubsection]{dual-backlink}
+
+Shortcut for:
+\begin{flushleft}\obeylines
+\csopt[\meta{boolean}]{dual-entry-backlink},
+\csopt[\meta{boolean}]{dual-abbrventry-backlink},
+\csopt[\meta{boolean}]{dual-abbrv-backlink},
+\csopt[\meta{boolean}]{dual-symbol-backlink},
+\csopt[\meta{boolean}]{dual-indexentry-backlink},
+\csopt[\meta{boolean}]{dual-indexsymbol-backlink},
+\csopt[\meta{boolean}]{dual-indexabbrv-backlink}
+\end{flushleft}
+
+\section{Tertiary Entries}
+
+\optsection{tertiary-prefix}
+
+This option indicates the prefix to use for the tertiary entries. The
+default value is \idprefix{tertiary} (including the terminating period).
+
+\optsection{tertiary-type}
+
+This option indicates that the tertiary entries should have
+their \field{type} field set to \meta{value}. If \meta{value} is
+empty the \field{type} is left unchanged. Unlike
+the \csopt{type} and \csopt{dual-type} options, there are no
+recognised keywords.
+
+\optsection{tertiary-category}
+
+This option indicates that the tertiary entries should have
+their \field{category} field set to \meta{value}. If \meta{value} is
+empty the \field{category} is left unchanged. Unlike
+the \csopt{category} and \csopt{dual-category} options, there are no
+recognised keywords.
\chapter{Provided Commands}
\label{sec:bibglscs}
-When \bibgls\ creates the \ext{glstex} file, it writes some
+When \bibgls\ creates the \iext{glstex} file, it writes some
definitions for custom commands in the form \csfmt{bibgls...} which
may be changed as required. The command definitions all use
-\cs{providecommand} which means that you can define the command with
-\cs{newcommand} before the resource file is loaded.
+\ics{providecommand} which means that you can define the command with
+\ics{newcommand} before the resource file is loaded.
\section{Entry Definitions}
\label{sec:newentrydefs}
@@ -6041,38 +10638,28 @@ provided.
After each entry is defined, if it has any associated locations, the
locations are added using
-\begin{alltt}
-\cs{glsxtrfieldlistadd}\margm{label}\marg{loclist}\margm{record}
-\end{alltt}
-This command is provided by \sty{glossaries-extra} (v1.12).
-
+\nosecformatdef{glsxtrfieldlistadd}
-\subsection{\csfmt{bibglsnewentry}}
-\labelcs{bibglsnewentry}
+\cssection{bibglsnewentry}
-\begin{definition}
-\cs{bibglsnewentry}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewentry}
This command is used to define terms identified with the
-\atentryref{entry} type. The definition provided in the \ext{glstex}
+\atentry{entry} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewentry}[4]{%
\longnewglossaryentry*{#1}{name={#3},#2}{#4}%
}
\end{verbatim}
-This uses the starred form of \cs{longnewglossaryentry} that
-doesn't automatically append \cs{nopostdesc} (which interferes with
+This uses the starred form of \gls{longnewglossaryentry} that
+doesn't automatically append \ics{nopostdesc} (which interferes with
the post-description hooks provided by category attributes).
-\subsection{\csfmt{bibglsnewsymbol}}
-\labelcs{bibglsnewsymbol}
+\cssection{bibglsnewsymbol}
-\begin{definition}
-\cs{bibglsnewsymbol}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewsymbol}
This command is used to define terms identified with the
-\atentryref{symbol} type. The definition provided in the \ext{glstex}
+\atentry{symbol} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewsymbol}[4]{%
@@ -6087,96 +10674,84 @@ the entries.
This also sets the \field{category} to \optfmt{symbol}, but again this may
be overridden by \meta{options} if the entry had the \field{category}
field set in the \ext{bib} file or if the \field{category} was
-overridden with \optref[\meta{value}]{category}.
+overridden with \csopt[\meta{value}]{category}.
-\subsection{\csfmt{bibglsnewnumber}}
-\labelcs{bibglsnewnumber}
+\cssection{bibglsnewnumber}
-\begin{definition}
-\cs{bibglsnewnumber}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewnumber}
This command is used to define terms identified with the
-\atentryref{number} type. The definition provided in the \ext{glstex}
+\atentry{number} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewnumber}[4]{%
\longnewglossaryentry*{#1}{name={#3},sort={#1},category={number},#2}{#4}%
}
\end{verbatim}
-This is much the same as \cs{bibglsnewsymbol} above but sets the
+This is much the same as \gls{bibglsnewsymbol} above but sets the
\field{category} to \optfmt{number}. Again the \field{sort} and
\field{category} keys may be overridden by \meta{options}.
-\subsection{\csfmt{bibglsnewindex}}
-\labelcs{bibglsnewindex}
+\cssection{bibglsnewindex}
-\begin{definition}
-\cs{bibglsnewindex}\margm{label}\margm{options}
-\end{definition}
+\formatdef{bibglsnewindex}
This command is used to define terms identified with the
-\atentryref{index} type. The definition provided in the \ext{glstex}
+\atentry{index} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand*{\bibglsnewindex}[2]{%
- \newglossaryentry{#1}{name={#1},description={},#2}%
+ \newglossaryentry{#1}{name={#1},category={index},description={},#2}%
}
\end{verbatim}
-This makes the \field{name} default to the \meta{label} and sets
-an empty \field{description}. These settings may be overridden by
-\meta{options}. Note that the \field{description} doesn't include
-\cs{nopostdesc} to allow for the post-description hook used by
+This makes the \field{name} default to the \meta{label}, assigns the
+the \field{category} to \code{index} and sets an empty
+\field{description}. These settings may be overridden by
+\meta{options}.
+
+Note that the \field{description} doesn't include
+\ics{nopostdesc} to allow for the post-description hook used by
category attributes.
-\subsection{\csfmt{bibglsnewabbreviation}}
-\labelcs{bibglsnewabbreviation}
+\cssection{bibglsnewabbreviation}
-\begin{definition}
-\cs{bibglsnewabbreviation}\margm{label}\margm{options}\margm{short}\margm{long}
-\end{definition}
+\formatdef{bibglsnewabbreviation}
This command is used to define terms identified with the
-\atentryref{abbreviation} type. The definition provided in the \ext{glstex}
+\atentry{abbreviation} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewabbreviation}[4]{%
\newabbreviation[#2]{#1}{#3}{#4}%
}
\end{verbatim}
-Since this uses \cs{newabbreviation}, it obeys the current
+Since this uses \gls{newabbreviation}, it obeys the
abbreviation style for its given \field{category} (which may have
been set in \meta{options}, either from the \field{category} field
-in the \ext{bib} file or through the \optref{category} option).
-Similarly the \field{type} will obey \cs{glsxtrabbrvtype} unless
+in the \ext{bib} file or through the \csopt{category} option).
+Similarly the \field{type} will obey \ics{glsxtrabbrvtype} unless
the value is supplied in the \ext{bib} file or through the
-\optref{type} option.
+\csopt{type} option.
-\subsection{\csfmt{bibglsnewacronym}}
-\labelcs{bibglsnewacronym}
+\cssection{bibglsnewacronym}
-\begin{definition}
-\cs{bibglsnewacronym}\margm{label}\margm{options}\margm{short}\margm{long}
-\end{definition}
+\formatdef{bibglsnewacronym}
This command is used to define terms identified with the
-\atentryref{acronym} type. The definition provided in the \ext{glstex}
+\atentry{acronym} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewacronym}[4]{%
\newacronym[#2]{#1}{#3}{#4}%
}
\end{verbatim}
-This works in much the same way as \cs{bibglsnewabbreviation}.
-Remember that with the \sty{glossaries-extra} package \cs{newacronym}
-is redefined to just use \cs{newabbreviation} with the default \field{type}
-set to \cs{acronymtype} and the default \field{category} set to
-\cs{acronym}.
+This works in much the same way as \gls{bibglsnewabbreviation}.
+Remember that with the \styfmt{glossaries-extra} package \gls{newacronym}
+is redefined to just use \gls{newabbreviation} with the default \field{type}
+set to \ics{acronymtype} and the default \field{category} set to
+\code{acronym}.
-\subsection{\csfmt{bibglsnewdualentry}}
-\labelcs{bibglsnewdualentry}
+\cssection{bibglsnewdualentry}
-\begin{definition}
-\cs{bibglsnewdualentry}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewdualentry}
This command is used to define terms identified with the
-\atentryref{dualentry} type. The definition provided in the \ext{glstex}
+\atentry{dualentry} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualentry}[4]{%
@@ -6184,14 +10759,165 @@ file is:
}
\end{verbatim}
-\subsection{\csfmt{bibglsnewdualentryabbreviation}}
-\labelcs{bibglsnewdualentryabbreviation}
+\cssection{bibglsnewdualindexentry}
-\begin{definition}
-\cs{bibglsnewdualentryabbreviation}\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}
-\end{definition}
+\formatdef{bibglsnewdualindexentry}
+This command is used to define primary terms identified with the
+\atentry{dualindexentry} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexentry}[4]{%
+ \longnewglossaryentry*{#1}{name={#3},category={index},#2}{}%
+}
+\end{verbatim}
+Note that this definition ignores the \meta{description} argument.
+
+\cssection{bibglsnewdualindexentrysecondary}
+
+\formatdef{bibglsnewdualindexentrysecondary}
+This command is used to define secondary terms identified with the
+\atentry{dualindexentry} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexentrysecondary}[4]{%
+ \longnewglossaryentry*{#1}{name={#3},#2}{#4}%
+}
+\end{verbatim}
+
+\cssection{bibglsnewdualindexsymbol}
+
+\formatdef{bibglsnewdualindexsymbol}
+This command is used to define primary terms identified with the
+\atentry{dualindexsymbol} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexsymbol}[5]{%
+ \longnewglossaryentry*{#1}{name={#3},category={index},symbol={#4},#2}{}%
+}
+\end{verbatim}
+Note that this definition ignores the \meta{description} argument.
+
+\cssection{bibglsnewdualindexsymbolsecondary}
+
+\formatdef{bibglsnewdualindexsymbolsecondary}
+This command is used to define secondary terms identified with the
+\atentry{dualindexsymbol} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexsymbolsecondary}[5]{%
+ \longnewglossaryentry*{#1}{name={#3},category={symbol},symbol={#4},#2}%
+ {#5}%
+}
+\end{verbatim}
+
+\cssection{bibglsnewdualindexnumber}
+
+\formatdef{bibglsnewdualindexnumber}
+This command is used to define primary terms identified with the
+\atentry{dualindexnumber} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexnumber}[5]{%
+ \longnewglossaryentry*{#1}{name={#3},category={index},symbol={#4},#2}{}%
+}
+\end{verbatim}
+Note that this definition ignores the \meta{description} argument.
+
+\cssection{bibglsnewdualindexnumbersecondary}
+
+\formatdef{bibglsnewdualindexnumbersecondary}
+This command is used to define secondary terms identified with the
+\atentry{dualindexnumber} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexnumbersecondary}[5]{%
+ \longnewglossaryentry*{#1}{name={#3},category={number},symbol={#4},#2}%
+ {#5}%
+}
+\end{verbatim}
+
+\cssection{bibglsnewdualindexabbreviation}
+
+\formatdef{bibglsnewdualindexabbreviation}
+This command is used to define primary terms identified with the
+\atentry{dualindexabbreviation} type. The default definition provided in
+the \ext{glstex} file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexabbreviation}[7]{%
+ \longnewglossaryentry*{#1}{%
+ name={\protect\bibglsuseabbrvfont{#4}{\glscategory{#2}}},%
+ category={index},#3}{}%
+\end{verbatim}
+In this case \meta{dual-label} is the dual entry's label, which is used
+to fetch the category label in \gls{bibglsuseabbrvfont}. (The
+\field{category} field for the dual isn't used as a custom
+definition of
+\csref{bibglsnewdualindexabbreviationsecondary} may override the
+value known to \bibgls.)
+
+Note that (as shown above) with the default
+\csopt[short]{abbreviation-name-fallback} the \field{name} uses
+\nosecformatdef{bibglsuseabbrvfont}
+to format the name, which ensures that it uses the same font as the
+short form for the dual abbreviation. This will use
+\ics{glsuseabbrvfont} if it's defined otherwise it will be defined
+to replicate that command. If \csopt{abbreviation-name-fallback} is
+set to some other field then the \field{name} uses
+\nosecformatdef{bibglsuselongfont}
+instead, which ensures that it uses the same font as the
+long form for the dual abbreviation.
+
+\cssection{bibglsnewdualindexabbreviationsecondary}
+
+\formatdef{bibglsnewdualindexabbreviationsecondary}
+This command is used to define secondary terms identified with the
+\atentry{dualindexabbreviation} entry type.
+The definition provided in the
+\ext{glstex} file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualindexabbreviationsecondary}[6]{%
+ \ifstrempty{#6}%
+ {\newabbreviation[#2]{#1}{#4}{#5}}%
+ {\newabbreviation[#2,description={#6}]{#1}{#4}{#5}}%
+}
+\end{verbatim}
+This ensures that a missing or empty \field{description} doesn't
+interfere with the abbreviation style.
+
+\cssection{bibglsnewdualabbreviationentry}
+
+\formatdef{bibglsnewdualabbreviationentry}
+This command is used to define primary terms identified with the
+\atentry{dualabbreviationentry} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualabbreviationentry}[5]{%
+ \newabbreviation[#2]{#1}{#3}{#4}%
+}
+\end{verbatim}
+Note that this definition ignores the \meta{description} argument.
+
+\cssection{bibglsnewdualabbreviationentrysecondary}
+
+\formatdef{bibglsnewdualabbreviationentrysecondary}
+This command is used to define secondary terms identified with the
+\atentry{dualabbreviationentry} type. The definition provided in the \ext{glstex}
+file is:
+\begin{verbatim}
+\providecommand{\bibglsnewdualabbreviationentrysecondary}[5]{%
+ \longnewglossaryentry*{#1}{#2}{#5}%
+}
+\end{verbatim}
+Note that this definition ignores the \meta{short} and \meta{long}
+arguments (which will typically be empty unless the default mappings
+are changed).
+
+\cssection{bibglsnewdualentryabbreviation}
+
+\formatdef{bibglsnewdualentryabbreviation}
This command is used to define primary terms identified with the
-\atentryref{dualentryabbreviation} type. The definition provided in the \ext{glstex}
+(now deprecated) entry type
+\atentry{dualentryabbreviation}. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualentryabbreviation}[5]{%
@@ -6200,14 +10926,12 @@ file is:
\end{verbatim}
Note that this definition ignores the \meta{description} argument.
-\subsection{\csfmt{bibglsnewdualentryabbreviationsecondary}}
-\labelcs{bibglsnewdualentryabbreviationsecondary}
+\cssection{bibglsnewdualentryabbreviationsecondary}
-\begin{definition}
-\cs{bibglsnewdualentryabbreviationsecondary}\margm{label}\margm{options}\margm{short}\margm{long}\margm{description}
-\end{definition}
+\formatdef{bibglsnewdualentryabbreviationsecondary}
This command is used to define secondary terms identified with the
-\atentryref{dualentryabbreviation} type. The definition provided in the \ext{glstex}
+(now deprecated) entry type
+\atentry{dualentryabbreviation}. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualentryabbreviationsecondary}[5]{%
@@ -6218,42 +10942,33 @@ Note that this definition ignores the \meta{short} and \meta{long}
arguments (which will typically be empty unless the default mappings
are changed).
-\subsection{\csfmt{bibglsnewdualsymbol}}
-\labelcs{bibglsnewdualsymbol}
+\cssection{bibglsnewdualsymbol}
-\begin{definition}
-\cs{bibglsnewdualsymbol}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewdualsymbol}
This command is used to define terms identified with the
-\atentryref{dualsymbol} type. The definition provided in the \ext{glstex}
+\atentry{dualsymbol} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualsymbol}[4]{%
\longnewglossaryentry*{#1}{name={#3},sort={#1},category={symbol},#2}{#4}}
\end{verbatim}
-\subsection{\csfmt{bibglsnewdualnumber}}
-\labelcs{bibglsnewdualnumber}
+\cssection{bibglsnewdualnumber}
-\begin{definition}
-\cs{bibglsnewdualnumber}\margm{label}\margm{options}\margm{name}\margm{description}
-\end{definition}
+\formatdef{bibglsnewdualnumber}
This command is used to define terms identified with the
-\atentryref{dualnumber} type. The definition provided in the \ext{glstex}
+\atentry{dualnumber} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualnumber}[4]{%
\longnewglossaryentry*{#1}{name={#3},sort={#1},category={symbol},#2}{#4}}
\end{verbatim}
-\subsection{\csfmt{bibglsnewdualabbreviation}}
-\labelcs{bibglsnewdualabbreviation}
+\cssection{bibglsnewdualabbreviation}
-\begin{definition}
-\cs{bibglsnewdualabbreviation}\margm{label}\margm{options}\margm{short}\margm{long}
-\end{definition}
+\formatdef{bibglsnewdualabbreviation}
This command is used to define terms identified with the
-\atentryref{dualabbreviation} type where the \field{duallong} field
+\atentry{dualabbreviation} type where the \field{duallong} field
is swapped with the \field{long} field and the \field{dualshort}
field is swapped with the \field{short} field. The definition provided in the
\ext{glstex} file is:
@@ -6263,25 +10978,63 @@ field is swapped with the \field{short} field. The definition provided in the
}
\end{verbatim}
-\subsection{\csfmt{bibglsnewdualacronym}}
-\labelcs{bibglsnewdualacronym}
+\cssection{bibglsnewdualacronym}
-\begin{definition}
-\cs{bibglsnewdualacronym}\margm{label}\margm{options}\margm{short}\margm{long}
-\end{definition}
+\formatdef{bibglsnewdualacronym}
This command is used to define terms identified with the
-\atentryref{dualacronym} type. The definition provided in the \ext{glstex}
+\atentry{dualacronym} type. The definition provided in the \ext{glstex}
file is:
\begin{verbatim}
\providecommand{\bibglsnewdualacronym}[4]{%
\newacronym[#2]{#1}{#3}{#4}%
}
\end{verbatim}
-This works in much the same way as \cs{bibglsnewdualabbreviation}.
-Remember that with the \sty{glossaries-extra} package \cs{newacronym}
-is redefined to just use \cs{newabbreviation} with the default \field{type}
-set to \cs{acronymtype} and the default \field{category} set to
-\cs{acronym}.
+This works in much the same way as \gls{bibglsnewdualabbreviation}.
+Remember that with the \styfmt{glossaries-extra} package \gls{newacronym}
+is redefined to just use \gls{newabbreviation} with the default \field{type}
+set to \ics{acronymtype} and the default \field{category} set to
+\code{acronym}.
+
+\cssection{bibglsnewtertiaryindexabbreviationentry}
+
+\formatdef{bibglsnewtertiaryindexabbreviationentry}
+This is used to define primary terms identified with the
+\atentry{tertiaryindexabbreviationentry} type. It's essentially
+the same as \csref{bibglsnewdualindexabbreviation}.
+The definition provided in the \ext{glstex} file is:
+\begin{verbatim}
+\providecommand{\bibglsnewtertiaryindexabbreviationentry}[7]{%
+ \longnewglossaryentry*{#1}{%
+ name={\protect\bibglsuseabbrvfont{#4}{\glscategory{#2}}},%
+ category={index},#3}{}%
+}
+\end{verbatim}
+
+\cssection{bibglsnewtertiaryindexabbreviationentrysecondary}
+
+\formatdef{bibglsnewtertiaryindexabbreviationentrysecondary}
+This command is used to define both the secondary and tertiary terms identified with the
+\atentry{tertiaryindexabbreviationentry} type. The secondary
+term is an abbreviation and the tertiary term is a regular entry.
+The definition written to the \ext{glstex} file is:
+\begin{verbatim}
+\providecommand{\bibglsnewtertiaryindexabbreviationentrysecondary}[8]{%
+ \newabbreviation[#3]{#1}{#6}{#7}%
+ \longnewglossaryentry*{#2}%
+ {name={\protect\bibglsuselongfont{#7}{\glscategory{#1}}},#4}%
+ {#8}%
+}
+\end{verbatim}
+The \meta{label} is the label for the secondary (abbreviation) entry
+and \meta{tertiary-label} is the label for the tertiary (regular)
+entry. The fifth argument (\meta{primary name}) isn't used but is
+provided if required for a custom redefinition.
+The \field{name} field for the tertiary is obtained from
+the \meta{long} argument encapsulated by \gls{bibglsuselongfont}
+to format the name, which ensures that it uses the same font as the
+long form for the dual abbreviation. This will use
+\ics{glsuselongfont} if it's defined otherwise it will be defined to
+replicate that command.
\section{Location Lists and Cross-References}
\label{sec:loclistdefs}
@@ -6291,18 +11044,14 @@ references are formatted. The commands typically aren't used until
the entry information is displayed in the glossary, so you may
redefine these commands after the resource file has been loaded.
-\subsection{\csfmt{bibglsseesep}}
-\labelcs{bibglsseesep}
-
-\begin{definition}
-\cs{bibglsseesep}
-\end{definition}
+\cssection{bibglsseesep}
+\formatdef{bibglsseesep}
Any entries that provide a \field{see} field (and that field hasn't
be omitted from the location list with \csopt[omit]{see}) will
-have \cs{bibglsseesep} inserted between the \field{see} part and the
+have \gls{bibglsseesep} inserted between the \field{see} part and the
location list (unless there are no locations, in which case just
-the \field{see} part is displayed without \cs{bibglsseesep}).
+the \field{see} part is displayed without \gls{bibglsseesep}).
This command is provided with:
\begin{verbatim}
@@ -6319,25 +11068,56 @@ Or you can redefine it afterwards:
\renewcommand{\bibglsseesep}{; }
\end{verbatim}
-\subsection{\csfmt{bibglsseealsosep}}
-\labelcs{bibglsseealsosep}
+\cssection{bibglsseealsosep}
-\begin{definition}
-\cs{bibglsseealsosep}
-\end{definition}
-
-This is like \cs{bibglsseesep} but is used with cross-reference
+\formatdef{bibglsseealsosep}
+This is like \gls{bibglsseesep} but is used with cross-reference
lists provided with the \field{seealso} field, if supported.
-\subsection{\csfmt{bibglspassim}}
-\labelcs{bibglspassim}
+\cssection{bibglsaliassep}
-\begin{definition}
-\cs{bibglspassim}
-\end{definition}
+\formatdef{bibglsaliassep}
+This is like \gls{bibglsseesep} but is used with cross-reference
+lists provided with the \field{alias} field.
+
+\cssection{bibglsusesee}
+
+\formatdef{bibglsusesee}
+Displays the formatted cross-reference list stored in the
+\field{see} field for the given entry. This just defaults to
+\ics{glsxtrusesee}\margm{label}.
+
+\cssection{bibglsuseseealso}
+
+\formatdef{bibglsuseseealso}
+Displays the formatted cross-reference list stored in the
+\field{seealso} field for the given entry. This just defaults to
+\ics{glsxtruseseealso}\margm{label}.
+
+\cssection{bibglsusealias}
+
+\formatdef{bibglsusealias}
+Displays the formatted cross-reference stored in the
+\field{alias} field for the given entry. This is defined to use
+\ics{glsseeformat}.
+
+\cssection{bibglsdelimN}
+
+\formatdef{bibglsdelimN}
+Separator between individual locations, except for the last.
+This defaults to \ics{delimN}.
-If \optref{max-loc-diff} is greater than 1, then any ranges that have
-skipped over gaps will be followed by \cs{bibglspassim}, which is
+\cssection{bibglslastDelimN}
+
+\formatdef{bibglslastDelimN}
+Separator between penultimate and final individual locations.
+This defaults to \verb|,~| to discourage lonely locations.
+
+\cssection{bibglspassim}
+
+\formatdef{bibglspassim}
+If \csopt{max-loc-diff} is greater than 1, then any ranges that have
+skipped over gaps will be followed by \gls{bibglspassim}, which is
defined as:
\begin{verbatim}
\providecommand{\bibglspassim}{ \bibglspassimname}
@@ -6353,46 +11133,34 @@ Or you can redefine it afterwards:
\renewcommand{\bibglspassim}{}
\end{verbatim}
-\subsection{\csfmt{bibglspassimname}}
-\labelcs{bibglspassimname}
-
-\begin{definition}
-\cs{bibglspassimname}
-\end{definition}
+\cssection{bibglspassimname}
+\formatdef{bibglspassimname}
The default definition is obtained from the \langxml. For example, with \file{bib2gls-en.xml} the provided
definition is
\begin{verbatim}
\providecommand{\bibglspassimname}{passim}
\end{verbatim}
-\subsection{\csfmt{bibglsrange}}
-\labelcs{bibglsrange}
-
-\begin{definition}
-\cs{bibglsrange}\marg{\meta{start}\cs{delimR} \meta{end}}
-\end{definition}
+\cssection{bibglsrange}
+\formatdef{bibglsrange}
Explicit ranges formed using \glsopt[(]{format} and
\glsopt[)]{format} or \glsopt[(\meta{csname}]{format} and
\glsopt[)\meta{csname}]{format} (where \meta{csname} matches and is a
text-block command without the initial backslash) in the optional
-argument of commands like \cs{gls} or \cs{glsadd} are encapsulated within
-the argument of \cs{bibglsrange}. By default this simply does its
+argument of commands like \ics{gls} or \ics{glsadd} are encapsulated within
+the argument of \gls{bibglsrange}. By default this simply does its
argument. This command is not used with ranges that are formed by collating
consecutive locations.
-\subsection{\csfmt{bibglsinterloper}}
-\labelcs{bibglsinterloper}
-
-\begin{definition}
-\cs{bibglsinterloper}\margm{location}
-\end{definition}
+\cssection{bibglsinterloper}
+\formatdef{bibglsinterloper}
If an explicit range conflicts with a record, a warning will be
issued and the conflicting record will be shifted to the front
-of the range inside the argument of \cs{bibglsinterloper}.
-The default definition just does \meta{location}\cs{delimN}
+of the range inside the argument of \gls{bibglsinterloper}.
+The default definition just does \meta{location}\csref{bibglsdelimN}
so that it fits neatly into the list.
For example, suppose on page~4 of my document I start a range with
@@ -6409,7 +11177,7 @@ have
\gls[format={hyperbf}]{sample}
\end{verbatim}
This record conflicts with the explicit range (which doesn't include
-\texttt{hyperbf} in the format). This causes a warning and
+\code{hyperbf} in the format). This causes a warning and
the conflicting entry will be moved before the start of the
explicit range resulting in \textbf{6}, 4--9.
@@ -6419,18 +11187,14 @@ so if \verb|\gls[format={hyperbf}]{sample}| also occurs
on pages~7 and~8 then the result will be \textbf{6}, \textbf{7},
\textbf{8}, 4--9. Either remove the explicit range or
remove the conflicting entries. (Alternatively, redefine
-\cs{bibglsinterloper} to ignore its argument, which will
+\gls{bibglsinterloper} to ignore its argument, which will
discard the conflicting entries.)
-\subsection{\csfmt{bibglspostlocprefix}}
-\labelcs{bibglspostlocprefix}
+\cssection{bibglspostlocprefix}
-\begin{definition}
-\cs{bibglspostlocprefix}
-\end{definition}
-
-If the \optref{loc-prefix} option is on, \csref{bibglslocprefix} will
-be inserted at the start of location lists. The command \cs{bibglspostlocprefix}
+\formatdef{bibglspostlocprefix}
+If the \csopt{loc-prefix} option is on, \csref{bibglslocprefix} will
+be inserted at the start of location lists. The command \gls{bibglspostlocprefix}
is placed after the prefix text. This command is provided with:
\begin{verbatim}
\providecommand{\bibglspostlocprefix}{\ }
@@ -6447,17 +11211,13 @@ Or you can redefine it afterwards:
\renewcommand{\bibglspostlocprefix}{: }
\end{verbatim}
-\subsection{\csfmt{bibglslocprefix}}
-\labelcs{bibglslocprefix}
-
-\begin{definition}
-\cs{bibglslocprefix}\margm{n}
-\end{definition}
+\cssection{bibglslocprefix}
-If the \optref{loc-prefix} option is on, this command will be
-provided. If the glossary type has been provided by \optref{type}
-(and \optref{dual-type} if there are any dual entries) then the
-definition of \cs{bibglslocprefix} will be appended to the glossary
+\formatdef{bibglslocprefix}
+If the \csopt{loc-prefix} option is on, this command will be
+provided. If the glossary type has been provided by \csopt{type}
+(and \csopt{dual-type} if there are any dual entries) then the
+definition of \gls{bibglslocprefix} will be appended to the glossary
preamble for the given type (or types if there are dual entries).
For example, if the document has
\begin{verbatim}
@@ -6488,47 +11248,36 @@ be added instead:
}
\end{verbatim}
-\subsection{\csfmt{bibglspagename}}
-\labelcs{bibglspagename}
-
-\begin{definition}
-\cs{bibglspagename}
-\end{definition}
+\cssection{bibglspagename}
+\formatdef{bibglspagename}
If \csopt[true]{loc-prefix} is used, then this command is provided
-using the value of \texttt{tag.page} from the \langxml. For example with \file{bib2gls-en.xml} the definition is:
+using the value of \code{tag.page} from the \langxml. For example with \file{bib2gls-en.xml} the definition is:
\begin{verbatim}
\providecommand{\bibglspagename}{Page}
\end{verbatim}
-\subsection{\csfmt{bibglspagesname}}
-\labelcs{bibglspagesname}
-
-\begin{definition}
-\cs{bibglspagesname}
-\end{definition}
+\cssection{bibglspagesname}
+\formatdef{bibglspagesname}
If \csopt[true]{loc-prefix} is used, then this command is provided
-using the value of \texttt{tag.pages} from the \langxml. For example with \file{bib2gls-en.xml} the definition is:
+using the value of \code{tag.pages} from the \langxml. For example with \file{bib2gls-en.xml} the definition is:
\begin{verbatim}
\providecommand{\bibglspagesname}{Pages}
\end{verbatim}
-\subsection{\csfmt{bibglslocsuffix}}
-\labelcs{bibglslocsuffix}
-
-\begin{definition}
-\cs{bibglslocsuffix}\margm{n}
-\end{definition}
+\cssection{bibglslocsuffix}
-If the \optref{loc-suffix} option is on, this command will be
-provided. If the glossary type has been provided by \optref{type}
-(and \optref{dual-type} if there are any dual entries) then the
-definition of \cs{bibglslocsuffix} will be appended to the glossary
+\formatdef{bibglslocsuffix}
+If the \csopt{loc-suffix} option is on, this command will be
+provided. If the glossary type has been provided by \csopt{type}
+(and \csopt{dual-type} if there are any dual entries) then the
+definition of \gls{bibglslocsuffix} will be appended to the glossary
preamble for the given type (or types if there are dual entries).
This commands definition depends on the value provided by
-\optref{loc-suffix}. For example, with \csopt[\cs{@}.]{loc-suffix}
+\csopt{loc-suffix}. For example, with
+\csopt[\ics{at}{\idx{periodchar}}]{loc-suffix}
the command is defined as:
\begin{verbatim}
\providecommand{\bibglslocsuffix}[1]{\@.}
@@ -6541,23 +11290,19 @@ the command is defined as:
\providecommand{\bibglslocsuffix}[1]{\ifcase#1 A\or B\else C\fi}
\end{verbatim}
-Note that this is slightly different from \cs{bibglslocprefix} as
+Note that this is slightly different from \gls{bibglslocprefix} as
it includes the 0 case, which in this instance means that there were
no locations but there was a cross-reference. This command isn't
added when the location list is empty.
-\subsection{\csfmt{bibglslocationgroup}}
-\labelcs{bibglslocationgroup}
+\cssection{bibglslocationgroup}
-\begin{definition}
-\cs{bibglslocationgroup}\margm{n}\margm{counter}\margm{list}
-\end{definition}
-
-When the \optref{loc-counters} option is used, the locations
+\formatdef{bibglslocationgroup}
+When the \csopt{loc-counters} option is used, the locations
for each entry are grouped together according to the counter
-(in the order specified in the value of \optref{loc-counters}).
+(in the order specified in the value of \csopt{loc-counters}).
Each group of locations is encapsulated within
-\cs{bibglslocationgroup}, where \meta{n} is the number
+\gls{bibglslocationgroup}, where \meta{n} is the number
of locations within the group, \meta{counter} is the
counter name and \meta{list} is the formatted location sub-list.
By default, this simply does \meta{list}, but may be
@@ -6602,14 +11347,10 @@ name to a different textual label, such as:
}
\end{verbatim}
-\subsection{\csfmt{bibglslocationgroupsep}}
-\labelcs{bibglslocationgroupsep}
+\cssection{bibglslocationgroupsep}
-\begin{definition}
-\cs{bibglslocationgroupsep}
-\end{definition}
-
-When the \optref{loc-counters} option is set, this command
+\formatdef{bibglslocationgroupsep}
+When the \csopt{loc-counters} option is set, this command
is used to separate each location sub-group. It may be defined
before the resources are loaded:
\begin{verbatim}
@@ -6630,27 +11371,19 @@ or redefined after the resources are loaded:
\renewcommand*{\bibglslocationgroupsep}{; }
\end{verbatim}
-\subsection{\csfmt{bibglssupplemental}}
-\labelcs{bibglssupplemental}
-
-\begin{definition}
-\cs{bibglssupplemental}\margm{n}\margm{list}
-\end{definition}
+\cssection{bibglssupplemental}
-When the \optref{supplemental-locations} option is used, the locations
+\formatdef{bibglssupplemental}
+When the \csopt{supplemental-locations} option is used, the locations
from a supplementary document are encapsulated within the \meta{list}
-part of \cs{bibglssupplemental}. The first argument \meta{n}
+part of \gls{bibglssupplemental}. The first argument \meta{n}
(ignored by default) is the number of supplementary locations.
-\subsection{\csfmt{bibglssupplementalsep}}
-\labelcs{bibglssupplementalsep}
-
-\begin{definition}
-\cs{bibglssupplementalsep}
-\end{definition}
+\cssection{bibglssupplementalsep}
+\formatdef{bibglssupplementalsep}
The separator between the main location list and the supplementary
-location list. By default this is just \cs{delimN}. This may be
+location list. By default this is just \csref{bibglsdelimN}. This may be
defined before the resources are loaded:
\begin{verbatim}
\newcommand{\bibglssupplementalsep}{; }
@@ -6672,17 +11405,16 @@ or redefined after the resources are loaded:
\label{sec:lettergroupdefs}
The commands listed in this section are provided for use with the
-\argref{group} switch and glossary styles that display the letter
+\longarg{group} switch and glossary styles that display the letter
group title. If these need their definitions altered, they should
-be defined before the resource file is loaded (rather than redefined
-afterwards).
+be defined before the resource file is loaded if field expansion
+is on (\longarg{expand-fields}) otherwise they may be redefined
+afterwards.
-The base \sty{glossaries} package determines group titles through a fairly
-simplistic rule. Both \app{makeindex} and \app{xindy} write the
+The base \isty{glossaries} package determines group titles through a fairly
+simplistic rule. Both \idx!{makeindex} and \idx!{xindy} write the
line
-\begin{alltt}
-\cs{glsgroupheading}\margm{heading}
-\end{alltt}
+\nosecformatdef{glsgroupheading}
to the associated glossary file at the start of each new letter group.
For example, the \qt{A} letter group will be written as:
\begin{verbatim}
@@ -6699,7 +11431,7 @@ the simple rule:
\item if \csfmt{\meta{heading}groupname} exists use that;
\item otherwise just use \meta{heading}.
\end{itemize}
-There's no \csfmt{Agroupname} provided, but \cs{glssymbolsgroupname}
+There's no \csfmt{Agroupname} provided, but \ics{glssymbolsgroupname}
is provided and is supported by the associated language modules,
such as \styfmt{glossaries-french}. (Similarly for the \qt{Numbers}
group.)
@@ -6708,39 +11440,37 @@ The glossary styles that provide hyperlinks to the groups (such as
\glostyle{indexhypergroup}) use \meta{heading} to form the target
name. A problem arises when active characters occur in
\meta{heading}, which happens with extended characters and
-\sty{inputenc}.
+\isty{inputenc}.
The \sty{glossaries-extra} package (as from version 1.14) provides
-\begin{definition}
-\cs{glsxtrsetgrouptitle}\margm{label}\margm{title}
-\end{definition}
+\nosecformatdef{glsxtrsetgrouptitle}
to set the title for a group with the given label. The internal
-workings of \cs{glsgroupheading} are modified to use a slightly
+workings of \gls{glsgroupheading} are modified to use a slightly
altered rule:
\begin{itemize}
\item if a title has been set using
-\cs{glsxtrsetgrouptitle}\margm{heading}\margm{title} for the given
+\gls{glsxtrsetgrouptitle}\margm{heading}\margm{title} for the given
\meta{heading}, use that;
\item if \csfmt{\meta{heading}groupname} exists, use that;
\item just use \meta{heading} for the title.
\end{itemize}
-So if \cs{glsxtrsetgrouptitle} hasn't been used, it falls back on
+So if \gls{glsxtrsetgrouptitle} hasn't been used, it falls back on
the original rule.
The problem is now how to make the indexing application use the
-desired label in the argument of \cs{glsgroupheading} instead of selecting
+desired label in the argument of \gls{glsgroupheading} instead of selecting
the heading based on the first character of each sort value for each
top-level entry in that group. This can't be done with
-\app{makeindex}, and with \app{xindy} it requires a custom language
+\idx{makeindex}, and with \idx{xindy} it requires a custom language
module, which isn't a trivial task.
-With \bibgls, a different approach is used. The \ext{glstex} file
-created isn't comparable to the \ext{gls} file created by
-\app{makeindex} or \app{xindy}. There's nowhere for \bibgls\ to
-write the \cs{glsgroupheading} line as it isn't creating the code
+With \bibgls, a different approach is used. The \iext{glstex} file
+created isn't comparable to the \iext{gls} file created by
+\idx{makeindex} or \idx{xindy}. There's nowhere for \bibgls\ to
+write the \gls{glsgroupheading} line as it isn't creating the code
that typesets the glossary list. Instead it's creating the code that
defines the entries. The actual group heading is inserted by
-\cs{printunsrtglossary} and it's only able to do this by checking if
+\ics{printunsrtglossary} and it's only able to do this by checking if
the entry has a \field{group} field and comparing it to the previous
entry's \field{group} field.
@@ -6752,14 +11482,14 @@ according to the rule):
\item \meta{title} The group's title. This is typically title-cased.
For example, if the rule recognises the digraph \qt{dz}, then the
title is \qt{Dz}. Exceptions to this are included in the \langxml.
-If the key \texttt{grouptitle.case.\meta{lc}} exists, where
+If the key \code{grouptitle.case.\meta{lc}} exists, where
\meta{lc} is the lower case version of \meta{title}, then the value
of that key is used instead. For example, the Dutch digraph \qt{ij}
should be converted to \qt{IJ}, so \file{bib2gls-en.xml} includes:
\begin{verbatim}
<entry key="grouptitle.case.ij">IJ</entry>
\end{verbatim}
-(See the \argref{group} switch for more details.)
+(See the \longarg{group} switch for more details.)
\item \meta{letter} This is the actual letter at the start of the
given entry's \field{sort} field, which may be lower case or may
contain diacritics that don't appear in \meta{title}.
@@ -6770,38 +11500,33 @@ method.
be empty. (\bibgls\ won't know if you've modified the associated
\csfmt{bibglsnew...} command to set the \field{type}. It can only
know the type if it's in the original \ext{bib} definition or is set
-using resource options such as \optref{type}.)
+using resource options such as \csopt{type}.)
\end{itemize}
The \field{group} field is then set using:
\begin{alltt}
-group=\marg{\cs{bibglslettergroup}\margm{title}\margm{letter}\margm{id}\margm{type}}
+group=\marg{\gls{bibglslettergroup}\margm{title}\margm{letter}\margm{id}\margm{type}}
\end{alltt}
This field needs to expand to a simple label, which \csref{bibglslettergroup}
is designed to do. Note that non-letter groups are dealt with
separately (see below).
-\subsection{\csfmt{bibglssetlettergrouptitle}}
-\labelcs{bibglssetlettergrouptitle}
+\cssection{bibglssetlettergrouptitle}
-For each group that's detected, \bibgls\ will write the line:
-\begin{definition}
-\cs{bibglssetlettergrouptitle}\marg{\margm{title}\margm{letter}\margm{id}\margm{type}}
-\end{definition}
+For each \idx{lettergroup} that's detected, \bibgls\ will write the line:
+\formatdef{bibglssetlettergrouptitle}
in the \ext{glstex} file, which sets the group's title using
-\begin{alltt}
-\cs{glsxtrsetgrouptitle}\margm{group label}\margm{group title}
-\end{alltt}
+\format{glsxtrsetgrouptitle}
where the \meta{group label} part matches the corresponding \field{group}
value.
-Note that \cs{bibglssetlettergrouptitle} only has a single
+Note that \gls{bibglssetlettergrouptitle} only has a single
argument, but that argument contains the four arguments needed by
\csref{bibglslettergroup} and \csref{bibglslettergrouptitle}.
These arguments are as described above.
-If \cs{glsxtrsetgrouptitle} has been defined (\sty{glossaries-extra}
-version 1.14 onwards), then \cs{bibglssetlettergrouptitle} will be
+If \gls{glsxtrsetgrouptitle} has been defined (\sty{glossaries-extra}
+version 1.14 onwards), then \gls{bibglssetlettergrouptitle} will be
defined as
\begin{verbatim}
\providecommand{\bibglssetlettergrouptitle}[1]{%
@@ -6812,7 +11537,7 @@ function can't be supported and the command will be defined to
simply ignore its argument. This will fall back on the original
method of just using \meta{title} as the label.
-Since \cs{bibglssetlettergrouptitle} is used in the \ext{glstex} file to
+Since \gls{bibglssetlettergrouptitle} is used in the \ext{glstex} file to
set the group titles, the associated commands need to be defined
before the resource file is loaded if their definitions require
modification. After the resource file has been loaded, you can
@@ -6820,38 +11545,32 @@ adjust the title of a specific group, but you'll need to check the
\ext{glstex} file for the appropriate arguments. For example, if the
\ext{glstex} file contains:
\begin{alltt}
-\cs{bibglssetlettergrouptitle}\marg{\marg{\AE}\marg{\ae}\marg{7274496}\marg{}}
+\gls{bibglssetlettergrouptitle}\marg{\marg{\AE}\marg{\ae}\marg{7274496}\marg{}}
\end{alltt}
but you actually want the group title to appear as \qt{\AE\ (AE)}
instead of just \qt{\AE}, then after the resource file has been
loaded you can do:
\begin{alltt}
-\cs{glsxtrsetgrouptitle}
- \marg{\cs{bibglslettergroup}\marg{\AE}\marg{\ae}\marg{7274496}\marg{}}\% label
+\gls{glsxtrsetgrouptitle}
+ \marg{\gls{bibglslettergroup}\marg{\AE}\marg{\ae}\marg{7274496}\marg{}}\% label
\marg{\AE\ (AE)}\% title
\end{alltt}
-\subsection{\csfmt{bibglslettergroup}}
-\labelcs{bibglslettergroup}
+\cssection{bibglslettergroup}
-\begin{definition}
-\cs{bibglslettergroup}\margm{title}\margm{letter}\margm{id}\margm{type}
-\end{definition}
-This command is used to determine the letter group label. The
+\formatdef{bibglslettergroup}
+This command is used to determine the \idx{lettergroup} label. The
default definition is \meta{type}\meta{id}, which ensures that no
problematic characters occur in the label since \meta{type} can't
contains special characters and \meta{id} is numeric. The
\meta{type} is included in case there are multiple glossaries, since
the hyperlink name must be unique.
-\subsection{\csfmt{bibglslettergrouptitle}}
-\labelcs{bibglslettergrouptitle}
+\cssection{bibglslettergrouptitle}
-\begin{definition}
-\cs{bibglslettergrouptitle}\margm{title}\margm{letter}\margm{id}\margm{type}
-\end{definition}
-This command is used to determine the letter group title.
-The default definition is \cs{unexpanded}\margm{title}, which guards
+\formatdef{bibglslettergrouptitle}
+This command is used to determine the \idx{lettergroup} title.
+The default definition is \ics{unexpanded}\margm{title}, which guards
against any expansion issues that may arise with characters outside
the basic Latin set.
@@ -6863,21 +11582,21 @@ For example:
of a centimetre}
}
\end{verbatim}
-The \field{sort} value is \qtt{\AA ngstr\"om}. With \optref[en]{sort}
-the \meta{title} part will be \texttt{A} but with \optref[sv]{sort}
-the \meta{title} part will be \texttt{\AA}. In both cases the
-\meta{letter} argument will be \texttt{\AA}.
+The \field{sort} value is \qtt{\AA ngstr\"om}. With \csopt[en]{sort}
+the \meta{title} part will be \code{A} but with \csopt[sv]{sort}
+the \meta{title} part will be \code{\AA}. In both cases the
+\meta{letter} argument will be \code{\AA}.
Take care if you are using a script that needs encapsulating. For
-example, with the \sty{CJKutf8} package the CJK characters need to
+example, with the \isty{CJKutf8} package the CJK characters need to
be placed within the \env{CJK} environment, so any letter group
titles that contain CJK characters will need special attention.
For example, suppose the \ext{bib} file contains entries in the
form:
\begin{alltt}
-\atentryref{dualentry}\marg{\meta{label},
- name = \marg{\cs{cjkname}\margm{CJK characters}},
+\atentry{dualentry}\marg{\meta{label},
+ name = \marg{\ics{cjkname}\margm{CJK characters}},
description = \margm{English description}
}
\end{alltt}
@@ -6902,12 +11621,12 @@ and the document contains:
]
\end{verbatim}
then CJK characters will appear in the \meta{title} argument of
-\cs{bibglslettergrouptitle} which causes a problem because they need
+\gls{bibglslettergrouptitle} which causes a problem because they need
to be encapsulated within the \env{CJK} environment. This can be more
conveniently done with the user supplied \csfmt{cjkname}, but the CJK
-characters need to be protected from expansion so \cs{unexpanded} is
-also needed. The new definition of \cs{bibglslettergrouptitle} needs
-to be defined before \cs{GlsXtrLoadResources}. For example:
+characters need to be protected from expansion so \ics{unexpanded} is
+also needed. The new definition of \gls{bibglslettergrouptitle} needs
+to be defined before \gls{GlsXtrLoadResources}. For example:
\begin{verbatim}
\newcommand{\bibglslettergrouptitle}[4]{\unexpanded{\cjkname{#1}}}
\end{verbatim}
@@ -6923,15 +11642,12 @@ also end up encapsulated. An alternative approach is to use the
(\csfmt{csuse} is provided by \sty{etoolbox}, which is automatically
loaded by the \styfmt{glossaries} package.)
-\subsection{\csfmt{bibglssetothergrouptitle}}
-\labelcs{bibglssetothergrouptitle}
+\cssection{bibglssetothergrouptitle}
-The group label and title for non-alphabetic characters (symbols)
-are dealt with in a similar way to the letter groups, but in this
+The label and title for \idxpl{symbolgroup}
+are dealt with in a similar way to the \idxpl!{lettergroup}, but in this
case the title is set using
-\begin{definition}
-\cs{bibglssetothergrouptitle}\marg{\margm{character}\margm{id}\margm{type}}
-\end{definition}
+\formatdef{bibglssetothergrouptitle}
This is defined in an analogous manner:
\begin{verbatim}
\providecommand{\bibglssetothergrouptitle}[1]{%
@@ -6951,45 +11667,57 @@ For example, suppose my \ext{bib} file contains:
description = {author string}
}
\end{verbatim}
-If a locale sort is used, the leading slash \texttt{/} will be
+If a locale sort is used, the leading slash \code{/} will be
ignored and this entry will belong to the \qt{A} letter group using
the letter commands described above. If, instead, one of the
character code sort methods are used, such as
-\optref[letter-case]{sort}, then this entry will be identified as
+\csopt[letter-case]{sort}, then this entry will be identified as
belonging to a symbol (or \qt{other}) group and the title will be
set using:
\begin{verbatim}
\bibglssetothergrouptitle{{/}{2F}{}}
\end{verbatim}
-\subsection{\csfmt{bibglsothergroup}}
-\labelcs{bibglsothergroup}
+\cssection{bibglsothergroup}
-\begin{definition}
-\cs{bibglsothergroup}\margm{character}\margm{id}\margm{type}
-\end{definition}
-This expands to the group label for symbol groups. This just
-defaults to \texttt{glssymbols} (ignoring all arguments), which
-replicates the label used when \app{makeindex} or \app{xindy}
+\formatdef{bibglsothergroup}
+This expands to the label for \idxpl{symbolgroup}. This just
+defaults to \code{glssymbols} (ignoring all arguments), which
+replicates the label used when \idx!{makeindex} or \idx!{xindy}
generate the glossary files.
-\subsection{\csfmt{bibglsothergrouptitle}}
-\labelcs{bibglsothergrouptitle}
+\cssection{bibglsothergrouptitle}
-\begin{definition}
-\cs{bibglsothergrouptitle}\margm{character}\margm{id}\margm{type}
-\end{definition}
-This expands to the group title for symbol groups. This just
-expands to \cs{glssymbolsgroupname} by default.
+\formatdef{bibglsothergrouptitle}
+This expands to the title for \idxpl{symbolgroup}. This just
+expands to \ics{glssymbolsgroupname} by default.
+
+\cssection{bibglssetemptygrouptitle}
+
+Used when the sort value devolves to an empty string. This command
+sets the label and title.
+\formatdef{bibglssetemptygrouptitle}
+
+\cssection{bibglsemptygroup}
-\subsection{\csfmt{bibglssetnumbergrouptitle}}
-\labelcs{bibglssetnumbergrouptitle}
+\formatdef{bibglsemptygroup}
+This expands to the label for \idxpl{emptygroup}. This
+defaults to \code{glssymbols} to make it consistent with
+\idxpl{nonlettergroup} (since the sort value likely contained
+unknown symbol commands).
-The numeric sort methods all create number groups instead of letter
+\cssection{bibglsemptygrouptitle}
+
+\formatdef{bibglsemptygrouptitle}
+This expands to the group title for \idx{emptygroup}. This just
+expands to \ics{glssymbolsgroupname} by default.
+
+\cssection{bibglssetnumbergrouptitle}
+
+The numeric sort methods (\tableref{tab:sortoptionsnumerical})
+all create \idxpl{numbergroup} instead of letter
or symbol groups. These behave in an analogous way to the above.
-\begin{definition}
-\cs{bibglssetnumbergrouptitle}\marg{\margm{value}\margm{id}\margm{type}}
-\end{definition}
+\formatdef{bibglssetnumbergrouptitle}
In this case \meta{value} is the actual numeric sort value, and
\meta{id} is a decimal number obtained from converting \meta{value}
to an integer. This command is defined as
@@ -6998,32 +11726,87 @@ to an integer. This command is defined as
\glsxtrsetgrouptitle{\bibglsnumbergroup#1}{\bibglsnumbergrouptitle#1}}
\end{verbatim}
-\subsection{\csfmt{bibglsnumbergroup}}
-\labelcs{bibglsnumbergroup}
+\cssection{bibglsnumbergroup}
-The number group label is obtained from:
-\begin{definition}
-\cs{bibglsnumbergroup}\margm{value}\margm{id}\margm{type}
-\end{definition}
-This just defaults to \texttt{glsnumbers}.
+The \idx{numbergroup} label is obtained from:
+\formatdef{bibglsnumbergroup}
+This just defaults to \code{glsnumbers}.
-\subsection{\csfmt{bibglsnumbergrouptitle}}
-\labelcs{bibglsnumbergrouptitle}
+\cssection{bibglsnumbergrouptitle}
-The number group title is obtained from:
-\begin{definition}
-\cs{bibglsnumbergrouptitle}\margm{value}\margm{id}\margm{type}
-\end{definition}
-This just defaults to \cs{glsnumbersgroupname}.
+The \idx{numbergroup} title is obtained from:
+\formatdef{bibglsnumbergrouptitle}
+This just defaults to \ics{glsnumbersgroupname}.
-\subsection{\csfmt{bibglshypergroup}}
-\labelcs{bibglshypergroup}
+\cssection{bibglsdatetimegroup}
-\begin{definition}
-\cs{bibglshypergroup}\margm{type}\margm{group id}
-\end{definition}
+\formatdef{bibglsdatetimegroup}
+
+This command is used for \idx{datetimegroup} labels with \optfmt{datetime} sorting
+(\tableref{tab:sortoptionsdatetime}). This has ten arguments, which means a
+little trickery is needed to deal with the tenth argument.
+The default definition is
+\begin{verbatim}
+\providecommand{\bibglsdatetimegroup}[9]{#1#2#3\@firstofone}
+\end{verbatim}
+This forms the group label from the year, month, day and \meta{type}.
+
+\cssection{bibglsdatetimegrouptitle}
+
+\formatdef{bibglsdatetimegrouptitle}
+
+This command is used for \idx{datetimegroup} titles with \optfmt{datetime} sorting
+(\tableref{tab:sortoptionsdatetime}).
+The default definition is
+\begin{verbatim}
+\providecommand{\bibglsdatetimegrouptitle}[9]{#1-#2-#3\@gobble}
+\end{verbatim}
+This sets the title to the numeric
+\code{\meta{YYYY}-\meta{MM}-\meta{DD}}
+but may be redefined as appropriate.
+
+\cssection{bibglsdategroup}
+
+\formatdef{bibglsdategroup}
+
+This command is used for \idx{dategroup} labels with \optfmt{date} (no time) sorting
+(\tableref{tab:sortoptionsdatetime}). The default definition is
+\begin{verbatim}
+\providecommand{\bibglsdategroup}[7]{#1#2#4#7}
+\end{verbatim}
+This forms the group label from the year, month, era and type.
+In this case, the era is a textual representation not the numeric
+value used in calculating the sort value.
+
+\cssection{bibglsdategrouptitle}
+
+\formatdef{bibglsdategrouptitle}
+This command is used for \idx{dategroup} titles with \optfmt{date} (no time) sorting
+(\tableref{tab:sortoptionsdatetime}). The default definition is
+\begin{verbatim}
+\providecommand{\bibglsdategrouptitle}[7]{#1-#2}
+\end{verbatim}
+This just sets the title to the numeric year-month form
+\code{\meta{YYYY}-\meta{MM}}.
+
+\cssection{bibglstimegroup}
+
+\formatdef{bibglstimegroup}
+This command is used for \idx{timegroup} labels with \optfmt{time} (no date) sorting
+(\tableref{tab:sortoptionsdatetime}).
+
+\cssection{bibglstimegrouptitle}
+
+\formatdef{bibglstimegrouptitle}
-If the \ext{log} file indicates that \sty{hyperref} has been loaded
+This command is used for \idx{timegroup} titles with \optfmt{time} (no date) sorting
+(\tableref{tab:sortoptionsdatetime}).
+
+\cssection{bibglshypergroup}
+
+\formatdef{bibglshypergroup}
+
+If the \iext{log} file indicates that \isty{hyperref} has been loaded
and the \longarg{group} switch is used, then this command will be
used to create the navigation information for glossary styles such
as \glostyle{indexhypergroup}.
@@ -7032,15 +11815,12 @@ as \glostyle{indexhypergroup}.
\label{sec:flattendefs}
These commands relate to the way the \field{name} field is altered
-when flattening lonely child entries with the \optref{flatten-lonely}
+when flattening lonely child entries with the \csopt{flatten-lonely}
option.
-\subsection{\csfmt{bibglsflattenedhomograph}}
-\labelcs{bibglsflattenedhomograph}
+\cssection{bibglsflattenedhomograph}
-\begin{definition}
-\cs{bibglsflattenedhomograph}\margm{name}\margm{parent label}
-\end{definition}
+\formatdef{bibglsflattenedhomograph}
The default definition simply does \meta{name}.
This command is used if the child and parent name's are identical.
@@ -7087,9 +11867,9 @@ odd. For example:
\textbf{glossary}\par
\quad 1) collection of glosses 1
\end{flushleft}
-With the \optref{flatten-lonely} option, the parent is removed and
+With the \csopt{flatten-lonely} option, the parent is removed and
the child is moved up a hierarchical level. With
-\optref[postsort]{flatten-lonely} this would normally adjust the
+\csopt[postsort]{flatten-lonely} this would normally adjust the
name so that it appears as \meta{parent name}, \meta{child name}
but in this case it would look a little odd for the name to
appear as \qt{glossary, glossary} so instead the name is
@@ -7101,21 +11881,17 @@ set to
label of the parent entry).
This means that the name simply appears as \qt{glossary}, even if
-the \optref[postsort]{flatten-lonely} option is used. Note that if
+the \csopt[postsort]{flatten-lonely} option is used. Note that if
the parent entry is removed, the parent label won't be of much use.
-You can test for existence using \cs{ifglsentryexists} (provided by
-the \sty{glossaries} package) in case you want to vary the way the
-name is displayed according to whether or not the parent is still
-present.
+You can test for existence using \ics{ifglsentryexists} in case you
+want to vary the way the name is displayed according to whether or
+not the parent is still present.
-\subsection{\csfmt{bibglsflattenedchildpresort}}
-\labelcs{bibglsflattenedchildpresort}
+\cssection{bibglsflattenedchildpresort}
-\begin{definition}
-\cs{bibglsflattenedchildpresort}\margm{child name}\margm{parent name}
-\end{definition}
+\formatdef{bibglsflattenedchildpresort}
-Used by the \optref[presort]{flatten-lonely} option. This defaults
+Used by the \csopt[presort]{flatten-lonely} option. This defaults
to just \meta{child name}. If you want to change this, remember that
you can let the interpreter know by adding the definition to
\atentry{preamble}. For example:
@@ -7123,15 +11899,12 @@ you can let the interpreter know by adding the definition to
@preamble{"\providecommand{\bibglsflattenedchildpresort}[2]{#1 (#2)}"}
\end{verbatim}
-\subsection{\csfmt{bibglsflattenedchildpostsort}}
-\labelcs{bibglsflattenedchildpostsort}
+\cssection{bibglsflattenedchildpostsort}
-\begin{definition}
-\cs{bibglsflattenedchildpostsort}\margm{parent name}\margm{child name}
-\end{definition}
+\formatdef{bibglsflattenedchildpostsort}
-Used by the \optref[postsort]{flatten-lonely} option. This defaults
-to \texttt{\meta{parent name}, \meta{child name}}.
+Used by the \csopt[postsort]{flatten-lonely} option. This defaults
+to \code{\meta{parent name}, \meta{child name}}.
Note that the arguments are in the reverse order to those of the
previous command. This is done to assist the automated first letter
@@ -7142,23 +11915,182 @@ field using:
\begin{verbatim}
\glssetexpandfield{name}
\end{verbatim}
-(before \cs{GlsXtrLoadResources}).
+(before \gls{GlsXtrLoadResources}).
-\chapter{Converting Existing \filefmt{.tex} to \filefmt{.bib}}
+\section{Other}
+
+\cssection{bibglshyperlink}
+
+\formatdef{bibglshyperlink}
+Used by the \hyperref[sec:dualoptsbacklinks]{back link options},
+this just defaults to
+\begin{alltt}
+\ics{glshyperlink}\oargm{text}\margm{label}
+\end{alltt}
+
+\cssection{bibglssetwidest}
+
+\formatdef{bibglssetwidest}
+This is used by \csopt{set-widest} to set the widest name for the
+given hierarchical level where the glossary type can't be determined.
+This is defined as:
+\begin{verbatim}
+\providecommand*{\bibglssetwidest}[2]{\glsupdatewidest[#1]{#2}}
+\end{verbatim}
+if \ics{glsupdatewidest} is defined, otherwise it will be
+defined to use
+\ics{glssetwidest}:
+\begin{verbatim}
+\providecommand*{\bibglssetwidest}[2]{\glssetwidest[#1]{#2}}
+\end{verbatim}
+Since this isn't scoped, this will affect other glossaries.
+In general, if you have more than one glossary it's best to
+set the \field{type} using options like \csopt{type}.
+
+\cssection{bibglssetwidestfortype}
+
+\formatdef{bibglssetwidestfortype}
+This is used by \csopt{set-widest} to set the widest name for the
+given hierarchical level where the glossary type is known. This
+is defined as:
+\begin{verbatim}
+\providecommand*{\bibglssetwidestfortype}[3]{%
+ \apptoglossarypreamble[#1]{\glsupdatewidest[#2]{#3}}%
+}
+\end{verbatim}
+if \ics{glsupdatewidest} is defined, otherwise it will be
+defined to use \ics{glssetwidest}:
+\begin{verbatim}
+\providecommand*{\bibglssetwidestfortype}[3]{%
+ \apptoglossarypreamble[#1]{\glssetwidest[#2]{#3}}%
+}
+\end{verbatim}
+Since the glossary preamble is scoped, this won't affect other
+glossaries.
+
+\cssection{bibglssetwidestfallback}
+
+\formatdef{bibglssetwidestfallback}
+This is used by \csopt{set-widest} instead of \gls{bibglssetwidest}
+when all \field{name} fields end up as an empty string when
+interpreted by \bibgls. This typically means that all the
+\field{name} fields contain unknown commands. This fallback command
+will use \ics{glsFindWidestLevelTwo}, which sets the widest name for
+the top-level and first two sub-levels.
+
+\cssection{bibglssetwidestfortypefallback}
+
+\formatdef{bibglssetwidestfortypefallback}
+This is used by \csopt{set-widest} instead of
+\gls{bibglssetwidestfortype}
+when all \field{name} fields end up as an empty string when
+interpreted by \bibgls. This typically means that all the
+\field{name} fields contain unknown commands. This fallback command
+will append \gls{bibglssetwidestfallback} to the glossary preamble
+for the given type.
+
+\cssection{bibglssetwidesttoplevelfallback}
+
+\formatdef{bibglssetwidesttoplevelfallback}
+This is used by \csopt{set-widest} instead of \gls{bibglssetwidest}
+when all \field{name} fields end up as an empty string when
+interpreted by \bibgls. This typically means that all the
+\field{name} fields contain unknown commands. This fallback command
+will use \ics{glsFindWidestTopLevelName}, which sets the widest name for
+the top-level.
+
+\cssection{bibglssetwidesttoplevelfortypefallback}
+
+\formatdef{bibglssetwidesttoplevelfortypefallback}
+This is used by \csopt{set-widest} instead of
+\gls{bibglssetwidestfortype}
+when all \field{name} fields end up as an empty string when
+interpreted by \bibgls. This typically means that all the
+\field{name} fields contain unknown commands. This fallback command
+will append \gls{bibglssetwidesttoplevelfallback} to the glossary
+preamble of the given type.
+
+\cssection{bibglscontributorlist}
+
+\formatdef{bibglscontributorlist}
+This is used when \csopt{bibtex-contributor-fields} is set. The
+definition depends on whether or not \ics{DTLformatlist} has been
+defined:
+\begin{verbatim}
+\ifdef\DTLformatlist
+{% datatool v2.28+
+ \providecommand*{\bibglscontributorlist}[2]{\DTLformatlist{#1}}
+}
+{% datatool v2.27 or earlier
+ \providecommand*{\bibglscontributorlist}[2]{%
+ \def\bibgls@sep{}%
+ \@for\bibgls@item:=#1\do{\bibgls@sep\bibgls@item\def\bibgls@sep{, }}%
+ }
+}
+\end{verbatim}
+The second argument allows you to provide definitions like:
+\begin{verbatim}
+\newcommand*{\bibglscontributorlist}[2]{%
+ \ifcase#2
+ \or
+ name:
+ \else
+ names:
+ \fi
+ \DTLformatlist{#1}%
+}
+\end{verbatim}
+
+\cssection{bibglscontributor}
+
+\formatdef{bibglscontributor}
+This is used when \csopt{bibtex-contributor-fields} is set. The
+definition depends on \csopt{contributor-order}. Note that if you have multiple
+resource sets, that option governs the way \bibgls's version of
+\gls{bibglscontributor} behaves. The definition is written to the
+\ext{glstex} using \cs{providecommand}, so \LaTeX\ will only pick up
+the first definition.
+
+\cssection{bibglshashchar}
+
+\formatdef{bibglshashchar}
+Expands to a literal hash character (\idx{hashchar}).
+
+\cssection{bibglsunderscorechar}
+
+\formatdef{bibglsunderscorechar}
+Expands to a literal underscore character (\idx{underscorechar}).
+
+\cssection{bibglsdollarchar}
+
+\formatdef{bibglsdollarchar}
+Expands to a literal dollar character (\idx{dollarchar}).
+
+\cssection{bibglsampersandchar}
+
+\formatdef{bibglsampersandchar}
+Expands to a literal ampersand character (\idx{ampchar}).
+
+\cssection{bibglscircumchar}
+
+\formatdef{bibglscircumchar}
+Expands to a literal circumflex character (\idx{circumchar}).
+
+\chapter{Converting Existing \iext{tex} to \iext{bib}}
\label{sec:gls2bib}
-If you have already been using the \sty{glossaries} or
-\sty{glossaries-extra} package with a large file containing all your
-definitions using commands like \cs{newglossaryentry}, then you can
-use the supplementary tool \app{convertgls2bib} to convert the definitions
+If you have already been using the \styfmt{glossaries} or
+\styfmt{glossaries-extra} package with a large file containing all your
+definitions using commands like \gls{newglossaryentry}, then you can
+use the supplementary tool \idx{convertgls2bib} to convert the definitions
to the \ext{bib} format required by \bibgls. The syntax is:
\begin{alltt}
convertgls2bib \oargm{options} \meta{tex file} \meta{bib file}
\end{alltt}
where \meta{tex file} is the \ext{tex} file and \meta{bib file} is
the \ext{bib} file. This application is less secure than \bibgls\ as
-it doesn't use \app{kpsewhich} to check \texttt{openin\_any} and
-\texttt{openout\_any}. Take care not to accidentally overwrite
+it doesn't use \idx{kpsewhich} to check \texmfcnf{openinany} and
+\texmfcnf{openoutany}. Take care not to accidentally overwrite
existing \ext{bib} files as there's no check to determine if
\meta{bib file} already exists.
@@ -7166,7 +12098,7 @@ The \meta{options} are:
\begin{description}
\item[\longargfmt{texenc} \meta{encoding}] The character encoding of the
\ext{tex} file. If omitted, the operating system's default encoding
-is assumed (or the Java Virtual Machine's).
+is assumed (or the \idx{JVM}['s]).
\item[\longargfmt{bibenc} \meta{encoding}] The character encoding of the
\ext{bib} file. If omitted, the same encoding as the
@@ -7178,7 +12110,7 @@ definitions in your \ext{tex} file have spaces, use this option to
replace spaces in labels. Each space will be substituted with
\meta{replacement}. The cross-referencing fields, \field{see},
\field{seealso} and \field{alias}, will also be adjusted, but any
-references using \cs{gls} etc will have to be substituted manually
+references using \ics{gls} etc will have to be substituted manually
(or use a global search and replace in your text editor).
If you want to strip the spaces, use an empty string for
\meta{replacement}. You'll need to delimit this according to your
@@ -7187,6 +12119,12 @@ operating system. For example:
gls2bib --space-sub '' entries.tex entries.bib
\end{verbatim}
+\item[\longargfmt{ignore-sort}] Ignore the \field{sort} field.
+This is the default since \bibgls\ can work out a more intuitive
+sort value than either \idx!{makeindex} or \idx!{xindy}.
+
+\item[\longargfmt{no-ignore-sort}] Don't ignore the \field{sort} field.
+
\item[\longargfmt{help} or \shortargfmt{h}] Display help message and
quit.
\item[\longargfmt{version} or \shortargfmt{v}] Display version
@@ -7198,7 +12136,7 @@ overly complicated code within the \ext{tex} file. The \TeX\ parser
library isn't a \TeX\ engine!
In all cases below, if \meta{\keyvallist} contains
\begin{alltt}
-see=[\cs{seealsoname}]\margm{label(s)}
+see=[\ics{seealsoname}]\margm{label(s)}
\end{alltt}
this will be substituted with
\begin{alltt}
@@ -7219,94 +12157,81 @@ v1.16+.)
Additionally, if \meta{\keyvallist} contains
\begin{alltt}
-type=\marg{\cs{glsdefaulttype}}
+type=\marg{\ics{glsdefaulttype}}
\end{alltt}
then this field will be ignored. (This \field{type} value is
recommended in \meta{\keyvallist} when loading files with
-\cs{loadglsentries}\oargm{type}\margm{file} to allow the optional
+\ics{loadglsentries}\oargm{type}\margm{file} to allow the optional
argument to set the \field{type}. With \bibgls\ you can use the
-\optref{type} option instead.)
+\csopt{type} option instead.)
-\section{\cs{newglossaryentry}}
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{newglossaryentry}\margm{label}\margm{\keyvallist}
-\end{definition}
+\cssection[\section]{newglossaryentry}
+The base \styfmt{glossaries} package provides:
+\formatdef{newglossaryentry}
This is converted to:
\begin{alltt}
-\atentryref{entry}\marg{\meta{label},
+\atentry{entry}\marg{\meta{label},
\meta{\keyvallist}
}
\end{alltt}
-\cs{newentry} (provided by the \sty{glossaries-extra}
-\styopt{shortcuts} option) is recognised as a synonym of \cs{newglossaryentry}.
-
-\section{\cs{provideglossaryentry}}
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{provideglossaryentry}\margm{label}\margm{\keyvallist}
-\end{definition}
+\ics{newentry} is recognised as a synonym of \gls{newglossaryentry}.
+\cssection[\section]{provideglossaryentry}
+The base \styfmt{glossaries} package provides:
+\formatdef{provideglossaryentry}
This is converted to:
\begin{alltt}
-\atentryref{entry}\marg{\meta{label},
+\atentry{entry}\marg{\meta{label},
\meta{\keyvallist}
}
\end{alltt}
but only if \meta{label} hasn't already been defined.
-\section{\cs{longnewglossaryentry}}
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{longnewglossaryentry}\margm{label}\margm{\keyvallist}\margm{description}
-\end{definition}
-
+\cssection[\section]{longnewglossaryentry}
+The base \styfmt{glossaries} package provides:
+\formatdef{longnewglossaryentry}
This is converted to:
\begin{alltt}
-\atentryref{entry}\marg{\meta{label},
+\atentry{entry}\marg{\meta{label},
\meta{\keyvallist},
description = \margm{description}
}
\end{alltt}
-The starred version provided by the \sty{glossaries-extra} package
+The starred version provided by the \styfmt{glossaries-extra} package
is also recognised. The unstarred version strips trailing spaces
-from \meta{description}. (This doesn't add \cs{nopostdesc}, but
-\sty{glossaries-extra} defaults to \styopt{nopostdot}.)
-
-\section{\cs{longprovideglossaryentry}}
+from \meta{description}. (This doesn't add \ics{nopostdesc}, but
+\styfmt{glossaries-extra} defaults to \styopt{nopostdot}.)
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{longprovideglossaryentry}\margm{label}\margm{\keyvallist}\margm{description}
-\end{definition}
+\cssection[\section]{longprovideglossaryentry}
+The base \styfmt{glossaries} package provides:
+\formatdef{longprovideglossaryentry}
As above, but only if \meta{label} hasn't already been defined.
-\section{\cs{newterm}}
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{newterm}\oargm{\keyvallist}\margm{label}
-\end{definition}
+\cssection[\section]{newterm}
+
+The base \styfmt{glossaries} package provides:
+\formatdef{newterm}
(when the \styopt{index} option is used).
This is converted to:
\begin{alltt}
-\atentryref{index}\marg{\meta{label},
+\atentry{index}\marg{\meta{label},
\meta{\keyvallist}
}
\end{alltt}
if the optional argument is present, otherwise it's just converted
to:
\begin{alltt}
-\atentryref{index}\marg{\meta{label}}
+\atentry{index}\marg{\meta{label}}
\end{alltt}
If \longargfmt{space-sub} is used and \meta{label} contains one or
more spaces, then \field{name} will be set if not included in
-\meta{\keyvallist}. For example, if \texttt{entries.bib}
+\meta{\keyvallist}. For example, if \filefmt{entries.bib}
contains
\begin{verbatim}
\newterm{sea lion}
@@ -7316,7 +12241,7 @@ then
\begin{verbatim}
gls2bib --space-sub '-' entries.bib entries.tex
\end{verbatim}
-will write the terms to \texttt{entries.tex} as
+will write the terms to \filefmt{entries.tex} as
\begin{verbatim}
@index{sea-lion,
name = {sea lion}
@@ -7330,7 +12255,7 @@ whereas just
\begin{verbatim}
gls2bib entries.bib entries.tex
\end{verbatim}
-will write the terms to \texttt{entries.tex} as
+will write the terms to \filefmt{entries.tex} as
\begin{verbatim}
@index{sea lion}
@@ -7342,15 +12267,12 @@ which will cause a problem when the \ext{bib} file is parsed
by \bibgls\ (and will probably also cause a problem for
bibliographic management systems).
-\section{\cs{newabbreviation}}
-The \sty{glossaries-extra} package provides:
-\begin{definition}
-\cs{newabbreviation}\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}
-\end{definition}
-
+\cssection[\section]{newabbreviation}
+The \styfmt{glossaries-extra} package provides:
+\formatdef{newabbreviation}
This is converted to:
\begin{alltt}
-\atentryref{abbreviation}\marg{\meta{label},
+\atentry{abbreviation}\marg{\meta{label},
short = \margm{short},
long = \margm{long},
\meta{\keyvallist}
@@ -7358,38 +12280,33 @@ This is converted to:
\end{alltt}
if the optional argument is present, otherwise it's converted to:
\begin{alltt}
-\atentryref{abbreviation}\marg{\meta{label},
+\atentry{abbreviation}\marg{\meta{label},
short = \margm{short},
long = \margm{long}
}
\end{alltt}
-\section{\cs{newacronym}}
-The base \sty{glossaries} package provides:
-\begin{definition}
-\cs{newacronym}\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}
-\end{definition}
-(which is redefined by \sty{glossaries-extra} to use
-\cs{newabbreviation}).
+\cssection[\section]{newacronym}
+The base \styfmt{glossaries} package provides:
+\formatdef{newacronym}
+(which is redefined by \styfmt{glossaries-extra} to use
+\gls{newabbreviation}).
-As above but uses \atentryref{acronym} instead.
+As above but uses \atentry{acronym} instead.
-\section{\cs{glsxtrnewsymbol}}
-The \sty{glossaries-extra} package provides:
-\begin{definition}
-\cs{glsxtrnewsymbol}\oargm{\keyvallist}\margm{label}\margm{symbol}
-\end{definition}
+\cssection[\section]{glsxtrnewsymbol}
+The \styfmt{glossaries-extra} package provides:
+\formatdef{glsxtrnewsymbol}
(when the \styopt{symbols} option is used).
-
This is converted to:
\begin{alltt}
-\atentryref{symbol}\marg{\meta{label},
+\atentry{symbol}\marg{\meta{label},
name = \margm{symbol}
}
\end{alltt}
if the optional argument is missing, otherwise it's converted to:
\begin{alltt}
-\atentryref{symbol}\marg{\meta{label},
+\atentry{symbol}\marg{\meta{label},
name = \margm{symbol},
\meta{\keyvallist}
}
@@ -7397,30 +12314,27 @@ if the optional argument is missing, otherwise it's converted to:
unless \meta{\keyvallist} contains the \field{name} field,
in which case it's converted to:
\begin{alltt}
-\atentryref{symbol}\marg{\meta{label},
+\atentry{symbol}\marg{\meta{label},
\meta{\keyvallist}
}
\end{alltt}
-\cs{newsym} (provided by the \styopt{shortcuts} option) is recognised
-as a synonym for \cs{glsxtrnewsymbol}.
+\ics{newsym} is recognised as a synonym for \gls{glsxtrnewsymbol}.
-\section{\cs{glsxtrnewnumber}}
-The \sty{glossaries-extra} package provides:
-\begin{definition}
-\cs{glsxtrnewnumber}\oargm{\keyvallist}\margm{label}
-\end{definition}
-(when the \styopt{numbers} option is used).
+\cssection[\section]{glsxtrnewnumber}
+The \styfmt{glossaries-extra} package provides:
+\formatdef{glsxtrnewnumber}
+(when the \styopt{numbers} option is used).
This is converted to:
\begin{alltt}
-\atentryref{number}\marg{\meta{label},
+\atentry{number}\marg{\meta{label},
name = \margm{label}
}
\end{alltt}
if the optional argument is missing, otherwise it's converted to:
\begin{alltt}
-\atentryref{number}\marg{\meta{label},
+\atentry{number}\marg{\meta{label},
name = \margm{label},
\meta{\keyvallist}
}
@@ -7428,34 +12342,30 @@ if the optional argument is missing, otherwise it's converted to:
if \field{name} isn't listed in \meta{\keyvallist},
otherwise it's converted to:
\begin{alltt}
-\atentryref{number}\marg{\meta{label},
+\atentry{number}\marg{\meta{label},
\meta{\keyvallist}
}
\end{alltt}
-\cs{newnum} (provided by the \styopt{shortcuts} option) is
-recognised as a synonym for \cs{glsxtrnewnumber}.
-
-\section{\cs{newdualentry}}
+\ics{newnum} is recognised as a synonym for \gls{glsxtrnewnumber}.
-\begin{definition}
-\cs{newdualentry}\oargm{\keyvallist}\margm{label}\margm{short}\margm{long}\margm{description}
-\end{definition}
+\cssection[\section]{newdualentry}
-This command isn't provided by either \sty{glossaries} or
-\sty{glossaries-extra} but is used as an example in the
-\sty{glossaries} user manual and in the sample file
+\formatdef{newdualentry}
+This command isn't provided by either \styfmt{glossaries} or
+\styfmt{glossaries-extra} but is used as an example in the
+\sty{glossaries} user manual~\cite{glossaries} and in the sample file
\file{sample-dual.tex} that accompanies the \sty{glossaries}
package. Since this command seems to be used quite a bit (given the
number of times it crops up on sites like
\href{https://tex.stackexchange.com/}{\TeX\ on StackExchange}),
-\appfmt{convertgls2bib} also supports it unless this command is
-defined using \csfmt{newcommand} or \csfmt{renewcommand} in the
+\idx{convertgls2bib} also supports it unless this command is
+defined using \ics{newcommand} or \ics{renewcommand} in the
input file. In which case the default definition will be overridden.
If the command definition isn't overridden, then it's converted to
\begin{alltt}
-\atentryref{dualentryabbreviation}\marg{\meta{label},
+\atentry{dualabbreviationentry}\marg{\meta{label},
short = \margm{short},
long = \margm{long},
description = \margm{description},
@@ -7464,14 +12374,14 @@ If the command definition isn't overridden, then it's converted to
\end{alltt}
if \meta{\keyvallist} is supplied, otherwise it's converted to:
\begin{alltt}
-\atentryref{dualentryabbreviation}\marg{\meta{label},
+\atentry{dualabbreviationentry}\marg{\meta{label},
short = \margm{short},
long = \margm{long},
description = \margm{description}
}
\end{alltt}
-For example, if the original \filefmt{.tex} file contains
+For example, if the original \ext{tex} file contains
\begin{verbatim}
\newcommand*{\newdualentry}[5][]{%
\newglossaryentry{main-#2}{name={#4},%
@@ -7487,7 +12397,7 @@ For example, if the original \filefmt{.tex} file contains
{support vector machine}% long form
{Statistical pattern recognition technique}% description
\end{verbatim}
-then the \filefmt{.bib} file will contain
+then the \ext{bib} file will contain
\begin{verbatim}
@entry{main-svm,
name = {support vector machine},
@@ -7500,18 +12410,4007 @@ then the \filefmt{.bib} file will contain
long = {support vector machine}
}
\end{verbatim}
-since \cs{newdualentry} was defined with \cs{newcommand}. However,
-if the original file uses \cs{providecommand} or omits the
-definition of \cs{newdualentry}, then the \filefmt{.bib} file will
+since \gls{newdualentry} was defined with \ics{newcommand}. However,
+if the original file uses \ics{providecommand} or omits the
+definition of \gls{newdualentry}, then the \ext{bib} file will
contain:
\begin{verbatim}
-@dualentryabbreviation{svm,
+@dualabbreviationentry{svm,
short = {SVM},
description = {Statistical pattern recognition technique},
long = {support vector machine}
}
\end{verbatim}
-\resetsecnumdepth
-\printindex
+\chapter{Examples}
+\label{sec:examples}
+\setcounter{secnumdepth}{0}
+\lstset{language={[LaTeX]TeX},upquote,basicstyle={\ttfamily\small},
+ commentstyle={\color{gray}}}
+
+The example files described here can be found in the
+\filefmt{examples} sub-directory. The \ext{bib} files are listed
+first and then sample files that use the \ext{bib} data.
+Make sure you have the latest versions of \styfmt{glossaries},
+\styfmt{mfirstuc}, \styfmt{glossaries-extra} and \bibgls\ if you
+want to try these out. (The \exfile{sample-media.tex} file requires
+at least \styfmt{datatool} v2.28.) If you get any undefined control
+sequence or undefined style errors then you need to update your
+\TeX\ distribution. Use the \longarg{group} switch when invoking
+\bibgls\ for all these examples if you want the glossaries divided
+into groups. The set of system calls for the document build in the
+examples below may require an extra \LaTeX\ run to ensure the PDF
+bookmarks are up-to-date when \sty{hyperref} is used.
+
+These files are just examples of how to use \bibgls. There are other
+ways of defining similar entries and sometimes alternatives are
+suggested. Use the code here as a starting point if you need data
+like this and adapt it to a format appropriate for your
+requirements.
+
+\filesection{no-interpret-preamble.bib}
+
+The \exfile{no-interpret-preamble.bib} file contains command
+definitions used in some of the \field{name} fields. Although these
+commands aren't used explicitly in the document, they need to be
+defined when the names are displayed in the document (typically in
+the glossary). These commands are much like the \gls{sortop} command
+described on \glsxtrpageref{sortop} and need to be hidden
+from \bibgls's interpreter. This file doesn't contain any entry
+definitions and must be loaded first with
+\csopt[false]{interpret-preamble}. The
+\exfile{interpret-preamble.bib} or \exfile{interpret-preamble2.bib}
+file can then be loaded to provide alternative definitions for
+\bibgls's interpreter.
+
+The first command is
+\nosecdef{sortname}
+This is used in the \field{name} fields for entries containing
+information about a person. The aim here is for \bibgls\ to sort
+according to \meta{surname}, \meta{first name(s)} but for the
+glossary to display \meta{first name(s)} \meta{surname}. For names
+with a \qt{von} part, there's another command:
+\nosecdef{sortvonname}
+which has a similar purpose.
+The third command is
+\nosecdef{sortart}
+This is the same as \gls{sortname} but is designed for titles,
+phrases or sentences that start with an article (such as \qt{a} or
+\qt{the}). Although it has the same definition as \gls{sortname}
+in this file, in the interpreted files the article part is omitted
+to completely ignore them in the sorting.
+The fourth command is
+\nosecdef{sortmediacreator}
+which again is functionally the same as \gls{sortname}.
+
+The names could be specified using \BibTeX's
+syntax instead with \csopt{bibtex-contributor-fields} to convert it,
+but the aim here is to show a variety of ways to use \bibgls. For an
+example of \csopt{bibtex-contributor-fields}, see the way the
+\fieldfmt{cast} field in \exfile{films.bib} is dealt with.
+
+Although the file only contains ASCII characters, it starts with
+an encoding line to prevent \bibgls\ from searching the entire file
+for it. (That's not so much of an issue with a short file, but may
+cause an unnecessary delay for much longer files.)
+
+The contents of \filefmt{no-interpret-preamble.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/no-interpret-preamble.bib}
+
+\filesection{interpret-preamble.bib}
+
+This provides definitions of \gls{sortname}, \gls{sortvonname},
+\gls{sortart} and \gls{sortmediacreator} in \atentry{preamble}
+that can be picked up by the interpreter and used during sorting.
+Note that in this case \gls{sortart} is defined to ignore the
+article to completely ignore it from sorting. If you happen to have
+\qt{a \meta{something}} and \qt{the \meta{something}} where the
+\meta{something}s are identical, you may want to append the article
+to disambiguate them.
+
+The contents of \filefmt{interpret-preamble.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/interpret-preamble.bib}
+
+\filesection{interpret-preamble2.bib}
+
+An alternative to \exfile{interpret-preamble.bib} with a different
+definition of \cs{sortmediacreator}. This uses \cs{renewcommand}
+instead of \cs{providecommand} so \csopt[false]{write-preamble}
+is required to prevent \LaTeX\ from picking up the definitions.
+
+The contents of \filefmt{interpret-preamble2.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/interpret-preamble2.bib}
+
+\filesection{constants.bib}
+
+The \exfile{constants.bib} file contains mathematical constants.
+These all use a custom entry type \atentryfmt{constant}, which must
+be aliased otherwise the entries will all be ignored. The entries
+all have custom fields, which also need to be aliased.
+For example
+\begin{codeenv}
+\csopt[constant=entry]{entry-type-aliases},
+\csopt[
+ constantname=name,
+ constantsymbol=symbol,
+ definition=description,
+ identifier=category,
+ value=user1
+]{field-aliases}
+\end{codeenv}
+This setting means that, for example,
+\begin{verbatim}
+@constant{root2,
+ constantname={Pythagoras' constant},
+ constantsymbol={\ensuremath{\surd2}},
+ definition={the square root of 2},
+ value={1.41421},
+ identifier={constant}
+}
+\end{verbatim}
+is treated as though it was defined as
+\begin{verbatim}
+@entry{root2,
+ name={Pythagoras' constant},
+ symbol={\ensuremath{\surd2}},
+ description={the square root of 2},
+ user1={1.41421},
+ category={constant}
+}
+\end{verbatim}
+This use of custom fields and entry types allows more flexibility.
+For example, I may have another document that uses the same
+\ext{bib} file but requires a different definition, for example:
+\begin{verbatim}
+@number{root2,
+ description={Pythagoras' constant},
+ name={\ensuremath{\surd2}}
+}
+\end{verbatim}
+which can be obtained with
+\begin{codeenv}
+\csopt[constant=number]{entry-type-aliases},
+\csopt[
+ constantname=description,
+ constantsymbol=name
+]{field-aliases}
+\end{codeenv}
+Since the other custom fields haven't be aliased, they're ignored.
+
+The custom fields are: \fieldfmt{identifier} (set to \code{constant}
+for all the entries), \fieldfmt{constantname} (the constant's name),
+\fieldfmt{definition} (a definition of the constant),
+\fieldfmt{value} (the approximate numeric value of the constant),
+\fieldfmt{constantsymbol} (the symbolic representation of the
+constant) and \fieldfmt{alternative} (alternative symbol).
+There are three entries that don't have the custom
+\fieldfmt{value} field: \code{zero} and \code{one} (the exact value
+is in the \fieldfmt{constantsymbol} field in both cases) and \code{imaginary}
+(where there's no real number value).
+
+I've provided some commands in the \atentry{preamble} for
+constants that are represented by Latin and Greek letters.
+These can be defined in the document before the \idx{resourceset}
+if different notation required. The upright Greek commands require
+the \isty{upgreek} package.
+
+If it's likely that there may be a need to sort according to
+\fieldfmt{definition}, then it would be better to use \cs{sortart}
+describe above:
+\begin{verbatim}
+@constant{root2,
+ constantname={Pythagoras' constant},
+ constantsymbol={\ensuremath{\surd2}},
+ definition={\sortart{the}{square root of 2}},
+ value={1.41421},
+ identifier={constant}
+}
+\end{verbatim}
+Remember that this would need \exfile{no-interpret-preamble.bib} to
+ensure the command is recognised in the document.
+
+The contents of \filefmt{constants.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/constants.bib}
+
+\filesection{chemicalformula.bib}
+
+The \exfile{chemicalformula.bib} file contains chemical formulae.
+Each entry has a field that uses \ics{ce} provided by \sty{mhchem}
+so the document will need to load that package. Since all resource
+files must be loaded in the preamble, it's possible to ensure that
+the package is loaded using:
+\begin{verbatim}
+@preamble{"\usepackage{mhchem}"}
+\end{verbatim}
+However, it's best just to load it in the document otherwise it
+won't be available before the \ext{glstex} file has been loaded.
+Also, \sty{glossaries} (and therefore \sty{glossaries-extra}) must be
+loaded after \sty{hyperref}, which usually needs to be loaded last
+so most packages should be loaded before \sty{glossaries-extra}.
+Instead, I've just put a comment in the \ext{bib} file as a
+reminder.
+
+All entries are defined using a custom entry type
+\atentryfmt{chemical}. This must be aliased using
+\csopt{entry-type-aliases} or the entries will be ignored. For
+example, to make \atentryfmt{chemical} behave like \atentry{symbol}:
+\begin{codeenv}
+\csopt[chemical=symbol]{entry-type-aliases}
+\end{codeenv}
+Remember that with the \atentry{symbol} type, if the \field{sort}
+field is omitted \bibgls\ will fallback on the label by default. It
+can be changed to fallback on the \field{name} field instead using
+\csopt[name]{symbol-sort-fallback}. This will require the use of
+the interpreter if the name contains a command but \bibgls\
+recognises the \sty{mhchem} package and has a limited ability to
+interpret \cs{ce}. If \atentryfmt{chemical} is changed to
+\atentry{entry} instead then the fallback for the \field{sort} will be the
+entry's \field{name}.
+
+All entries only contain custom fields, which will all be ignored by
+\bibgls\ unless defined or aliased: \fieldfmt{identifier}, which is set to
+\code{chemical} for all entries, \fieldfmt{formula}, which set to the
+chemical formula, and \fieldfmt{chemicalname}, which set to the chemical
+name. This allows the flexibility of determining whether the
+\field{name} or \field{symbol} field should contain the chemical
+formula on a per-resource basis. For example:
+\begin{codeenv}
+\csopt[formula=name,chemicalname=description]{field-aliases}
+\end{codeenv}
+or
+\begin{codeenv}
+\csopt[chemicalname=name,formula=symbol]{field-aliases}
+\end{codeenv}
+
+The contents of \filefmt{chemicalformula.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/chemicalformula.bib}
+
+\filesection{bacteria.bib}
+
+The \exfile{bacteria.bib} file contains bacteria abbreviations.
+These all use the \atentry{abbreviation} entry type with a
+\field{short} and \field{long} field.
+
+The entries all have a custom field \fieldfmt{identifier} set to
+\code{bacteria}. This will be ignored by \bibgls\ unless it's
+defined using \cs{glsaddkey} or \cs{glsaddstoragekey} or if it's
+aliased with \csopt{field-aliases}.
+
+The contents of \filefmt{bacteria.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/bacteria.bib}
+
+\filesection{baseunits.bib}
+
+The \exfile{baseunits.bib} file contains base \idxpl{SIunit}. The entries
+are all defined using the custom \atentryfmt{unit} entry
+type. This must be aliased with \csopt{entry-type-aliases} otherwise
+\bibgls\ will ignored all the entries. For example
+\begin{codeenv}
+\csopt[unit=symbol]{entry-type-aliases}
+\end{codeenv}
+will make \bibgls\ treat the entries as though they were defined
+using \atentry{symbol}. (Remember that \atentry{symbol} entry types use the label
+as the fallback field for \field{sort}.)
+
+The entries all have custom fields \fieldfmt{unitname},
+\fieldfmt{unitsymbol} and \fieldfmt{measurement}, one of which must
+be aliased or copied to \field{name}. The others may be aliased or
+copied to \field{symbol} and \field{description} as required. The
+\fieldfmt{unitsymbol} fields all use \ics{si} provided by the
+\isty{siunitx} package, so that package must be loaded in the
+document. This is one of the small number of packages recognised by
+\bibgls, so it's possible to sort according to the symbol if
+required.
+
+The entries also all have a custom field \fieldfmt{identifier} set to
+\code{baseunit}. This will be ignored by \bibgls\ unless it's
+defined using \cs{glsaddkey} or \cs{glsaddstoragekey} or if it's
+aliased with \csopt{field-aliases}.
+
+The contents of \filefmt{baseunits.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/baseunits.bib}
+
+\filesection{derivedunits.bib}
+
+The \exfile{derivedunits.bib} file is much like \exfile{baseunits.bib}
+but contains derived units and in this case the custom entry type
+is \atentryfmt{measurement} must be aliased
+otherwise the entries will all be ignored.
+The entries all have a custom field \fieldfmt{identifier} set to
+\code{derivedunit}. This will be ignored by \bibgls\ unless it's
+defined using \cs{glsaddkey} or \cs{glsaddstoragekey} or if it's
+aliased with \csopt{field-aliases}.
+
+The contents of \filefmt{derivedunits.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/derivedunits.bib}
+
+\filesection{people.bib}
+
+The \exfile{people.bib} file contains details about people.
+The \field{name} fields contain custom commands provided in
+\exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib}.
+Remember that if \exfile{no-interpret-preamble.bib} is
+loaded first, the definitions provided in that file will be the one
+in use in the document. The \exfile{interpret-preamble.bib} file
+then needs to be loaded to provide the definitions for \bibgls's
+interpreter.
+
+The information for each person is supplied in an \atentry{entry}
+type. There are some non-standard fields: \fieldfmt{born},
+\fieldfmt{died} and \fieldfmt{othername}. These fields will be ignored
+unless keys are provided (using \cs{glsaddkey} or
+\cs{glsaddstoragekey}) or the fields are aliased (using
+\csopt{field-aliases}). The \fieldfmt{born} and \fieldfmt{died}
+fields have dates that are \emph{almost} in the default \code{en-GB} locale
+format, but they include a tilde \verb|~| to prevent awkward line
+breaks. By default \bibgls's interpreter converts \verb|~| to the non-breaking
+space character 0xA0 which isn't recognised by the date format.
+This can easily be fixed with the \longarg{break-space} switch which
+will interpret \verb|~| as a normal breakable space (0x20), so
+with that switch \csopt[date]{sort} or \csopt[date-reverse]{sort}
+can be used on either of those fields.
+
+An alternative approach would be to provide a command that can be
+modified in the document to adjust the date style. For example, the
+\fieldfmt{born} field could be specified as:
+\begin{verbatim}
+born={\formatdate{13}{7}{100}{BC}}
+\end{verbatim}
+The definition provided for the document could then be, for example:
+\begin{verbatim}
+\providecommand{\formatdate}[4]{\DTMdisplaydate{#3}{#2}{#1}{-1} #4}
+\end{verbatim}
+(where \ics{DTMdisplaydate} is provided by the \isty{datetime2}
+package) and a definition could be provided for \bibgls's
+interpreter, for example:
+\begin{verbatim}
+\providecommand{\formatdate}[4]{#1/#2/#3 #4}
+\end{verbatim}
+This would need the date format set. For example,
+\csopt[d/M/y G]{date-sort-format}.
+
+Some of the entries, such as \code{caesar}, have a \field{first}
+field. In those cases the \field{first} field is slightly different
+from the \field{name} field (for example, \qt{Gaius} is omitted in
+\code{caesar}'s \field{first} field). The other entries don't have a
+\field{first} field. They can simply have the \field{name} copied to
+\field{first} with the \csopt{replicate-fields} option (so that the
+full name is shown on first use) or the \field{first} field can be
+ignored with \csopt{ignore-fields} (so all entries will use the
+\field{text} field on first use). The \csopt{replicate-override}
+option can be used to force the \field{name} field to be copied to
+the \field{first} field, even if the \field{first} field is already
+set. Alternatively, with \csopt[true]{replicate-override} and
+\csopt[first=name]{replicate-fields}, the \field{first} field be
+copied to the \field{name} field. For consistency, the \field{first}
+fields use the same custom commands as used in the \field{name}
+field.
+
+There's one name with a \qt{von} part. In this case the \field{name}
+field is set to
+\begin{verbatim}
+\sortvonname{Manfred}{von}{Richthofen}
+\end{verbatim}
+which will come under the \qt{V} letter group since \gls{sortvonname}
+is defined as \meta{von} \meta{surname}, \meta{first name(s)}
+
+If you prefer that this name should come under \qt{R} instead, then
+you need to adjust the definition of \gls{sortvonname}:
+\begin{verbatim}
+@preamble{"\providecommand{\sortname}[2]{#2, #1}
+\providecommand{\sortvonname}[3]{#3, #1 #2}"}
+\end{verbatim}
+An alternative approach would be to format the names using
+\BibTeX's contributor syntax and use
+\csopt[name]{bibtex-contributor-fields} to convert them.
+
+There are also some synonyms provided with \atentry{index} entry
+types that have the \field{alias} field to redirect to the main
+entry. These don't include a \field{description} or any of the other
+fields as that would be redundant. All the information can be found
+in the main entry.
+
+Except for the aliases, the entries have a custom field
+\fieldfmt{identifier} set to \code{person}. This will be ignored by
+\bibgls\ unless it's defined using \cs{glsaddkey} or
+\cs{glsaddstoragekey} or if it's aliased with \csopt{field-aliases}.
+
+The contents of \filefmt{people.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/people.bib}
+
+\filesection{books.bib}
+
+The \exfile{books.bib} file contains details about books.
+As above, the entries use custom commands provided in
+\exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib} or
+\exfile{interpret-preamble2.bib}.
+The entries all have a custom field \fieldfmt{identifier} set to
+\code{book} and other custom fields \fieldfmt{author} and
+\fieldfmt{year}.
+These will be ignored by \bibgls\ unless they're
+defined using \cs{glsaddkey} or \cs{glsaddstoragekey} or if they're
+aliased with \csopt{field-aliases}.
+
+There are other ways in which this data could be specified. For
+example, the \field{description} field could contain a brief summary
+(or \qt{log line}). The \fieldfmt{author} field could use \BibTeX's
+syntax instead with \csopt{bibtex-contributor-fields} to convert it.
+
+The contents of \filefmt{books.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/books.bib}
+
+\filesection{films.bib}
+
+The \exfile{films.bib} file contains details about films.
+As above, the entries use custom commands provided in
+\exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib}.
+The entries all have a custom field \fieldfmt{identifier} set to
+\code{film} and other custom fields \fieldfmt{cast}, \fieldfmt{director} and
+\fieldfmt{year}. These will be ignored by \bibgls\ unless they're
+defined using \cs{glsaddkey} or \cs{glsaddstoragekey} or if they're
+aliased with \csopt{field-aliases}.
+
+This example file references entries defined in \exfile{books.bib}
+through the use of the special
+\glsdisp{idx.idprefix.extn}{\idprefixfmt{ext1}} prefix.
+To avoid a label conflict \exfile{films.bib} prefixes all labels
+with \idprefixfmt{film} rather than relying on \csopt{label-prefix}.
+This ensures that both \exfile{books.bib} and \exfile{films.bib}
+can be loaded in the same resource set (otherwise they'd have to be
+loaded in separate resource sets with different prefixes). Remember
+that you can use \ics{glsxtrnewgls}. For example:
+\begin{verbatim}
+\glsxtrnewgls{film.}{\film}
+\end{verbatim}
+This means you can do, for example, just \verb|\film{bladerunner}|
+if you want to reference a film without worrying about the prefix.
+
+As with all the example files, there are other ways in which
+to specify the data, depending on your requirements. For example,
+the \fieldfmt{director} field could use \BibTeX's contributor syntax
+(as the \fieldfmt{cast} field does). Some of
+the films actually had more than one director but only one is listed
+per film in this sample file for simplicity. Similarly, the
+\fieldfmt{cast} field only contains the principle actors rather than the
+complete list. The book on which the film is based
+could be contained in a cross-reference field or a custom
+\fieldfmt{basedon} field.
+
+The book \qt{Do Androids Dream of Electric Sheep?}\ referenced at the end
+of the \qt{Blade Runner} film's \field{description} ends with
+a question mark. (Similarly for \qt{Why Didn't They Ask Evans?})
+If the \field{description} field is simply set as:
+\begin{verbatim}
+description={a film starring Harrison Ford, Rutger Hauer
+ and Sean Young loosely based on the novel
+ \gls{ext1.doandroidsdreamofelectricsheep}},
+\end{verbatim}
+then the \styopt{postdot} package option will produce an odd
+result as the inserted \idx{full-stop} immediately follows the question
+mark. This is an awkward situation. One possibility is to explicitly
+put the \idx{full-stop} at the end of the \field{description} field for all the
+other entries and omit it for the problematic entries, but this
+interferes with the possibility of a category-dependent
+\idx{postdescriptionhook}.
+
+Another option is to put \ics{nopostdesc} in the
+problematic entries. For example:
+\begin{verbatim}
+description={a film starring Harrison Ford, Rutger Hauer
+ and Sean Young loosely based on the novel
+ \gls{ext1.doandroidsdreamofelectricsheep}\nopostdesc},
+\end{verbatim}
+Be careful with this as it will completely suppress the
+\idx{postdescriptionhook}.
+A third possibility is to use \ics{glsxtrnopostpunc} instead:
+\begin{verbatim}
+description={a film starring Harrison Ford, Rutger Hauer
+ and Sean Young loosely based on the novel
+ \gls{ext1.doandroidsdreamofelectricsheep}\glsxtrnopostpunc},
+\end{verbatim}
+This doesn't interfere with the \idx{postdescriptionhook} but if a hook
+is provided the post-punctuation may then be required. In both of
+the above two cases, \csopt{strip-trailing-nopost} could be used
+to remove the suppression commands from the \field{description}
+fields if a hook is defined. However this doesn't deal with hooks
+that only conditionally append text.
+
+The best solution is with \styfmt{glossaries-extra} v1.23+ which
+provides \ics{glsxtrrestorepostpunc} for use in the category
+\idxpl{postdescriptionhook} that counter-acts \cs{glsxtrnopostpunc}.
+This can be placed inside a conditional, as used in
+\exfile{sample-media.tex}, and does nothing if \cs{glsxtrnopostpunc}
+doesn't occur in the \field{description} field. (Note that
+\cs{glsxtrrestorepostpunc} can't be used to counter-act
+\cs{nopostdesc}, since that completely suppresses the hook.)
+
+The contents of \filefmt{films.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/films.bib}
+
+\filesection{mathgreek.bib}
+
+The \exfile{mathgreek.bib} file contains Greek letters for use in
+maths mode. These are all defined use \atentry{symbol}, which means
+that by default the \field{sort} field will be obtained from the
+label not from the \field{name} field. However, if you want to sort
+by the \field{name} field (for example, with \csopt[name]{sort-field})
+the \TeX\ parser library recognises all the mathematical Greek letter commands
+provided in the \LaTeX\ kernel. Additionally it recognises
+\ics{omicron} which isn't provided by \LaTeX\ (the symbol can be
+reproduced with a lower case Latin \qt{o}).
+
+The \ext{bib} file could just use \code{o}:
+\begin{verbatim}
+@symbol{omicron,
+ name={\ensuremath{o}},
+ description={omicron},
+ identifier={mathgreek}
+}
+\end{verbatim}
+but this means that if \bibgls\ sorts according to the \field{name}
+field using a letter sort, this entry will come before all the other
+Greek letters since the character \qt{o} has Unicode value \hex{6F}
+whereas, for example, mathematical italic small alpha ($\alpha$)
+has Unicode value \hex{1D6FC}. This means that for sorting purposes
+it's better to use \ics{omicron}:
+\begin{verbatim}
+@symbol{omicron,
+ name={\ensuremath{\omicron}},
+ description={omicron},
+ identifier={mathgreek}
+}
+\end{verbatim}
+but \LaTeX\ needs a definition for this, so it's provided in the
+\atentry{preamble}:
+\begin{verbatim}
+@preamble{"\providecommand{\omicron}{o}"}
+\end{verbatim}
+The \TeX\ parser library similarly provides the missing upper case
+Greek letters, and these can be dealt with in the same way.
+
+The contents of \filefmt{mathgreek.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/mathgreek.bib}
+
+\filesection{bigmathsymbols.bib}
+
+The \exfile{bigmathsymbols.bib} file contains mathematical symbols
+that have a large version in display mode. As with
+\exfile{mathgreek.bib} the entries are defined using
+\atentry{symbol}. This example file requires the \isty{stix} package
+as not all of the commands are provided by the \LaTeX\ kernel.
+This file also has a preamble:
+\begin{verbatim}
+@preamble{"\providecommand{\bigoperatornamefmt}[1]{%
+ $\displaystyle#1\textstyle#1$}
+\providecommand{\nary}[1]{$#1$-ary}"}
+\end{verbatim}
+The first command \ics{bigoperatornamefmt} is used in the
+\field{name} field to display both the in-line and display versions
+of the symbol. The \TeX\ parser library only has a limited ability
+to interpret this as not all the symbols have Unicode in-line and large
+versions. In some cases, such as the integral symbol $\int$ only has
+a small version. (A large version would require construction from
+\hex{2320}, \hex{23AE} and \hex{2321}, which is too complicated in
+this context.) However, the interpreter works well enough to guess
+at the widest name if \csopt{set-widest} is used. There's no
+advantage in sorting according to the \field{name} field here, as
+the Unicode symbols are scattered about different blocks. Better
+approaches are to sort according to document use (\csopt[use]{sort})
+or to sort according to the \field{description} field.
+
+The other custom command is \ics{nary} to provide semantic markup
+for \qt{$n$-ary}. This could be defined without an argument:
+\begin{verbatim}
+\providecommand{\nary}{$n$-ary}
+\end{verbatim}
+but providing an argument will allow \verb|\nary{n}| to work
+with first letter uppercasing in the event that the
+\field{description} field has a case-change applied (otherwise
+it would end up as \qt{$N$-ARY}).
+
+As with the other sample \ext{bib} files, each entry is given a
+custom \fieldfmt{identifier} field, which by default will be
+ignored. In this case, \fieldfmt{identifier} is either set to
+\code{naryoperator} (for $n$-ary operators) or \code{integral}
+for integrals.
+
+The contents of \filefmt{bigmathsymbols.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/bigmathsymbols.bib}
+
+\filesection{mathsrelations.bib}
+
+The \exfile{mathsrelations.bib} file contains mathematical
+relational symbols. These use the maths shift character
+\idx{mshiftchar} in the \field{name} field and just the symbol in
+the \field{text} field. This just illustrates an alternative way of
+defining symbols. Since \ics{ensuremath} isn't used, commands
+\cs{gls} must be explicitly placed in maths mode. For example,
+\verb|$\gls{leq}$| rather than simply \verb|\gls{leq}|. The custom
+\fieldfmt{identifier} field is set to \code{relation}.
+
+The contents of \filefmt{mathsrelations.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/mathsrelations.bib}
+
+\filesection{binaryoperators.bib}
+
+The \exfile{binaryoperators.bib} file contains mathematical binary
+operators. The format is much like the above
+\exfile{mathsrelations.bib} file. The custom \fieldfmt{identifier}
+field is set to \code{binaryoperator}.
+
+The contents of \filefmt{binaryoperators.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/binaryoperators.bib}
+
+\filesection{unaryoperators.bib}
+
+The \exfile{unaryoperators.bib} file contains mathematical unary
+operators. This again uses \atentry{symbol} to define the symbols,
+but in this case \ics{ensuremath} is used in the \field{name}
+field and there's no \field{text} field. I've also used \ics{mathord}
+to ensure the symbol is treated as a unary (rather than binary)
+operator, except for the \ics{forall} entry which is already defined as an
+ordinary maths symbol.
+
+The contents of \filefmt{unaryoperators.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/unaryoperators.bib}
+
+\filesection{mathsobjects.bib}
+
+The \exfile{mathsobjects.bib} file contains entries related to
+mathematical objects (sets, spaces, vectors and matrices). This
+provides some custom formatting commands in the preamble:
+\nosecdef{setfmt}
+which is used to format \meta{symbol} as a set,
+\nosecdef{setcontentsfmt}
+which is used to format the set contents,
+\nosecdef{setmembershipfmt}
+which is used to format the set membership criteria,
+\nosecdef{setcardfmt}
+which is used to format the cardinality of a set,
+\nosecdef{numspacefmt}
+which is used to format \meta{symbol} as a number space,
+\nosecdef{transposefmt}
+which is used to format matrix and vector transposes,
+\nosecdef{invfmt}
+which is used to format inverses,
+\nosecdef{vecfmt}
+which is used to format \meta{symbol} as a vector and
+\nosecdef{mtxfmt}
+which is used to format \meta{symbol} as a matrix.
+These commands are intended for use with \ics{glsxtrfmt},
+but \csref{setmembershipfmt} causes a problem as it has two
+arguments and \ics{glsxtrfmt} requires the control sequence to
+have exactly one argument. This means employing a little trick.
+A command with just one argument is provided:
+\nosecdef{setmembershiponeargfmt}
+that requires the actual two arguments to be supplied inside
+\verb|#1|. The outer grouping is removed and the two-argument
+\csref{setmembershipfmt} command is applied:
+\begin{verbatim}
+\providecommand{\setmembershiponeargfmt}[1]{\setmembershipfmt#1}
+\end{verbatim}
+This means that the entry needs to be referenced in the document
+using:
+\begin{alltt}
+\csref{glsxtrfmt}\marg{setmembership}\marg{\margm{variable(s)}\margm{condition}}
+\end{alltt}
+The simplest thing to do here is to provide a wrapper command in the
+document, for example:
+\begin{verbatim}
+\newcommand*{\setmembership}[2]{\glsxtrfmt{setmembership}{{#1}{#2}}}
+\end{verbatim}
+Now this can be used as
+\begin{alltt}
+\csfmt{setmembership}\margm{variable(s)}\margm{condition}
+\end{alltt}
+
+There are essentially two types of entry defined in this file:
+entries that demonstrate the formatting for the objects
+and entries that represent specific objects. In the first case
+there's a custom \fieldfmt{format} field
+that's set to the control sequence name of the relevant semantic
+command. If this field is defined or aliased then it can be used
+with \csref{glsxtrfmt} (as in the example above).
+
+In both cases there's a custom \fieldfmt{identifier} field that
+reflects the type of object: \code{numberspace} for number spaces,
+\code{set} for sets, \code{matrix} for matrices or vectors.
+
+Be careful with the set cardinality example. Remember that nested
+links cause problems and the \sty{glossaries-extra} manual advises
+against using commands like \cs{gls} or \csref{glsxtrfmt} within
+link text and that includes within the \meta{text} argument of
+\csref{glsxtrfmt}. See \exfile{sample-maths.tex} for suggested
+usage.
+
+Some of the \field{description} fields use \csref{sortart}, so
+\exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib} are also needed.
+
+The contents of \filefmt{mathsobjects.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/mathsobjects.bib}
+
+\filesection{miscsymbols.bib}
+
+The \exfile{miscsymbols.bib} file contains text symbols provided
+by the \isty{marvosym} and \isty{ifsym} packages. The \sty{ifsym}
+package needs to be loaded with the \styoptfmt{weather} option
+to provide the weather commands. Unfortunately both packages define
+\csfmt{Sun} and \csfmt{Lightning}, which causes a conflict. See
+\exfile{sample-textsymbols.tex} for a workaround. Alternatively,
+you can load \sty{ifsym} without the \styoptfmt{weather} option
+and use the internal definition of \sty{ifsym}'s \csfmt{Sun}
+and \csfmt{Lightning} commands:
+\begin{verbatim}
+@icon{sun,
+ icon={\textweathersymbol{16}},
+ description={sunny},
+ identifier={weather}
+}
+
+@icon{lightning,
+ icon={\textweathersymbol{26}},
+ description={thunderstorm},
+ identifier={weather}
+}
+\end{verbatim}
+This removes the conflict, and \csfmt{Sun} and \csfmt{Lightning}
+are as defined by \sty{marvosym}.
+
+This file uses a custom entry type \atentryfmt{icon}, which must be
+aliased to a recognised entry identifier otherwise the entries will
+all be ignored. For example:
+\begin{codeenv}
+\csopt[unit=symbol]{entry-type-aliases}
+\end{codeenv}
+
+There are three types of symbols defined: media controls, information
+and weather. They have the custom \fieldfmt{identifier}
+field set to \code{mediacontrol}, \code{information} and
+\code{weather}, respectively. There are two other custom fields:
+\fieldfmt{icon} and \fieldfmt{icondescription}. These will need to
+be aliased to \field{name} and \field{description}.
+
+Neither of these packages are recognised by \bibgls, which means
+that \csopt{set-widest} won't be able to determine the widest name
+nor is this data suitable for sorting according to the
+\fieldfmt{icon} field (or its alias). Instead, either sort by label
+(which is the default for \atentry{symbol}) or by the
+\field{description}. If you want to use one of the
+\glostyle{alttree} styles you can still use \csopt{set-widest}, but
+it will have to use the fallback command. Alternatively, you can
+omit \csopt{set-widest} and explicitly use
+\cs{glsFindWidestTopLevelName}.
+
+The contents of \filefmt{miscsymbols.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/miscsymbols.bib}
+
+\filesection{markuplanguages.bib}
+
+The \exfile{markuplanguages.bib} file includes a mixture of
+\atentry{entry} and \atentry{abbreviation} definitions. A~custom
+command is provided in \atentry{preamble} to tag the letters
+in the \field{long} field that are used to form the abbreviation.
+This simply does its argument and is provided in case it's not set
+up in the document. If you do want to enable tagging using
+\ics{GlsXtrEnableInitialTagging}, remember that this command must be
+used before the abbreviations are defined, which means before
+the resource file is input with \gls{GlsXtrLoadResources}.
+Similarly, the abbreviation style must be set before the
+abbreviations are defined.
+
+For convenience \atentry{string} is also used to define a \ext{bib}
+variable, which may be appended to fields using the \ext{bib}
+concatenation character \idx{stringconcat}. As with the other sample
+\ext{bib} files, there's a custom field \fieldfmt{identifier}
+which will be ignored unless defined or aliased.
+
+The empty braces at the start some of the fields are there to
+protect against first letter uppercasing, where it might cause a
+problem.
+
+The contents of \filefmt{markuplanguages.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/markuplanguages.bib}
+
+\filesection{usergroups.bib}
+
+The \exfile{usergroups.bib} file requires either \XeLaTeX\ or
+\LuaLaTeX\ as some of the entry labels use \idx{non-ASCII} characters.
+This file has a mixture of \atentry{abbreviation} and
+\atentry{index} entries. It also uses \atentry{string} for
+convenience and provides a custom command \csfmt{dash} in
+\atentry{preamble}. Each entry is the name of a \TeX\ user group:
+the international \idx{TUG} and all the local groups.
+Most of them have an abbreviated name, so they're defined with
+\atentry{abbreviation}. There are a few without an abbreviation, so
+they're defined with \atentry{index} instead. There's one alias.
+(The information was obtained from \idx{TUG}['s]
+\href{http://tug.org/usergroups.html}{user groups
+page}~\cite{tugusergroups}.)
+
+As with the other examples, there are some custom fields which will
+be ignored if they aren't defined or aliased: \fieldfmt{identifier}
+(set to \code{texusergroup}), \fieldfmt{language} (a comma-separated
+list of language tags) and \fieldfmt{translation} (provides a
+translation if the user group name isn't in English).
+
+Not all entries have a \fieldfmt{translation} field. It it's
+omitted, then the user group name is in English, otherwise it's
+in the first language listed in the \fieldfmt{language} field.
+Most of the language tags are just the ISO 639-1 language code, but
+a few of them include the ISO 3166-1 region code as well.
+
+The contents of \filefmt{usergroups.bib} are as follows:
+\begin{lstlisting}[escapechar=|]
+% Encoding: UTF-8
+
+% Requires XeLaTeX/LuaLaTeX for non-ASCII labels
+
+@string{tug={\TeX\ Users Group}}
+
+@preamble{"\providecommand{\dash}{\,---\,}"}
+
+@abbreviation{TUG,
+ short={TUG},
+ long=tug,
+ language={en},
+ identifier={texusergroup}
+}
+
+@abbreviation{bgTeX,
+ short={bgTeX},
+ long={Bulgarian \LaTeX\ Users Group},
+ language={bg},
+ identifier={texusergroup}
+}
+
+@abbreviation{latex-br,
+ short={latex-br},
+ long={Grupo de Usuários},
+ language={pt-BR},
+ identifier={texusergroup},
+ translation={Brazilian }#tug
+}
+
+@abbreviation{CTeX,
+ short={CTeX},
+ long={Chinese \TeX\ Society},
+ identifier={texusergroup},
+ language={zh}
+}
+
+@abbreviation{CSTUG,
+ short={CSTUG},
+ long={|Československé sdružení uživatelů TeXu|, z.~s.},
+ language={cs},
+ identifier={texusergroup},
+ translation={Czech Republic }#tug
+}
+
+@abbreviation{DANTE,
+ short={DANTE e.V.},
+ long={Deutschsprachige Anwendervereinigung \TeX\ e.V.},
+ language={de},
+ identifier={texusergroup},
+ translation={German Speaking }#tug
+}
+
+@abbreviation{DKTUG,
+ short={DK-TUG},
+ long={Danish }#tug,
+ language={da},
+ identifier={texusergroup}
+}
+
+@index{EUG,
+ name={Estonian User Group},
+ language={et},
+ identifier={texusergroup}
+}
+
+@abbreviation{CervanTeX,
+ short={CervanTeX},
+ long={Grupo de Usuarios de \TeX\ Hispanohablantes},
+ language={es},
+ identifier={texusergroup},
+ translation={Spanish Speaking }#tug
+}
+
+@abbreviation{TirantloTeX,
+ short={Tirant lo \TeX},
+ long={Catalan }#tug,
+ language={ca},
+ identifier={texusergroup}
+}
+
+@abbreviation{GUTenberg,
+ short={GUTenberg},
+ long={Groupe francophone des utilisateurs de \TeX},
+ language={fr},
+ identifier={texusergroup},
+ translation={French Speaking }#tug
+}
+
+@abbreviation{UKTUG,
+ short={UK-TUG},
+ long={UK }#tug,
+ language={en-GB},
+ identifier={texusergroup}
+}
+
+@abbreviation{|\greekmono ɛϕτ|,
+ short={|\greekmono ɛϕτ|},
+ long={|\greekmono Σύλλογος Ελλήνων Φίλων του| \TeX},
+ language={el},
+ identifier={texusergroup},
+ translation={Greek \TeX\ Friends}
+}
+
+@abbreviation{MaTeX,
+ short={MaTeX},
+ long={Magyar \TeX\ Egyesület},
+ language={hu},
+ identifier={texusergroup},
+ translation={Hungarian }#tug
+}
+
+@abbreviation{ITALIC,
+ short={ITALIC},
+ long={Irish \TeX\ and \LaTeX\ In-print Community},
+ language={en-GB,en-IE},
+ identifier={texusergroup}
+}
+
+@abbreviation{ÍsTeX,
+ short={ÍsTeX},
+ long={Vefur íslenskra \TeX\ notenda},
+ language={is},
+ identifier={texusergroup},
+ translation={Icelandic }#tug
+}
+
+@abbreviation{GuIT,
+ short={GuIT},
+ long={Gruppo Utilizzatori Italiani di \TeX},
+ language={it},
+ identifier={texusergroup},
+ translation={Italian }#tug
+}
+
+@abbreviation{KTS,
+ short={KTS},
+ identifier={texusergroup},
+ long={Korean \TeX\ Society},
+ language={ko}
+}
+
+@index{KTUG,
+ alias={KTS},
+ identifier={texusergroup}
+}
+
+@index{LTVG,
+ name={Lietuvos \TeX'o |Vartotojų Grupė|},
+ language={lt},
+ identifier={texusergroup},
+ translation={Lithuanian }#tug
+}
+
+@index{mxTeX,
+ name={\TeX\ México},
+ language={es-MX},
+ identifier={texusergroup},
+ translation={Mexican }#tug
+}
+
+@abbreviation{NTG,
+ short={NTG},
+ long={Nederlandstalige \TeX\ Gebruikersgroep},
+ language={nl},
+ identifier={texusergroup},
+ translation={Netherlands }#tug
+}
+
+@index{NTUG,
+ name={Nordic \TeX\ Users Group},
+ language={da,et,fi,fo,is,nb,nn,sv},
+ identifier={texusergroup}
+}
+
+@abbreviation{GUST,
+ short={GUST},
+ long={Polska Grupa |Użytkowników| Systemu \TeX},
+ language={pl},
+ identifier={texusergroup},
+ translation={Polish }#tug
+}
+
+@abbreviation{GUTpt,
+ short={GUTpt},
+ long={Grupo de Utilizadores de \TeX},
+ language={pt},
+ identifier={texusergroup},
+ translation={Portuguese }#tug
+}
+
+@abbreviation{VietTUG,
+ short={VietTUG},
+ long={Vietnamese }#tug,
+ language={vi},
+ identifier={texusergroup}
+}
+
+@abbreviation{LUGSA,
+ short={LUGSA},
+ long={\LaTeX\ User Group\dash South Africa},
+ language={en-ZA},
+ identifier={texusergroup}
+}
+
+
+\end{lstlisting}
+
+\filesection{animals.bib}
+
+The \exfile{animals.bib} file contains entries defined using
+\atentry{entry}. As with the above example \ext{bib} files, there's
+a custom \fieldfmt{identifier} field that will be ignored unless
+defined or aliased.
+
+The contents of \filefmt{animals.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/animals.bib}
+
+\filesection{minerals.bib}
+
+The \exfile{minerals.bib} file contains entries defined using
+\atentry{entry}. As with the above example \ext{bib} files, there's
+a custom \fieldfmt{identifier} field that will be ignored unless
+defined or aliased.
+
+The contents of \filefmt{minerals.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/minerals.bib}
+
+\filesection{vegetables.bib}
+
+The \exfile{vegetables.bib} file contains entries defined using
+\atentry{entry} and an entry defined with \atentry{index} with just
+the \field{alias} field. As with the above example \ext{bib} files, there's
+a custom \fieldfmt{identifier} field that will be ignored unless
+defined or aliased.
+
+The contents of \filefmt{vegetables.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/vegetables.bib}
+
+\filesection{terms.bib}
+
+The \exfile{terms.bib} file contains entries defined using
+\atentry{index}. Unlike the above sample \ext{bib} files, there
+are no custom fields here.
+
+The contents of \filefmt{terms.bib} are as follows:
+\lstinputlisting[firstline=5]{../examples/terms.bib}
+
+\filesection{sample-constants.tex}
+
+This example uses the \exfile{constants.bib} file. The aim here
+is to just have a list of all the constants defined in the \ext{bib}
+file. (There are no references in the document.) This means I need
+to use
+\begin{codeenv}
+\csopt[all]{selection}
+\end{codeenv}
+in order to select all entries. I also need to alias the custom
+\atentryfmt{constant} entry type otherwise all the entries will be
+ignored. I decided to make \atentryfmt{constant} behave like
+\atentry{number} for semantic reasons:
+\begin{codeenv}
+\csopt[constant=number]{entry-type-aliases}
+\end{codeenv}
+The custom fields also need aliasing:
+\begin{codeenv}
+\csopt[
+ identifier=category,
+ constantsymbol=name,
+ constantname=description,
+ value=user1,
+ definition=user2,
+ alternative=user3,
+]{field-aliases}
+\end{codeenv}
+I decided to use the \glostyle{altlist} style, so I've instructed
+\bibgls\ to determine the widest name:
+\begin{codeenv}
+\csopt{set-widest}
+\end{codeenv}
+It's always a good idea to specify the glossary type when using
+\csopt{set-widest}, although in this example there's only one
+glossary so it doesn't make much difference.
+\begin{codeenv}
+\csopt[main]{type}
+\end{codeenv}
+I decided to order the constants according to their (approximate)
+numerical value. I've aliased the custom \fieldfmt{value} field to
+\field{user1}, so I can sort by that field using a numerical
+comparison:
+\begin{codeenv}
+\csopt[user1]{sort-field},
+\csopt[double]{sort}
+\end{codeenv}
+There are three entries without the \fieldfmt{user1} field (as the
+custom \fieldfmt{value} field is missing in the \ext{bib} file):
+\code{zero}, \code{one} and \code{imaginary}. In the case of
+\code{zero} and \code{one} the exact value can be obtained from the
+\field{name} field. Since I've change the default \csopt{sort-field}, I
+can't use \csopt{symbol-sort-fallback}. Instead I need to use
+\begin{codeenv}
+\csopt[name]{missing-sort-fallback}
+\end{codeenv}
+
+What happens with the \code{imaginary} entry? It has no real
+representation. The transcript (\ext{glg}) file shows the message:
+\begin{verbatim}
+Warning: Can't parse sort value 'i' for: imaginary
+\end{verbatim}
+With the numerical sort methods, if the field can't be parsed the
+value defaults to 0. This means that both \code{zero} and
+\code{imaginary} have 0 as the sort value, so the
+\csopt{identical-sort-action} is implemented. The default setting
+means that \bibgls\ will fallback on comparing the entry labels, so
+\code{imaginary} comes before \code{zero}.
+
+Since I'm just using the \glostyle{alttree} style, I only need
+\sty{glossary-tree}. I can improve efficiency in the document build
+by preventing the other glossary style packages from being loaded
+using the \styopt{nostyles} package option. This also prevents
+\sty{glossary-tree} from being loaded, but I can both load it and
+patch the styles with \sty{glossaries-extra-stylemods} through the
+option \styopt[tree]{stylemods}. Since the default \glostyle{list}
+style is no longer available, I need to set a new default with
+\styopt[alttree]{style}. I also want to automatically insert a
+\idx{full-stop} after the description, which can be done with
+\styopt{postdot}. Don't forget that the \styopt{record} option is
+always needed when using \bibgls. This means that the
+\sty{glossaries-extra} package needs to be loaded as follows:
+\begin{verbatim}
+\usepackage[record,nostyles,postdot,stylemods={tree},style=alttree]
+ {glossaries-extra}
+\end{verbatim}
+I've assigned the custom \fieldfmt{constantname} field to the
+\field{description} field and the custom \fieldfmt{constantsymbol} field to the
+\field{name} field. This means that by default the glossary list
+will just show the symbolic representation and the constant's name.
+I'd like to append the value and definition after the description.
+With the base \sty{glossaries} package this would require defining a
+new glossary style but with \sty{glossaries-extra} it can easily be
+achieved through the \idx{postdescriptionhook}.
+
+I've aliased the custom \fieldfmt{identifier} field to
+\field{category}, which means that all the entries will have the
+\field{category} set to \code{constant}. The
+\idx{postdescriptionhook} is obtained from
+\idx{glsxtrpostdesccategory}, so I need to define
+the command \csfmt{glsxtrpostdescconstant}. A simple definition is
+\begin{verbatim}
+\newcommand{\glsxtrpostdescconstant}{%
+ \space (approximately \glsentryuseri{\glscurrententrylabel})%
+ : \glsentryuserii{\glscurrententrylabel}%
+}
+\end{verbatim}
+This is fine if all entries have the \field{user1} and \field{user2}
+fields set. A more generic approach tests for the existence of these
+fields. This can either be done with \idx{ifglshasfield}:
+\begin{verbatim}
+\newcommand{\glsxtrpostdescconstant}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ { (approximately \glscurrentfieldvalue)}%
+ {}%
+ \ifglshasfield{user2}{\glscurrententrylabel}%
+ {: \glscurrentfieldvalue}%
+ {}%
+}
+\end{verbatim}
+or with \idx{glsxtrifhasfield}:
+\begin{verbatim}
+\newcommand{\glsxtrpostdescconstant}{%
+ \glsxtrifhasfield{useri}{\glscurrententrylabel}%
+ { (approximately \glscurrentfieldvalue)}%
+ {}%
+ \glsxtrifhasfield{userii}{\glscurrententrylabel}%
+ {: \glscurrentfieldvalue}%
+ {}%
+}
+\end{verbatim}
+(Note the need to use the internal field label \field{useri} and
+\field{userii} with \ics{glsxtrifhasfield}.)
+
+A modification can be made to also show the alternative
+representation (obtained from the custom \fieldfmt{alternative}
+field which has been aliased to \field{user3}):
+\begin{verbatim}
+\newcommand{\glsxtrpostdescconstant}{%
+ \glsxtrifhasfield{useriii}{\glscurrententrylabel}%
+ { (also denoted \glscurrentfieldvalue
+ \glsxtrifhasfield{useri}{\glscurrententrylabel}%
+ {, approximately \glscurrentfieldvalue}%
+ {}%
+ )%
+ }%
+ {%
+ \glsxtrifhasfield{useri}{\glscurrententrylabel}%
+ { (approximately \glscurrentfieldvalue)}%
+ {}%
+ }%
+ \glsxtrifhasfield{userii}{\glscurrententrylabel}%
+ {: \glscurrentfieldvalue}%
+ {}%
+}
+\end{verbatim}
+
+The complete code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-constants
+bib2gls sample-constants
+pdflatex sample-constants
+\end{verbatim}
+The complete document is shown in \figureref{fig:sample-constants.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-constants.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-constants.pdf}}%
+}
+{\caption{\filefmt{sample-constants.pdf}}}
+{fig:sample-constants.pdf}
+\end{figure}
+
+\filesection{sample-chemical.tex}
+
+This example just uses the \exfile{chemicalformula.bib} file. The aim here
+is to have a list of chemical formulae referenced in the document
+but not have a number list. I could use the \styopt{nonumberlist}
+package option to suppress the number list display, but it's more
+efficient to instruct \bibgls\ to not save the number list with:
+\begin{codeenv}
+\csopt[false]{save-locations}
+\end{codeenv}
+All entries are defined in \exfile{chemicalformula.bib} using
+a custom entry type \atentryfmt{chemical} which needs to be aliased
+in order for the entries to be recognised:
+\begin{codeenv}
+\csopt[chemical=symbol]{entry-type-aliases}
+\end{codeenv}
+Additionally, the entries only have custom fields, so these also
+need to be aliased. In this case I want the formula in the \field{name} field
+and the chemical name in the \field{description} field:
+\begin{codeenv}
+\csopt[formula=name,chemicalname=description]{field-aliases}
+\end{codeenv}
+The \atentry{symbol} entry type falls back on the label for the
+\field{sort} value by default, but I've decided
+to fallback on the \field{name} field for sorting:
+\begin{codeenv}
+\csopt[name]{symbol-sort-fallback}
+\end{codeenv}
+An alternative approach would simply be to alias
+\atentryfmt{chemical} to \atentry{entry} instead.
+
+Since the \field{name} field contains chemical formulae rather than
+words, it makes more sense to use one of the letter sort methods
+rather than a locale collator. In this case the names contain
+mixtures of letters and numbers, so one of the letter-number sort
+methods (listed in \tableref{tab:sortoptionsletternumber}) would be
+appropriate.
+
+I want to use the \glostyle{alttreegroup} style (provided by
+\sty{glossary-tree}). Since I don't require the other style
+packages, I've used \styopt{nostyles} to suppress the automatic
+loading and \styopt[tree]{stylemods} to both load
+\sty{glossary-tree} and patch it. The \glostyle{alttreegroup} style
+needs to know the widest name, so I've use \csopt{set-widest} for
+convenience. The default behaviour of the tree styles is to
+format the name in bold. This is done through the command
+\ics{glstreenamefmt} which is defined as:
+\begin{verbatim}
+\newcommand*{\glstreenamefmt}[1]{\textbf{#1}}
+\end{verbatim}
+The group headings use \ics{glstreegroupheaderfmt} which defaults to
+\cs{glstreenamefmt}. Since I want to keep bold headings, I need to
+redefine this as well:
+\begin{verbatim}
+\renewcommand*{\glstreenamefmt}[1]{#1}
+\renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}
+\end{verbatim}
+(For a more compact layout, you could use \glostyle{mcolalttreegroup}
+instead.)
+
+The complete code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-chemical
+bib2gls --group sample-chemical
+pdflatex sample-chemical
+\end{verbatim}
+The complete document is shown in \figureref{fig:sample-chemical.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-chemical.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-chemical.pdf}}%
+}
+{\caption{\filefmt{sample-chemical.pdf}}}
+{fig:sample-chemical.pdf}
+\end{figure}
+
+\filesection{sample-bacteria.tex}
+
+This example just uses the \exfile{bacteria.bib} file. The aim here
+is to have a simple list of the bacteria referenced in the document.
+Bacteria names are often shown in the long form on first use
+(without the short form) and then the short form on subsequent use.
+This can easily be done with the \abbrstyle{long-only-short-only}
+style. Bacteria are usually typeset in italic. It's best to create a
+semantic command for this:
+\begin{verbatim}
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+\end{verbatim}
+There are two methods to apply this to the bacteria entries. The
+first is to redefine the formatting commands used by the
+\abbrstyle{long-only-short-only} style:
+\begin{verbatim}
+\renewcommand*{\glsabbrvonlyfont}[1]{\bacteriafont{#1}}
+\renewcommand*{\glslongonlyfont}[1]{\bacteriafont{#1}}
+\end{verbatim}
+This is fine if I don't intend to use this style for other types of
+abbreviations. However, I may decide to extend the document at a
+later date to include other abbreviations that need
+\abbrstyle{long-only-short-only} but shouldn't be emphasized.
+This can be done through the use of \idxpl{categoryattribute}.
+The font used for the \field{name} in the glossary is governed by
+the \catattr{glossnamefont} attribute, the font used for the
+\field{description} in the glossary is governed by the
+\catattr{glossdescfont} attribute and the font used by commands like
+\cs{gls} in the document is governed by the \catattr{textformat}
+attribute (\styfmt{glossaries-extra} v1.21+). So if I set
+the \field{category} to \code{bacteria} then I can do:
+\begin{verbatim}
+\setabbreviationstyle[bacteria]{long-only-short-only}
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+\end{verbatim}
+and (if the \field{description} field is displayed in the glossary):
+\begin{verbatim}
+\glssetcategoryattribute{bacteria}{glossdescfont}{bacteriafont}
+\end{verbatim}
+(Note that the attribute value is the control sequence name without
+the initial backslash.)
+
+I'd like to use the \glostyle{bookindex} style, which is
+provided by the \sty{glossary-bookindex}
+package.\footnote{\styfmt{glossary-bookindex}
+is distributed with \styfmt{glossaries-extra} v1.21+.} This isn't loaded
+automatically, but it can be loaded through the
+\styopt{stylemods} package option:
+\begin{verbatim}
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default style packages
+ stylemods={bookindex},% load glossary-bookindex.sty and patch styles
+ style=mcolindexgroup]{glossaries-extra}
+\end{verbatim}
+I've used the \styopt{nostyles} package option to suppress loading
+the default style packages, since I'm not using them. If you inspect
+the \ext{log} file, you may notice that \sty{glossary-tree} is still
+loaded. This is because it's required by \sty{glossary-bookindex}
+as the \glostyle{bookindex} style is based on the \glostyle{index}
+style provided by \sty{glossary-tree}.
+
+The \glostyle{bookindex} style doesn't show the \field{description}
+field (which means I don't need the \catattr{glossdescfont}
+attribute) and, since the \abbrstyle{long-only-short-only} style sets
+the \field{name} to the short form by default, only the short form
+will show in the glossary. I'd rather it was just the long form.
+This could simply be done using \csopt{replicate-fields} to copy the
+\field{long} field to the \field{name} field:
+\begin{verbatim}
+replicate-fields={long=name}
+\end{verbatim}
+Again, I want to consider the possibility of adding other types of
+abbreviations and this might not be appropriate for them (for
+example, I might want some abbreviations with the long form followed
+by the short form in parentheses). Another
+approach is to redefine \ics{glsxtrbookindexname} which is used by
+the \glostyle{bookindex} style to display the name. This takes the
+entry's label as the argument. The default definition is:
+\begin{verbatim}
+\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}}
+\end{verbatim}
+This can be changed to test for the entry's category:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glsifcategory{#1}{bacteria}
+ {\glossentrynameother{#1}{long}}%
+ {\glossentryname{#1}}%
+}
+\end{verbatim}
+Note that I've used \ics{glossentrynameother} here rather than
+\ics{glsentrylong}. This ensures that it follows the same formatting
+as \ics{glossentryname} (so it will use \ics{glsnamefont} or the
+\catattr{glossnamefont} attribute, the \catattr{glossname}
+attribute, and the \idx{postnamehook}, if set). In this case it
+picks up the \catattr{glossnamefont} attribute, which is used
+instead of \cs{glsnamefont}.
+
+If the \field{sort} field is missing for abbreviation styles, the
+fallback value is the \field{short} field (not the \field{name}
+field). In this case it would be better to fallback on the
+\field{long} field instead, which can be done with the
+\csopt{abbreviation-sort-fallback} option:
+\begin{verbatim}
+abbreviation-sort-fallback=long
+\end{verbatim}
+If I do add other types of abbreviations, they will all be sorted
+according to the \field{long} form, but at least this way I can have
+some \meta{long} (\meta{short}) names as well.
+
+The complete code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-bacteria
+bib2gls --group sample-bacteria
+pdflatex sample-bacteria
+\end{verbatim}
+This simple example only references entries on the first page so all
+entries just have~1 in the number list. The complete document is
+shown in \figureref{fig:sample-bacteria.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-bacteria.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-bacteria.pdf}}%
+}
+{\caption{\filefmt{sample-bacteria.pdf}}}
+{fig:sample-bacteria.pdf}
+\end{figure}
+
+\filesection{sample-units1.tex}
+
+This example uses the \exfile{baseunits.bib} and
+\exfile{derivedunits.bib} files. The aim here is to have a glossary
+in two blocks: base units and derived units. This can be achieved by
+first loading \exfile{baseunits.bib} with \csopt{group} set to the
+desired group title (\qt{Base Units} in this case) and then load
+\exfile{derivedunits.bib} with the \csopt{group} set to the desired
+title (\qt{Derived Units} in this case). Remember that the
+\field{group} field needs to be used as a label. If the group title
+contains any problematic characters or commands, then it's better to
+use labels:
+\begin{codeenv}
+\csopt[baseunits]{group}
+\end{codeenv}
+for the first \idx{resourceset} and
+\begin{codeenv}
+\csopt[derivedunits]{group}
+\end{codeenv}
+for the second, and then set the group titles:
+\begin{codeenv}
+\gls{glsxtrsetgrouptitle}\marg{baseunits}\marg{Base Units}
+\gls{glsxtrsetgrouptitle}\marg{derivedunits}\marg{Derived Units}
+\end{codeenv}
+I've used this method to make it easier to adapt to other languages
+that may need extended characters in the group titles.
+
+The \exfile{baseunits.bib} file use a custom entry type
+\atentryfmt{unit}, which must be aliased otherwise \bibgls\
+will ignore the entries. I decided to use \atentry{symbol} for
+semantic reasons:
+\begin{codeenv}
+\csopt[unit=symbol]{entry-type-aliases}
+\end{codeenv}
+Similarly for the custom \atentryfmt{measurement} entry type in
+\exfile{derivedunits.bib}:
+\begin{codeenv}
+\csopt[measurement=symbol]{entry-type-aliases}
+\end{codeenv}
+Remember that \atentry{symbol} uses the label as the default sort fallback,
+so I've changed it to use \field{name} instead:
+\begin{codeenv}
+\csopt[name]{symbol-sort-fallback}
+\end{codeenv}
+An alternative approach would be to alias \atentryfmt{unit}
+and \atentryfmt{measurement} to \atentry{entry} instead.
+
+Since there's no \csopt{type} set, all entries end up in the main
+glossary, but since there are two resource commands the glossary
+ends up with sorted blocks.
+
+The document doesn't include any commands like \cs{gls}, so
+I've use \csopt[all]{selection} to select all entries in the \ext{bib}
+files. There won't be any number lists since there are no records.
+I need a glossary style that shows the \field{symbol} field so I've
+used \glostyle{mcolindexgroup}. Again I've suppressed the automatic
+loading of the default styles with \styopt{nostyles} and used
+\styopt[mcols]{stylemods} to load \sty{glossary-mcols} and patch the
+styles. Note that although I've used \styopt{nostyles}, the
+\sty{glossary-tree} style is loaded as it's required by
+\sty{glossary-mcols}.
+
+As with the previous example, the custom fields need to be aliased:
+\begin{codeenv}
+\csopt[
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+]{field-aliases}
+\end{codeenv}
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-units1
+bib2gls --group sample-units1
+pdflatex sample-units1
+\end{verbatim}
+The complete document is shown in \figureref{fig:sample-units1.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-units1.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-units1.pdf}}%
+}
+{\caption{\filefmt{sample-units1.pdf}}}
+{fig:sample-units1.pdf}
+\end{figure}
+
+\filesection{sample-units2.tex}
+
+This example is provided for comparison with
+\exfile{sample-units1.tex}. Instead of having a single glossary with
+sorted blocks this example has two glossaries:
+\begin{codeenv}
+\ics{newglossary*}\marg{baseunits}\marg{Base Units}
+\cs{newglossary*}\marg{derivedunits}\marg{Derived Units}
+\end{codeenv}
+I've used the \styopt{section} package option to use \ics{section*} for the
+glossary titles. This overrides the default \ics{chapter*} which is
+used with book or report type of classes. I've also used the
+\styopt{nomain} option to suppress the creation of the main glossary
+as I want to define my own glossary types instead.
+
+As before the custom entry types need to be aliased:
+\begin{codeenv}
+\csopt[unit=symbol]{entry-type-aliases}
+\end{codeenv}
+for the first \idx{resourceset} and
+\begin{codeenv}
+\csopt[measurement=symbol]{entry-type-aliases}
+\end{codeenv}
+for the second. Similarly for the custom entry fields:
+\begin{codeenv}
+\csopt[
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+]{field-aliases}
+\end{codeenv}
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-units2
+bib2gls --group sample-units2
+pdflatex sample-units2
+\end{verbatim}
+The complete document is shown in \figureref{fig:sample-units2.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-units2.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-units2.pdf}}%
+}
+{\caption{\filefmt{sample-units2.pdf}}}
+{fig:sample-units2.pdf}
+\end{figure}
+
+\filesection{sample-units3.tex}
+
+This is another example that uses the \exfile{baseunits.bib} and
+\exfile{derivedunits.bib} files. As before the custom fields need to be aliased:
+\begin{codeenv}
+\csopt[
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+]{field-aliases}
+\end{codeenv}
+This time I want two glossaries containing all the units (base and
+derived) where the first glossary is ordered by name and the second
+is ordered by symbol. This can be done with a single resource
+command that instructs \bibgls\ to make the custom \atentryfmt{unit}
+and \atentryfmt{measurement} entry types behave like
+\atentry{dualsymbol}:
+\begin{codeenv}
+\csopt[
+ unit=dualsymbol,
+ measurement=dualsymbol
+]{entry-type-aliases}
+\end{codeenv}
+This causes the \field{name} and \field{symbol} fields to be swapped
+in the dual list. Remember that the fallback for the \field{sort} field is the
+label for the symbol entry types so I need \csopt[name]{symbol-sort-fallback}
+to fallback on \field{name} field instead. (Alternative, I could
+just sort by the \field{name} field instead using
+\csopt[name]{sort-field}.)
+
+The primary entries can still be sorted according to the default
+locale collator, but the dual entries need a sort method that's
+better suited to symbols. Fortunately, \bibgls\ has some (very
+limited) support for \isty{siunitx} and is able to interpret
+the \ics{si} commands in the sample \ext{bib} files. Since
+\idxpl{SIunit} are a mix of letters and numbers I've used one of the
+letter-number methods listed in
+\tableref{tab:sortoptionsletternumber}.
+
+I've decided to define a custom style for the first glossary. Since
+it's based on the \glostyle{long3col-booktabs} style I need to
+load \sty{glossary-longbooktabs}, which can conveniently be done with
+the \styopt{stylemods} option. This uses \env{longtable} (provided
+by \sty{longtable}, which is automatically loaded) which means
+an extra \LaTeX\ call is required in the build process to ensure the
+column widths are correct. Again I'm using \styopt{nostyles} to
+suppress the automatic loading of the default styles, however
+\sty{glossary-tree} will be loaded as it's listed in the value of
+\styopt{stylemods} and \sty{glossary-long} will be loaded as it's
+required by \sty{glossary-longbooktabs}. I can't use my custom style
+in the \styopt{style} package option as it hasn't been defined at
+that point. The default \glostyle{list} style is now unavailable
+since \styopt{nostyles} has prevented it from being defined, so
+I've used \styopt[alttree]{style} to ensure there's a valid default
+style.
+
+Since my custom style is based on one of the long styles, I need to
+set the length register \ics{glsdescwidth} to adjust the width of
+the description column:
+\begin{verbatim}
+\setlength{\glsdescwidth}{.4\hsize}
+\end{verbatim}
+The \glostyle{long3col-booktabs} style sets up a three column
+\env{longtable} so I just need to adjust the table header (to rename
+the column headers) and the way each row is formatted:
+\begin{verbatim}
+\newglossarystyle{units}% style name
+{% base it on long3col-booktabs
+ \setglossarystyle{long3col-booktabs}%
+ \renewcommand*{\glossaryheader}{%
+ \toprule
+ \bfseries Name &
+ \bfseries Measurement &
+ \bfseries Symbol
+ \tabularnewline\midrule\endhead
+ \bottomrule\endfoot}%
+% main entries:
+ \renewcommand{\glossentry}[2]{%
+ \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+ \glossentrydesc{##1}\glspostdescription &
+ \glossentrysymbol{##1}\tabularnewline
+ }%
+}
+\end{verbatim}
+There are no sub-entries in this document so I haven't bothered to
+redefine \ics{subglossentry}. (The tabular styles aren't appropriate
+for hierarchical glossaries.) This puts the symbol into the third
+column (rather than the location list, which is ignored).
+
+I also need to make sure I've defined a glossary for the dual
+entries:
+\begin{codeenv}
+\cs{newglossary*}\marg{units}\marg{Units of Measurement (by SI unit)}
+\end{codeenv}
+and specify the glossary types for the primary and dual entries:
+\begin{codeenv}
+\csopt[main]{type},
+\csopt[units]{dual-type}
+\end{codeenv}
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-units3
+bib2gls --group sample-units3
+pdflatex sample-units3
+pdflatex sample-units3
+\end{verbatim}
+The two pages of the document are shown in
+\figureref{fig:sample-units3.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-units3.tex}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-units3.pdf}{2}}
+{\caption{\filefmt{sample-units3.pdf}}}
+{fig:sample-units3.pdf}
+\end{figure}
+
+\filesection{sample-media.tex}
+
+This example uses the sample files \exfile{books.bib},
+\exfile{films.bib}, \exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib}. The aim is to produce a combined
+list of books and films in a single glossary. The films are based on
+some of the books so some of the entries have the same name. The
+default setting for identical sort values is
+\csopt[id]{identical-sort-action}, which means that the ordering for
+the duplicate names is based on the entry labels. This can lead to
+the odd effect of sometimes having the film listed first
+(\code{film.thebigsleep} comes before \code{thebigsleep}) and
+sometimes having the book listed first (\code{brightonrock} comes
+before \code{film.brightonrock}).
+
+One possible solution would be to also assign prefixes for the book
+labels, but \csopt{label-prefix} is applied to all primary entries
+for the given resource set and can't be applied selectively, so this
+would require editing the \exfile{books.bib} file.
+
+A more consistent approach would be to fallback on the category.
+This means that the \field{category} field needs to be set. There
+are two simple ways to achieve this: use \csopt[same as base]{category}
+(which sets the \field{category} to \code{books} for entries in
+\exfile{books.bib} and to \code{films} for entries in
+\exfile{films.bib}) or alias the custom \fieldfmt{identifier} field to
+\field{category}. I've chosen the later method and also provided
+aliases for the custom \fieldfmt{year} and \fieldfmt{cast} fields:
+\begin{codeenv}
+\csopt[identifier=category,year=user1,cast=user2]{field-aliases},
+\csopt[category]{identical-sort-action}
+\end{codeenv}
+This ensures that books always come before films with the same
+title. An oddity is the film \qt{Whisky Galore!}\ which is one
+character different from the book \qt{Whisky Galore} but the default
+locale collator ignores punctuation so the two titles are considered
+identical by the collator (but not by \csopt[non-unique]{sort-suffix}).
+If a letter comparison was used instead, they would no longer be
+considered identical, but in this case the film would
+still be placed after the book since the film title is longer.
+
+Since I've set the \field{category} I can provide semantic
+formatting commands (as for \exfile{sample-bacteria.tex}):
+\begin{verbatim}
+\newcommand*{\bookfont}[1]{\emph{#1}}
+\newcommand*{\filmfont}[1]{\textsf{\em #1}}
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+\glssetcategoryattribute{film}{textformat}{filmfont}
+\glssetcategoryattribute{film}{glossnamefont}{filmfont}
+\end{verbatim}
+I've given films a slightly different format to make them easier to
+distinguish from books of the same name.
+
+Both \exfile{books.bib} and \exfile{films.bib} had the custom
+\fieldfmt{year} field, indicating the year of first publication
+or release, which I've assigned to the \field{user1} field.
+I can define \idxpl{postnamehook} for each category
+to append the year in brackets after the name is displayed in the
+glossary:
+\begin{verbatim}
+\newcommand*{\glsxtrpostnamebook}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ {\space(published \glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostnamefilm}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}%
+ {\space(released \glscurrentfieldvalue)}%
+ {}%
+}
+\end{verbatim}
+
+I've assigned the \fieldfmt{cast} field to the \field{user2} field,
+and since this field uses \BibTeX's contributor markup I need to
+convert this to a form that's easier to customize:
+\begin{verbatim}
+bibtex-contributor-fields={user2}
+\end{verbatim}
+I'm not sorting by this field and it would look better in the
+document to list the forenames before the surname so I've also done:
+\begin{verbatim}
+contributor-order={forenames}
+\end{verbatim}
+Since I have \sty{datatool-base} v2.28+ installed, the list will be
+formatted using \ics{DTLformatlist}. If I want an Oxford comma, I need
+to redefine \ics{DTLlistformatoxford} in the document:
+\begin{verbatim}
+\renewcommand*{\DTLlistformatoxford}{,}
+\end{verbatim}
+If I want to change \qt{\&} to \qt{and} I also need to redefine
+\ics{DTLandname}:
+\begin{verbatim}
+\renewcommand*{\DTLandname}{and}
+\end{verbatim}
+If \ics{DTLformatlist} isn't defined (\sty{datatool-base} v2.27 or
+earlier), the cast list will look a little odd as it uses a comma
+separator between all elements of this list, including the final
+pair (so there's no final \& or \qt{and}).
+
+I've provided a \idx{postdescriptionhook}
+\ics{glsxtrpostdesccategory} to append the cast list:
+\begin{verbatim}
+\newcommand*{\glsxtrpostdescfilm}{%
+ \ifglshasfield{user2}{\glscurrententrylabel}%
+ {%
+ \glsxtrrestorepostpunc % requires glossaries-extra v1.23+
+ \ featuring \glscurrentfieldvalue
+ }%
+ {}%
+}
+\end{verbatim}
+This uses \ics{glsxtrrestorepostpunc} to restore the
+post-description punctuation if it was suppressed with
+\ics{glsxtrnopostpunc}. This means that if I decide not to include
+the \field{user2} field then the post-description punctuation will
+be revert back to being suppressed for entries containing
+\cs{glsxtrnopostpunc} in the \field{description} field.
+
+I haven't referenced any of the entries in the main body of the
+document, so I've used \csopt[all]{selection} to select all entries.
+This means that there are no number lists on the first document
+build (\LaTeX+\bibgls+\LaTeX) but the next build would show locations for
+the books that have been referenced by the film entries. Since this
+looks a bit odd, I've added \csopt[false]{save-locations} to
+prevent \bibgls\ from saving the locations.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-media
+bib2gls --group sample-media
+pdflatex sample-media
+\end{verbatim}
+The four pages of the document are shown in
+\figureref{fig:sample-media.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-media.tex}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-media.pdf}{4}}
+{\caption{\filefmt{sample-media.pdf}}}
+{fig:sample-media.pdf}
+\end{figure}
+
+\filesection{sample-people.tex}
+
+This example uses the files \exfile{people.bib},
+ \exfile{no-interpret-preamble.bib} and \exfile{interpret-preamble.bib}. The
+aim here is to have a list of people ordered alphabetically by
+surname with a brief description, the same list ordered by date of
+birth and an index of all the people without their details but with
+a number list indicating where that person was mentioned in the
+document. The first two lists shouldn't include aliases but the
+index should. Not all the entries defined in \exfile{people.bib}
+are included in the document. Those that aren't either explicitly
+referenced or aliased are filtered by the \csopt{selection} criteria.
+
+Since this is just an example document all the \cs{gls} commands
+only occur on page~1, which means that each number list is just
+\qt{1}. A real document would have the references scattered about.
+The aliases haven't actually been referenced anywhere in the
+document.
+
+The \fieldfmt{born}, \fieldfmt{died} and \fieldfmt{othername} fields will be
+ignored by default since they don't correspond to recognised keys,
+so the keys either need to be defined or the fields need to be
+mapped to existing keys. In this case I've decided to map them to
+the \field{user1}, \field{user2} and \field{user3} fields using
+\csopt{field-aliases}:
+\begin{verbatim}
+field-aliases={born=user1,died=user2,othername=user3}
+\end{verbatim}
+Although the aliases haven't been referenced in the document, I've
+taken into account the possibility that they might later be added.
+To prevent them from showing in the first two lists I've filtered
+them out. This is easy to do since the aliases are all defined using
+\atentry{index} whereas the remaining (non-aliased) entries are
+defined using \atentry{entry} so \csopt{match} can be used to only
+select entries defined with \atentry{entry}:
+\begin{verbatim}
+match={entrytype=entry}
+\end{verbatim}
+
+I'd like the first use of \ics{gls} to display the full name, except
+for the entry that has the \field{first} field set. The remaining
+entries only have \field{text} set to a shortened version of the
+name so they need to have the \field{name} field copied to the
+\field{first} field using \csopt{replicate-fields}:
+\begin{verbatim}
+replicate-fields={name={first}}
+\end{verbatim}
+
+I'd like the first use to show the other name in parentheses where
+provided. The simplest way to achieve this is by defining the
+\idx{postlinkhook} \ics{glsxtrpostlinkcategory}. If the
+\field{category} field isn't specified it will default to
+\code{general} (for entries defined with \atentry{entry}), so I
+could just define \csfmt{glsxtrpostlinkgeneral} but to allow for
+the possibility of extending the document to incorporate other types
+of entries I decided to set the \field{category} to \code{people}
+through the use of the \csopt{category} option:
+\begin{verbatim}
+category={people}
+\end{verbatim}
+
+This means that I now need to define a command called
+\csfmt{glsxtrpostlinkpeople} that will be used after instances of
+\cs{gls} etc where the entry has the \field{category} set to
+\code{people}. This first tests if that was the first use of the
+entry with \ics{glsxtrifwasfirstuse} and then tests if the
+\field{user3} field is set. If so, it does a space followed by that
+field's value in parentheses. The entry's label can be obtained from
+\ics{glslabel}:
+\begin{verbatim}
+\newcommand*{\glsxtrpostlinkpeople}{%
+ \glsxtrifwasfirstuse
+ {%
+ \ifglshasfield{user3}{\glslabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+}
+\end{verbatim}
+
+I'd also like to do something similar after the name when the entry
+is displayed in the glossary. This means defining the \idx{postnamehook}
+\ics{glsxtrpostnamecategory}, in this case
+\csfmt{glsxtrpostnamepeople}. The entry's label is referenced
+with \ics{glscurrententrylabel}:
+\begin{verbatim}
+\newcommand*{\glsxtrpostnamepeople}{%
+ \ifglshasfield{user3}{\glscurrententrylabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+}
+\end{verbatim}
+(A different command is used since \cs{gls} may occur in the
+description, which would interfere with the current entry label if
+they shared the same command to reference the label.)
+
+The \idx{postdescriptionhook} can be used to append the birth and
+death dates. Although all the entries that have been selected from \exfile{people.bib} have a
+\fieldfmt{died} field, I've added a check for the corresponding
+\field{user3} field in case new references are added for people who are
+still alive:
+\begin{verbatim}
+\newcommand*{\glsxtrpostdescpeople}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}
+ {% born
+ \space(\glscurrentfieldvalue\,--\,%
+ \ifglshasfield{user2}{\glscurrententrylabel}
+ {% died
+ \glscurrentfieldvalue
+ }%
+ {}%
+ )%
+ }%
+ {}%
+}
+\end{verbatim}
+
+The first list is quite straight-forward and can be created with:
+\begin{codeenv}
+\gls!{GlsXtrLoadResources}\oarg{
+ \csopt[people]{src},
+ \csopt[entrytype=entry]{match},
+ \csopt[people]{category},
+ \csopt[name=\marg{first}]{replicate-fields},
+ \csopt[born=user1,died=user2,othername=user3]{field-aliases}
+}
+\end{codeenv}
+I have used the \csopt{sort} option and there's no document language,
+so \bibgls\ will sort according to my locale. The custom
+commands \gls{sortname} and \gls{sortvonname} ensure that the
+entries are all sorted alphabetically according to the surnames.
+
+The second list can easily be created by adding the \csopt{secondary}
+option:
+\begin{codeenv}
+\csopt[date:user1:bybirth]{secondary}
+\end{codeenv}
+This sorts according to the \field{user1} field (which was
+originally the \fieldfmt{birth} field). I've changed the
+date group headings by redefining \gls{bibglsdategroup} and
+\gls{bibglsdategrouptitle}, which means that the grouping in the
+\code{bybirth} glossary will be in the form \meta{year} \meta{era}:
+\begin{verbatim}
+\newcommand{\bibglsdategroup}[7]{#1#4#7}
+\newcommand{\bibglsdategrouptitle}[7]{\number#1\ #4}
+\end{verbatim}
+I've also defined the \code{bybirth} glossary and supplied a title:
+\begin{verbatim}
+\newglossary*{bybirth}{People (Ordered by Birth)}
+\end{verbatim}
+
+The first two glossaries have entries with fairly long names (especially those
+with the \idx{postnamehook}), so the best style is the
+\glostyle{altlistgroup}. The \sty{glossaries-extra-stylemods}
+package patches this style to discourage page breaks occurring after
+group headings, so I've also used the \styopt{stylemods}
+option to automatically load that package. I'd like to use the
+\glostyle{bookindex} style for the index, which is provided by
+\sty{glossary-bookindex}, so I need:
+\begin{codeenv}
+\styopt[list,bookindex]{stylemods}
+\end{codeenv}
+This ensures that \sty{glossary-list} and \sty{glossary-bookindex}
+are loaded and patches the list styles.
+
+The first two glossaries would look better with a terminating
+\idx{full-stop}, so I've used the \styopt{postdot} package option.
+(The \glostyle{bookindex} style doesn't use the \field{description}
+field and therefore doesn't use the \idx{postdescriptionhook}.)
+The index glossary type can be defined with the \styopt{index}
+package option. I've set the default style to \glostyle{altlistgroup}
+but this can locally be changed to \glostyle{bookindex} when I
+display the index. The \styopt{record} option is needed to use
+\bibgls, so the \styfmt{glossaries-extra} package is loaded with:
+\begin{verbatim}
+\usepackage[record,% using bib2gls
+ index,% create index glossary
+ postdot,% dot after descriptions
+% load glossary-list.sty and glossary-bookindex.sty and patch:
+ stylemods={list,bookindex},
+ style=altlistgroup]{glossaries-extra}
+\end{verbatim}
+
+The index needs to include all the entries that have already been
+defined but also needs to include the aliased entries. This means
+that existing entries simply need their label copied to the
+\code{index} glossary but the other entries need to be defined
+so this requires setting the \csopt{action} option:
+\begin{codeenv}
+\csopt[define or copy]{action}
+\end{codeenv}
+I would also like to have groups in the index (which the
+\glostyle{bookindex} style supports) so I need to specify a field
+in which to save the group information using
+\csopt{copy-action-group-field}:
+\begin{codeenv}
+\csopt[indexgroup]{copy-action-group-field}
+\end{codeenv}
+I need to remember to redefine \ics{glsxtrgroupfield} to this value before
+displaying the index:
+\begin{verbatim}
+\renewcommand{\glsxtrgroupfield}{indexgroup}
+\end{verbatim}
+
+The aliased entries won't be selected by default since they haven't
+been used in the document, so I need to change the selection
+criteria with \csopt{selection}:
+\begin{codeenv}
+\csopt[recorded and deps and see]{selection}
+\end{codeenv}
+
+In the index, I'd like the surnames first. This can be done by
+redefining the custom commands used in the \field{name} fields.
+There's a slight complication here. These commands aren't defined on
+the first \LaTeX\ run as their definitions are written to the
+\ext{glstex} file by \bibgls, so I can't use \cs{renewcommand}.
+instead I've provided some custom commands:
+\begin{verbatim}
+\newcommand*{\swaptwo}[2]{#2, #1}
+\newcommand*{\swapthree}[3]{#2 #3, #1}
+\end{verbatim}
+Now I just need to make an assignment using \ics{let}:
+\begin{verbatim}
+\let\sortname\swaptwo
+\let\sortart\swaptwo
+\let\sortvonname\swapthree
+\end{verbatim}
+This doesn't perform any check to determine if the commands are
+already defined so there won't be a problem on the first run.
+
+The first two glossaries shouldn't have number lists:
+\begin{verbatim}
+\printunsrtglossary[title={People (Alphabetical)},nonumberlist]
+\printunsrtglossary[type=bybirth,target=false,nonumberlist]
+\end{verbatim}
+I'd like to use \sty{hyperref} but I have to switch off the
+hypertargets for the second glossary otherwise I'll end up with
+duplicate targets. This is done with \code{target=false}.
+All references using \cs{gls} etc will link to the first glossary.
+
+I could also do this for the index but the cross-references in the
+aliased entries will link to the first glossary rather than the
+relevant entry in the index. The simplest way to fix this is to
+redefine \ics{glolinkprefix} to provide a different target:
+\begin{verbatim}
+\renewcommand*{\glolinkprefix}{idx:}
+\end{verbatim}
+These redefinitions need to be done before the index. I've decided
+to use the starred \ics{printunsrtglossary*} to localise these
+changes, although that's not needed for this document since the
+index comes right at the end:
+\begin{verbatim}
+\printunsrtglossary*
+ [type=index,style=bookindex]
+ {%
+ \let\sortname\swaptwo
+ \let\sortart\swaptwo
+ \let\sortvonname\swapthree
+ \renewcommand{\glsxtrgroupfield}{indexgroup}%
+ \renewcommand*{\glolinkprefix}{idx:}%
+ }
+\end{verbatim}
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-people
+bib2gls --group --break-space sample-people
+pdflatex sample-people
+\end{verbatim}
+The four pages of the document are shown in \figureref{fig:sample-people.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-people.tex}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-people.pdf}{4}}
+{\caption{\filefmt{sample-people.pdf}}}
+{fig:sample-people.pdf}
+\end{figure}
+
+\filesection{sample-authors.tex}
+
+This example uses the files \exfile{people.bib},
+\exfile{books.bib}, \exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble2.bib}. The aim is to reference the books
+in \exfile{books.bib} and have them listed by author. This means
+finding a way of assigning each book entry a \field{parent} field that
+contains the label identifying the relevant author in \exfile{people.bib}.
+
+To recap, each author is defined in \exfile{people.bib} in the form:
+\begin{verbatim}
+@entry{dickens,
+ name={\sortname{Charles}{Dickens}},
+ text={Dickens},
+ description={English writer and social critic},
+ born={7~February 1812 AD},
+ died={9~June 1870 AD},
+ identifier={person}
+}
+\end{verbatim}
+and each book is defined in \exfile{books.bib} in the form:
+\begin{verbatim}
+@entry{bleakhouse,
+ name={Bleak House},
+ description={novel by Charles Dickens},
+ identifier={book},
+ author={\sortmediacreator{Charles}{Dickens}},
+ year={1852}
+}
+\end{verbatim}
+There's a field here (the custom \fieldfmt{author} field) that contains
+the author's name, and this can be aliased to the \field{parent}
+field with \csopt{field-aliases}:
+\begin{codeenv}
+\csopt[author=parent]{field-aliases}
+\end{codeenv}
+but the author's label in the \exfile{people.bib}
+file is just the lower case surname.
+
+Remember from \sectionref{sec:texparserlib} that the interpreter
+will be used on the \field{parent} field if the value contains
+\verb|\| or \verb|{| or \verb|}| and
+\csopt[true]{interpret-label-fields}. This means that with this
+field alias and the interpreter on, \bibgls\ will attempt to
+interpret the field contents. So all that's needed is to ensure that
+\bibgls\ is given a definition of \gls{sortmediacreator} that
+ignores the first argument and converts the second argument to lower
+case. This definition is available in
+\exfile{interpret-preamble2.bib} but, since this file uses
+\cs{renewcommand} rather than \cs{providecommand},
+\csopt[false]{write-preamble} is required to prevent \LaTeX\ from
+picking up this definition.
+
+As with the \exfile{sample-people.tex} example, I need to copy
+the \field{name} field to the \field{first} field if that field is
+missing using \csopt{replicate-fields}:
+\begin{codeenv}
+\csopt[{name=\marg{first}}]{replicate-fields}
+\end{codeenv}
+and I also want to provide a semantic command to format the book
+title, so the field aliases also need to convert the custom
+\fieldfmt{identifier} field to \field{category}:
+\begin{codeenv}
+\csopt[identifier=category,author=parent]{field-aliases}
+\end{codeenv}
+so that the document can set the \catattr{textformat} and
+\catattr{glossnamefont} attributes:
+\begin{verbatim}
+\newcommand*{\bookfont}[1]{\emph{#1}}
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+\end{verbatim}
+As with \exfile{sample-media.tex}, the terminating question mark at
+the end of some of the \field{name} fields can cause an awkward
+situation if \cs{gls} is used at the end of a sentence. This can be
+dealt with by getting \bibgls\ to make a note of the fields that
+end with sentence-terminating punctuation through the use of
+the \csopt{check-end-punctuation} option. In this example, the
+\field{name}, \field{text} and \field{first} fields are the same for
+all the books, so it's sufficient just to check the \field{name}
+field:
+\begin{codeenv}
+\csopt[name]{check-end-punctuation}
+\end{codeenv}
+With \sty{glossaries-extra} v1.23+ it's easy to hook into the
+\idx{postlinkhook} to check if
+\fielddisp{fieldendpunc}{namendpunc} exists:
+\begin{verbatim}
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+}
+\end{verbatim}
+This will now cause the full stops following
+\begin{verbatim}
+\gls{whydidnttheyaskevans}.
+\end{verbatim}
+and
+\begin{verbatim}
+\gls{doandroidsdreamofelectricsheep}.
+\end{verbatim}
+to be discarded.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-authors
+bib2gls --group sample-authors
+pdflatex sample-authors
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-authors.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-authors.tex}
+
+\lstinputlisting[firstline=5]{../examples/sample-authors.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-authors.pdf}}%
+}
+{\caption{\filefmt{sample-authors.pdf}}}
+{fig:sample-authors.pdf}
+\end{figure}
+
+\filesection{sample-msymbols.tex}
+
+This example uses \exfile{bigmathsymbols.bib},
+\exfile{mathsrelations.bib}, \exfile{binaryoperators.bib},
+\exfile{unaryoperators.bib} and \exfile{mathgreek.bib}. The \isty{stix}
+package is required for some of the commands used in
+\exfile{bigmathsymbols.bib}, so that must be loaded in the document.
+
+I'm using the \glostyle{mcolalttree} style for this document,
+which means that the \sty{glossary-mcols} package is required and
+the styles need patching, which can be done with
+the \styopt{stylemods} package option:
+\begin{verbatim}
+\usepackage[record,% using bib2gls
+ nostyles,% don't load default styles
+ postdot,% append a dot after descriptions
+ stylemods={mcols},% load glossary-mcols.sty and patch
+ style=mcolalttree]{glossaries-extra}
+\end{verbatim}
+I'm not using a group-based style which suggests that I don't need the
+\longarg{group} switch. However, although I don't want group titles,
+I still want a slight gap between logical groups, which means that I
+still need this switch. If I added the \styopt{nogroupskip} package
+option, then I can omit \longarg{group}.
+
+I'm not referencing any of the entries in the document as I'm just
+generating a complete list of all the defined symbols. This means I
+need to tell \bibgls\ to select all entries and don't bother saving
+the \field{location} field:
+\begin{codeenv}
+\csopt[false]{save-locations},
+\csopt[all]{selection}
+\end{codeenv}
+Since I'm using a style that's based on \glostyle{alttree} I need to
+find the widest \field{name}, which can be done with \csopt{set-widest}.
+
+I've used \csopt{field-aliases} to convert the custom
+\fieldfmt{identifier} field to \field{category}, which means I can
+also sort by that field:
+\begin{codeenv}
+\csopt[category]{sort-field},
+\csopt[identifier=category]{field-aliases}
+\end{codeenv}
+Since this will cause identical sort values, I need to provide a
+fallback. Here I've decided to fallback on the \field{description}
+field:
+\begin{codeenv}
+\csopt[description]{identical-sort-action}
+\end{codeenv}
+This means that entries will be order by \field{category} and
+then \field{description}, which naturally creates blocks of symbol
+types in the glossary.
+
+Remember that I want a small vertical gap between each logical
+block. These needs the \field{group} field which, with the default
+locale sort, is obtained from the first letter of the sort value.
+In this case the sort value is obtained from the \field{category}
+field, and as each category happens to start with a different
+letter, this means I get the desired effect. However, in the event
+that I add more entries with a new category that happens to start
+with the same letter as an existing category, it's better to provide
+a more future-proof method, so I've set the \field{group} field to
+fetch its value from the \field{category} field:
+\begin{codeenv}
+\csopt[category=group]{replicate-fields}
+\end{codeenv}
+(Since the \csopt{field-aliases} option is always performed before
+\csopt{replicate-fields}, the \field{category} field will already
+have been set and is available for replicating.) This means that the
+\field{group} label is the same as the \field{category} label rather
+than just the first letter. (For a quick check, change the glossary
+style to \glostyle{mcolalttreegroup} to display the group titles.)
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-msymbols
+bib2gls --group sample-msymbols
+pdflatex sample-msymbols
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-msymbols.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-msymbols.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-msymbols.pdf}}%
+}
+{\caption{\filefmt{sample-msymbols.pdf}}}
+{fig:sample-msymbols.pdf}
+\end{figure}
+
+\filesection{sample-maths.tex}
+
+This example uses \exfile{bigmathsymbols.bib} and \exfile{mathsobjects.bib}.
+It has a fairly similar preamble to \exfile{sample-msymbols.tex},
+but \exfile{no-interpret-preamble.bib} and
+\exfile{interpret-preamble.bib} are now needed to provide
+the \csref{sortart} command:
+\begin{codeenv}
+\gls!{GlsXtrLoadResources}\oarg{
+ \csopt[no-interpret-preamble]{src},
+ \csopt[false]{interpret-preamble}
+}
+\end{codeenv}
+There's also an extra custom field to alias:
+\begin{codeenv}
+\csopt[identifier=category,format=user1]{field-aliases}
+\end{codeenv}
+I've aliased \fieldfmt{format} to \field{user1} since \csref{glsxtrfmt}
+defaults to that field. If I decided to use a different field I also
+need to remember to redefine \ics{GlsXtrFmtField} to match.
+
+In this document I only want to select entries that have been
+indexed, so I've omitted the \csopt{selection} option I used in the
+\exfile{sample-msymbols.tex} example, however
+I still don't want any number lists so I still have
+\csopt[false]{save-locations}.
+
+I want \csref{glsxtrfmt} to index (which it doesn't by default) so
+that means I need to redefine \ics{GlsXtrFmtDefaultOptions}
+to prevent it from using \code{noindex}:
+\begin{verbatim}
+\renewcommand{\GlsXtrFmtDefaultOptions}{}
+\end{verbatim}
+I've provided some convenient wrapper commands that use
+\csref{glsxtrfmt*} or the non-linking \csref{glsxtrentryfmt} that
+are in the form:
+\begin{verbatim}
+\newcommand{\set}[2][]{\glsxtrfmt*[#1]{set}{#2}}
+\newcommand{\nlset}[1]{\glsxtrentryfmt{set}{#1}}
+\end{verbatim}
+The use of the starred form allows:
+\begin{verbatim}
+\[\set{A} = \gls{bigcup}[_{i=1}^n] \set{B}[_i] \]
+\end{verbatim}
+which produces:
+\[ \mathcal{A} = \bigcup_{i=1}^n \mathcal{B}_i \]
+Note the difference if the optional arguments aren't used:
+\begin{verbatim}
+\[\set{A} = \gls{bigcup}_{i=1}^n \set{B}_i \]
+\end{verbatim}
+This produces:
+\[ \mathcal{A} = \bigcup{}_{i=1}^n \mathcal{B}{}_i \]
+
+Be careful with the set cardinality example. You might be tempted to
+nest \csfmt{set} within the argument of \csfmt{setcard} but this
+results in nested hyperlinks. These are unpredictable and there's no
+consistent handling of them between different PDF viewers. It can
+also be confusing to the reader. If $|\mathcal{B}_1\cup\mathcal{B}_2|$
+shows up as what appears to be a single hyperlink, where would the
+reader expect the target? This is the reason for providing the
+non-linking commands like \csfmt{nlset} and \csfmt{nlsetcard}.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-maths
+bib2gls --group sample-maths
+pdflatex sample-maths
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-maths.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-maths.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-maths.pdf}}%
+}
+{\caption{\filefmt{sample-maths.pdf}}}
+{fig:sample-maths.pdf}
+\end{figure}
+
+\filesection{sample-textsymbols.tex}
+
+This example uses \exfile{miscsymbols.bib}. This requires both
+\isty{marvosym} and (with the \styoptfmt{weather} option)
+\isty{ifsym}. Unfortunately both define the commands \csfmt{Sun}
+and \csfmt{Lightning}, so these commands need to be undefined after
+the first package is loaded and before the second.
+Since I want the definitions provide by \sty{ifsym} I have to first
+load \sty{marvosym}, then undefine the conflicting commands and then
+load \sty{ifsym}:
+\begin{verbatim}
+\usepackage{etoolbox}
+\usepackage{marvosym}
+\undef\Sun
+\undef\Lightning
+\usepackage[weather]{ifsym}
+\end{verbatim}
+The \sty{etoolbox} package is also loaded as it provides
+\ics{undef}.
+
+The custom entry type \atentryfmt{icon} must be aliased for the
+entries to be recognised:
+\begin{codeenv}
+\csopt[unit=symbol]{entry-type-aliases}
+\end{codeenv}
+
+Since none of the entries have a \field{name} or \field{description}
+field, the custom fields \fieldfmt{icon} and
+\fieldfmt{icondescription} need to be aliased to them.
+The document uses the \glostyle{alttreegroup} style where the groups
+are obtained from the \field{category}, which again I obtain from
+the custom \fieldfmt{identifier} field using:
+\begin{codeenv}
+\csopt[
+ identifier=category,
+ icon=name,
+ icondescription=description]{field-aliases},
+\csopt[category=group]{replicate-fields}
+\end{codeenv}
+The \field{group} field is just a label and an appropriate title needs to be
+supplied for each group label:
+\begin{verbatim}
+\glsxtrsetgrouptitle{information}{Information}
+\glsxtrsetgrouptitle{mediacontrol}{Media Controls}
+\glsxtrsetgrouptitle{weather}{Weather Symbols}
+\end{verbatim}
+This also requires sorting first by \field{category} and then
+fallback on another field. The most appropriate here is the
+\field{description} field, but instead of using
+\csopt{identical-sort-action}, I'm using \csopt{sort-suffix},
+which works better with the default locale sort when the fallback
+field consists of words or phrases.
+\begin{codeenv}
+\csopt[category]{sort-field},
+\csopt[description]{sort-suffix},
+\csopt[|]{sort-suffix-marker}
+\end{codeenv}
+Since I'm using one of the \glostyle{alttree} styles, I need to set
+the widest name:
+\begin{codeenv}
+\csopt{set-widest}
+\end{codeenv}
+In this case, \bibgls\ won't be able to determine the widest name
+since it doesn't recognise any of the commands, so it will have to
+use the fallback command, which will use one of the commands
+provided by the \sty{glossaries-extra-stylemods} package.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-textsymbols
+bib2gls --group sample-textsymbols
+pdflatex sample-textsymbols
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-textsymbols.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-textsymbols.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-textsymbols.pdf}}%
+}
+{\caption{\filefmt{sample-textsymbols.pdf}}}
+{fig:sample-textsymbols.pdf}
+\end{figure}
+
+\filesection{sample-languages.tex}
+
+This example uses \exfile{markuplanguages.bib}. Since the file
+includes abbreviations, any commands that must be used before
+abbreviations are defined need to go before
+\ics{GlsXtrLoadResources}. This includes the abbreviation style,
+which I've set to \abbrstyle{long-short-desc}:
+\begin{verbatim}
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+\end{verbatim}
+This style sets the \field{name} field using
+\ics{glsxtrlongshortdescname}, which defaults to the long form
+followed by the short form in parenthesis. I decided to switch this
+round so that the short form is shown first, which conveniently
+matches the default \csopt{abbreviation-sort-fallback}.
+\begin{verbatim}
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+\end{verbatim}
+This redefinition must be done before the abbreviations are defined
+as it's expanded when the \field{name} field is set. (Note the need
+to protect commands that shouldn't be expanded.) If I decide not to change
+the \field{name} format in this way, I would then need to use
+\csopt[long]{abbreviation-sort-fallback}.
+
+I also decided to make use of the custom command \csfmt{abbrvtag}
+that marks up the letters in the \field{long} field used to obtain
+the abbreviation. As with the abbreviation style, this must be
+done before the abbreviations are defined:
+\begin{codeenv}
+\cs{GlsXtrEnableInitialTagging}\marg{markuplanguage}\marg{\csfmt{abbrvtag}}
+\end{codeenv}
+If you accidentally place it after \gls{GlsXtrLoadResources}, you'll
+encounter an error on the second \LaTeX\ run (but not the first).
+This is because \ics{GlsXtrEnableInitialTagging} requires that the
+supplied command (\csfmt{abbrvtag} in this case) be undefined. On
+the first \LaTeX\ it's undefined, but on the second it picks up
+the \atentry{preamble} definition, which is now in the resource file.
+
+The tagging format is governed by \ics{glsxtrtagfont} which
+underlines its argument by default. I've redefined it to also
+convert the letter to uppercase:
+\begin{verbatim}
+\renewcommand*{\glsxtrtagfont}[1]{\underline{\MakeTextUppercase{#1}}}
+\end{verbatim}
+Note that in the \code{mathml} case, the first tag consists of more
+than one letter:
+\begin{verbatim}
+long={\abbrvtag{m\NoCaseChange{ath}}ematical }#markuplang
+\end{verbatim}
+Here \ics{NoCaseChange} is used to prevent \ics{MakeTextUppercase}
+from applying the case change.
+
+The default \csopt{selection} criteria includes entries that have
+been indexed and any cross-references. Some of the
+\field{description} fields include \ics{glsxtrshort}, which \bibgls\ picks
+up and the referenced entry is included in the dependency list.
+However, I don't want any indexing
+performed by commands occurring in the glossary. This can be dealt
+with in one of two ways: either switch the format to \code{glsignore}
+or suppress the indexing by changing the default options with
+\ics{GlsXtrSetDefaultGlsOpts}. In this case I decided to turn the
+records into ignored records:
+\begin{codeenv}
+\ics{GlsXtrSetDefaultNumberFormat}\marg{glsignore}
+\end{codeenv}
+This means that some of the entries won't have location lists, so I've provided
+a \idx{postdescriptionhook} that inserts a \idx{full-stop} after the
+\field{description} if there's no location otherwise it inserts a
+comma:
+\begin{verbatim}
+\newcommand{\glsxtrpostdescmarkuplanguage}{%
+ \glsxtrifhasfield{location}{\glscurrententrylabel}%
+ {,}%
+ {.}%
+}
+\end{verbatim}
+I've used \csopt{loc-suffix} to append a \idx{full-stop} after the
+location lists. This doesn't affect the entries that haven't been
+indexed.
+
+I decided to convert the first letter of the \field{name} field to
+uppercase. Since the \field{name} is implicitly set for
+abbreviations based on the style, I've decided to implement this
+through the \catattr{glossname} attribute rather than using
+\csopt{name-case-change}:
+\begin{verbatim}
+\glssetcategoryattribute{markuplanguage}{glossname}{firstuc}
+\end{verbatim}
+If this line causes an error when the glossary is displayed that goes
+away if it's commented out, make sure you have at least version 2.06
+of \sty{mfirstuc}. For most of the entries, this doesn't make a
+difference as they already start with a capital. It's only the
+\code{markdown} entry that's actually affected.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-languages
+bib2gls --group sample-languages
+pdflatex sample-languages
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-languages.pdf}.
+
+\lstinputlisting[firstline=5]{../examples/sample-languages.tex}
+
+\begin{figure}
+\figcontents
+{%
+ \frame{\includegraphics[height=.9\textheight]{../examples/sample-languages.pdf}}%
+}
+{\caption{\filefmt{sample-languages.pdf}}}
+{fig:sample-languages.pdf}
+\end{figure}
+
+
+\filesection{sample-usergroups.tex}
+
+This example uses \exfile{usergroups.bib}. This requires \XeLaTeX\
+or \LuaLaTeX\ as the \ext{bib} file includes \idx{non-ASCII} labels.
+The entries include fields in different languages, the main one
+being English. If an entry has a non-English \field{name} or
+\field{long} field, it also includes the custom field
+\fieldfmt{translation} that provides an (approximate) translation.
+If this field is present, the language is given by the first element
+of the custom \fieldfmt{language} field.
+
+In this case, I'm providing keys for the custom
+\fieldfmt{language} and \fieldfmt{translation} fields, and for a bit
+of variety from the other examples, I'm ignoring the custom
+\fieldfmt{identifier} field. The custom keys are provided with
+\ics{glsaddstoragekey}:
+\begin{verbatim}
+\glsaddstoragekey{language}{}{\glsentrylanguage}
+\glsaddstoragekey{translation}{}{\glsentrytranslation}
+\end{verbatim}
+The \ext{bib} file includes abbreviations. Remember that the
+abbreviation style must be set before the resource file is loaded:
+\begin{verbatim}
+\setabbreviationstyle[tug]{long-short-user}
+\end{verbatim}
+For this example, I'm explicitly setting the \field{category} field
+to \code{tug}:
+\begin{codeenv}
+\csopt[tug]{category}
+\end{codeenv}
+Some of the fields end with a \idx{full-stop}. This isn't a problem with
+the \field{long} field as the first use follows the long form with
+the short form in parentheses, but it will be a problem on
+subsequent use if the \field{short} field ends with a \idx{full-stop}.
+This means I need to check for end-of-sentence punctuation
+for the \field{short} field. It's also a good idea to do this for
+the \field{name} field for the non-abbreviations.
+\begin{verbatim}
+check-end-punctuation={name,short}
+\end{verbatim}
+It's now possible to discard a \idx{full-stop} that follows
+\ics{gls}:
+\begin{verbatim}
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \ifglshasshort{\glslabel}%
+ {%
+ \glsxtrifwasfirstuse{}%
+ {%
+ \GlsXtrIfFieldUndef{shortendpunc}{\glslabel}{#2}{#1}%
+ }%
+ }%
+ {%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+ }%
+}
+\end{verbatim}
+This first tests if the entry that's just been referenced has a
+\field{short} field. If it has, then the next test is to check if
+that was the first use for that entry. If it was, nothing is done.
+If it wasn't, then \cs{GlsXtrIfFieldUndef} is used to determine
+if \fielddisp{fieldendpunc}{shortendpunc} has been set. If it has
+been set then the period discard function is performed. If the
+entry doesn't have a \field{short} field, then the
+\fielddisp{fieldendpunc}{nameendpunc} field needs checking instead.
+
+Since the document requires \XeLaTeX\ or \LuaLaTeX\ and has some
+\idx{non-ASCII} characters, it needs \sty{fontspec} and an
+appropriate font. In this case I've chosen \qt{Linux Libertine O}.
+If you don't have it installed, you'll need to change it.
+\begin{verbatim}
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+\end{verbatim}
+Since it's a multilingual document I also need \sty{polyglossia}
+with the main language set to \code{english}:
+\begin{verbatim}
+\usepackage{polyglossia}
+\setmainlanguage[variant=uk]{english}
+\end{verbatim}
+Now comes the difficult bit. The document needs to determine what
+other languages need to be loaded. The \sty{tracklang} package
+provides a convenient interface when dealing with language tags.
+This is automatically loaded by \styfmt{glossaries} but I've loaded
+it here explicitly as a reminder:
+\begin{verbatim}
+\usepackage{tracklang}
+\end{verbatim}
+Once the resource file has been loaded, I need to iterate over all
+the defined entries and check if the \fieldfmt{translation} field
+has been set. If it has, then the first language tag in the
+\fieldfmt{language} field will supply the language, but this needs
+to be converted from the \idx{IETF} language tag to a language name
+recognised by \sty{polyglossia}.
+
+Iterating over all entries can be done with \ics{forglsentries}
+but remember that no entries will be defined before \bibgls\ has
+been run, so this does nothing on the first \LaTeX\ run.
+\begin{verbatim}
+\forglsentries{\thislabel}{%
+ \glsxtrifhasfield{translation}{\thislabel}%
+ {%
+ % requires glossaries-extra v1.24
+ \glsxtrforcsvfield{\thislabel}{language}{\addfirstlang}%
+ }%
+ {}%
+}
+\end{verbatim}
+Within the outer (\cs{forglsentries}) loop, there's a check
+for the \fieldfmt{translation} field using \ics{glsxtrifhasfield}.
+If it's present, then the first element of the \fieldfmt{language}
+field is required. The simplest way to get this is to use
+\ics{glsxtrforcsvfield} which iterates over all elements of the
+given field (\fieldfmt{language} in this case) and break out of the
+loop (with \ics{glsxtrendfor}) once the language has been found.
+
+The handler function (\csfmt{addfirstlang}) is defined so that it
+adds the given language tag as a tracked language using
+\ics{TrackLocale}. This command sets
+\ics{TrackLangLastTrackedDialect} to the associated
+(\sty{tracklang}) dialect label for convenience. This dialect label
+can then be converted to the root language label using
+\ics{TrackedLanguageFromDialect}. If this language is supported
+by \sty{polyglossia}, then there should be a file called
+\metafilefmt{gloss}{language}{.ldf}.
+
+Some of the entries use the same language, so it's necessary to
+check if the language has already been defined before loading it.
+There's also a problem in that the language file should not be
+loaded in a scoped context, but both \ics{glsxtrforcsvfield}
+and the unstarred \ics{glsxtrifhasfield} add implicit grouping.
+To solve both problems, an internal \sty{etoolbox} list is
+defined:
+\begin{verbatim}
+\newcommand{\langlist}{}%
+\end{verbatim}
+and \ics{xifinlist} is used to first check if the language label is
+already in the list before adding it. Since this part of the code is
+scoped, the global \ics{listxadd} is used to add the language label
+to the list.
+
+Next the \field{useri} field is set to \code{text}\meta{language}
+which is the name of the control sequence used with
+\sty{polyglossia} to switch languages. This means that
+\ics{glsxtrentryfmt}\margm{text} can be used to format \meta{text}
+in the relevant language. Finally, \ics{glsxtrendfor} is used to
+break out of the loop.
+\begin{verbatim}
+\newcommand*{\addfirstlang}[1]{%
+ \TrackLocale{#1}%
+ \edef\thislanguage{%
+ \TrackedLanguageFromDialect\TrackLangLastTrackedDialect}%
+ \IfFileExists{gloss-\thislanguage.ldf}%
+ {%
+ \xifinlist{\thislanguage}{\langlist}{}%
+ {\listxadd{\langlist}{\thislanguage}}%
+ \xGlsXtrSetField{\thislabel}{useri}{text\thislanguage}%
+ \glsxtrendfor
+ }%
+ {}%
+}
+\end{verbatim}
+Once the \ics{forglsentries} loop has found the appropriate
+languages, it's now necessary to iterator over the internal list
+\csfmt{langlist} and set the language:
+\begin{verbatim}
+\forlistloop{\setotherlanguage}{\langlist}
+\end{verbatim}
+The \abbrstyle{long-short-user} style now needs to be adjusted
+to ensure that it picks up the appropriate language change.
+By default this style checks the \field{useri} field, so this needs
+to be changed to \fieldfmt{translation} by redefining
+\ics{glsxtruserfield}:
+\begin{verbatim}
+\renewcommand*{\glsxtruserfield}{translation}
+\end{verbatim}
+The command that governs the format of the parenthetical material
+(\ics{glsxtruserparen}) also needs adjusting. I've changed the
+space before the parenthesis to \ics{cs.space} because some of the
+long fields end with a \idx{full-stop} and this corrects the
+spacing. The \fieldfmt{translation} field is in English,
+so this needs to be encapsulated with \csfmt{textenglish}
+in case the surrounding text is in a different language.
+\begin{verbatim}
+\renewcommand*{\glsxtruserparen}[2]{%
+ \
+ \glsxtrparen{#1%
+ \ifglshasfield{\glsxtruserfield}{#2}{,
+ \textenglish{\glscurrentfieldvalue}}{}}%
+}
+\end{verbatim}
+Next I've defined a convenient command for use in the \catattr{textformat}
+attributes for the custom \code{tug} category:
+\begin{verbatim}
+\newcommand*{\tugtextformat}[1]{%
+ \glsxtrentryfmt{\glslabel}{#1}%
+}
+\end{verbatim}
+This uses \ics{glsxtrentryfmt} to encapsulate the given text
+in the appropriate language command (if provided). When this is set
+as the \catattr{textformat} attribute, it will be used instead of
+\ics{glstextformat}, which means that the entry label can be
+referenced with \cs{glslabel}.
+
+There's a similar command for use in the \catattr{glossnamefont}
+attribute. This is used in the glossary, so the label is referenced
+with \cs{glscurrententrylabel}:
+\begin{verbatim}
+\newcommand*{\tugnameformat}[1]{%
+ \glsxtrentryfmt{\glscurrententrylabel}{#1}%
+}
+\end{verbatim}
+The attributes can now be set to the relevant control sequence name:
+\begin{verbatim}
+\glssetcategoryattribute{tug}{textformat}{tugtextformat}
+\glssetcategoryattribute{tug}{glossnamefont}{tugnameformat}
+\end{verbatim}
+
+This document uses the \glostyle{bookindex} style. This is set in
+the package options:
+\begin{verbatim}
+\usepackage[record,
+ nostyles,
+ stylemods={bookindex},
+ style={bookindex}
+]{glossaries-extra}
+\end{verbatim}
+This style ignores the \field{description} field, so I've provided
+a \idx{postnamehook} to append it in parentheses (with the
+translation, if provided):
+\begin{verbatim}
+\newcommand{\glsxtrpostnametug}{%
+ \ifglshasdesc{\glscurrententrylabel}%
+ {\ (\glossentrydesc{\glscurrententrylabel}%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {, \textenglish{\glscurrentfieldvalue}}%
+ {}%
+ )}%
+ {%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {\ (\textenglish{\glscurrentfieldvalue})}%
+ {}%
+ }%
+}
+\end{verbatim}
+Remember that this hook is included within the \field{name} font
+(provided by the \catattr{glossnamefont} attribute in this case)
+so \csfmt{textenglish} is again used to switch the language to
+English for the translation.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+xelatex sample-usergroups
+bib2gls --group sample-usergroups
+xelatex sample-usergroups
+xelatex sample-usergroups
+\end{verbatim}
+The two pages of the document are shown in
+\figureref{fig:sample-usergroups.pdf}. Since the entries have all
+been referenced on page~1, the location lists are all simply~\qt{1}.
+
+%\lstinputlisting[firstline=5]{../examples/sample-usergroups.tex}
+\begin{lstlisting}[escapechar=|]
+\documentclass{scrreprt}
+
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+
+\usepackage{polyglossia}
+\setmainlanguage[variant=uk]{english}
+\usepackage{tracklang}
+\usepackage{etoolbox}
+
+\usepackage[record,% use bib2gls
+ nostyles,% don't load default styles
+ stylemods={bookindex},
+ style={bookindex}
+]{glossaries-extra}
+
+\glsaddstoragekey{language}{}{\glsentrylanguage}
+\glsaddstoragekey{translation}{}{\glsentrytranslation}
+
+\setabbreviationstyle[tug]{long-short-user}
+
+\GlsXtrLoadResources[
+ src={usergroups}, % data in usergroups.bib
+ check-end-punctuation={name,short},
+ category=tug
+]
+
+\renewcommand*{\glsxtrifcustomdiscardperiod}[2]{%
+ \ifglshasshort{\glslabel}%
+ {%
+ \glsxtrifwasfirstuse{}%
+ {%
+ \GlsXtrIfFieldUndef{shortendpunc}{\glslabel}{#2}{#1}%
+ }%
+ }%
+ {%
+ \GlsXtrIfFieldUndef{nameendpunc}{\glslabel}{#2}{#1}%
+ }%
+}
+
+\newcommand{\langlist}{}%
+
+\newcommand*{\addfirstlang}[1]{%
+ \TrackLocale{#1}%
+ \edef\thislanguage{%
+ \TrackedLanguageFromDialect\TrackLangLastTrackedDialect}%
+ \IfFileExists{gloss-\thislanguage.ldf}%
+ {%
+ \xifinlist{\thislanguage}{\langlist}{}%
+ {\listxadd{\langlist}{\thislanguage}}%
+ \xGlsXtrSetField{\thislabel}{useri}{text\thislanguage}%
+ \glsxtrendfor
+ }%
+ {}%
+}
+
+\forglsentries{\thislabel}{%
+ \glsxtrifhasfield{translation}{\thislabel}%
+ {%
+ % requires glossaries-extra v1.24
+ \glsxtrforcsvfield{\thislabel}{language}{\addfirstlang}%
+ }%
+ {}%
+}
+
+\forlistloop{\setotherlanguage}{\langlist}
+
+\renewcommand*{\glsxtruserfield}{translation}
+
+\renewcommand*{\glsxtruserparen}[2]{%
+ \
+ \glsxtrparen{#1%
+ \ifglshasfield{\glsxtruserfield}{#2}{,
+ \textenglish{\glscurrentfieldvalue}}{}}%
+}
+
+\newcommand*{\tugtextformat}[1]{%
+ \glsxtrentryfmt{\glslabel}{#1}%
+}
+
+\newcommand*{\tugnameformat}[1]{%
+ \glsxtrentryfmt{\glscurrententrylabel}{#1}%
+}
+
+\glssetcategoryattribute{tug}{textformat}{tugtextformat}
+\glssetcategoryattribute{tug}{glossnamefont}{tugnameformat}
+
+\newcommand{\glsxtrpostnametug}{%
+ \ifglshasdesc{\glscurrententrylabel}%
+ {\ (\glossentrydesc{\glscurrententrylabel}%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {, \textenglish{\glscurrentfieldvalue}}%
+ {}%
+ )}%
+ {%
+ \glsxtrifhasfield{translation}{\glscurrententrylabel}%
+ {\ (\textenglish{\glscurrentfieldvalue})}%
+ {}%
+ }%
+}
+
+\begin{document}
+\chapter{Sample}
+\section{First Use}
+\gls{TUG}. \gls{bgTeX}. \gls{latex-br}. \gls{CTeX}.
+\gls{CSTUG}. \gls{DANTE}. \gls{DKTUG}. \gls{EUG}.
+\gls{CervanTeX}. \gls{TirantloTeX}. \gls{GUTenberg}.
+\gls{UKTUG}. \gls{|\greekmono ɛϕτ|}. \gls{MaTeX}. \gls{ITALIC}.
+\gls{ÍsTeX}. \gls{GuIT}. \gls{KTS}. \gls{LTVG}.
+\gls{mxTeX}. \gls{NTG}. \gls{NTUG}. \gls{GUST}. \gls{GUTpt}.
+\gls{VietTUG}. \gls{LUGSA}.
+
+\section{Next Use}
+
+\gls{TUG}. \gls{bgTeX}. \gls{latex-br}. \gls{CTeX}.
+\gls{CSTUG}. \gls{DANTE}. \gls{DKTUG}. \gls{EUG}.
+\gls{CervanTeX}. \gls{TirantloTeX}. \gls{GUTenberg}.
+\gls{UKTUG}. \gls{|\greekmono ɛϕτ|}. \gls{MaTeX}. \gls{ITALIC}.
+\gls{ÍsTeX}. \gls{GuIT}. \gls{KTS}. \gls{LTVG}.
+\gls{mxTeX}. \gls{NTG}. \gls{NTUG}. \gls{GUST}. \gls{GUTpt}.
+\gls{VietTUG}. \gls{LUGSA}.
+
+\printunsrtglossaries
+\end{document}
+\end{lstlisting}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-usergroups.pdf}{2}}
+{\caption{\filefmt{sample-usergroups.pdf}}}
+{fig:sample-usergroups.pdf}
+\end{figure}
+
+\filesection{sample-multi1.tex}
+
+This example uses \exfile{bacteria.bib},
+\exfile{markuplanguages.bib}, \exfile{vegetables.bib}, \exfile{minerals.bib},
+\exfile{animals.bib}, \exfile{chemicalformula.bib},
+\exfile{baseunits.bib} and \exfile{derivedunits.bib}.
+Since there's one or more UTF-8 character, the document requires
+UTF-8 support:
+\begin{verbatim}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\end{verbatim}
+
+The aim of this example document is to have a separate glossary
+(without number lists) for each type of data (bacteria, markup
+languages, vegetables, minerals, animals, chemical formula, base
+units and derived units) and also an
+index listing all referenced entries with number lists as well as
+aliased entries that haven't explicitly been used but the
+cross-reference term as been indexed. This requires
+\begin{codeenv}
+\csopt[recorded and deps and see]{selection}
+\end{codeenv}
+to ensure the aliased entries are selected.
+
+Since I don't need the default \code{main} glossary (I'm providing
+my own custom glossaries) I've used the \styopt{nomain} option to
+suppress its automatic creation, but I do want the \code{index}
+glossary so I've used the \styopt{index} package option. As with the
+other examples, I've used \styopt{nostyles} to suppress the creation
+of the default styles and used \styopt{stylemods} to load the
+particular style packages that I need and use
+\sty{glossaries-extra-stylemods} to patch them. The index needs to
+be in an unnumbered chapter, which is the default for book-like
+styles, but I want the other glossaries in unnumbered sections so
+I've used the \styopt{section} option. I just need to remember to
+switch this before displaying the index:
+\begin{verbatim}
+\usepackage[record,% use bib2gls
+ section,% use \section* for glossary headings
+ postdot,% insert dot after descriptions in glossaries
+ nomain,% don't create 'main' glossary
+ index,% create 'index' glossary
+ nostyles,% don't load default styles
+% load and patch required style packages:
+ stylemods={list,mcols,tree,bookindex}
+]{glossaries-extra}
+\end{verbatim}
+The remaining glossaries need defining:
+\begin{verbatim}
+\newglossary*{bacteria}{Bacteria}
+\newglossary*{markuplanguage}{Markup Languages}
+\newglossary*{vegetable}{Vegetables}
+\newglossary*{mineral}{Minerals}
+\newglossary*{animal}{Animals}
+\newglossary*{chemical}{Chemical Formula}
+\newglossary*{baseunit}{SI Units}
+\newglossary*{derivedunit}{Derived Units}
+\end{verbatim}
+As with \exfile{sample-bacteria.tex} and \exfile{sample-languages.tex}
+I need to set the abbreviation styles before the abbreviations are
+defined:
+\begin{verbatim}
+\setabbreviationstyle[bacteria]{long-only-short-only}
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+\end{verbatim}
+Unlike the \exfile{sample-languages.tex} example, I'm not interested
+in tagging the initials in this case, but I still want to change the
+way the \field{name} field is set with the
+\abbrstyle{long-short-desc} abbreviation style:
+\begin{verbatim}
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+\end{verbatim}
+Remember that this also needs to be set before the abbreviations are
+defined. The \catattr{textformat} and \catattr{glossnamefont}
+attributes may be set after definition:
+\begin{verbatim}
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+\end{verbatim}
+The description font also needs to be set since this will contain
+the long form:
+\begin{verbatim}
+\glssetcategoryattribute{bacteria}{glossdescfont}{bacteriafont}
+\end{verbatim}
+
+The \code{markuplanguage} glossary contains descriptions and some
+long names, so it's better suited to the \glostyle{altlist} style,
+in which case the descriptions would look better if they started
+with a capital letter:
+\begin{verbatim}
+\glssetcategoryattribute{markuplanguage}{glossdesc}{firstuc}
+\end{verbatim}
+Remember that the \glostyle{altlist} style uses the
+\env{description} environment, which is governed by the document
+class (and may be modified by list-related packages). In this case,
+one of the KOMA-Script classes is used, so the list items are
+typeset in sans-serif.
+
+There are various ways of dealing with the duplicated data in the
+index, such as using the \csopt{secondary} option or having a
+separate resource set with a copy \csopt{action}. In this case, I've
+decided to use a dual entry system. Since the entries aren't defined
+using any dual types, I've used \csopt{entry-type-aliases} to
+make \bibgls\ treat them as though they were, and I also need to
+alias the custom \atentryfmt{chemical}, \atentryfmt{unit} and
+\atentryfmt{measurement} entry types:
+\begin{codeenv}
+\csopt[
+ abbreviation=dualindexabbreviation,
+ entry=dualindexentry,
+ symbol=dualindexsymbol,
+ unit=dualindexsymbol,
+ measurement=dualindexsymbol,
+ chemical=dualindexsymbol
+ ]{entry-type-aliases}
+\end{codeenv}
+Note that I haven't aliased the \atentry{index} types as I only want
+these in the index and not replicated in a separate glossary.
+
+The primary entries for the \atentry{dualindexabbreviation} type
+ignore the short form. It would be useful to store it. This could be
+done by copying the \field{short} field with
+\csopt{replicate-fields}. For example,
+\csopt[short=symbol]{replicate-fields}. However, this will cause the
+\field{symbol} field to be set for both the primary and dual
+entries, which will cause an unwanted duplication if the dual
+entries are displayed using a glossary style that shows the
+\field{symbol} field. Another field (such as \field{user1}) could be
+used instead or \gls{bibglsnewdualindexabbreviation} could be
+defined before \ics{GlsXtrLoadResources}:
+\begin{verbatim}
+\newcommand{\bibglsnewdualindexabbreviation}[7]{%
+ \longnewglossaryentry*{#1}{%
+ name={\protect\bibglsuselongfont{#4}{\glscategory{#2}}},%
+ symbol={\protect\bibglsuseabbrvfont{#5}{\glscategory{#2}}},%
+ category={index},#3}{}%
+}
+\end{verbatim}
+However, this will affect all \atentry{dualindexabbreviation} entry
+types, but it's not necessary for the bacteria abbreviations.
+Instead it's simpler to just keep a record of the dual label so that
+the short form can be obtained from the dual entry:
+\begin{codeenv}
+\csopt{dual-field}
+\end{codeenv}
+
+By default, the \atentry{dualindexabbreviation} entry type falls back on the
+\field{short} field if the \field{name} is omitted. In this case I
+want it to fall back on the \field{long} field instead.
+\begin{codeenv}
+\csopt[long]{abbreviation-name-fallback}
+\end{codeenv}
+Remember that the sort fallback for abbreviations is still \field{short} (but can be
+changed with \csopt{abbreviation-sort-fallback}), but I've changed
+the sort fallback for symbols:
+\begin{codeenv}
+\csopt[name]{symbol-sort-fallback}
+\end{codeenv}
+I also need to alias the custom fields (especially for those in the
+\exfile{chemicalformula.bib}, \exfile{baseunits.bib} and
+\exfile{derivedunits.bib} files):
+\begin{codeenv}
+\csopt[
+ identifier=category,
+ formula=symbol,
+ chemicalname=name,
+ unitname=name,
+ unitsymbol=symbol,
+ measurement=description
+]{field-aliases}
+\end{codeenv}
+There's a slight problem here. This ensures that the entries defined
+in \exfile{chemicalformula.bib} have a \field{name} and
+\field{symbol} field, which are swapped round for the dual
+(according to the default \csopt{dual-indexsymbol-map}) but these
+entries don't have a \field{description} field. Since I'd like to
+use the \glostyle{mcolalttreegroup} style, this will end up with
+the odd appearance of the formula (stored in the \field{name} field for the
+dual) followed by the chemical name (stored in the \field{symbol}
+field for the dual) in parenthesis. This is default \meta{name}
+(\meta{symbol}) \meta{description} format for the style. I've fixed
+this by locally redefining \ics{glsxtralttreeSymbolDescLocation} for
+just that glossary:
+\begin{verbatim}
+\printunsrtglossary*[type=chemical,style=mcolalttreegroup]
+{%
+ \renewcommand\glsxtralttreeSymbolDescLocation[2]{%
+ \glossentrysymbol{#1}\glspostdescription\glsxtrAltTreePar
+ }%
+ \renewcommand*{\glstreenamefmt}[1]{#1}%
+ \renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}%
+}
+\end{verbatim}
+I've also redefined \cs{glstreenamefmt} to prevent the names
+appearing in bold, which means I also need to redefine
+\cs{glstreegroupheaderfmt} to keep the headers bold.
+
+All the \atentryfmt{dualindex\meta{type}} entry types provide a primary
+entry that behaves like \atentry{index}. The secondary behaves like
+\atentryfmt{\meta{type}}. This means that the primaries are
+conveniently gather together with all the unaliased \atentry{index}
+entries, so the primary entry type needs to be set to \code{index}:
+\begin{codeenv}
+\csopt[index]{type}
+\end{codeenv}
+The dual entry type depends on the entry's category. Since I've
+defined my custom glossaries with a label that matches the
+custom \fieldfmt{identifier} field, I can both alias this custom field
+to the \field{category} field and also set \csopt{dual-type} so that
+it matches the category:
+\begin{codeenv}
+\csopt[identifier=category]{field-aliases},
+\csopt[same as category]{dual-type}
+\end{codeenv}
+The primary entries (in the \code{index} glossary) need to be sorted
+alphabetically, and since the document is in English I'm sorting
+according to that language (identified by the language code
+\code{en}), but I also want to make sure that all the primary
+entries are sorted by the \field{name} field to avoid discrepancies
+in the fallback value for the \field{sort} field:
+\begin{codeenv}
+\csopt[en]{sort},
+\csopt[name]{sort-field}
+\end{codeenv}
+With \csopt[long]{abbreviation-name-fallback} now set,
+this means that \emph{Coxiella burnetii} comes after
+\emph{Clostridium tetani} in the index. I haven't changed the sort
+field for the dual entries, so in that case the
+\csopt{abbreviation-sort-fallback} and \csopt{symbol-sort-fallback}
+settings will be used with the duals. This means that
+\emph{C.\ burnetii} is between \emph{C.\ botulinum} and \emph{C.\
+perfringens} rather than after \emph{C.\ tetani}.
+
+I'd like to sort the dual entries according to a letter-number rule
+(as for the above \exfile{sample-chemical.tex} and \exfile{sample-units3.tex}
+examples)
+but this would order \qt{b\'ilinite} after \qt{biotite} in the
+\code{minerals} glossary, so instead I'm also using the English sort
+rule for the duals, but with the numbers padded:
+\begin{codeenv}
+\csopt[en]{dual-sort},
+\csopt[2]{dual-sort-number-pad},
+\end{codeenv}
+This method doesn't work as well as the method used in
+\exfile{sample-chemical.tex} as it doesn't separate the capitals,
+digits and lower case characters in the way that can be achieved with the
+letter-number methods. An improvement can be made by changing the
+break-points. I could use \csopt[upper-upper]{dual-break-at} but
+this would put \qt{seal} before \qt{sea lion} in the \code{animal}
+glossary, so instead I've used:
+\begin{codeenv}
+\csopt[upper-upper-word]{dual-break-at}
+\end{codeenv}
+This now puts \qt{sea lion} before \qt{seal}. Unfortunately the word
+break points will cause a break at the markers used to indicate
+positive and negative numbers that are inserted with
+\csopt{dual-sort-number-pad}, so these need to be changed to
+something that won't cause them to be discarded:
+\begin{codeenv}
+\csopt[0]{dual-sort-pad-minus},
+\csopt[1]{dual-sort-pad-plus}
+\end{codeenv}
+
+The document loads \sty{hyperref} which means that all the \cs{gls}
+references will create hyperlinks. Since the primaries are in the
+index, the default prefixes mean that, for example,
+\verb|\gls{svg}| links to the \qt{scalable vector graphics} item in
+the index rather than to the abbreviation \qt{SVG} in the
+\code{markuplanguage} glossary. There are two alternatives: change
+\verb|\gls{svg}| to \verb|\gls{dual.svg}| or change the default
+prefixes, which is the more convenient approach as is the one used
+here:
+\begin{codeenv}
+\csopt[idx.]{label-prefix},
+\csopt[\empty]{dual-prefix}
+\end{codeenv}
+Now \verb|\gls{svg}| refers to the dual abbreviation \qt{SVG} and
+\verb|\gls{idx.svg}| refers to the primary entry \qt{scalable vector
+graphics}. Unfortunately this means that the records created with
+\verb|\gls{svg}| now refer to the dual abbreviation and will end up
+being displayed in the glossary instead of the index. This can be
+fixed with:
+\begin{codeenv}
+\csopt[primary]{combine-dual-locations}
+\end{codeenv}
+Which transfers the dual entry locations to the corresponding
+primary.
+
+The other problem is the cross-references in the \field{description}
+fields. Since the labels don't start with \idprefix{dual} \bibgls\
+will assume the refer to the primary entries, which means that
+\idprefixfmt{idx} (the value of \csopt{label-prefix}) will be
+inserted. This means that they'll link to the index rather than the
+glossary entry. It also means that the cross-references where the
+dual is an abbreviation won't behave like an abbreviation as the
+reference is to the primary (non-abbreviation) entry. This can be
+fixed by setting \csopt{cs-label-prefix} to the same value as
+\csopt{dual-prefix}:
+\begin{codeenv}
+\csopt[\empty]{cs-label-prefix}
+\end{codeenv}
+The index is displayed using the \glostyle{bookindex} style. This
+doesn't show the description or symbol by default, but it would be
+useful to include the symbol in parentheses after the name. This can
+be done by redefining \ics{glsxtrbookindexname}:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}%
+}
+\end{verbatim}
+However the chemical forumlae look a little odd in parentheses
+(especially those that contain parenthetical parts) but this can be
+fixed by adding a category check:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrysymbol{#1})}%
+ }%
+ {}%
+}
+\end{verbatim}
+Unfortunately \ics{glossentrysymbol} doesn't pick up the
+\catattr{glossnamefont} attribute, so if the short form of the
+abbreviations is saved in the \field{symbol} field, using one of the
+methods discussed above, then the custom \csfmt{bacteriafont} won't
+be applied. A simple solution is to use \ics{glossentrynameother}
+instead:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrynameother{#1}{symbol})}%
+ }%
+ {}%
+}
+\end{verbatim}
+However, since I decided not to store the short form in the
+\field{symbol} field and just saved the dual entry label instead, I
+need to lookup the short form from the dual entry:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrynameother{#1}{symbol})}%
+ }%
+ {%
+ \glsifcategory{#1}{markuplanguage}%
+ {%
+ \glsxtrifhasfield{short}{\glsxtrusefield{#1}{dual}}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+ }%
+}
+\end{verbatim}
+Not all of the markup languages are abbreviations so this uses
+\ics{glsxtrifhasfield} to check if the \field{short} field is set.
+The dual entry's label is easily obtained because \csopt{dual-field}
+has provided the \fieldfmt{dual} internal field and set it to the
+corresponding label.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-multi1
+bib2gls --group sample-multi1
+pdflatex sample-multi1
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-multi1.pdf}
+and \figureref{fig:sample-multi1.pdf2}.
+
+\lstinputlisting[firstline=5]{../examples/sample-multi1.tex}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-multi1.pdf}{4}}
+{\caption{\filefmt{sample-multi1.pdf} (pages~1 to~4)}}
+{fig:sample-multi1.pdf}
+\end{figure}
+
+\begin{figure}
+\figcontents
+{\pdftwocol[5]{../examples/sample-multi1.pdf}{8}}
+{\caption{\filefmt{sample-multi1.pdf} (pages~5 to 8)}}
+{fig:sample-multi1.pdf2}
+\end{figure}
+
+\filesection{sample-multi2.tex}
+
+This example is an alternative approach to
+\exfile{sample-multi1.tex}. Instead of using dual entry types to
+define entries that appear in both a glossary and the index, this
+example makes use of \csopt{record-label-prefix} to reselect the
+recorded entries for the index. This is more complicated but it
+allows the entries that have natural word ordering to use a locale
+sort method while the entries that are symbolic can use one of the
+letter-number sort methods.
+
+This document uses some additional \ext{bib} files to the previous
+example, so it has extra glossaries, which all need to be defined:
+\begin{verbatim}
+\newglossary*{bacteria}{Bacteria}
+\newglossary*{markuplanguage}{Markup Languages}
+\newglossary*{vegetable}{Vegetables}
+\newglossary*{mineral}{Minerals}
+\newglossary*{animal}{Animals}
+\newglossary*{chemical}{Chemical Formula}
+\newglossary*{baseunit}{SI Units}
+\newglossary*{measurement}{Measurements}
+\newglossary*{film}{Films}
+\newglossary*{book}{Books}
+\newglossary*{person}{People}
+\newglossary*{mediacontrol}{Media Control Symbols}
+\newglossary*{information}{Information Symbols}
+\newglossary*{weather}{Weather Symbols}
+\end{verbatim}
+Note that this is a total of 15 (including the \code{index})
+glossaries. With the \ics{makeglossaries} method, this would require
+16 write registers (including the write register used to create the
+indexing style file), and a total of $15\times3 + 1 = 46$ associated
+files. (This doesn't include the standard \ext{aux} file and the
+\ext{out} file created by \sty{hyperref}.) With \bibgls, no
+additional write registers are required and the number of associated
+\bibgls\ files is equal to the number of resource commands plus the
+transcript file (in this example, $9+1=10$).
+
+Since this document requires \exfile{people.bib}, \exfile{books.bib}
+and \exfile{films.bib} it also requires the files that
+supply the definitions of the custom commands
+(\exfile{no-interpret-preamble.bib} and either
+\exfile{interpret-preamble.bib} or \exfile{interpret-preamble2.bib})
+to ensure the custom commands are provided both for the document and
+for \bibgls's interpreter.
+
+The first resource set to be loaded simply reads
+\exfile{no-interpret-preamble.bib} with the preamble interpreter
+switched off:
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[no-interpret-preamble]{src},
+ \csopt[false]{interpret-preamble}
+}
+\end{codeenv}
+This ensures that \LaTeX\ can pick up the provided commands and
+prevents them from being added to the interpreter.
+
+The \exfile{people.bib} file is the next to be loaded with
+\exfile{interpret-preamble.bib}. This is loaded separately from the
+other resources as this needs the \field{name} field to be copied to
+\field{first} (if not already set), as in the
+\exfile{sample-people.tex} file. By having a separate resource set,
+this setting doesn't affect the other entries. I've also converted
+the date fields so that I can customise the format in the document.
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[interpret-preamble,people]{src},
+ \csopt[
+ identifier=category,
+ born=user1,
+ died=user2,
+ othername=user3
+ ]{field-aliases},
+ \csopt[name=\marg{first}]{replicate-fields},
+ \csopt[person]{type},
+ \csopt[false]{save-locations}
+ \csopt[user1,user2]{date-fields},
+ \csopt[d MMM y G]{date-field-format}
+}
+\end{codeenv}
+As with the \exfile{sample-people.tex} document, I need to use the
+\longarg{break-space} switch to convert the \idx{nbspchar} to a
+normal breakable space so that it matches the given format. I've
+loaded the \sty{datetime2} package:\footnote{The
+\styoptfmt{en-GB} option to \sty{datetime2} also requires that
+\styfmt{datetime2-english} must be installed.}
+\begin{verbatim}
+\usepackage[en-GB]{datetime2}
+\end{verbatim}
+so that I can use \ics{DTMdisplaydate} to adjust the formatting:
+\begin{verbatim}
+\newcommand*{\bibglsdate}[7]{\DTMdisplaydate{#1}{#2}{#3}{#4}}
+\end{verbatim}
+This needs to go before the \idx{resourceset} is loaded. Note that
+the \styoptfmt{en-GB} option identifies the document locale as
+\code{en-GB} (since there are no language packages loaded).
+
+Note that unlike \exfile{sample-people.tex} which had
+\csopt[people]{category}, this document obtains the \field{category} field
+from the custom \fieldfmt{identifier} field, which in this case
+has the value \code{person}. This means that the category hooks from
+\exfile{sample-people.tex} need to be renamed to reflect the
+different category label:
+\begin{verbatim}
+\newcommand*{\glsxtrpostlinkperson}{%
+ \glsxtrifwasfirstuse
+ {%
+ \ifglshasfield{user3}{\glslabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+ }%
+ {}%
+}
+
+\newcommand*{\glsxtrpostnameperson}{%
+ \ifglshasfield{user3}{\glscurrententrylabel}%
+ {\space(\glscurrentfieldvalue)}%
+ {}%
+}
+
+\newcommand*{\glsxtrpostdescperson}{%
+ \ifglshasfield{user1}{\glscurrententrylabel}
+ {% born
+ \space(\glscurrentfieldvalue\,--\,%
+ \ifglshasfield{user2}{\glscurrententrylabel}
+ {% died
+ \glscurrentfieldvalue
+ }%
+ {}%
+ )%
+ }%
+ {}%
+}
+\end{verbatim}
+The other \ext{bib} files that require locale sorting can now be
+loaded, but remember that the abbreviation style settings must be
+set first since this resource set includes abbreviations:
+\begin{verbatim}
+\setabbreviationstyle[bacteria]{long-only-short-only}
+\setabbreviationstyle[markuplanguage]{long-short-desc}
+
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glsabbrvfont{\the\glsshorttok}\space
+ \glsxtrparen{\glslongfont{\the\glslongtok}}%
+}
+\end{verbatim}
+Now the resource set can be loaded:
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[bacteria,markuplanguages,vegetables,
+ minerals,animals,books,films]{src},
+ \csopt[identifier=category]{field-aliases},
+ \csopt[same as category]{type},
+ \csopt[false]{save-locations}
+}
+\end{codeenv}
+The semantic markup command and attributes are as for
+\exfile{sample-multi1.tex}:
+\begin{verbatim}
+\newcommand{\bacteriafont}[1]{\emph{#1}}
+\glssetcategoryattribute{bacteria}{textformat}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont}
+\glssetcategoryattribute{bacteria}{glossdescfont}{bacteriafont}
+\glssetcategoryattribute{markuplanguage}{glossdesc}{firstuc}
+\end{verbatim}
+Similarly for the books:
+\begin{verbatim}
+\newcommand{\bookfont}[1]{\emph{#1}}
+\glssetcategoryattribute{book}{textformat}{bookfont}
+\glssetcategoryattribute{book}{glossnamefont}{bookfont}
+\end{verbatim}
+(as for \exfile{sample-media.tex}) and for films:
+\begin{verbatim}
+\newcommand{\filmfont}[1]{\emph{#1}}
+\glssetcategoryattribute{film}{textformat}{filmfont}
+\glssetcategoryattribute{film}{glossnamefont}{filmfont}
+\end{verbatim}
+
+Next come the chemical formulae:
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[chemicalformula]{src},
+ \csopt[chemical=symbol]{entry-type-aliases},
+ \csopt[
+ identifier=category,
+ formula=name,
+ chemicalname=description,
+ ]{field-aliases},
+ \csopt[chemical]{type},
+ \csopt{set-widest},
+ \csopt[letternumber-case]{sort},
+ \csopt[name]{symbol-sort-fallback},
+ \csopt[false]{save-locations}
+}
+\end{codeenv}
+and the \idxpl{SIunit}, which are now combined into a single
+glossary:
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ src={baseunits,derivedunits},
+ \csopt[measurement=symbol,unit=symbol]{entry-type-aliases},
+ field-aliases={
+ unitname=description,
+ unitsymbol=symbol,
+ measurement=name
+ },
+ category={measurement},
+ type={measurement},
+ set-widest,
+ symbol-sort-fallback={name},
+ save-locations=false
+}
+\end{codeenv}
+Here the \field{name} field is obtained from the custom
+\fieldfmt{measurement} field. Since this contains a word, the
+default locale sort is appropriate. I've locally redefined
+\ics{glsxtralttreeSymbolDescLocation} to place the symbol in
+parentheses after the description:
+\begin{verbatim}
+\printunsrtglossary*[type=measurement,style=alttree,nogroupskip]
+{%
+ \renewcommand{\glsxtralttreeSymbolDescLocation}[2]{%
+ \glossentrydesc{#1}%
+ \ifglshassymbol{#1}{\space(\glossentrysymbol{#1})}{}%
+ \glspostdescription\glstreeprelocation
+ \glsxtrAltTreePar
+ }%
+}
+\end{verbatim}
+
+The base units are replicated in the \code{baseunit} glossary, this
+time with the \field{name} field obtained from the custom
+\fieldfmt{unitsymbol} field. This means that I need to find a way to
+prevent duplicate labels. The simplest method is to use
+\csopt{duplicate-label-suffix}:
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[baseunits]{src},
+ \csopt[unit=symbol]{entry-type-aliases},
+ \csopt[
+ unitname=description,
+ unitsymbol=name
+ ]{field-aliases},
+ \csopt[measurement]{category},
+ \csopt[baseunit]{type},
+ \csopt[.copy]{duplicate-label-suffix},
+ \csopt[name]{symbol-sort-fallback},
+ \csopt[false]{save-locations}
+}
+\end{codeenv}
+I can't use \csopt{set-widest} here as it won't pick up the modified
+label and will instead use the label from the original entry.
+Instead I've used \cs{glsFindWidestTopLevelName} to find it:
+\begin{verbatim}
+\printunsrtglossary*[type=baseunit,style=alttree,nogroupskip]
+{%
+ \glsFindWidestTopLevelName[baseunit]%
+}
+\end{verbatim}
+
+The text symbols from \exfile{miscsymbols.bib} are all loaded in a
+single \idx{resourceset}, where the \field{type} field can be
+obtained from the \field{category}, which in turns is obtained from
+the custom \fieldfmt{identifier} field. Since \bibgls\ doesn't
+recognise any of the symbol commands, I'm sorting according to the
+\field{description} field. (Even if \bibgls\ could determine a
+Unicode value for each of the symbols, sorting by the description
+makes more sense in this case.)
+\begin{codeenv}
+\gls{GlsXtrLoadResources}\oarg{
+ \csopt[miscsymbols]{src},
+ \csopt[
+ identifier=category,
+ icon=name,
+ icondescription=description
+ ]{field-aliases},
+ \csopt[icon=symbol]{entry-type-aliases},
+ \csopt[same as category]{type},
+ \csopt[description]{sort-field},
+ \csopt[false]{save-locations},
+ \csopt{set-widest}
+}
+\end{codeenv}
+
+Finally, all recorded and cross-referenced terms are needed for the
+index. This includes entries that have already been defined in the
+earlier \idxpl{resourceset} (so a guard against duplicates is
+necessary) but it also includes entries from the \exfile{terms.bib}
+file that haven't yet been dealt with. I'd like the index to start
+with a \idx{symbolgroup} containing the icons from
+\exfile{miscsymbols.bib}. This needs to be dealt with separately from
+the rest of the index to keep them together in a single group:
+\begin{codeenv}
+\cs{GlsXtrLoadResources}\oarg{
+ \csopt[miscsymbols]{src},
+ \csopt[recorded no deps]{selection},
+ \csopt[.copy]{duplicate-label-suffix},
+ \csopt[icon=index]{entry-type-aliases},
+ \csopt[
+ identifier=category,
+ icondescription=symbol,
+ icon=name
+ ]{field-aliases},
+ \csopt[index]{type},
+ \csopt[symbol]{sort-field},
+ \csopt[glssymbols]{group}
+}
+\end{codeenv}
+Since I know that there are no parents or cross-references in this
+set of entries I've used \csopt[recorded no deps]{selection} to skip
+the dependency checks. In this \idx{resourceset}, the \field{name}
+field has the symbol command (obtained from the custom
+\fieldfmt{icon} field), and the \field{symbol} field has the symbol
+description (obtained from the custom \fieldfmt{icondescription}
+field), which is used as the sort field. I've set the \field{group}
+label to \code{glssymbols}, which keeps all these entries in a
+single group and the title will be obtained from
+\ics{glssymbolsgroupname}.
+
+Before loading the final \idx{resourceset} \ics{glsxtrlongshortdescname} needs
+to be changed
+so that the abbreviations using the \abbrstyle{long-short-desc}
+style (that is, the abbreviations with the \field{category} set to
+\code{markuplanguage}) have the \field{name} field set to
+\meta{long} (\meta{short}):
+\begin{verbatim}
+\renewcommand*{\glsxtrlongshortdescname}{%
+ \protect\protect\glslongfont{\the\glslongtok}\space
+ \glsxtrparen{\glsabbrvfont{\the\glsshorttok}}%
+}
+\end{verbatim}
+The \abbrstyle{long-only-short-only} style has a similar command,
+but it was only introduced to \sty{glossaries-extra} version 1.25:
+\begin{verbatim}
+\renewcommand*{\glsxtronlyname}{%
+ \protect\glsabbrvonlyfont{\the\glslongtok}%
+}
+\end{verbatim}
+
+The abbreviations all need to be sorted according to the long form:
+\begin{codeenv}
+\csopt[long]{abbreviation-sort-fallback}
+\end{codeenv}
+The custom entry types and fields again need to be aliased
+\begin{codeenv}
+\csopt[
+ chemical=index,
+ measurement=entry,
+ unit=dualentry,
+ icon=index
+]{entry-type-aliases},
+\csopt[
+ identifier=category,
+ formula=symbol,
+ chemicalname=name,
+ unitname=description,
+ unitsymbol=symbol,
+ measurement=name,
+ icon=symbol,
+ icondescription=name
+ ]{field-aliases}
+\end{codeenv}
+The chemical formulae and icons are now defined using
+\atentry{index} with the \field{name} field set to a word form
+(chemical name and icon description). This means
+they're appropriate for alphabetical sorting. (Both \atentry{entry}
+and \atentry{symbol} require the \field{description} field, which is
+why I've aliased \atentryfmt{chemical} and \atentryfmt{icon}
+to \atentry{index} here.) The custom \atentryfmt{measurement} entry
+type has a \field{description} field (obtained from
+\fieldfmt{unitname}), so that's aliased to \atentry{entry} as again
+the \field{name} field is suitable for alphabetical sorting.
+
+I've aliased \atentryfmt{unit} to \atentry{dualentry}
+rather than \atentry{symbol} as I want both the unit name and the
+measurement in the index and I've combined their location lists:
+\begin{codeenv}
+\csopt[both]{combine-dual-locations}
+\end{codeenv}
+Both primary and dual entries need to go in the \code{index}
+glossary:
+\begin{codeenv}
+\csopt[index]{type},
+\csopt[index]{dual-type}
+\end{codeenv}
+
+All \ext{bib} files used in the previous \idxpl{resourceset} are needed
+as well as the \exfile{terms.bib} file:
+\begin{codeenv}
+\csopt[terms,bacteria,markuplanguages,vegetables,minerals,
+ animals,chemicalformula,baseunits,derivedunits,people,
+ films,books,miscsymbols]{src}
+\end{codeenv}
+but this time I also want to select entries that haven't been
+recorded but have a cross-reference to a recorded entry:
+\begin{codeenv}
+\csopt{selection}[recorded and deps and see]
+\end{codeenv}
+Again it's necessary to provide a way to avoid duplicate entry
+labels, which can be done with
+\begin{codeenv}
+\csopt[.copy]{duplicate-label-suffix},
+\end{codeenv}
+as above. However, this will cause the cross-references (from the
+\field{alias} fields) to link to the glossary rather than the index.
+This may or may not confuse the reader. For consistency, it may be
+more suitable to have the cross-reference in the index link to the
+aliased entry in the index rather than in the glossary. I've
+therefore instead used:
+\begin{codeenv}
+ \csopt[idx.]{label-prefix},
+ \csopt[idx.]{record-label-prefix},
+\end{codeenv}
+This means that the entries defined in \exfile{terms.bib} need to be
+referenced with this prefix.
+
+All instances of \cs{gls} will link to the original entry, so all
+entries except for those in the \exfile{terms.bib} file will link to
+the relevant glossary. Those in the \exfile{terms.bib} file will
+link to the index. It's possible to disable the hyperlinks for those
+entries, but the reader may find it useful to jump to the index to
+look up other locations for that entry in the document.
+
+To deal with the identical book and film titles, I'm again using the
+\field{category} to resolve identical sort values:
+\begin{codeenv}
+\csopt[category]{identical-sort-action}
+\end{codeenv}
+For the people who have a \field{first} field, I've decided that
+this would be more appropriate for the index as it's more compact
+than the \field{name}, so here I've done the reverse to earlier and copied the
+\field{first} field (if supplied) into the \field{name} field, but
+since the \field{name} field is already provided the override
+setting needs to be on:
+\begin{codeenv}
+\csopt{replicate-override},
+\csopt[first=name]{replicate-fields}
+\end{codeenv}
+As with \exfile{sample-people.tex} I've provided some custom
+commands to make it easier to locally redefined \cs{sortname} and
+\cs{sortvonname}:
+\begin{verbatim}
+\newcommand*{\swaptwo}[2]{#2, #1}
+\newcommand*{\swapthree}[3]{#2 #3, #1}
+\end{verbatim}
+I've redefined \ics{glsxtrbookindexname} in a similar manner to
+\exfile{sample-multi1.tex} but it has some modifications:
+\begin{verbatim}
+\renewcommand*{\glsxtrbookindexname}[1]{%
+ \glossentryname{#1}%
+ \ifglshassymbol{#1}%
+ {%
+ \glsifcategory{#1}{chemical}%
+ {, \glossentrysymbol{#1}}%
+ {\space(\glossentrynameother{#1}{symbol})}%
+ }%
+ {%
+ \glsifcategory{#1}{film}%
+ {\ (film)}%
+ {}%
+ }%
+}
+\end{verbatim}
+This appends \qt{(film)} to film names. I've chosen this method
+rather than using the \idx{postnamehook} as I only want this in the
+index and not in the list of films.
+
+For some of the entries that are referenced in the document, I've
+appended information in parentheses:
+\begin{verbatim}
+\gls{Al2SO43} (\glsdesc{Al2SO43})
+\end{verbatim}
+This is all right for odd instances, but if this always needs to be done
+on first use, then it's better to use the \idx{postlinkhook}, which
+is what I've done for the icons for comparison:
+\begin{verbatim}
+\newcommand*{\glsxtrpostlinkmediacontrol}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newcommand*{\glsxtrpostlinkinformation}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newcommand*{\glsxtrpostlinkweather}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+\end{verbatim}
+
+I've also provided some custom commands to make it easier to reference
+entries without worrying about the prefixes:
+\begin{codeenv}
+\cs{newcommand}\marg{\csfmt{unit}}\marg{\ics{glssymbol}}
+\cs{newcommand}\marg{\csfmt{measurement}}\marg{\cs{gls}}
+\cs{glsxtrnewgls}\marg{film.}\marg{\csfmt{film}}
+\end{codeenv}
+
+It would be useful to include the page where the entries are defined
+in their corresponding lists. This can be done by redefining the
+general purpose non-category post-name hook
+\ics{glsextrapostnamehook}:
+\begin{verbatim}
+\newcommand*{\glsextrapostnamehook}[1]{%
+ \glsadd[format=hyperbf]{#1}%
+}
+\end{verbatim}
+This needs resetting before the index, since it's redundant to
+record an entry in the index. This will require an extra
+\bibgls+\LaTeX\ system call as this code can't be performed until
+the glossaries have been created.
+
+The complete document code is listed below. The document build is:
+\begin{verbatim}
+pdflatex sample-multi2
+bib2gls --group --break-space sample-multi2
+pdflatex sample-multi2
+bib2gls --group --break-space sample-multi2
+pdflatex sample-multi2
+\end{verbatim}
+The resulting document is shown in \figureref{fig:sample-multi2.pdf},
+\figureref{fig:sample-multi2.pdf2} and \figureref{fig:sample-multi2.pdf3}.
+
+\lstinputlisting[firstline=5]{../examples/sample-multi2.tex}
+
+\begin{figure}
+\figcontents
+{\pdftwocol{../examples/sample-multi2.pdf}{4}}
+{\caption{\filefmt{sample-multi2.pdf} (pages~1 to~4)}}
+{fig:sample-multi2.pdf}
+\end{figure}
+
+\begin{figure}
+\figcontents
+{\pdftwocol[5]{../examples/sample-multi2.pdf}{8}}
+{\caption{\filefmt{sample-multi2.pdf} (pages~5 to 8)}}
+{fig:sample-multi2.pdf2}
+\end{figure}
+
+\begin{figure}
+\figcontents
+{\pdftwocol[9]{../examples/sample-multi2.pdf}{12}}
+{\caption{\filefmt{sample-multi2.pdf} (pages~9 and 12)}}
+{fig:sample-multi2.pdf3}
+\end{figure}
+
+\printcommandsummary
+
+\bibliographystyle{plain}
+\bibliography{bib2gls-cite}
+
+\printunsrtglossary[type=index]
\end{document}
diff --git a/Master/texmf-dist/source/support/bib2gls/src/convertgls2bib.pod b/Master/texmf-dist/source/support/bib2gls/src/convertgls2bib.pod
new file mode 100644
index 00000000000..300bb3e264a
--- /dev/null
+++ b/Master/texmf-dist/source/support/bib2gls/src/convertgls2bib.pod
@@ -0,0 +1,82 @@
+=head1 SYNOPSIS
+
+B<convertgls2bib> [I<option>]+ I<auxfile>
+
+=head1 DESCRIPTION
+
+Converts a B<.tex> file containing glossary definitions using
+commands like B<\newglossaryentry> and B<\newacronym> to
+a B<.bib> file in the format required for B<bib2gls>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help> or B<-h>
+
+Display help message and exit.
+
+=item B<--version> or B<-v>
+
+Display version information and exit.
+
+=item B<--texenc> I<name>
+
+Set the character encoding to I<name> for the input B<.tex> files.
+
+=item B<--bibenc> I<name>
+
+Set the character encoding to I<name> for the output B<.bib> files.
+
+=item B<--ignore-sort>
+
+Ignore the B<sort> field (default).
+
+=item B<--no-ignore-sort>
+
+Don't ignore the B<sort> field.
+
+=item B<--space-sub> I<value>
+
+Substitute spaces in labels with I<value>.
+
+=item B<--locale> I<lang tag>
+
+Use the language resource files associated with the given language
+tag I<lang tag>. If there isn't an appropriate file, the B<en>
+(English) file will be used.
+
+=back
+
+=head1 REQUIRES
+
+Java 7 and a TeX distribution.
+
+=head1 LICENSE
+
+License GPLv3+: GNU GPL version 3 or later
+<http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+=head1 RECOMMENDED READING
+
+The bib2gls manual:
+
+ texdoc bib2gls
+
+The glossaries-extra manual:
+
+ texdoc glossaries-extra
+
+The glossaries manual:
+
+ texdoc glossaries
+
+=head1 AUTHOR
+
+Nicola L. C. Talbot,
+L<http://www.dickimaw-books.com/>
+
+=cut
+
diff --git a/Master/texmf-dist/source/support/bib2gls/src/gls2bib-src.zip b/Master/texmf-dist/source/support/bib2gls/src/gls2bib-src.zip
index a99d9e215aa..1734a891ea2 100644
--- a/Master/texmf-dist/source/support/bib2gls/src/gls2bib-src.zip
+++ b/Master/texmf-dist/source/support/bib2gls/src/gls2bib-src.zip
Binary files differ
diff --git a/Master/texmf-dist/source/support/bib2gls/src/texparser-src.zip b/Master/texmf-dist/source/support/bib2gls/src/texparser-src.zip
index 2d68d27209f..6c29443e9cf 100644
--- a/Master/texmf-dist/source/support/bib2gls/src/texparser-src.zip
+++ b/Master/texmf-dist/source/support/bib2gls/src/texparser-src.zip
Binary files differ