summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-14 03:01:59 +0000
committerNorbert Preining <norbert@preining.info>2020-02-14 03:01:59 +0000
commitdc072b1cb0427be056e747cdbfd6b7a4f1e02e56 (patch)
tree5eb1f068a849be6dd23015ecb42fbc04829386bc /support
parent8379012d545fd6a59fae8842d97d14ec0c2b27d7 (diff)
CTAN sync 202002140301
Diffstat (limited to 'support')
-rw-r--r--support/bib2gls/CHANGES67
-rw-r--r--support/bib2gls/README.md3
-rw-r--r--support/bib2gls/bib2gls-begin.pdfbin719773 -> 726603 bytes
-rw-r--r--support/bib2gls/bib2gls-en.xml84
-rw-r--r--support/bib2gls/bib2gls.124
-rw-r--r--support/bib2gls/bib2gls.pdfbin4449928 -> 4530680 bytes
-rw-r--r--support/bib2gls/convertgls2bib.181
-rw-r--r--support/bib2gls/examples/sample-authors.pdfbin49017 -> 48997 bytes
-rw-r--r--support/bib2gls/examples/sample-bacteria.pdfbin50468 -> 50456 bytes
-rw-r--r--support/bib2gls/examples/sample-chemical.pdfbin50256 -> 50245 bytes
-rw-r--r--support/bib2gls/examples/sample-citations.pdfbin47338 -> 47240 bytes
-rw-r--r--support/bib2gls/examples/sample-constants.pdfbin89416 -> 89404 bytes
-rw-r--r--support/bib2gls/examples/sample-markuplanguages.pdfbin56334 -> 56324 bytes
-rw-r--r--support/bib2gls/examples/sample-maths.pdfbin110958 -> 110939 bytes
-rw-r--r--support/bib2gls/examples/sample-media.pdfbin160811 -> 160838 bytes
-rw-r--r--support/bib2gls/examples/sample-msymbols.pdfbin103819 -> 103806 bytes
-rw-r--r--support/bib2gls/examples/sample-multi1.pdfbin243192 -> 243258 bytes
-rw-r--r--support/bib2gls/examples/sample-multi2.pdfbin317978 -> 318229 bytes
-rw-r--r--support/bib2gls/examples/sample-people.pdfbin47760 -> 47742 bytes
-rw-r--r--support/bib2gls/examples/sample-textsymbols.pdfbin69804 -> 69791 bytes
-rw-r--r--support/bib2gls/examples/sample-textsymbols2.pdfbin67012 -> 67002 bytes
-rw-r--r--support/bib2gls/examples/sample-units1.pdfbin53015 -> 53003 bytes
-rw-r--r--support/bib2gls/examples/sample-units2.pdfbin54758 -> 54745 bytes
-rw-r--r--support/bib2gls/examples/sample-units3.pdfbin41133 -> 41124 bytes
-rw-r--r--support/bib2gls/examples/sample-usergroups.pdfbin23882 -> 24511 bytes
-rw-r--r--support/bib2gls/src/bib2gls-begin.tex36
-rw-r--r--support/bib2gls/src/bib2gls.bib610
-rw-r--r--support/bib2gls/src/bib2gls.pod22
-rw-r--r--support/bib2gls/src/bib2gls.tex841
-rw-r--r--support/bib2gls/src/convertgls2bib.pod92
30 files changed, 1590 insertions, 270 deletions
diff --git a/support/bib2gls/CHANGES b/support/bib2gls/CHANGES
index 8d0335622c..1acb131e0b 100644
--- a/support/bib2gls/CHANGES
+++ b/support/bib2gls/CHANGES
@@ -1,3 +1,70 @@
+v2.0 (2020-02-12):
+
+ * New command line options:
+
+ --trim-only-fields
+ --trim-except-fields
+
+ * New resource option:
+
+ interpret-fields-action
+ prefix-fields
+ append-prefix-field
+ append-prefix-field-cs
+ append-prefix-field-exceptions
+ append-prefix-field-cs-exceptions
+ append-prefix-field-nbsp-match
+ save-sibling-count
+
+ * New values for 'identical-sort-action' option: 'def' and 'use'
+
+ * New value for 'selection' option: 'recorded and deps and see not also'
+
+ * New internal fields: dualprefix, dualprefixplural,
+ dualprefixfirst, dualprefixfirstplural, siblingcount,
+ siblinglist
+
+ * Dual prefix mappings now added if the prefix field is defined
+ (provided by glosssaries-prefix.sty).
+
+ * Interpreter now supports \nobreakspace and it obeys
+ --break-space and --no-break-space in the same way as ~
+
+ * Added support for nonumberlist
+
+ * Bug fixes:
+
+ - corrected interpret-fields
+ - corrected selection={recorded and deps and see}
+ - corrected plural for entries where the name is inherited from
+ the parent
+
+
+ * convertgls2bib:
+
+ - new command line options:
+
+ --ignore-type
+ --no-ignore-type
+ --split-on-type (-p)
+ --no-split-on-type
+ --ignore-category
+ --no-ignore-category
+ --split-on-category (-c)
+ --no-split-on-category
+ --ignore-fields (-f)
+ --overwrite
+ --no-overwrite
+ --preamble-only (-p)
+ --no-preamble-only
+ --index-conversion (-i)
+ --no-index-conversion
+ --absorb-see
+ --no-absorb-see
+
+ - added check for see=[\alsoname] in addition to
+ see=[\seealsoname]
+
v1.9 (2019-04-09):
* manual:
diff --git a/support/bib2gls/README.md b/support/bib2gls/README.md
index ac1077f308..528c5ac725 100644
--- a/support/bib2gls/README.md
+++ b/support/bib2gls/README.md
@@ -9,7 +9,8 @@ Application Home Page: http://www.dickimaw-books.com/software/bib2gls
# Licence
-Copyright (C) 2017-2019 Nicola L. C. Talbot (www.dickimaw-books.com)
+Copyright (C) 2017-2020 Nicola L. C. Talbot (www.dickimaw-books.com)
+
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.
diff --git a/support/bib2gls/bib2gls-begin.pdf b/support/bib2gls/bib2gls-begin.pdf
index 7e1e380497..fb5b191d50 100644
--- a/support/bib2gls/bib2gls-begin.pdf
+++ b/support/bib2gls/bib2gls-begin.pdf
Binary files differ
diff --git a/support/bib2gls/bib2gls-en.xml b/support/bib2gls/bib2gls-en.xml
index de36c1eac0..524ba7ca25 100644
--- a/support/bib2gls/bib2gls-en.xml
+++ b/support/bib2gls/bib2gls-en.xml
@@ -55,7 +55,7 @@ See the manual for further details.</entry>
Don''t warn if internal non-bib fields are found in .bib file.</entry>
<entry key="syntax.warn.unknown.entry.types">{0}
Warn if unknown entry types are found in .bib file.</entry>
-<entry key="syntax.no-warn.unknown.entry.types">{0}
+<entry key="syntax.no.warn.unknown.entry.types">{0}
Don''t warn if unknown entry types are found in .bib file.</entry>
<entry key="syntax.merge.nameref.on">{0} &lt;rule&gt;
@@ -140,6 +140,12 @@ See the manual for further details.</entry>
<entry key="syntax.no.trim.fields">{0}
Don''t trim leading and trailing spaces from fields
(default).</entry>
+<entry key="syntax.trim.only.fields">{0} &lt;list&gt;
+ Only trim leading and trailing spaces from listed fields.
+ (Cumulative.)</entry>
+<entry key="syntax.trim.except.fields">{0} &lt;list&gt;
+ Trim leading and trailing spaces from all fields except those listed.
+ (Cumulative.)</entry>
<entry key="syntax.expand.fields">{0}
Don''t write \glsnoexpandfields to the .glstex file.</entry>
<entry key="syntax.no.expand.fields">{0}
@@ -189,6 +195,7 @@ See the manual for further details.</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.ignore.field">Ignoring field ''{0}'' for entry ''{1}''</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>
@@ -244,6 +251,7 @@ See the manual for further details.</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.parsing.fields">Parsing fields for entry ''{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>
@@ -292,6 +300,11 @@ Defaulting to: {0}.
<entry key="message.created.missing.parent">Created missing parent ''{0}'' for entry ''{1}''</entry>
<entry key="message.found_entry_in_resource">Found entry ''{0}'' in resource set: {1}</entry>
<entry key="message.spawning">Spawning ''{0}'' (from ''{1}'')</entry>
+<entry key="message.append.prefix.space">Appending {0} for prefix field ''{1}''</entry>
+<entry key="message.append.prefix.nospace">Not appending anything for prefix field ''{0}'' (ends with exception character code {1})</entry>
+<entry key="message.append.prefix.cs.nospace">Not appending anything for prefix field ''{0}'' (ends with exception control sequence \{1})</entry>
+<entry key="message.append.prefix.no.excp">Appending {0} for prefix field ''{1}'' (''{2}'' doesn''t fit exception rules)</entry>
+<entry key="message.append.prefix.nbsp.match">Append nbsp for prefix field ''{0}'': matched ''{1}'' in ''{2}'' (pattern ''{3}'')</entry>
<entry key="tag.page">Page</entry>
<entry key="tag.pages">Pages</entry>
@@ -337,6 +350,10 @@ Falling back on ID.</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>
+<entry key="warning.glsadd.in.field">Entry ''{0}'' contains \glsadd in field: {1}
+Consider using a dual entry or add ''{2}'' to one of the cross-referencing fields instead.
+(With a dual entry type, you don''t need to link a primary to its dual
+with \glsadd. They are automatically dependent on each other.)</entry>
<entry key="warning.dir.no.write">Directory not writable: {0}
Using TEXMFOUTPUT instead: {1}</entry>
<entry key="warning.conflicting.range.format">Entry location conflict for formats: {0} and {1}
@@ -379,6 +396,8 @@ Aliased entries must be in the same resource set as their target entries with op
<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.def">Falling back on order of definition</entry>
+<entry key="warning.identical.use">Falling back on order of use</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>
@@ -423,8 +442,12 @@ Value must be a list of size {2,number}</entry>
<entry key="error.invalid.opt.keylist.value">Invalid ''{0}'' value ''{1}'' (within option ''{2}'')</entry>
<entry key="error.invalid.opt.keylist.key">Invalid key ''{0}'' within option ''{1}''</entry>
<entry key="error.invalid.opt.keylist.pattern">Invalid pattern ''{1}'' in {0}='{'{1}'}' (within option ''{2}'')</entry>
+<entry key="error.invalid.opt.pattern">Invalid pattern ''{0}'' in option ''{1}''</entry>
<entry key="error.missing.value">Missing value for: {0}</entry>
<entry key="error.option.clash">Option clash: {0} and {1}</entry>
+<entry key="error.append.prefix.field">Invalid {0} found in {1} (value should be a sequence of characters only)</entry>
+<entry key="error.append.prefix.field.cs">Invalid {0} found in {1} (value should be a sequence of commands only)</entry>
+<entry key="error.append.prefix.field.spacecs">Invalid value ''{0}'' for option {1} (value should be a single command)</entry>
<entry key="error.invalid.dual.map">Invalid mapping: {0}={1}
The size of the first list ({2,number}) is not the same as the size of
the second list ({3,number}).</entry>
@@ -490,23 +513,51 @@ Use {1} for help.</entry>
<entry key="gls2bib.syntax">{0} [&lt;options&gt;] &lt;tex file&gt; &lt;bib file&gt;</entry>
<entry key="gls2bib.syntax.options">Options:</entry>
-<entry key="gls2bib.syntax.version">{0} (or {1}) Display version information</entry>
-<entry key="gls2bib.syntax.help">{0} (or {1}) Display help</entry>
-<entry key="gls2bib.syntax.texenc">{0} &lt;encoding&gt; .tex file encoding</entry>
-<entry key="gls2bib.syntax.bibenc">{0} &lt;encoding&gt; .bib file encoding</entry>
-<entry key="gls2bib.syntax.ignore-sort">{0} Ignore sort field (default)</entry>
-<entry key="gls2bib.syntax.no-ignore-sort">{0} Don''t ignore sort field</entry>
-<entry key="gls2bib.syntax.space-sub">{0} &lt;value&gt; Substitute spaces in labels with &lt;value&gt;</entry>
-<entry key="gls2bib.syntax.locale">{0} &lt;lang tag&gt; Use language resource file given by &lt;lang tag&gt; for messages.</entry>
-<entry key="gls2bib.syntax.silent">{0} Suppress messages.</entry>
-<entry key="gls2bib.syntax.verbose">{0} Normal messages.</entry>
-<entry key="gls2bib.syntax.debug">{0} Debug mode.</entry>
+<entry key="gls2bib.syntax.options.general">General:</entry>
+<entry key="gls2bib.syntax.options.locale">Encoding and Localisation:</entry>
+<entry key="gls2bib.syntax.options.filter">Filtering:</entry>
+<entry key="gls2bib.syntax.options.io">Output Files:</entry>
+<entry key="gls2bib.syntax.options.adjust">Adjustments:</entry>
+<entry key="gls2bib.syntax.version">{0} (or {1}) Display version information</entry>
+<entry key="gls2bib.syntax.help">{0} (or {1}) Display help</entry>
+<entry key="gls2bib.syntax.texenc">{0} &lt;encoding&gt; .tex file encoding</entry>
+<entry key="gls2bib.syntax.bibenc">{0} &lt;encoding&gt; .bib file encoding</entry>
+<entry key="gls2bib.syntax.ignore-sort">{0} Ignore sort field (default)</entry>
+<entry key="gls2bib.syntax.no-ignore-sort">{0} Don''t ignore sort field</entry>
+<entry key="gls2bib.syntax.ignore-type">{0} Omit type field</entry>
+<entry key="gls2bib.syntax.no-ignore-type">{0} Don''t omit type field (default)</entry>
+<entry key="gls2bib.syntax.split-on-type">{0} or {1} Split entries into separate files according to type field</entry>
+<entry key="gls2bib.syntax.no-split-on-type">{0} Don''t split entries according to type field (default)</entry>
+<entry key="gls2bib.syntax.ignore-category">{0} Omit category field</entry>
+<entry key="gls2bib.syntax.no-ignore-category">{0} Don''t omit category field (default)</entry>
+<entry key="gls2bib.syntax.split-on-category">{0} or {1} Split entries into separate files according to category field</entry>
+<entry key="gls2bib.syntax.no-split-on-category">{0} Don''t split entries according to category field (default)</entry>
+<entry key="gls2bib.syntax.ignore-fields">{0} &lt;list&gt; or {1} &lt;list&gt;
+ Ignore the fields contained in the comma-separated &lt;list&gt;</entry>
+<entry key="gls2bib.syntax.overwrite">{0} Overwrite files (default unless {1} or {2})</entry>
+<entry key="gls2bib.syntax.no-overwrite">{0} Don''t overwrite files</entry>
+<entry key="gls2bib.syntax.preamble-only">{0} or {1} Only parse the preamble</entry>
+<entry key="gls2bib.syntax.no-preamble-only">{0} Parse the entire document (default).</entry>
+<entry key="gls2bib.syntax.space-sub">{0} &lt;val&gt; or {1} &lt;val&gt; Substitute spaces in labels with &lt;val&gt;</entry>
+<entry key="gls2bib.syntax.index-conversion">{0} or {1} Convert @entry to @index if no description.</entry>
+<entry key="gls2bib.syntax.no-index-conversion">{0} Don''t convert @entry to @index.</entry>
+<entry key="gls2bib.syntax.absorb-see">{0} Absorb \glssee and \glsxtrindexseealso into the data (default).</entry>
+<entry key="gls2bib.syntax.no-absorb-see">{0} Don''t absorb \glssee and \glsxtrindexseealso into the data.</entry>
+<entry key="gls2bib.syntax.locale">{0} &lt;iso tag&gt; Use language resource file given by &lt;iso tag&gt; for messages.</entry>
+<entry key="gls2bib.syntax.silent">{0} Suppress messages.</entry>
+<entry key="gls2bib.syntax.verbose">{0} Normal messages.</entry>
+<entry key="gls2bib.syntax.debug">{0} Debug mode.</entry>
<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 @dualabbreviationentry.)</entry>
+<entry key="gls2bib.absorbsee">Absorbing {0}</entry>
+<entry key="gls2bib.absorbsee.entryundef">Unable to absorb {0}: can''t find entry ''{1}''</entry>
+<entry key="gls2bib.absorbsee.failed">Unable to absorb {0} into {1}</entry>
+<entry key="gls2bib.discarding.field">Discarding field ''{0}={1}'' for entry {2}</entry>
+
<!--
The following messages are used by various parts of
texparserlib.jar only a few of them may actually be generated by
@@ -529,6 +580,7 @@ converted to @dualabbreviationentry.)</entry>
<entry key="error.syntax.batch.missing_out">Output directory required for batch mode</entry>
<entry key="error.syntax.batch.unknown_format">Unknown format ''{0}''</entry>
<entry key="error.exists">{0} already exists</entry>
+<entry key="error.file_exists.nooverwrite">Can''t write to ''{0}'': file already exists (use {1} to force overwrite)</entry>
<entry key="tex.error.bad_param">Parameter digit 1 to 9 expected. Found ''{0}''</entry>
<entry key="tex.error.no_eg">Missing end group</entry>
@@ -546,9 +598,9 @@ converted to @dualabbreviationentry.)</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.cs_expected">Control sequence expected (found ''{0}'', class ''{1}'')</entry>
<entry key="tex.error.number_expected">Number expected (found ''{0}'')</entry>
<entry key="tex.error.register_undef">Unknown register ''{0}''</entry>
<entry key="tex.error.syntax">Invalid syntax for {0}</entry>
@@ -585,6 +637,8 @@ converted to @dualabbreviationentry.)</entry>
<entry key="latex.class.error">Class {0} Error: {1}</entry>
<entry key="latex.illegal.argtype">Illegal argument type {0}</entry>
<entry key="latex.package.not.loaded">Package ''{0}'' has not been loaded</entry>
+<entry key="latex.error.counter.too.large">Counter too large</entry>
+<entry key="latex.error.counter.out.of.range">Counter value {0} out of valid range ({1})</entry>
<entry key="bibtex.error.missing_value">Missing value</entry>
<entry key="bibtex.error.expecting">Expecting ''{0}''</entry>
@@ -599,7 +653,7 @@ converted to @dualabbreviationentry.)</entry>
<entry key="bibtex.error.illegal_end">Illegal end</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.string_name_undefined">String name ''{0}'' undefined (did you forget braces or quotes?)</entry>
<entry key="bibtex.error.repeated_entry">Repeated entry ''{0}''</entry>
<!-- Package messages -->
diff --git a/support/bib2gls/bib2gls.1 b/support/bib2gls/bib2gls.1
index b106bdcacf..42ece34b41 100644
--- a/support/bib2gls/bib2gls.1
+++ b/support/bib2gls/bib2gls.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.12 (Pod::Simple 3.39)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "BIB2GLS 1"
-.TH BIB2GLS 1 "2019-03-31" "perl v5.28.1" "bib2gls"
+.TH BIB2GLS 1 "2020-02-09" "perl v5.30.1" "bib2gls"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -201,10 +201,10 @@ Use the TeX parser library to interpret known (La)TeX commands
Don't try interpreting (La)TeX commands.
.IP "\fB\-\-break\-space\fR" 4
.IX Item "--break-space"
-Interpret tilde character as a normal space.
+Interpret tilde character and \enobreakspace as a normal space.
.IP "\fB\-\-no\-break\-space\fR" 4
.IX Item "--no-break-space"
-Interpret tilde as a non-breaking space (default).
+Interpret tilde and \enobreakspace as a non-breaking space (default).
.IP "\fB\-\-cite\-as\-record\fR" 4
.IX Item "--cite-as-record"
Treat \fB\ecitation\fR as an ignored record.
@@ -343,10 +343,24 @@ This option automatically implements \fB\-\-record\-count\fR.
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.
+Trim leading and trailing spaces from all fields.
+This option cancels \fB\-\-trim\-only\-fields\fR and \fB\-\-no\-trim\-fields\fR.
+.IP "\fB\-\-trim\-only\-fields\fR \fIlist\fR" 4
+.IX Item "--trim-only-fields list"
+Trim leading and trailing spaces from only the listed fields.
+This option is cumulative but is cancelled by \fB\-\-trim\-fields\fR
+and \fB\-\-no\-trim\-fields\fR. This option may not be used with
+\&\fB\-\-trim\-except\-fields\fR.
+.IP "\fB\-\-trim\-except\-fields\fR \fIlist\fR" 4
+.IX Item "--trim-except-fields list"
+Trim leading and trailing spaces from all fields except those listed.
+This option is cumulative but is cancelled by \fB\-\-trim\-fields\fR
+and \fB\-\-no\-trim\-fields\fR. This option may not be used with
+\&\fB\-\-trim\-only\-fields\fR.
.IP "\fB\-\-no\-trim\-fields\fR" 4
.IX Item "--no-trim-fields"
Don't trim leading and trailing spaces from fields (default).
+This option cancels \fB\-\-trim\-only\-fields\fR and \fB\-\-trim\-fields\fR.
.IP "\fB\-\-expand\-fields\fR" 4
.IX Item "--expand-fields"
Don't write \fB\eglsnoexpandfields\fR to the \fB.glstex\fR file.
diff --git a/support/bib2gls/bib2gls.pdf b/support/bib2gls/bib2gls.pdf
index 25ac8ce15b..2ea6535518 100644
--- a/support/bib2gls/bib2gls.pdf
+++ b/support/bib2gls/bib2gls.pdf
Binary files differ
diff --git a/support/bib2gls/convertgls2bib.1 b/support/bib2gls/convertgls2bib.1
index f7e3f097b7..c5f2aceaa0 100644
--- a/support/bib2gls/convertgls2bib.1
+++ b/support/bib2gls/convertgls2bib.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.12 (Pod::Simple 3.39)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "CONVERTGLS2BIB 1"
-.TH CONVERTGLS2BIB 1 "2018-03-04" "perl v5.28.1" "convertgls2bib"
+.TH CONVERTGLS2BIB 1 "2020-02-11" "perl v5.30.1" "convertgls2bib"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -144,7 +144,7 @@
.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
+commands like \f(CW\*(C`\enewglossaryentry\*(C'\fR and \f(CW\*(C`\enewacronym\*(C'\fR to
a \fB.bib\fR file in the format required for \fBbib2gls\fR.
.SH "OPTIONS"
.IX Header "OPTIONS"
@@ -175,8 +175,77 @@ 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"
+.IP "\fB\-\-ignore\-type\fR" 4
+.IX Item "--ignore-type"
+Omit the \fBtype\fR field. Default if \fB\-\-split\-on\-type\fR.
+.IP "\fB\-\-no\-ignore\-type\fR" 4
+.IX Item "--no-ignore-type"
+Don't omit the \fBtype\fR field. Default unless \fB\-\-split\-on\-type\fR.
+.IP "\fB\-\-split\-on\-type\fR or \fB\-t\fR" 4
+.IX Item "--split-on-type or -t"
+Split the entries into separate files according to the \fBtype\fR field.
+This option automatically implements \fB\-\-ignore\-type\fR and
+\&\fB\-\-no\-overwrite\fR.
+.IP "\fB\-\-no\-split\-on\-type\fR" 4
+.IX Item "--no-split-on-type"
+Don't split the entries into separate files according to the \fBtype\fR
+field (default).
+.IP "\fB\-\-ignore\-category\fR" 4
+.IX Item "--ignore-category"
+Omit the \fBcategory\fR field. Default if \fB\-\-split\-on\-category\fR.
+.IP "\fB\-\-no\-ignore\-category\fR" 4
+.IX Item "--no-ignore-category"
+Don't omit the \fBcategory\fR field. Default unless \fB\-\-split\-on\-category\fR.
+.IP "\fB\-\-split\-on\-category\fR or \fB\-t\fR" 4
+.IX Item "--split-on-category or -t"
+Split the entries into separate files according to the \fBcategory\fR field.
+This option automatically implements \fB\-\-ignore\-category\fR and
+\&\fB\-\-no\-overwrite\fR.
+.IP "\fB\-\-no\-split\-on\-category\fR" 4
+.IX Item "--no-split-on-category"
+Don't split the entries into separate files according to the \fBcategory\fR
+field (default).
+.IP "\fB\-\-ignore\-fields\fR \fIlist\fR or \fB\-f\fR \fIlist\fR" 4
+.IX Item "--ignore-fields list or -f list"
+Ignore all the fields in the comma-separated \fIlist\fR. If the
+list includes \fBsort\fR, \fBtype\fR or \fBcategory\fR it will automatically
+implement the corresponding \fB\-\-ignore\-sort\fR, \fB\-\-ignore\-type\fR or
+\&\fB\-\-ignore\*(--category\fR option.
+.Sp
+This option isn't cumulative. An empty list will clear a previously
+set list but won't undo the sort, type or category ignore options.
+.IP "\fB\-\-overwrite\fR" 4
+.IX Item "--overwrite"
+Overwrite existing .bib files. Default unless \fB\-\-split\-on\-type\fR
+used.
+.IP "\fB\-\-no\-overwrite\fR" 4
+.IX Item "--no-overwrite"
+Don't overwrite existing .bib files. Default if \fB\-\-split\-on\-type\fR
+used.
+.IP "\fB\-\-index\-conversion\fR or \fB\-i\fR" 4
+.IX Item "--index-conversion or -i"
+Any entries that would normally be converted to \f(CW@entry\fR that don't
+have a description or just have the description set to
+\&\f(CW\*(C`\enopostdesc\*(C'\fR or \f(CW\*(C`\eglsxtrnopostpunc\*(C'\fR will be converted to \f(CW@index\fR
+and the \fBdescription\fR field will be omitted.
+.IP "\fB\-\-no\-index\-conversion\fR" 4
+.IX Item "--no-index-conversion"
+Don't use \f(CW@index\fR instead of \f(CW@entry\fR if the description is empty or
+just \f(CW\*(C`\enopostdesc\*(C'\fR or \f(CW\*(C`\eglsxtrnopostpunc\*(C'\fR (default).
+.IP "\fB\-\-absorb\-see\fR" 4
+.IX Item "--absorb-see"
+Absorb \f(CW\*(C`\eglssee\*(C'\fR and \f(CW\*(C`\eglsxtrindexseealso\*(C'\fR into the data (default).
+.IP "\fB\-\-no\-absorb\-see\fR" 4
+.IX Item "--no-absorb-see"
+Don't absorb \f(CW\*(C`\eglssee\*(C'\fR and \f(CW\*(C`\eglsxtrindexseealso\*(C'\fR into the data.
+.IP "\fB\-\-preamble\-only\fR or \fB\-p\fR" 4
+.IX Item "--preamble-only or -p"
+Only parse the document preamble.
+.IP "\fB\-\-no\-preamble\-only\fR" 4
+.IX Item "--no-preamble-only"
+Parse the entire document (default).
+.IP "\fB\-\-space\-sub\fR \fIvalue\fR or \fB\-s\fR \fIvalue\fR" 4
+.IX Item "--space-sub value or -s value"
Substitute spaces in labels with \fIvalue\fR.
.IP "\fB\-\-locale\fR \fIlang tag\fR" 4
.IX Item "--locale lang tag"
@@ -185,7 +254,7 @@ 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.
+Java 8 and a TeX distribution.
.SH "LICENSE"
.IX Header "LICENSE"
License GPLv3+: \s-1GNU GPL\s0 version 3 or later
diff --git a/support/bib2gls/examples/sample-authors.pdf b/support/bib2gls/examples/sample-authors.pdf
index 391edd5c4c..acf6537b34 100644
--- a/support/bib2gls/examples/sample-authors.pdf
+++ b/support/bib2gls/examples/sample-authors.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-bacteria.pdf b/support/bib2gls/examples/sample-bacteria.pdf
index b42fe0ce03..df886866be 100644
--- a/support/bib2gls/examples/sample-bacteria.pdf
+++ b/support/bib2gls/examples/sample-bacteria.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-chemical.pdf b/support/bib2gls/examples/sample-chemical.pdf
index 415f4aa092..1faa304fe1 100644
--- a/support/bib2gls/examples/sample-chemical.pdf
+++ b/support/bib2gls/examples/sample-chemical.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-citations.pdf b/support/bib2gls/examples/sample-citations.pdf
index 26d9b7bb3d..dd6512f7d3 100644
--- a/support/bib2gls/examples/sample-citations.pdf
+++ b/support/bib2gls/examples/sample-citations.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-constants.pdf b/support/bib2gls/examples/sample-constants.pdf
index d650ceed9b..6a0681f54a 100644
--- a/support/bib2gls/examples/sample-constants.pdf
+++ b/support/bib2gls/examples/sample-constants.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-markuplanguages.pdf b/support/bib2gls/examples/sample-markuplanguages.pdf
index f06a07262a..88d0ee81dd 100644
--- a/support/bib2gls/examples/sample-markuplanguages.pdf
+++ b/support/bib2gls/examples/sample-markuplanguages.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-maths.pdf b/support/bib2gls/examples/sample-maths.pdf
index 8a6db9d368..1028059b89 100644
--- a/support/bib2gls/examples/sample-maths.pdf
+++ b/support/bib2gls/examples/sample-maths.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-media.pdf b/support/bib2gls/examples/sample-media.pdf
index 57b1cd6c75..d90d857809 100644
--- a/support/bib2gls/examples/sample-media.pdf
+++ b/support/bib2gls/examples/sample-media.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-msymbols.pdf b/support/bib2gls/examples/sample-msymbols.pdf
index 9ed3e0ce93..c4ac33f154 100644
--- a/support/bib2gls/examples/sample-msymbols.pdf
+++ b/support/bib2gls/examples/sample-msymbols.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-multi1.pdf b/support/bib2gls/examples/sample-multi1.pdf
index 0928aae45a..4d22ee3560 100644
--- a/support/bib2gls/examples/sample-multi1.pdf
+++ b/support/bib2gls/examples/sample-multi1.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-multi2.pdf b/support/bib2gls/examples/sample-multi2.pdf
index a033fb98a1..47af93e5b7 100644
--- a/support/bib2gls/examples/sample-multi2.pdf
+++ b/support/bib2gls/examples/sample-multi2.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-people.pdf b/support/bib2gls/examples/sample-people.pdf
index 0c3e8bdfd8..f362fa06e0 100644
--- a/support/bib2gls/examples/sample-people.pdf
+++ b/support/bib2gls/examples/sample-people.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-textsymbols.pdf b/support/bib2gls/examples/sample-textsymbols.pdf
index 15b504fc05..0d514283b3 100644
--- a/support/bib2gls/examples/sample-textsymbols.pdf
+++ b/support/bib2gls/examples/sample-textsymbols.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-textsymbols2.pdf b/support/bib2gls/examples/sample-textsymbols2.pdf
index 98022c2dac..3dc3f8f9ac 100644
--- a/support/bib2gls/examples/sample-textsymbols2.pdf
+++ b/support/bib2gls/examples/sample-textsymbols2.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-units1.pdf b/support/bib2gls/examples/sample-units1.pdf
index 3d08fa6a9d..ae04bcf249 100644
--- a/support/bib2gls/examples/sample-units1.pdf
+++ b/support/bib2gls/examples/sample-units1.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-units2.pdf b/support/bib2gls/examples/sample-units2.pdf
index e80be3024c..bcf1b75288 100644
--- a/support/bib2gls/examples/sample-units2.pdf
+++ b/support/bib2gls/examples/sample-units2.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-units3.pdf b/support/bib2gls/examples/sample-units3.pdf
index c7d170c578..86b750011f 100644
--- a/support/bib2gls/examples/sample-units3.pdf
+++ b/support/bib2gls/examples/sample-units3.pdf
Binary files differ
diff --git a/support/bib2gls/examples/sample-usergroups.pdf b/support/bib2gls/examples/sample-usergroups.pdf
index 042f277b42..fe807b2eab 100644
--- a/support/bib2gls/examples/sample-usergroups.pdf
+++ b/support/bib2gls/examples/sample-usergroups.pdf
Binary files differ
diff --git a/support/bib2gls/src/bib2gls-begin.tex b/support/bib2gls/src/bib2gls-begin.tex
index f30604e4ba..e9327b04ea 100644
--- a/support/bib2gls/src/bib2gls-begin.tex
+++ b/support/bib2gls/src/bib2gls-begin.tex
@@ -81,6 +81,11 @@
\newcommand{\texparserdefnote}{}
+\newcommand*{\longargfmt}[1]{%
+ \texorpdfstring{\texttt{\longswitch #1}}%
+ {\string-\string-#1}%
+}
+
\GlsXtrLoadResources[
src={bib2gls},
max-loc-diff=3,
@@ -354,11 +359,6 @@
\newrobustcmd{\longswitch}{\string-{}\string-}
-\newcommand*{\longargfmt}[1]{%
- \texorpdfstring{\texttt{\longswitch #1}}%
- {\string-\string-#1}%
-}
-
\newcommand*{\shortargfmt}[1]{%
\texorpdfstring{\texttt{\string-#1}}%
{\string-#1}%
@@ -419,7 +419,10 @@
\pagestyle{headings}
\newcommand{\glossarytitle}{Index}
+\let\orgbibcite\bibcite
+\renewcommand{\bibcite}[2]{}
\externaldocument{bib2gls}
+\let\bibcite\orgbibcite
\newcommand{\addr}[1]{\\\href{https://www.#1/}{\nolinkurl{#1}}}
\title{\styfmt{glossaries-extra} and \bibgls: An Introductory Guide}
@@ -1290,25 +1293,10 @@ will produce
\field{name} = sample , \field{description} = \marg{an example}
}
\end{codeenv}
-However, spaces at the start or end of the value if it's been
-enclosed in braces aren't ignored. For example, if the entry is now
-defined as:
-\begin{codeenv}
-\gls{newglossaryentry}\marg{sample}
-\marg{
- \field{name} = \marg{ sample } , \field{description} = {an example}\incorrect
-}
-\end{codeenv}
-then:
-\begin{codeenv}
-/\gls{gls}\marg{sample}/
-\end{codeenv}
-produces:
-\begin{result}
-/ sample /
-\end{result}
-The spaces in this case have been retained. The unstarred version of
-\gls{longnewglossaryentry} appends extra code to the end of the
+However, spaces at the start or end of the value that's provided as
+an argument (rather than in a \keyvallist) often aren't ignored.
+
+The unstarred version of \gls{longnewglossaryentry} appends extra code to the end of the
description, which removes any trailing spaces (and also the
\gls{postdescriptionhook}). The starred version
\gls{longnewglossaryentry*} (only available with \sty{glossaries-extra})
diff --git a/support/bib2gls/src/bib2gls.bib b/support/bib2gls/src/bib2gls.bib
index ec94ffe5d5..915cc0d110 100644
--- a/support/bib2gls/src/bib2gls.bib
+++ b/support/bib2gls/src/bib2gls.bib
@@ -42,6 +42,7 @@
% @topic -> topic
@preamble{"\providecommand{\dhyphen}{-}
+\providecommand{\longargfmt}[1]{-{}-#1}
\providecommand{\csfmt}[1]{\texttt{\glsbackslash #1}}
\providecommand{\derivfn}[1]{f'(#1)}
\providecommand{\rangestartmark}{\symbol{40}}
@@ -212,7 +213,7 @@
name={categories and attributes}
}
-@topic{regex,
+@index{regex,
name={regular expressions},
text={regular expression},
}
@@ -221,14 +222,14 @@
name={accessibility support}
}
-@topic{conditionals,
+@topic{conditional,
name={conditionals and boolean values},
text={conditional},
plural={conditionals}
}
@indexplural{booleanvals,
text={boolean value},
- alias={conditionals}
+ alias={conditional}
}
@topic{debugging,
@@ -242,9 +243,9 @@
}
@topic{hooks,name={hooks},text={hook}}
-@topic{loops,name={loops},text={loop}}
-@index{iteration,see={loops}}
-@indexplural{handler,seealso={loops}}
+@topic{loop,name={loops},text={loop}}
+@index{iteration,see={loop}}
+@indexplural{handler,seealso={loop}}
@topic{indexing}
@bibglscommand{bibglsnewentry,
@@ -695,7 +696,7 @@
(provided in the final optional argument of commands like \cs{gls})
is inside or outside of the font changing commands in the predefined
abbreviation styles. The default is \optfmt{false}},
- topics={abbreviationcommands,conditionals},
+ topics={abbreviationcommands,conditional},
note={\styfmt{glossaries-extra} v1.02+},
category={command}
}
@@ -703,7 +704,7 @@
@glscommand{glsxtrinsertinsidefalse,
name={\csfmt{gls\-xtr\-insert\-inside\-false}},
description={sets the \cs{ifglsxtrinsertinside} switch to \optfmt{false}},
- topics={abbreviationcommands,conditionals},
+ topics={abbreviationcommands,conditional},
note={\styfmt{glossaries-extra} v1.02+},
category={command}
}
@@ -711,7 +712,7 @@
@glscommand{glsxtrinsertinsidetrue,
name={\csfmt{gls\-xtr\-insert\-inside\-true}},
description={sets the \cs{ifglsxtrinsertinside} switch to \optfmt{true}},
- topics={abbreviationcommands,conditionals},
+ topics={abbreviationcommands,conditional},
note={\styfmt{glossaries-extra} v1.02+},
category={command}
}
@@ -1675,6 +1676,17 @@ extra code to the end of \meta{description}},
category={command}
}
+@glscommand{oldacronym,
+ name={\csfmt{old\-acronym}},
+ user1={\oargm{label}\margm{short}\margm{long}\margm{options}},
+ description={Emulates the way the old \styfmt{glossary} package
+ defined acronyms},
+ topics={definingterms},
+ note={\styfmt{glossaries}},
+ seealso={newacronym},
+ category={command}
+}
+
@mainglscommand{glsxtrnewsymbol,
name={\csfmt{gls\-xtr\-new\-symbol}},
user1={\oargm{\keyvallist}\margm{label}\margm{symbol}},
@@ -2338,6 +2350,48 @@ field\dhyphen locale}},
parent={resourceoptions}
}
+@resourceoption{opt.prefix-fields,
+ name={\csoptfmt{prefix\dhyphen fields}},
+ user1={\meta{list}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@resourceoption{opt.append-prefix-field,
+ name={\csoptfmt{append\dhyphen prefix\dhyphen field}},
+ user1={\meta{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@resourceoption{opt.append-prefix-field-cs,
+ name={\csoptfmt{append\dhyphen prefix\dhyphen field\dhyphen cs}},
+ user1={\meta{cs}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@resourceoption{opt.append-prefix-field-exceptions,
+ name={\csoptfmt{append\dhyphen prefix\dhyphen field\dhyphen exceptions}},
+ user1={\meta{sequence}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@resourceoption{opt.append-prefix-field-cs-exceptions,
+ name={\csoptfmt{append\dhyphen prefix\dhyphen field\dhyphen cs\dhyphen exceptions}},
+ user1={\meta{sequence}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
+@resourceoption{opt.append-prefix-field-nbsp-match,
+ name={\csoptfmt{append\dhyphen prefix\dhyphen field\dhyphen nbsp\dhyphen match}},
+ user1={\meta{pattern}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
@resourceoption{opt.interpret-fields,
name={\csoptfmt{interpret\dhyphen fields}},
user1={\margm{list}},
@@ -2345,6 +2399,13 @@ field\dhyphen locale}},
parent={resourceoptions}
}
+@resourceoption{opt.interpret-fields-action,
+ name={\csoptfmt{interpret\dhyphen fields\dhyphen action}},
+ user1={\margm{value}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
@resourceoption{opt.post-description-dot,
name={\csoptfmt{post\dhyphen description\dhyphen dot}},
user1={\meta{value}},
@@ -2408,6 +2469,13 @@ field\dhyphen locale}},
parent={resourceoptions}
}
+@resourceoption{opt.save-sibling-count,
+ name={\csoptfmt{save\dhyphen sibling\dhyphen count}},
+ user1={\meta{boolean}},
+ category={resourceoption},
+ parent={resourceoptions}
+}
+
@resourceoption{opt.save-original-entrytype,
name={\csoptfmt{save\dhyphen original\dhyphen entrytype}},
user1={\meta{boolean}},
@@ -3426,7 +3494,7 @@ cs}\margm{Glspl-like cs}},
user1={\margm{label}\margm{field}\margm{item}\margm{true}\margm{false}},
description={tests if the given item is in the given field that contains
an \styfmt{etoolbox} internal list},
- topics={listcommands,conditionals,fieldrefcommands},
+ topics={listcommands,conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.12+},
seealso={glsxtrfieldxifinlist,glsxtrfieldlistadd,glsxtrfieldforlistloop,glsxtrfielddolistloop},
category={command}
@@ -3437,7 +3505,7 @@ cs}\margm{Glspl-like cs}},
user1={\margm{label}\margm{field}\margm{item}\margm{true}\margm{false}},
description={tests if the expansion of the given item is in the given field that contains
an \styfmt{etoolbox} internal list},
- topics={listcommands,conditionals,fieldrefcommands},
+ topics={listcommands,conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.12+},
seealso={glsxtrfieldifinlist},
category={command}
@@ -4106,6 +4174,12 @@ and \L/\l\ treated as L/l},
parent={packages}
}
+@package{xkeyval,
+ name={\styfmt{xkeyval}},
+ category={package},
+ parent={packages}
+}
+
@package{textcomp,
name={\styfmt{textcomp}},
category={package},
@@ -4689,6 +4763,13 @@ with forced line breaks in paragraph column formats)},
category={command}
}
+@command{nobreakspace,
+ name={\csfmt{nobreakspace}},
+ description={produces a non-breakable space},
+ note={kernel command\texparserdefnote},
+ category={command}
+}
+
@symbol{aposchar,
name={\code{'} (apostrophe)},
text={\code{'}},
@@ -4951,6 +5032,13 @@ given language},
category={environment}
}
+@environment{env.document,
+ name={\envfmt{document}},
+ description={contains the entire document text},
+ note={kernel command\texparserdefnote},
+ category={environment}
+}
+
@environment{env.description,
name={\envfmt{description}},
description={list-like environment},
@@ -6867,6 +6955,12 @@ long form on \idx{firstuse}. The default definition just uses
parent={categoryattribute}
}
+@categoryattribute{catattr.glosssymbolfont,
+ name={\catattrfmt{gloss\-symbol\-font}},
+ category={categoryattribute},
+ parent={categoryattribute}
+}
+
@categoryattribute{catattr.textformat,
name={\catattrfmt{text\-format}},
category={categoryattribute},
@@ -7534,7 +7628,7 @@ long form on \idx{firstuse}. The default definition just uses
@packageoption{styopt.nosuper,
name={\styoptfmt{nosuper}},
package={glossaries},
- description={prevents the \sty{glossary-super} package (which
+ description={prevents the \isty{glossary-super} package (which
provides the \glostyle{super} styles) from being
automatically loaded},
category={packageoption},
@@ -8054,6 +8148,46 @@ field.},
parent={fields}
}
+@field{field.dualprefix,
+ name={\fieldfmt{dual\-prefix}},
+ description={The dual of the \field{prefix} field. This field
+ isn't provided with a key or associated command, but can be
+ accessed as an internal field},
+ note={\appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@field{field.dualprefixplural,
+ name={\fieldfmt{dual\-prefix\-plural}},
+ description={The dual of the \field{prefixplural} field. This field
+ isn't provided with a key or associated command, but can be
+ accessed as an internal field},
+ note={\appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@field{field.dualprefixfirst,
+ name={\fieldfmt{dual\-prefix\-first}},
+ description={The dual of the \field{prefixfirst} field. This field
+ isn't provided with a key or associated command, but can be
+ accessed as an internal field},
+ note={\appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
+@field{field.dualprefixfirstplural,
+ name={\fieldfmt{dual\-prefix\-first\-plural}},
+ description={The dual of the \field{prefixfirstplural} field. This field
+ isn't provided with a key or associated command, but can be
+ accessed as an internal field},
+ note={\appfmt{bib2gls}},
+ category={bib2glsfield},
+ parent={fields}
+}
+
@field{field.access,
name={\fieldfmt{access}},
description={The replacement text for the \field{name} field.},
@@ -8188,6 +8322,24 @@ field.},
parent={internalfields}
}
+@field{field.siblingcount,
+ name={\fieldfmt{siblingcount}},
+ description={Stores the number of siblings this entry has
+ had selected.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
+@field{field.siblinglist,
+ name={\fieldfmt{siblinglist}},
+ description={A list of labels (in \sty{etoolbox}'s internal list
+ format) of the siblings this entry has had selected.},
+ note={internal field set by \appfmt{bib2gls}},
+ category={internalfield},
+ parent={internalfields}
+}
+
@field{field.originalentrytype,
name={\fieldfmt{original\-entry\-type}},
description={The original entry type before any aliasing was
@@ -8460,10 +8612,14 @@ primary formats, if enabled.},
@field{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}
+ description={Used to suppress the location list for a specific entry.
+ Its value may only be \code{true} or \code{false}.
+ Technically this isn't actually a field as its value isn't saved
+ so it can't be referenced or modified after the entry has been
+ defined.},
+ note={\styfmt{glossaries}},
+ category={basefield},
+ parent={fields}
}
@field{field.prevcount,
@@ -8799,11 +8955,21 @@ primary formats, if enabled.},
name={switches},
text={switch},
plural={switches},
- see={commandlineoptions}
+ see={commandlineoptions,commandlineoptionsgls2bib}
+}
+
+@index{--switch,
+ name={\longargfmt{\meta{switch}}},
+ see={commandlineoptions,commandlineoptionsgls2bib}
}
@index{commandlineoptions,
- name={command line options},
+ name={command line options (\appfmt{bib2gls})},
+ text={command line option}
+}
+
+@index{commandlineoptionsgls2bib,
+ name={command line options (\appfmt{convertgls2bib})},
text={command line option}
}
@@ -9164,6 +9330,20 @@ primary formats, if enabled.},
parent={commandlineoptions}
}
+@switch{switch.trim-only-fields,
+ name={\longargfmt{trim\dhyphen only\dhyphen fields}},
+ user1={\meta{list}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
+@switch{switch.trim-except-fields,
+ name={\longargfmt{trim\dhyphen except\dhyphen fields}},
+ user1={\meta{list}},
+ category={switch},
+ parent={commandlineoptions}
+}
+
@switch{switch.no-trim-fields,
name={\longargfmt{no\dhyphen trim\dhyphen fields}},
user1={},
@@ -9171,6 +9351,206 @@ primary formats, if enabled.},
parent={commandlineoptions}
}
+@switch{switch.gls2bib.help,
+ name={\longargfmt{help}},
+ symbol={\shortargfmt{h}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.version,
+ name={\longargfmt{version}},
+ symbol={\shortargfmt{v}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.debug,
+ name={\longargfmt{debug}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.silent,
+ name={\longargfmt{silent}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.verbose,
+ name={\longargfmt{verbose}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.texenc,
+ name={\longargfmt{texenc}},
+ user1={\meta{encoding}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.bibenc,
+ name={\longargfmt{bibenc}},
+ user1={\meta{encoding}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.ignore-sort,
+ name={\longargfmt{ignore\dhyphen sort}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-ignore-sort,
+ name={\longargfmt{no\dhyphen ignore\dhyphen sort}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.ignore-type,
+ name={\longargfmt{ignore\dhyphen type}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-ignore-type,
+ name={\longargfmt{no\dhyphen ignore\dhyphen type}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.split-on-type,
+ name={\longargfmt{split\dhyphen on\dhyphen type}},
+ symbol={\shortargfmt{t}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-split-on-type,
+ name={\longargfmt{no\dhyphen split\dhyphen on\dhyphen type}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.ignore-category,
+ name={\longargfmt{ignore\dhyphen category}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-ignore-category,
+ name={\longargfmt{no\dhyphen ignore\dhyphen category}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.ignore-fields,
+ name={\longargfmt{ignore\dhyphen fields}},
+ symbol={\shortargfmt{f}},
+ user1={\meta{list}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.split-on-category,
+ name={\longargfmt{split\dhyphen on\dhyphen category}},
+ symbol={\shortargfmt{c}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-split-on-category,
+ name={\longargfmt{no\dhyphen split\dhyphen on\dhyphen category}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.overwrite,
+ name={\longargfmt{overwrite}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-overwrite,
+ name={\longargfmt{no\dhyphen overwrite}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.preamble-only,
+ name={\longargfmt{preamble\dhyphen only}},
+ symbol={\shortargfmt{p}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-preamble-only,
+ name={\longargfmt{no\dhyphen preamble\dhyphen only}},
+ user1={},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.space-sub,
+ name={\longargfmt{space\dhyphen sub}},
+ symbol={\shortargfmt{s}},
+ user1={\meta{replacement}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.locale,
+ name={\longargfmt{locale}},
+ user1={\meta{language tag}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.index-conversion,
+ name={\longargfmt{index\dhyphen conversion}},
+ symbol={\shortargfmt{i}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-index-conversion,
+ name={\longargfmt{no\dhyphen index\dhyphen conversion}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.absorb-see,
+ name={\longargfmt{absorb\dhyphen see}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
+@switch{switch.gls2bib.no-absorb-see,
+ name={\longargfmt{no\dhyphen absorb\dhyphen see}},
+ category={switch},
+ parent={commandlineoptionsgls2bib}
+}
+
@index{lettergroup,
name={letter group}
}
@@ -9681,9 +10061,9 @@ primary formats, if enabled.},
user1={\margm{label}\margm{field}},
description={iterates over the items the given field, which contains
an \styfmt{etoolbox} internal list},
- topics={listcommands,loops,fieldrefcommands},
+ topics={listcommands,loop,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.12+},
- seealso={glsxtrfieldforlistloop,glsxtrfieldifinlist,glsxtrfieldlistadd},
+ seealso={glsxtrfieldforlistloop,glsxtrfieldifinlist,glsxtrfieldlistadd,listbreak},
category={command}
}
@@ -9692,9 +10072,33 @@ primary formats, if enabled.},
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},
- topics={listcommands,loops,fieldrefcommands},
+ topics={listcommands,loop,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.29+},
- seealso={glsxtrfielddolistloop,glsxtrfieldifinlist,glsxtrfieldlistadd},
+ seealso={glsxtrfielddolistloop,glsxtrfieldifinlist,glsxtrfieldlistadd,listbreak},
+ category={command}
+}
+
+@glscommand{glsxtrfieldformatlist,
+ name={\csfmt{gls\-xtr\-field\-format\-list}},
+ user1={\margm{label}\margm{field}},
+ description={formats the items in the given field, which contains
+ an \styfmt{etoolbox} internal list, using the same handler as
+ \ics{DTLformatlist}},
+ topics={listcommands,loop,fieldrefcommands},
+ note={\styfmt{glossaries-extra} v1.42+},
+ seealso={glsxtrfieldforlistloop,glsxtrfielddolistloop,DTLformatlist,glsxtrfieldformatcsvlist},
+ category={command}
+}
+
+@glscommand{glsxtrfieldformatcsvlist,
+ name={\csfmt{gls\-xtr\-field\-format\-csv\-list}},
+ user1={\margm{label}\margm{field}},
+ description={formats the items in the given field, which contains
+ a comma-separated list, using the same handler as
+ \ics{DTLformatlist}},
+ topics={listcommands,loop,fieldrefcommands},
+ note={\styfmt{glossaries-extra} v1.42+},
+ seealso={glsxtrfieldforlistloop,glsxtrfielddolistloop,DTLformatlist,glsxtrfieldformatlist},
category={command}
}
@@ -11076,7 +11480,7 @@ category},
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},
- topics={hooks,conditionals},
+ topics={hooks,conditional},
note={\styfmt{glossaries-extra}},
category={command}
}
@@ -11089,7 +11493,7 @@ category},
if the entry doesn't exist (an error or warning message will
occur and ?? will appear in the document).
This command is not for use in the post-link hooks},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
seealso={GlsXtrIfUnusedOrUndefined,glsxtrifwasfirstuse},
category={command}
@@ -11102,7 +11506,7 @@ category},
hasn't been
used or is undefined, otherwise it does \meta{false}.
This command is not for use in the post-link hooks},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries-extra} v1.34+},
seealso={ifglsused,glsxtrifwasfirstuse},
category={command}
@@ -11145,7 +11549,7 @@ label of the current entry},
description={only for use in the \meta{true} part of
\cs{ifglshasfield} or \cs{glsxtrifhasfield}, this expands to the
field value},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries}},
category={command}
}
@@ -11238,7 +11642,7 @@ field value},
(defined and not empty)
without testing if the entry exists and adds implicit scoping
to \meta{true} and \meta{false}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.19+},
seealso={GlsXtrIfFieldUndef},
category={command}
@@ -11251,7 +11655,7 @@ field value},
(defined and not empty)
without testing if the entry exists and without introducing
an implicit scope},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.19+},
seealso={GlsXtrIfFieldUndef},
category={command}
@@ -11262,7 +11666,7 @@ field value},
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},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.23+},
category={command}
}
@@ -11274,7 +11678,7 @@ field value},
\meta{text} for the given entry, which may not exist. The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.21+},
category={command}
}
@@ -11286,7 +11690,7 @@ doesn't},
fully expands \meta{text} (but not the field value). The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.31+},
category={command}
}
@@ -11298,7 +11702,7 @@ doesn't},
fully expands both the field value and \meta{text}. The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.31+},
category={command}
}
@@ -11309,7 +11713,7 @@ doesn't},
description={tests if the given entry, which must be defined, has the
given field set to a non-empty value},
note={\styfmt{glossaries}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
seealso={glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
}
@@ -11320,7 +11724,7 @@ doesn't},
description={tests if the given entry, which must be defined, has the
\field{symbol} field set to value that's not empty and not
\csfmt{relax}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries}},
seealso={ifglshasdesc,glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
@@ -11331,7 +11735,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{description} field set},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries}},
seealso={ifglshassymbol,ifglshasdescsuppressed},
category={command}
@@ -11342,7 +11746,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{description} field set to \cs{nopostdesc}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries}},
seealso={ifglshasdesc},
category={command}
@@ -11353,7 +11757,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{parent} field set},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -11368,7 +11772,7 @@ doesn't},
field. With \bibgls, a more efficient approach is to
use \csopt{save-child-count} and test the value of
the \field{childcount} field},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -11378,7 +11782,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{short} field set},
- topics={conditionals,fieldrefcommands,abbreviationcommands},
+ topics={conditional,fieldrefcommands,abbreviationcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -11388,7 +11792,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{long} field set},
- topics={conditionals,fieldrefcommands,abbreviationcommands},
+ topics={conditional,fieldrefcommands,abbreviationcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -11398,7 +11802,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{prefix} field set to value that's not empty},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-prefix}},
seealso={ifglshasdesc,glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
@@ -11409,7 +11813,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{prefixplural} field set to value that's not empty},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-prefix}},
seealso={ifglshasdesc,glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
@@ -11420,7 +11824,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{prefixfirst} field set to value that's not empty},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-prefix}},
seealso={ifglshasdesc,glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
@@ -11431,7 +11835,7 @@ doesn't},
user1={\margm{entry label}\margm{true}\margm{false}},
description={tests if the given entry, which must be defined, has the
\field{prefixfirstplural} field set to value that's not empty},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-prefix}},
seealso={ifglshasdesc,glsxtrifhasfield,GlsXtrIfFieldUndef},
category={command}
@@ -11444,7 +11848,7 @@ doesn't},
given field value equal to \meta{string}, where \meta{field label}
is the internal field label (not the key name). No expansion is
performed in the test (which just uses \cs{ifcsstring})},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries} v4.16+},
category={command}
}
@@ -11457,7 +11861,7 @@ doesn't},
given by \meta{cs}, where \meta{field label}
is the internal field label (not the key name). The test
uses \cs{ifdefstrequal}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries} v4.16+},
category={command}
}
@@ -11470,7 +11874,7 @@ doesn't},
given by the control sequence name \meta{cs-name}, where \meta{field label}
is the internal field label (not the key name). The test
uses \cs{ifcsstrequal}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries} v4.16+},
category={command}
}
@@ -11525,7 +11929,7 @@ The value can be referenced in \meta{true} or \meta{false}
with \cs{glscurrentfieldvalue}. The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.31+},
seealso={GlsXtrIfFieldEqNum},
category={command}
@@ -11541,7 +11945,7 @@ The value can be referenced in \meta{true} or \meta{false}
with \cs{glscurrentfieldvalue}. The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.31+},
seealso={GlsXtrIfFieldNonZero,GlsXtrIfFieldCmpNum},
category={command}
@@ -11558,7 +11962,7 @@ The value can be referenced in \meta{true} or \meta{false}
with \cs{glscurrentfieldvalue}. The unstarred
form adds implicit grouping. The starred form (new to v1.39)
doesn't},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra} v1.31+},
seealso={GlsXtrIfFieldNonZero},
category={command}
@@ -11572,7 +11976,7 @@ option, this uses \cs{GlsXtrIfFieldNonZero} to test if the
\field{childcount} field has a non-zero value. The value
can be referenced in \meta{true} or \meta{false} with
\cs{glscurrentfieldvalue}},
- topics={conditionals,fieldrefcommands},
+ topics={conditional,fieldrefcommands},
note={\styfmt{glossaries-extra-bib2gls} v1.31+},
seealso={GlsXtrIfFieldNonZero},
category={command}
@@ -11584,7 +11988,7 @@ can be referenced in \meta{true} or \meta{false} with
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}},
- topics={conditionals,hooks},
+ topics={conditional,hooks},
note={\styfmt{glossaries-extra} v1.23+},
category={command}
}
@@ -11860,7 +12264,7 @@ can be referenced in \meta{true} or \meta{false} with
user1={\margm{location list cs}},
description={iterates over the given internal location list using
the \cs{glsnoidxloclisthandler} handler},
- topics={glossarystylecommands,loops,loclistcommands},
+ topics={glossarystylecommands,loop,loclistcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -11869,7 +12273,7 @@ can be referenced in \meta{true} or \meta{false} with
name={\csfmt{gls\-noidx\-loc\-list\-handler}},
description={the handler used by the internal list loop function used
in \cs{glsnoidxloclist}},
- topics={glossarystylecommands,loops,loclistcommands},
+ topics={glossarystylecommands,loop,loclistcommands},
user1={\margm{location}},
note={\styfmt{glossaries}},
category={command}
@@ -12078,7 +12482,7 @@ letter to \idx{uppercase}},
and performs \code{\cs{glsadd}\oargm{options}} for each entry.
This command isn't suitable for use with \bibgls. Use the
\csopt{selection} option instead},
- topics={loops,indexing},
+ topics={loop,indexing},
note={\styfmt{glossaries}},
category={command}
}
@@ -12092,7 +12496,7 @@ letter to \idx{uppercase}},
the \glsaddopt{format} set to \code{glsignore}.
This command isn't suitable for use with \bibgls. Use the
\csopt{selection} option instead},
- topics={loops,indexing},
+ topics={loop,indexing},
note={\styfmt{glossaries}},
category={command}
}
@@ -12704,7 +13108,7 @@ usual delay},
name={\csfmt{ifglsentryexists}},
user1={\margm{label}\margm{true}\margm{false}},
description={tests if the entry given by \meta{label} exists},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -12748,7 +13152,7 @@ usual delay},
defined (which, with \bibgls, should correspond to the
order obtained from the sort settings given in the
\idx{resourceset} options)},
- topics={glossrefs,loops},
+ topics={glossrefs,loop},
note={\styfmt{glossaries-extra} v1.08+},
category={command}
}
@@ -12759,7 +13163,7 @@ usual delay},
description={as \cs{printunsrtglossary} but performs
\meta{code} first (scoped to localise any assignments within
\meta{code})},
- topics={glossrefs,loops},
+ topics={glossrefs,loop},
note={\styfmt{glossaries-extra} v1.12+},
category={command}
}
@@ -12769,7 +13173,7 @@ usual delay},
user1={},
description={iterates over all non-ignored defined glossaries
and performs \cs{printunsrtglossary} for each one},
- topics={glossrefs,loops},
+ topics={glossrefs,loop},
note={\styfmt{glossaries-extra} v1.08+},
category={command}
}
@@ -12779,7 +13183,7 @@ usual delay},
user1={\margm{label}},
description={performed at each iteration of the internal loop used
by \cs{printunsrtglossary}},
- topics={glossrefs,loops,hooks},
+ topics={glossrefs,loop,hooks},
note={\styfmt{glossaries-extra} v1.21+},
category={command}
}
@@ -12789,7 +13193,7 @@ by \cs{printunsrtglossary}},
description={only allowed within
\cs{printunsrtglossaryentryprocesshook} this command
indicates that the current entry should be skipped},
- topics={glossrefs,loops,hooks},
+ topics={glossrefs,loop,hooks},
note={\styfmt{glossaries-extra} v1.21+},
category={command}
}
@@ -12818,7 +13222,7 @@ hasn't been defined},
user1={\margm{label}\margm{category}\margm{true}\margm{false}},
description={does \meta{true} if the \field{category} field for
the entry given by \meta{label} is \meta{category}},
- topics={conditionals,fieldrefcommands,catattrcommands},
+ topics={conditional,fieldrefcommands,catattrcommands},
note={\styfmt{glossaries-extra}},
category={command}
}
@@ -12830,7 +13234,7 @@ hasn't been defined},
in the comma-separated \meta{list}, where both \meta{label}
and \meta{list} are fully expanded before testing. This test
is designed for \emph{labels} that are fully expandable},
- topics={conditionals,listcommands},
+ topics={conditional,listcommands},
note={\styfmt{glossaries-extra} v1.21+},
category={command}
}
@@ -13013,7 +13417,7 @@ hasn't been defined},
user1={},
description={iterates over all non-ignored defined glossaries
and performs \cs{printglossary} for each one},
- topics={glossrefs,loops},
+ topics={glossrefs,loop},
note={\styfmt{glossaries}},
category={command}
}
@@ -13032,7 +13436,7 @@ hasn't been defined},
user1={},
description={iterates over all non-ignored defined glossaries
and performs \cs{printnoidxglossary} for each one},
- topics={glossrefs,loops},
+ topics={glossrefs,loop},
note={\styfmt{glossaries} v4.04+},
category={command}
}
@@ -13222,7 +13626,7 @@ defined},
@glscommand{glscapturedgroup,
name={\csfmt{glscapturedgroup}},
description={expands to \cs{cs.string}\idx{dollarchar}},
- topics={charcommands,regex},
+ topics={charcommands},
note={\styfmt{glossaries-extra-bib2gls} v1.31+},
category={command}
}
@@ -13429,11 +13833,21 @@ glossary (or the default of \meta{type} is omitted)},
}
@command{seealsoname,
- name={\csfmt{seealsoname}},
+ name={\csfmt{see\-also\-name}},
user1={},
- description={language sensitive \qt{see also} text},
+ description={language sensitive \qt{see also} text (as from v1.42
+ this will be defined to \cs{alsoname} if that command exists)},
topics={fixedtextcommands,glossarystylecommands,loclistcommands},
- note={\styfmt{glossaries-extra} or language packages},
+ note={\styfmt{glossaries-extra}},
+ category={command}
+}
+
+@command{alsoname,
+ name={\csfmt{also\-name}},
+ user1={},
+ description={language sensitive \qt{see also} text},
+ topics={fixedtextcommands},
+ note={language packages},
category={command}
}
@@ -14371,7 +14785,7 @@ location list},
description={used by commands like \cs{glsfmtshort}, this expands
to \meta{true} in page headings and the table of contents,
otherwise it expands to \meta{false}},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries-extra} v1.07+},
category={command}
}
@@ -14442,8 +14856,7 @@ entries in the \glostyle{tree}-like styles},
description={length register used by the tabular styles to specify
the width of the description column},
topics={glossarystylecommands},
- note={\styfmt{glossary-long} and
- \styfmt{glossary-super}},
+ note={\isty{glossary-long} and \isty{glossary-super}},
category={command}
}
@@ -14496,7 +14909,7 @@ paragraph break that retains the hanging indent},
identified by \meta{type} (or the default, if \meta{type}
is omitted) and perform \meta{body} where you can use the
control sequence \meta{cs} to reference the current entry label},
- topics={loops,entryrefcommands},
+ topics={loop,entryrefcommands},
note={\styfmt{glossaries}},
seealso={forallglsentries},
category={command}
@@ -14510,7 +14923,7 @@ paragraph break that retains the hanging indent},
glossaries if the optional argument is omitted) and perform
\meta{body} where you can use the control sequence \meta{cs} to
reference the current entry label},
- topics={loops,glossrefs,entryrefcommands},
+ topics={loop,glossrefs,entryrefcommands},
note={\styfmt{glossaries}},
seealso={forglsentries,forallglossaries},
category={command}
@@ -14524,7 +14937,7 @@ paragraph break that retains the hanging indent},
glossaries if the optional argument is omitted) and performs \meta{body}
where you can use the control sequence \meta{cs} to reference
the current glossary label},
- topics={loops,glossrefs},
+ topics={loop,glossrefs},
note={\styfmt{glossaries}},
category={command}
}
@@ -14537,7 +14950,7 @@ paragraph break that retains the hanging indent},
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},
- topics={loops,fieldrefcommands,listcommands},
+ topics={loop,fieldrefcommands,listcommands},
note={\styfmt{glossaries}},
note={\styfmt{glossaries-extra} v1.24+},
seealso={glsxtrendfor},
@@ -14549,9 +14962,20 @@ paragraph break that retains the hanging indent},
user1={},
description={may be used within the handler macro
of \cs{glsxtrforcsvfield} to prematurely break the loop},
- topics={loops,listcommands},
+ topics={loop,listcommands},
note={\styfmt{glossaries-extra} v1.24+},
- seealso={glsxtrforcsvfield},
+ seealso={glsxtrforcsvfield,listbreak},
+ category={command}
+}
+
+@glscommand{listbreak,
+ name={\csfmt{list\-break}},
+ user1={},
+ description={may be used within the handler macro
+ of \sty{etoolbox}'s internal list loop commands to prematurely break the loop},
+ topics={loop,listcommands},
+ note={\styfmt{etoolbox}},
+ seealso={forlistloop,glsxtrfieldforlistloop,glsxtrfielddolistloop,glsxtrendfor},
category={command}
}
@@ -14560,7 +14984,7 @@ paragraph break that retains the hanging indent},
user1={\margm{type}\margm{true}\margm{false}},
description={tests if the glossary given by \meta{type} exists
and does \meta{true} if it does exists, otherwise does \meta{false}},
- topics={conditionals,glossrefs},
+ topics={conditional,glossrefs},
note={\styfmt{glossaries}},
category={command}
}
@@ -14570,7 +14994,7 @@ paragraph break that retains the hanging indent},
user1={\margm{type}\margm{true}\margm{false}},
description={tests if the glossary given by \meta{type} was
defined as an ignored glossary},
- topics={conditionals,glossrefs},
+ topics={conditional,glossrefs},
note={\styfmt{glossaries} v4.08+},
category={command}
}
@@ -14582,7 +15006,7 @@ paragraph break that retains the hanging indent},
is done, otherwise an error (or warning with
\sty{glossaries-extra}'s \styopt[warn]{undefaction} option) is
triggered},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -14594,7 +15018,7 @@ paragraph break that retains the hanging indent},
is done, otherwise an error (or warning with
\sty{glossaries-extra}'s \styopt[warn]{undefaction} option) is
triggered},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -14606,7 +15030,7 @@ paragraph break that retains the hanging indent},
is done, otherwise an error (or warning with
\sty{glossaries-extra}'s \styopt[warn]{undefaction} option) is
triggered and \meta{else code} is done},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -14618,7 +15042,7 @@ paragraph break that retains the hanging indent},
is done, otherwise an error (or warning with
\sty{glossaries-extra}'s \styopt[warn]{undefaction} option) is
triggered and \meta{else code} is done},
- topics={conditionals,entryrefcommands},
+ topics={conditional,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
}
@@ -14718,7 +15142,7 @@ been assigned a mapping to a language hook label},
\cs{GlsXtrStopUnsetBuffering}. The starred form
(added to v1.31) avoids duplicate labels in the buffer's
internal list},
- topics={entryrefcommands,conditionals},
+ topics={entryrefcommands,conditional},
note={\styfmt{glossaries-extra} v1.30+},
seealso={GlsXtrForUnsetBufferedList},
category={command}
@@ -14730,7 +15154,7 @@ been assigned a mapping to a language hook label},
\idx{firstuseflag} of all the entry whose labels are stored in the
buffer that was started with
\cs{GlsXtrStartUnsetBuffering} and then clears the buffer},
- topics={entryrefcommands,conditionals},
+ topics={entryrefcommands,conditional},
note={\styfmt{glossaries-extra} v1.30+},
seealso={GlsXtrForUnsetBufferedList},
category={command}
@@ -14754,7 +15178,7 @@ been assigned a mapping to a language hook label},
user1 = {\margm{label}},
description={unsets the \idx{firstuseflag} so that the entry is
marked as having been used},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries}},
category={command}
}
@@ -14764,7 +15188,7 @@ marked as having been used},
user1 = {\margm{label}},
description={locally unsets the \idx{firstuseflag} so that the entry is
marked as having been used},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries}},
category={command}
}
@@ -14774,7 +15198,7 @@ marked as having been used},
user1 = {\margm{label}},
description={resets the \idx{firstuseflag} so that the entry is
marked as not used},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries}},
category={command}
}
@@ -14784,7 +15208,7 @@ marked as not used},
user1 = {\margm{label}},
description={locally resets the \idx{firstuseflag} so that the entry is
marked as not used},
- topics={conditionals},
+ topics={conditional},
note={\styfmt{glossaries}},
category={command}
}
@@ -14795,7 +15219,7 @@ marked as not used},
environment to deal with the problem of unsetting the
\idx{firstuseflag} either explicitly with \cs{glsunset} or
implicitly through commands like \cs{gls} (does nothing if
- \sty{tabularx} hasn't been loaded)},
+ \isty{tabularx} hasn't been loaded)},
topics={hooks,entryrefcommands},
note={\styfmt{glossaries}},
category={command}
@@ -15684,7 +16108,7 @@ to use in the header (leave empty for default)},
user1={\margm{label}},
description={interrupts the document build and shows the value of
the \idx{firstuseflag} in the transcript},
- topics={debugging,fieldrefcommands,conditionals},
+ topics={debugging,fieldrefcommands,conditional},
note={\styfmt{glossaries}},
category={command}
}
diff --git a/support/bib2gls/src/bib2gls.pod b/support/bib2gls/src/bib2gls.pod
index c1f41701ad..0740dac928 100644
--- a/support/bib2gls/src/bib2gls.pod
+++ b/support/bib2gls/src/bib2gls.pod
@@ -78,11 +78,11 @@ Don't try interpreting (La)TeX commands.
=item B<--break-space>
-Interpret tilde character as a normal space.
+Interpret tilde character and \nobreakspace as a normal space.
=item B<--no-break-space>
-Interpret tilde as a non-breaking space (default).
+Interpret tilde and \nobreakspace as a non-breaking space (default).
=item B<--cite-as-record>
@@ -254,11 +254,27 @@ Don't add unit record count field to entries (default).
=item B<--trim-fields>
-Trim leading and trailing spaces from fields.
+Trim leading and trailing spaces from all fields.
+This option cancels B<--trim-only-fields> and B<--no-trim-fields>.
+
+=item B<--trim-only-fields> I<list>
+
+Trim leading and trailing spaces from only the listed fields.
+This option is cumulative but is cancelled by B<--trim-fields>
+and B<--no-trim-fields>. This option may not be used with
+B<--trim-except-fields>.
+
+=item B<--trim-except-fields> I<list>
+
+Trim leading and trailing spaces from all fields except those listed.
+This option is cumulative but is cancelled by B<--trim-fields>
+and B<--no-trim-fields>. This option may not be used with
+B<--trim-only-fields>.
=item B<--no-trim-fields>
Don't trim leading and trailing spaces from fields (default).
+This option cancels B<--trim-only-fields> and B<--trim-fields>.
=item B<--expand-fields>
diff --git a/support/bib2gls/src/bib2gls.tex b/support/bib2gls/src/bib2gls.tex
index f7ba9c27ef..f8fa262b5b 100644
--- a/support/bib2gls/src/bib2gls.tex
+++ b/support/bib2gls/src/bib2gls.tex
@@ -51,6 +51,7 @@
entrycounter,% enable entry counting
subentrycounter,% enable entry counting
%debug=showtargets,% debugging information
+ %debug=showwrgloss,% debugging information
stylemods={mcols,bookindex},% adjust predefined styles and load glossary-mcols.sty and glossary-bookindex.sty
style=bookindex
]
@@ -92,8 +93,8 @@
\newcommand{\bibglsseealsosep}{\glstreesubitem}
-\renewcommand*{\glsseesep}{, \glstreesubitem\qquad}
-\renewcommand*{\glsseelastsep}{\glstreesubitem\qquad\andname\space}
+\renewcommand*{\glsseesep}{, \glstreesubitem\quad}
+\renewcommand*{\glsseelastsep}{\glstreesubitem\quad\strut\llap{\andname\space}}
\newcommand{\glsxtrpostnameabbreviation}{%
\space(\glsentrylong{\glscurrententrylabel})%
@@ -125,6 +126,11 @@
\glsxtrprovidestoragekey{unsortedprogeny}{}{}
+\newcommand*{\longargfmt}[1]{%
+ \texorpdfstring{\texttt{\longswitch #1}}%
+ {\string-\string-#1}%
+}
+
\GlsXtrLoadResources[
entry-type-aliases={
bibglscommand=dualindexentry,
@@ -143,6 +149,8 @@
exampleabbreviation=abbreviation,
exampleentry=entry
},
+ max-loc-diff={2},
+ see=omit,seealso=omit,alias=omit,
field-aliases={topics=adoptparents},
replicate-fields={name=nametitle,progeny=unsortedprogeny},
field-case-change={nametitle=title},
@@ -170,7 +178,7 @@
dual-prefix={},
dual-type={main},
combine-dual-locations={primary},
- selection={recorded and deps and see},
+ selection={recorded and deps and see not also},
symbol-sort-fallback={name},
sort-label-list={progeny:letter-nocase:glsxtrentryparentname},
strip-missing-parents,
@@ -294,6 +302,10 @@
\newcommand*{\metafilefmt}[3]{%
\filefmt{#1}\discretionary{}{}{}\meta{#2}\discretionary{}{}{}\filefmt{#3}%
}
+\newcommand*{\metametafilefmt}[5]{%
+ \filefmt{#1}\discretionary{}{}{}\meta{#2}\discretionary{}{}{}\filefmt{#3}%
+ \discretionary{}{}{}\meta{#4}\discretionary{}{}{}\filefmt{#5}%
+}
\newcommand*{\primaryresourcefmt}{%
\texorpdfstring
@@ -1011,7 +1023,7 @@
\item \glstarget{##1}{\strut}%
\glsxtrifhasfield{dualid}{##1}%
{%
- \glshyperlink{\glscurrentfieldvalue}%
+ \gls{\glscurrentfieldvalue}%
}%
{%
\gls[hyper=false]{##1}%
@@ -1068,6 +1080,8 @@
\newcommand*{\atentryref}[1]{\gls[format=glsignore]{entry.#1}}
+\newcommand{\convertglsbibarg}[2][\subsection]{\argsection[#1]{gls2bib.#2}}
+
\newcommand{\argsection}[2][\section]{%
\def\switcharg{}%
\def\switchalt{}%
@@ -1093,11 +1107,6 @@
\newrobustcmd{\longswitch}{\string-{}\string-}
-\newcommand*{\longargfmt}[1]{%
- \texorpdfstring{\texttt{\longswitch #1}}%
- {\string-\string-#1}%
-}
-
\newcommand*{\shortargfmt}[1]{%
\texorpdfstring{\texttt{\string-#1}}%
{\string-#1}%
@@ -1109,6 +1118,12 @@
{\string-\string-#1}%
}
+\newcommand*{\convertglsbiblongarg}[1]{%
+ \texorpdfstring
+ {\gls{switch.gls2bib.#1}}%
+ {\string-\string-#1}%
+}
+
\newcommand*{\longargpageref}[1]{%
\longarg{#1} (page~\glsxtrpageref{switch.#1})}%
@@ -1248,20 +1263,22 @@ files}
\newenvironment{codeenv}
{%
+ \GlsXtrStartUnsetBuffering
\renewcommand{\glslinkpresetkeys}{\setkeys{glslink}{noindex}}%
\setupcodeenvfmts
\begin{flushleft}\ttfamily\obeylines\frenchspacing\@vobeyspaces
\parindent\z@\parfillskip\@flushglue\parskip\z@skip
}
- {\end{flushleft}\ignorespacesafterend}
+ {\end{flushleft}\GlsXtrDiscardUnsetBuffering\ignorespacesafterend}
\newenvironment{codeenv*}
{%
+ \GlsXtrStartUnsetBuffering
\setupcodeenvfmts
\begin{flushleft}\ttfamily\obeylines\frenchspacing\@vobeyspaces
\parindent\z@\parfillskip\@flushglue\parskip\z@skip
}
- {\end{flushleft}\ignorespacesafterend}
+ {\end{flushleft}\GlsXtrDiscardUnsetBuffering\ignorespacesafterend}
\begingroup
\renewcommand{\addr}[1]{}
@@ -1299,7 +1316,7 @@ required by not defining unnecessary commands.
Since \bibgls\ can also sort and collate the recorded locations
present in the \ext{aux} file, it can simultaneously by-pass the
-need to use \idx{makeindex} or \idx{xindy}, although \bibgls\
+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 \idx{xindy} rule is needed.)
@@ -1327,7 +1344,7 @@ to convert the entries to the \ext{bib} format required by
\bibgls. See \sectionref{sec:gls2bib} for further details.
The supplementary file \introguide\ is an
-introductory guide to the \sty{glossaries-extra} package, which you
+introductory guide to the \isty{glossaries-extra} package, which you
may prefer to start with if you are unfamiliar with the
\sty{glossaries} and \sty{glossaries-extra} packages.
\end{abstract}
@@ -1414,7 +1431,7 @@ example, the file \filefmt{entries.bib} might contain:
}
\strut
\atentry{symbol}\marg{v,
- \field{name}=\marg{\idx{mshiftchar}\cs{vec}\marg{v}\idx{mshiftchar}},
+ \field{name}=\marg{\idx!{mshiftchar}\cs{vec}\marg{v}\idx!{mshiftchar}},
\field{text}=\marg{\cs{vec}\marg{v}},
\field{description}=\marg{a vector}
}
@@ -2012,7 +2029,9 @@ the corresponding set of \ext{bib} files:
\item any fields that have been identified with
\csopt{interpret-fields} are replaced with their interpreted
- values.
+ values;
+
+ \item check for \field{nonumberlist}.
\end{itemize}
\item The dual version (if appropriate) is created.
\item Records are added to the entry's location list (or transferred
@@ -2112,8 +2131,8 @@ 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.
+stage~4 are processed in separate \idxpl{loop}, otherwise they are
+processed in the same \idx{loop}.
\section{Indexing}
@@ -2442,7 +2461,7 @@ 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
with \csopt[true]{interpret-label-fields} as
it may legitimately contain \LaTeX\ code in the optional tag part
-(such as \cs{seealsoname}).
+(such as \cs{seealsoname} or \cs{alsoname}).
The parser has a different concept of expansion to \TeX\
and will expand some things that aren't expanded by \LaTeX\
@@ -2452,7 +2471,7 @@ in terms of complicated internals).
If you get a \idx{StackOverflowError} while a field is being
interpreted (with a long stack trace that contains repeated file names and
-line numbers) then it's likely you have an infinite loop. For
+line numbers) then it's likely you have an infinite \idx{loop}. For
example, this can be triggered if a field contains \csfmt{foo} that
has been defined as:
\begin{codeenv}
@@ -2543,7 +2562,7 @@ rule that recognises these Unicode characters (for example,
complicated for simple \idxpl!{regex}. The \TeX\ parser 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
-\idx{convertgls2bib}). When the \longarg{debug} mode is on, any
+\idx!{convertgls2bib}). When the \longarg{debug} mode is on, any
warnings or errors triggered by the interpreter will be written to
the transcript prefixed with \code{texparserlib:} (the results of
the conversions will be included in the transcript as informational
@@ -2968,12 +2987,13 @@ for more details about the interpreter.
\argsection{no-break-space}
The interpreter treats a tilde character \idx{nbspchar} as a non-breakable
-space (default).
+space (default). Similarly \ics{nobreakspace} produces a
+non-breakable space character (\hex{00A0}).
\argsection{break-space}
The interpreter treats a tilde character \idx{nbspchar} as a normal
-space.
+space. Similarly \ics{nobreakspace} just produces a space.
\argsection{cite-as-record}
@@ -3680,7 +3700,7 @@ line in the \ext{bib} file or the \csopt{charset} resource option.
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
+(for example in a \idx!{loop}) but can cause a problem if certain fragile
commands are included in the field.
The switch \longarg{no-expand-fields} makes \bibgls\ write
@@ -3703,23 +3723,67 @@ before the entries are defined (that is, before using
\argsection{trim-fields}
-Trim leading and trailing spaces from field values. For example,
+Trim leading and trailing spaces from all field values. For example,
if the \ext{bib} file contains:
\begin{codeenv}
\atentry{entry}\marg{sample,
- \field{name} = \marg{ sample },
+ \field{name} = \marg{sample},
\field{description} = \marg{
an example
}
}
\end{codeenv}
-This will cause spurious spaces. Using \longarg{trim-fields} will
-automatically trim the values before writing the \iext{glstex} file.
+This will cause spurious spaces in the \field{description} field.
+Using \longarg{trim-fields} will automatically trim the values
+before writing the \iext{glstex} file.
+
+Note that even without this trimming option on, fields that are
+set as keys within \cs{longnewglossaryentry} or the optional
+argument of \cs{newabbreviation} will automatically have the leading and
+trailing spaces internally trimmed by the \isty{xkeyval} package, so
+this trimming action only affects fields that aren't set in this
+way, such as the \field{description}, \field{long} and \field{short}
+fields. If you specifically require a space at the start or end of a
+field then use a spacing command, such as \cs{cs.space} or \cs{space}
+or \idx{nbspchar}.
+
+\argsection{trim-only-fields}
+
+Only trim leading and trailing spaces from the fields identified in
+the comma-separated \meta{list}. This option has a cumulative effect
+but is cancelled by \longarg{no-trim-fields} (which switches off all
+trimming) and by \longarg{trim-fields} (which switches on trimming
+for all fields). This option may not be used with
+\longarg{trim-except-fields}.
+
+For example, to only trim the \field{description} field:
+\begin{verbatim}
+bib2gls --trim-only-fields description myDoc
+\end{verbatim}
+
+\argsection{trim-except-fields}
+
+Trim all leading and trailing spaces from fields except those identified in
+the comma-separated \meta{list}. This option has a cumulative effect
+but is cancelled by \longarg{no-trim-fields} (which switches off all
+trimming) and by \longarg{trim-fields} (which switches on trimming
+for all fields). This option may not be used with
+\longarg{trim-only-fields}. See the above note about \sty{xkeyval}.
+
+For example, to trim all fields except \field{short} and
+\field{long}:
+\begin{verbatim}
+bib2gls --trim-except-fields short,long myDoc
+\end{verbatim}
+Or
+\begin{verbatim}
+bib2gls --trim-except-fields short --trim-except-fields long myDoc
+\end{verbatim}
\argsection{no-trim-fields}
-Don't trim any leading or trailing spaces from field values.
-This is the default setting.
+Don't trim any leading or trailing spaces from field values (but see
+the above note about \sty{xkeyval}). This is the default setting.
\argsection{record-count}
@@ -3965,7 +4029,7 @@ 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 \ics{seealsoname} or
\ics{glsxtruseseealsoformat}. Note that, unless you are using
-\idx{xindy}, \ics{glsxtrindexseealso} just does
+\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.
@@ -4000,7 +4064,8 @@ location list. The option may be used in combination with the \field{see} or
\printfields
[%
Don't load \isty{glossaries-accsupp} directly (with \ics{usepackage})
- when using \styfmt{glossaries-extra}. Load using the \styopt{accsupp}
+ when using \styfmt{glossaries-extra}. Load using the
+ \glsadd{idx.accsupp}\styopt{accsupp}
package option instead.
%\begin{codeenv}
%\cs{usepackage}\oarg{\styopt{record},\styopt{accsupp}}\marg{glossaries-extra}
@@ -4702,6 +4767,11 @@ functionally like \atentry{symbol}) or
is functionally like \code{@}\meta{primary} and the dual is
functionally like \code{@}\meta{dual}.
+If the fields provided by the \isty{glossaries-prefix} are defined,
+there will be additional mappings for the special internal fields
+\field{dualprefix}, \field{dualprefixfirst},
+\field{dualprefixplural}, and \field{dualprefixfirstplural}.
+
For example:
\begin{codeenv}
\atentry{dualabbreviationentry}\marg{svm,
@@ -5035,6 +5105,18 @@ The default mappings are:
\item \field{description} $\mapsto$ \field{name}
\item \field{descriptionplural} $\mapsto$ \field{plural}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\end{itemize}
The required fields are as for \atentry{entry}.
For example:
@@ -5092,6 +5174,18 @@ like \atentry{entry}. The default field mapping is:
\begin{itemize}
\item \field{name} $\mapsto$ \field{name}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\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
@@ -5197,6 +5291,18 @@ field mapping is:
\begin{itemize}
\item \field{name} $\mapsto$ \field{name}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\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
@@ -5245,6 +5351,18 @@ field mappings are:
\item \field{symbolplural} $\mapsto$ \field{plural}
\item \field{plural} $\mapsto$ \field{symbolplural}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\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.
@@ -5412,6 +5530,18 @@ field mappings are:
\item \field{longplural} $\mapsto$ \field{plural}
\item \field{short} $\mapsto$ \field{text}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\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
@@ -5493,6 +5623,18 @@ This is like \atentry{dualentry} but the default mappings are:
\item \field{symbol} $\mapsto$ \field{name}
\item \field{symbolplural} $\mapsto$ \field{plural}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\end{itemize}
The \field{name} and \field{symbol} fields are required.
For example:
\begin{codeenv}
@@ -5563,6 +5705,18 @@ field mappings are:
\item \field{duallong} $\mapsto$ \field{long}
\item \field{duallongplural} $\mapsto$ \field{longplural}
\end{itemize}
+If the prefix fields are defined, then the default mappings
+additionally include:
+\begin{itemize}
+\item \field{prefix} $\mapsto$ \field{dualprefix}
+\item \field{prefixplural} $\mapsto$ \field{dualprefixplural}
+\item \field{prefixfirst} $\mapsto$ \field{dualprefixfirst}
+\item \field{prefixfirstplural} $\mapsto$ \field{dualprefixfirstplural}
+\item \field{dualprefix} $\mapsto$ \field{prefix}
+\item \field{dualprefixplural} $\mapsto$ \field{prefixplural}
+\item \field{dualprefixfirst} $\mapsto$ \field{prefixfirst}
+\item \field{dualprefixfirstplural} $\mapsto$ \field{prefixfirstplural}
+\end{itemize}
The required fields are: \field{short}, \field{long},
\field{dualshort} and \field{duallong}.
This includes some new fields: \field{dualshort},
@@ -5982,7 +6136,7 @@ original entry type (before it was aliased to
For example \code{article} or \code{book}.
You can iterate over these internal list fields using
-\ics{glsxtrfielddolistloop} or \ics{glsxtrfieldforlistloop}.
+\glsadd{idx.loop}\ics{glsxtrfielddolistloop} or \ics{glsxtrfieldforlistloop}.
For example:
\begin{codeenv}
\cs{newcommand}\marg{\csfmt{contributorhandler}}[1]\marg{\csfmt{par}\cs{glsentryname}\marg{\#1}}
@@ -6662,9 +6816,9 @@ that don't get seen by \LaTeX.
The \glostyle{alttree} glossary style needs to know the widest
\field{name} (for each level, if hierarchical). This can be set
-using \ics{glssetwidest} provided by the \styfmt{glossary-tree}
+using \ics{glssetwidest} provided by the \isty{glossary-tree}
package (or similar commands like \ics{glsupdatewidest} provided by
-\styfmt{glossaries-extra-stylemods}), but this requires knowing
+\isty{glossaries-extra-stylemods}), but this requires knowing
which name is the widest. Alternatively, 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.
@@ -7056,8 +7210,15 @@ following values are allowed:
\begin{itemize}
\item \optfmt{recorded and deps}: add all recorded entries and
their dependencies (default).
+
\item \optfmt{recorded and deps and see}: as above but will also
-add unrecorded entries whose \field{see} or \field{seealso} field refers to a recorded entry.
+add unrecorded entries whose \field{see}, \field{seealso} or
+\field{alias} field refers to a recorded entry.
+
+\item \optfmt{recorded and deps and see not also}: as above but will
+add unrecorded entries whose \field{see} or \field{alias} (but not
+\field{seealso}) field refers to a recorded entry.
+
\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 or fields identified by
@@ -7065,10 +7226,12 @@ their dependencies. The dependencies include those referenced in the
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 \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
haven't been referenced in the document.
+
\item \optfmt{all}: add all entries found in the \ext{bib} files
supplied in the \csopt{src} option.
\end{itemize}
@@ -7308,7 +7471,7 @@ the value equal to the number of child entries that have been
selected. As from version 1.5, this option also creates
the \field{childlist} field for entries that have children
selected. This field is in \sty{etoolbox}'s internal list
-format and can be iterated over using \ics{glsxtrfieldforlistloop}.
+format and can be iterated over using \glsadd{idx.loop}\ics{glsxtrfieldforlistloop}.
The assignment is done using \ics{GlsXtrSetField} so there's
no associated key. You can test if the field is set and non-zero
@@ -7390,6 +7553,19 @@ grouping. With \sty{glossaries-extra} v1.31+ you can perform a
numerical test with \ics{GlsXtrIfFieldNonZero} or
\ics{GlsXtrIfFieldEqNum}.
+\optsection{save-sibling-count}
+
+This is a boolean option. The default setting is
+\csopt[false]{save-sibling-count}. This is like
+\csopt{save-child-count} but saves the sibling count in
+\field{siblingcount} and the sibling list in \field{siblinglist}.
+As with the child list, the sibling list is in \sty{etoolbox}['s]
+internal list format. The sibling information is only saved for
+entries that have a parent.
+
+The advantage with \field{siblinglist} over accessing the parent's
+\field{childlist} is that the entry itself is excluded from the list.
+
\optsection{flatten}
This is a boolean option. The default value is \csopt[false]{flatten}.
@@ -7803,7 +7979,7 @@ the new parent entry can be assigned with
\csopt{missing-parent-category}.
\end{itemize}
-For example, consider the \exfile{books.bib} file which contains
+For example, consider the \exfile!{books.bib} file which contains
entries like:
\begin{codeenv}
\atentry{entry}\marg{ubik,
@@ -8173,7 +8349,7 @@ characters \code{.}~(full stop), \code{-}~(hyphen), \code{+}~(plus),
\code{'}~(apostrophe) or \code{@}~(at-sign) are stripped. If you want to
retain commas, use \csopt{labelify-list} instead. If you want to
strip any of the allowed punctuation, use \csopt{labelify-replace} to
-remove the unwanted characters. (Remember that \sty{babel} can make
+remove the unwanted characters. (Remember that \isty{babel} can make
some of these punctuation characters active, in which case they need
to be stripped.)
@@ -9320,7 +9496,7 @@ as:
Any character that isn't of type \idx{punctuationother} won't
match.
-For example, the sample \exfile{books.bib} file contains:
+For example, the sample \exfile!{books.bib} file contains:
\begin{codeenv}
\atentry{entry}\marg{whydidnttheyaskevans,
\field{name}=\marg{Why Didn't They Ask Evans?},
@@ -9950,6 +10126,21 @@ bookmarks by adjusting the definition of the custom command:
}
\end{codeenv}
+\optsection[\subsubsection]{interpret-fields-action}
+
+This option governs the behaviour of \csopt{interpret-fields}.
+Available values are:
+\begin{itemize}
+\item\code{replace}: replace the field content with its interpreted
+value (default);
+\item\code{replace non empty}: only replace the field content with
+its interpreted value if the interpreted value isn't an empty
+string.
+\end{itemize}
+If a field value consists solely of commands that are unknown to the
+interpreter, then the resulting value will end up empty. In this
+case, it may be more appropriate to leave the field unchanged.
+
\optsection[\subsubsection]{date-time-fields}
This option indicates that the listed fields all contain
@@ -10040,6 +10231,107 @@ The value is the locale used when parsing fields identified
by \csopt{time-fields}. The \meta{value} is as for
\csopt{date-sort-locale}.
+\subsection{Prefix Fields}
+\label{sec:prefixes}
+
+If you use the \isty{glossaries-prefix} package, the prefix
+set of fields become available (\field{prefix},
+\field{prefixplural}, \field{prefixfirst} and
+\field{prefixfirstplural}). The default behaviour of \ics{pgls} is for no
+separator between the prefix and the text produced with \cs{gls}.
+This is because there are situations where there shouldn't be a
+space, although a space is more commonly required.
+
+This means that a space needs to be appended to the required prefix
+fields, but an actual space character can't be used because
+\sty{xkeyval} trims leading and trailing spaces. The \ics{space}
+command needs to be used instead, but there are also situations
+where an non-breakable space should be used (for example, where the
+prefix is a single character). It's a bit tiresome having to
+remember to put \ics{space} or \idx{nbspchar} at the end of the
+field value.
+
+The \csopt{append-prefix-field} option allows the automatic insertion of a
+space, but it may be used without the \sty{glossaries-prefix}
+package. The fields that contain prefixes are identified by
+\csopt{prefix-fields}.
+
+If you have any dual entries, then \bibgls\ will also recognise the
+special internal fields \field{dualprefix},
+\field{dualprefixplural}, \field{dualprefixfirst} and
+\field{dualprefixfirstplural}.
+
+\optsection[\subsubsection]{prefix-fields}
+
+Identifies the fields that are used to store prefixes. The default
+set is: \field{prefix}, \field{prefixfirst}, \field{prefixplural},
+\field{prefixfirstplural}, and their dual counterparts
+\field{dualprefix}, \field{dualprefixfirst}, \field{dualprefixplural}
+and \field{dualprefixfirstplural}.
+
+\optsection[\subsubsection]{append-prefix-field}
+
+Allowed values are:
+\begin{itemize}
+\item \optfmt{none}: don't append a space to the prefix fields (default);
+
+\item \optfmt{space}: append the command identified by
+\csopt{append-prefix-field-cs} (\ics{space} by default) to the
+prefix field unless the field value ends with a character identified
+by \csopt{append-prefix-field-exceptions} or a command identified by
+\csopt{append-prefix-field-cs-exceptions}. Note that if the field
+value ends with anything else (such as an empty group) then these
+exceptions won't apply.
+
+\item \optfmt{space or nbsp}: as above but uses \idx{nbspchar}
+instead of \ics{space} if the field value matches the pattern given
+by \csopt{append-prefix-field-nbsp-match}.
+
+\end{itemize}
+
+\optsection[\subsubsection]{append-prefix-field-cs}
+
+Identifies the command \meta{cs} that should be used to append to
+the prefix fields. The default value is \ics{space}. Remember to use
+\cs{cs.string} or \cs{protect} to prevent the command from being
+expanded as it's written to the \ext{aux} file.
+
+\optsection[\subsubsection]{append-prefix-field-exceptions}
+
+This setting identifies the set of characters that, if found at the
+end of a prefix field, prevent \csopt{append-prefix-field} from
+appending a space (either \ics{space} or \idx{nbspchar}).
+
+The value should be a sequence of characters. You may use
+\stringu\meta{hex} to identify a character by its hexadecimal code.
+Spaces are ignored, so \csopt[ ' - ]{append-prefix-field-exceptions}
+is equivalent to \csopt['-]{append-prefix-field-exceptions}.
+
+The default set is the straight apostrophe character (\hex{0027}),
+the hyphen-minus character (\hex{002D}), the tilde character
+(\idx{nbspchar}), the hyphen character (\hex{2010}), the
+non-breaking hyphen (\hex{2011}), and the right single quotation
+mark (\hex{2019}).
+
+\optsection[\subsubsection]{append-prefix-field-cs-exceptions}
+
+This setting identifies the set of commands that, if found at the
+end of a prefix field, prevent \csopt{append-prefix-field} from
+appending a space (either \ics{space} or \idx{nbspchar}). Any spaces
+found in \meta{sequence} are ignored. The default setting is the
+set: \cs{space}, \ics{nobreakspace} and \cs{cs.space}.
+
+Remember that you will need to use \cs{cs.string} or \cs{protect} to
+prevent the command from being expanded while the resource options
+are written to the \ext{aux} file.
+
+\optsection[\subsubsection]{append-prefix-field-nbsp-match}
+
+The value is the \idx{regex} that identifies prefixes that should be
+followed by \idx{nbspchar} instead of \ics{space}. The default
+is \csopt[\idx{matchanydot}]{append-prefix-field-nbsp-match} which indicates a
+single character.
+
\subsection{Case-Changing}
\label{sec:fieldcase}
@@ -10534,9 +10826,9 @@ is omitted for the argument that follows any of those commands.
For example, this manual defines some semantic commands such as
\csfmt{fieldfmt} (to format field names), \csfmt{abbrstylefmt}
(to format abbreviation style names) and \csfmt{glostylefmt} (to format
-glossary style names). These occur in some of the section
-and subsection headings in the \hyperref[sec:topics]{topic summary}
-which are converted to \idx{titlecase} (see \csopt{field-case-change}).
+glossary style names). If any these occur in section
+and subsection headings (which are converted to \idx{titlecase})
+then the case-change would produce an inappropriate result.
These formatting commands shouldn't have their argument changed so they
are identified with:
\begin{codeenv}
@@ -10629,8 +10921,7 @@ field and convert \fieldfmt{nametitle} to \idx{titlecase}:
\csopt[\field{name}=\fieldfmt{nametitle}]{replicate-fields},
\csopt[\fieldfmt{nametitle}=title]{field-case-change},
\end{codeenv}
-This means that the \hyperref[sec:topics]{topic summary}
-(page~\pageref{sec:topics}) can fetch the value of
+This means that it's possible to fetch the value of
\fieldfmt{nametitle} instead of \field{name}, which provides an
expandable \idx{titlecase} form that's suitable for the PDF
bookmarks.
@@ -10815,7 +11106,7 @@ for more information about supplemental locations and
records.)
You can iterate through the \field{loclist} value
-using one of \sty{etoolbox}'s internal list loops (either
+using one of \sty{etoolbox}'s internal list \idxpl{loop} (either
by first fetching the list using \ics{glsfieldfetch}
or through \styfmt{glossaries-extra}'s \ics{glsxtrfielddolistloop}
or \ics{glsxtrfieldforlistloop} shortcuts).
@@ -11014,7 +11305,7 @@ For more information on adjusting the formatting see the
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 \idx{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
@@ -11022,6 +11313,23 @@ 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.
+The boolean \field{nonumberlist} key that may be used in
+\gls{newglossaryentry} can also be used in a \ext{bib} file, but in
+this case it can't have an empty value. The value must be either
+\code{true} or \code{false}. If \code{true} then \bibgls\ won't
+save the \field{location} or \field{loclist} fields.
+
+The \field{nonumberlist} key provided by the base \sty{glossaries}
+package doesn't represent a real field. The value isn't saved but,
+if used, it will alter the indexing information that's written to
+the \idx!{makeindex} or \idx!{xindy} file. It's a little hack to
+ensure that the location is hidden for a specific entry when used
+with \idx!{makeindex} and \idx!{xindy}.
+
+\bibgls\ will look for this key to determine if the location should
+be omitted for the given entry, but it won't write the key to the
+\ext{glstex} file.
+
\optsection{save-loclist}
If you want the \field{location} field but don't need
@@ -11911,7 +12219,7 @@ loaded) so that if the counter is \counter{wrglossary} then
page number is displayed in the location list but it links back to
the place where the corresponding \cs{label} occurred.
-This method works partially with \appfmt{makeindex} and \appfmt{xindy}
+This method works partially with \idx!{makeindex} and \idx!{xindy}
but from their point of view the location is the value of the
\counter{wrglossary} counter, which interferes with their ability to
merge duplicate page numbers and form ranges. Since \bibgls\ is
@@ -13778,7 +14086,7 @@ 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
+\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.)
@@ -13827,7 +14135,7 @@ according to \optfmt{upper-notlower} and then according to
according to \optfmt{upper-upper} and then according to
\optfmt{word}.
\item \optfmt{none}: don't create break points. Use this option to
-emulate \idx{makeindex} or \idx{xindy}'s letter ordering, or combine
+emulate \idx!{makeindex} or \idx!{xindy}'s letter ordering, or combine
with \csopt{sort-replace} to insert custom break points.
\end{itemize}
@@ -13909,6 +14217,9 @@ 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{def} if sort values are identical, order them according to definition;
+\item\optfmt{use}: if sort values are identical, order them
+according to use in the document (order determine by a normal record);
\item\optfmt{id}: if sort values are identical, compare
the entry labels;
\item\optfmt{original id}: if sort values are identical, compare the
@@ -13916,9 +14227,8 @@ 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
+For the last three cases, 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
@@ -17754,7 +18064,7 @@ Converts the first letter of \meta{text} to \idx{uppercase}. This just uses
\chapter{Converting Existing \iext{tex} to \iext{bib}}
\label{sec:gls2bib}
-\setsecdepth{0}
+\setsecdepth{1}
If you have already been using the \styfmt{glossaries} or
\styfmt{glossaries-extra} package with a large file containing all your
@@ -17769,20 +18079,29 @@ the \ext{bib} file. This application is less secure than \bibgls\ as
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.
+\meta{bib file} already exists with the default \convertglsbiblongarg{overwrite}.
-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 \idx{JVM}['s]).
+If the \ext{bib} extension is missing from \meta{bib file}, it will
+be added. The extension is required for \meta{tex file}.
+
+\section{Command Line Arguments}
-\item[\longargfmt{bibenc} \meta{encoding}] The character encoding of the
-\ext{bib} file. If omitted, the same encoding as the
-\ext{tex} file is assumed.
+The \meta{options} recognised by \idx{convertgls2bib} are described below.
-\item[\longargfmt{space-sub} \meta{replacement}] The \ext{bib}
-format doesn't allow spaces in labels. If your original
+\convertglsbibarg{texenc}
+
+The character encoding of the \ext{tex} file. If omitted, the
+operating system's default encoding is assumed (or the
+\idx{JVM}['s]).
+
+\convertglsbibarg{bibenc}
+
+The character encoding of the \ext{bib} file. If omitted, the same
+encoding as the \ext{tex} file is assumed.
+
+\convertglsbibarg{space-sub}
+
+The \ext{bib} format doesn't allow spaces in labels. If your original
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},
@@ -17796,38 +18115,234 @@ operating system. For example:
convertgls2bib --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}.
+\convertglsbibarg{ignore-sort}
-\item[\longargfmt{no-ignore-sort}] Don't ignore the \field{sort} field.
+Omit 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{locale} \meta{lang tag}] Identifies the \langxml\
-to use for \idx{convertgls2bib}['s] messages.
+\convertglsbibarg{no-ignore-sort}
-\item[\longargfmt{silent}] Suppress all messages except for errors.
+Don't ignore the \field{sort} field.
-\item[\longargfmt{verbose}] Display messages and warnings (default).
+\convertglsbibarg{ignore-type}
-\item[\longargfmt{debug}] Display debugging messages (stack
-traces and other information in addition to \longargfmt{verbose}).
+Omit the \field{type} field in the \ext{bib} file. You may find it
+more flexible not to be locked into a specific glossary type if you
+have a large database of entries.
-\item[\longargfmt{help} or \shortargfmt{h}] Display help message and
-quit.
-\item[\longargfmt{version} or \shortargfmt{v}] Display version
-information and quit.
-\end{description}
+\convertglsbibarg{no-ignore-type}
+
+ Don't omit the \field{type} field (default unless
+\convertglsbiblongarg{split-on-type}).
+
+\convertglsbibarg{split-on-type}
+
+Split the entries into separate files according to the \field{type}
+field. Any entries that have the \field{type} field set to \ics{glsdefaulttype}
+or that don't have the \field{type} field set and there's no default provided
+by the command used to define the entry (see below) then the
+\atentryfmt{\meta{entry}} data will be written to the main \meta{bib
+file}. Otherwise entries will be written to the split file
+(in the same directory as \meta{bib file}).
+
+The split file name depends on whether or not the
+\convertglsbiblongarg{split-on-category} switch has also been used. With both
+and if the category and field values are different then
+the file name is \metametafilefmt{}{type}{-}{category}{.bib} otherwise
+it's \metafilefmt{}{type}{.bib}.
+
+Commands that have a default type are as follows:
+\begin{itemize}
+\item \gls{newabbreviation}, \gls{newacronym}, \ics{oldacronym},
+\gls{newdualentry}:
+the default type is assumed to be \code{abbreviations} (regardless
+of the definition of \ics{acronymtype} or \ics{glsxtrabbrvtype});
+\item \gls{glsxtrnewsymbol}: the default type is assumed to be \code{symbols};
+\item \gls{glsxtrnewnumber}: the default type is assumed to be \code{numbers};
+\item \gls{newterm}: the default type is assumed to be \code{index}.
+\end{itemize}
+
+This option automatically implements \convertglsbiblongarg{ignore-type} and
+\convertglsbiblongarg{no-overwrite}.
+
+\convertglsbibarg{no-split-on-type}
+
+Don't split the entries into separate files according to their type
+(default).
+
+\convertglsbibarg{ignore-category}
+
+Omit the \field{category} field in the \ext{bib} file.
+
+\convertglsbibarg{no-ignore-category}
+
+Don't omit the \field{category} field (default unless
+\convertglsbiblongarg{split-on-category}).
+
+\convertglsbibarg{split-on-category}
+
+Split the entries into separate files according to the \field{category}.
+If the \field{category} field isn't present and there's no default provided
+by the command used to define the entry (see below) then the
+\atentryfmt{\meta{entry}} data will be written to the main \meta{bib
+file}. Otherwise entries will be written to the split file
+(in the same directory as \meta{bib file}).
+
+The split file name depends on whether or not the
+\convertglsbiblongarg{split-on-type} switch has also been used. With both and
+if the category and field values are different then
+the file name is \metametafilefmt{}{type}{}{category}{.bib} otherwise
+it's \metafilefmt{}{category}{.bib}.
+
+Commands that have a default category are as follows:
+\begin{itemize}
+\item \gls{newabbreviation}, \gls{newacronym}, \ics{oldacronym},
+\gls{newdualentry}:
+the default category is assumed to be \code{abbreviation};
+\item \gls{glsxtrnewsymbol}: the default category is assumed to be \code{symbol};
+\item \gls{glsxtrnewnumber}: the default category is assumed to be \code{number};
+\item \gls{newterm}: the default category is assumed to be \code{index}.
+\end{itemize}
+
+For example, if you have both \convertglsbiblongarg{split-on-type} and
+\convertglsbiblongarg{split-on-category}, then the default file name for
+\gls{newabbreviation} will be
+\filefmt{abbreviations-abbreviation.bib} but the default file name
+for \gls{newterm} will be \filefmt{index.bib}. Whereas if you only
+have \convertglsbiblongarg{split-on-category} and not
+\convertglsbiblongarg{split-on-type}, then then default file name for
+\gls{newabbreviation} will be \filefmt{abbreviation.bib}.
+
+This option automatically implements \convertglsbiblongarg{ignore-category} and
+\convertglsbiblongarg{no-overwrite}.
+
+\convertglsbibarg{no-split-on-category}
+
+Don't split the entries into separate files according to their
+category (default).
+
+\convertglsbibarg{ignore-fields}
+
+Omit all the fields listed in \meta{list} from the \ext{bib} file.
+If \field{sort}, \field{type} or \field{category} are included
+in the list, this will automatically implement the corresponding
+\convertglsbiblongarg{ignore-sort},
+\convertglsbiblongarg{ignore-type} or
+\convertglsbiblongarg{ignore-category} option.
+
+This option is not cumulative. If the list is empty it will unset
+any previous list but won't unset any
+\convertglsbiblongarg{ignore-sort},
+\convertglsbiblongarg{ignore-type} or
+\convertglsbiblongarg{ignore-category} option.
+
+For example:
+\begin{alltt}
+convertgls2bib \longargfmt{ignore-fields} 'user1,sort' entries.bib
+\end{alltt}
+is equivalent to:
+\begin{alltt}
+convertgls2bib \longargfmt{ignore-fields} user1 \longargfmt{ignore-sort entries.bib}
+\end{alltt}
+and
+\begin{alltt}
+convertgls2bib \longargfmt{ignore-fields} 'user1,sort' \longargfmt{ignore-fields} '' entries.bib
+\end{alltt}
+is equivalent to:
+\begin{alltt}
+convertgls2bib \longargfmt{ignore-sort} entries.bib
+\end{alltt}
+
+\convertglsbibarg{preamble-only}
+
+Stop parsing if the start of the \env{document} environment is found.
+
+\convertglsbibarg{no-preamble-only}
+
+Parse the entire file (default). Be prepared for a lot of
+unknown command warnings if you make \idx{convertgls2bib} parse an
+entire document.
+
+\convertglsbibarg{absorb-see}
+
+Absorb any cross-referencing information identified with
+\ics{glssee} or \ics{glsxtrindexseealso} commands into
+the corresponding entry (default).
+
+\convertglsbibarg{no-absorb-see}
+
+Don't absorb any cross-referencing information identified with \ics{glssee}
+or \ics{glsxtrindexseealso} commands.
+
+\convertglsbibarg{index-conversion}
+
+Use \atentry{index} instead of \atentry{entry} if the
+\field{description} is empty or simply \ics{nopostdesc} or
+\ics{glsxtrnopostpunc}. (Only applies to terms that would otherwise
+be converted to \atentry{entry}, such as those defined with
+\gls{newglossaryentry}.)
+
+\convertglsbibarg{no-index-conversion}
+
+Don't convert \atentry{entry} to \atentry{index} (default).
+
+\convertglsbibarg{locale}
-This application recognises the commands listed below. Avoid any overly
+Identifies the \langxml\ to use for \idx{convertgls2bib}['s]
+messages.
+
+\convertglsbibarg{overwrite}
+
+Allow existing \ext{bib} files to be overwritten. (Default unless
+\convertglsbiblongarg{split-on-type}.)
+
+\convertglsbibarg{no-overwrite}
+
+Don't allow existing \ext{bib} files to be overwritten. (Default if
+\convertglsbiblongarg{split-on-type}.)
+
+\convertglsbibarg{silent}
+
+Suppress all messages except for errors.
+
+\convertglsbibarg{verbose}
+
+Display messages and warnings (default).
+
+\convertglsbibarg{debug}
+
+Display debugging messages (stack traces and other information in
+addition to \convertglsbiblongarg{verbose}).
+
+\convertglsbibarg{help}
+
+Display help message and quit.
+
+\convertglsbibarg{version}
+
+Display version information and quit.
+
+\section{Recognised Commands}
+
+This application recognises the commands listed below as well as
+some standard commands such as \ics{newcommand}. Avoid any overly
complicated code within the \ext{tex} file. The
\hyperref[sec:texparserlib]{\TeX\ parser library} isn't a \TeX\ engine! The
\ext{tex} file doesn't need to be a complete document, but if you want certain
commands recognised from packages that the \TeX\ parser library supports,
-you'll need to include \ics{usepackage} in the \ext{tex} file.
+you'll need to include \ics{usepackage} in the \ext{tex} file. If
+you want to quit parsing the \ext{tex} file at the start of the
+document, use the \convertglsbiblongarg{preamble-only} switch.
+
In all cases below, if \meta{\keyvallist} contains:
\begin{codeenv*}
\field{see}=\marg{[\ics{seealsoname}]\meta{label(s)}}
\end{codeenv*}
+or
+\begin{codeenv*}
+\field{see}=\marg{[\ics{alsoname}]\meta{label(s)}}
+\end{codeenv*}
this will be substituted with:
\begin{codeenv*}
\field{seealso}=\margm{label(s)}
@@ -17842,6 +18357,10 @@ will be written as:
\field{seealso} = \marg{goose}
}
\end{codeenv}
+Note that it won't convert \code{\field{see}=\marg{[see also]\meta{labels}}}.
+If you have used explicit text instead of \ics{seealsoname} or
+\ics{alsoname} then consider performing a global search and replace
+on your file using your text editor.
Additionally, if \meta{\keyvallist} contains:
\begin{codeenv}
@@ -17853,7 +18372,7 @@ recommended in \meta{\keyvallist} when loading files with
argument to set the \field{type}. With \bibgls\ you can use the
\csopt{type} option instead.)
-\cssection[\section]{glsexpandfields}
+\cssection{glsexpandfields}
The base \styfmt{glossaries} package provides:
\formatdef{glsexpandfields}
If present, this instructs \idx{convertgls2bib} to expand all fields
@@ -17864,19 +18383,19 @@ field values. Conversely, there are some commands that will be
expanded by \idx{convertgls2bib} that aren't expandable in \TeX\
(such as \ics{MakeUppercase} and \ics{char}).
-\cssection[\section]{glsnoexpandfields}
+\cssection{glsnoexpandfields}
The base \styfmt{glossaries} package provides:
\formatdef{glsnoexpandfields}
If present, this instructs \idx{convertgls2bib} to not expand fields
unless explicitly identified by \gls{glssetexpandfield}.
-\cssection[\section]{glssetexpandfield}
+\cssection{glssetexpandfield}
The base \styfmt{glossaries} package provides:
\formatdef{glssetexpandfield}
If present, this instructs \idx{convertgls2bib} to expand the
given field, even if \gls{glsnoexpandfields} has been used.
-\cssection[\section]{glssetnoexpandfield}
+\cssection{glssetnoexpandfield}
The base \styfmt{glossaries} package provides:
\formatdef{glssetnoexpandfield}
If present, this instructs \idx{convertgls2bib} to not expand the
@@ -17885,7 +18404,7 @@ Unlike the default behaviour with the \sty{glossaries} package, there are no
fields switched explicitly switched off by default with
\idx{convertgls2bib}.
-\cssection[\section]{newglossaryentry}
+\cssection{newglossaryentry}
The base \styfmt{glossaries} package provides:
\formatdef{newglossaryentry}
This is converted to:
@@ -17896,7 +18415,7 @@ This is converted to:
\end{codeenv}
\ics{newentry} is recognised as a synonym of \gls{newglossaryentry}.
-\cssection[\section]{provideglossaryentry}
+\cssection{provideglossaryentry}
The base \styfmt{glossaries} package provides:
\formatdef{provideglossaryentry}
This is converted to:
@@ -17907,7 +18426,7 @@ This is converted to:
\end{codeenv}
but only if \meta{label} hasn't already been defined.
-\cssection[\section]{longnewglossaryentry}
+\cssection{longnewglossaryentry}
The base \styfmt{glossaries} package provides:
\formatdef{longnewglossaryentry}
This is converted to:
@@ -17922,13 +18441,13 @@ is also recognised. The unstarred version strips trailing spaces
from \meta{description}. (This doesn't add \ics{nopostdesc}, but
\styfmt{glossaries-extra} defaults to \styopt{nopostdot}.)
-\cssection[\section]{longprovideglossaryentry}
+\cssection{longprovideglossaryentry}
The base \styfmt{glossaries} package provides:
\formatdef{longprovideglossaryentry}
As above, but only if \meta{label} hasn't already been defined.
-\cssection[\section]{newterm}
+\cssection{newterm}
The base \styfmt{glossaries} package provides:
\formatdef{newterm}
@@ -17983,7 +18502,7 @@ 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).
-\cssection[\section]{newabbreviation}
+\cssection{newabbreviation}
The \styfmt{glossaries-extra} package provides:
\formatdef{newabbreviation}
This is converted to:
@@ -18002,15 +18521,19 @@ if the optional argument is present, otherwise it's converted to:
}
\end{codeenv}
-\cssection[\section]{newacronym}
+\cssection{newacronym}
The base \styfmt{glossaries} package provides:
\formatdef{newacronym}
(which is redefined by \styfmt{glossaries-extra} to use
\gls{newabbreviation}).
-As above but uses \atentry{acronym} instead.
+As above but uses \atentry{acronym} instead. The base package also
+provides \ics{oldacronym}, which emulates the way abbreviations were
+defined with the precursor \styfmt{glossary} package. This has
+different syntax to \gls{newacronym} but is also recognised by \idx{convertgls2bib}
+and is converted to \atentry{acronym}.
-\cssection[\section]{glsxtrnewsymbol}
+\cssection{glsxtrnewsymbol}
The \styfmt{glossaries-extra} package provides:
\formatdef{glsxtrnewsymbol}
(when the \styopt{symbols} option is used).
@@ -18036,7 +18559,7 @@ in which case it's converted to:
\end{codeenv}
\ics{newsym} is recognised as a synonym for \gls{glsxtrnewsymbol}.
-\cssection[\section]{glsxtrnewnumber}
+\cssection{glsxtrnewnumber}
The \styfmt{glossaries-extra} package provides:
\formatdef{glsxtrnewnumber}
@@ -18063,7 +18586,7 @@ otherwise it's converted to:
\end{codeenv}
\ics{newnum} is recognised as a synonym for \gls{glsxtrnewnumber}.
-\cssection[\section]{newdualentry}
+\cssection{newdualentry}
\formatdef{newdualentry}
This command isn't provided by either \styfmt{glossaries} or
@@ -18640,7 +19163,7 @@ 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 counteracts \cs{glsxtrnopostpunc}.
-This can be placed inside a conditional, as used in
+This can be placed inside a \idx{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 counteract
@@ -19564,7 +20087,7 @@ and (if the \field{description} field is displayed in the glossary):
the initial backslash.)
I'd like to use the \glostyle{bookindex} style, which is
-provided by the \sty{glossary-bookindex}
+provided by the \isty{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
@@ -19712,7 +20235,7 @@ 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
+\styopt[mcols]{stylemods} to load \isty{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}.
@@ -19838,14 +20361,14 @@ letter-number methods listed in
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
+load \isty{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
+by \isty{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
+\styopt{stylemods} and \isty{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
@@ -20252,7 +20775,7 @@ option to automatically load that package. I'd like to use the
\begin{codeenv}
\styopt[list,bookindex]{stylemods}
\end{codeenv}
-This ensures that \sty{glossary-list} and \sty{glossary-bookindex}
+This ensures that \isty{glossary-list} and \sty{glossary-bookindex}
are loaded and patches the list styles.
The first two glossaries would look better with a terminating
@@ -21230,7 +21753,7 @@ If you don't have it installed, you'll need to change it.
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\end{verbatim}
-Since it's a multilingual document I also need \sty{polyglossia}
+Since it's a multilingual document I also need \isty{polyglossia}
with the main language set to \code{english}:
\begin{codeenv}
\cmd{usepackage}\marg{polyglossia}
@@ -21249,7 +21772,7 @@ 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}.
+\isty{polyglossia}.
Iterating over all entries can be done with \ics{forglsentries}
but remember that no entries will be defined before \bibgls\ has
@@ -21264,13 +21787,13 @@ been run, so this does nothing on the first \LaTeX\ run.
\marg{}\comment{}
}
\end{codeenv}
-Within the outer (\cs{forglsentries}) loop, there's a check
+Within the outer (\cs{forglsentries}) \idx{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.
+\idx{loop} (with \ics{glsxtrendfor}) once the language has been found.
The \idx{handler} function (\csfmt{addfirstlang}) is defined so that it
adds the given language tag as a tracked language using
@@ -21279,7 +21802,7 @@ adds the given language tag as a tracked language using
(\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
+by \isty{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
@@ -21303,7 +21826,7 @@ which is the name of the control sequence used with
\sty{polyglossia} to switch language for a short block of text. This means that
\gls{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.
+break out of the \idx{loop}.
\begin{codeenv}
\cs{newcommand}*\marg{\cmd{addfirstlang}}[1]\marg{\comment{}
\cs{TrackLocale}\marg{\idx{param}1}\comment{}
@@ -21319,7 +21842,7 @@ break out of the loop.
\marg{}\comment{}
}
\end{codeenv}
-Once the \ics{forglsentries} loop has found the appropriate
+Once the \ics{forglsentries} \idx{loop} has found the appropriate
languages, it's now necessary to iterate over the internal list
\csfmt{langlist} and set the language:
\begin{codeenv}
@@ -21888,8 +22411,11 @@ 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:
+be applied. (As from \sty{glossaries-extra} version 1.42, there is
+now the \catattr{glosssymbolfont} attribute that's used by
+\ics{glossentrysymbol}.)
+
+A simple solution is to use \ics{glossentrynameother} instead:
\begin{codeenv}
\cs{renewcommand}*\marg{\cs{glsxtrbookindexname}}[1]\marg{\comment{}
\cs{glossentryname}\marg{\idx{param}1}\comment{}
@@ -22012,11 +22538,11 @@ 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
+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})
+(\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.
@@ -22520,6 +23046,7 @@ The resulting document is shown in \figureref{fig:sample-multi2.pdf},
{fig:sample-multi2.pdf3}
\end{figure}
+\setupglossaries{indexonlyfirst}
\printstyoptsummary
\printcommandsummary
%\printcommandtopic
@@ -22536,14 +23063,88 @@ The resulting document is shown in \figureref{fig:sample-multi2.pdf},
}%
{\glossentryname{#1}}%
}
+\newcommand{\locationfont}{\small}
+\newcommand{\widecrossreffont}{\footnotesize}
+\newcommand{\ifwidecrossref}[3]{%
+ \dimen0=0pt\relax
+ \glsxtrifhasfield*{see}{#1}%
+ {\settowidth{\dimen0}{\locationfont\glsxtrusesee{#1}}}%
+ {%
+ \glsxtrifhasfield*{seealso}{#1}%
+ {\settowidth{\dimen0}{\locationfont\glsxtruseseealso{#1}}}%
+ {%
+ \glsxtrifhasfield*{alias}{#1}%
+ {\settowidth{\dimen0}{\locationfont\glsxtrusealias{#1}}}%
+ {}%
+ }%
+ }%
+ \ifdim\dimen0>0.4\linewidth #2\else#3\fi
+}
+\newcommand{\precrossref}{}
+\newcommand{\indexdotfill}{\,\cleaders\hbox to .44em{\hss\textcolor{lightgray}{.}\hss}\hfill\,}
\renewcommand*{\glsxtrbookindexprelocation}[1]{%
- \glsxtrifhasfield{location}{#1}%
- {\nobreak\cleaders\hbox to .44em{\hss\textcolor{lightgray}{.}\hss}\hfill}%
- {\glsxtrprelocation}%
+ \glsxtrifhasfield*{location}{#1}%
+ {\nobreak\indexdotfill
+ \ifwidecrossref{#1}%
+ {\def\precrossref{\widecrossreffont\glstreesubitem}}%
+ {\def\precrossref{, }}%
+ }%
+ {%
+ \ifwidecrossref{#1}{\nobreak\def\precrossref{\widecrossreffont\glstreesubitem}}%
+ {\def\precrossref{\nobreak\indexdotfill}}%
+ \glsxtrprelocation
+ }%
+}
+\renewcommand{\glsxtrbookindexlocation}[2]{%
+ \begingroup
+ \locationfont
+ #2%
+ \glsxtrifhasfield{see}{#1}{\precrossref\glsxtrusesee{#1}}%
+ {%
+ \glsxtrifhasfield{seealso}{#1}%
+ {\precrossref\glsxtruseseealso{#1}}%
+ {%
+ \glsxtrifhasfield{alias}{#1}{\precrossref\glsxtrusealias{#1}}{}%
+ }%
+ }%
+ \endgroup
+ \let\precrossref\empty
}
+% With \printcommandtopic missing a lot of spawned entries will
+% appear in the index without a record. Without the topic list they
+% need to be skipped
\renewcommand{\printunsrtglossaryentryprocesshook}[1]{%
- \glsxtrifhasfield*{progenitor}{#1}{\printunsrtglossaryskipentry}{}%
+ \glsxtrifhasfield*{progenitor}{#1}%
+ {%\typeout{SKIPPING [has progenitor] #1}
+ \printunsrtglossaryskipentry
+ }%
+ {%
+ \GlsXtrIfFieldEqStr*{originalentrytype}{#1}{topic}%
+ {%
+ \glsxtrifhasfield*{location}{#1}%
+ {}%
+ {%
+ \ifglshasdesc{#1}{}%
+ {%
+ %\typeout{SKIPPING [no location] #1}
+ \printunsrtglossaryskipentry
+ }%
+ }%
+ }%
+ {%
+ \GlsXtrIfFieldValueInCsvList*{#1}{category}%
+ {abbreviationstyle,packageoption,glossarystyle,package}%
+ {%
+ \glsxtrifhasfield*{location}{#1}{}%
+ {%\typeout{SKIPPING [topic \glscategory{#1} no location] #1}%
+ \printunsrtglossaryskipentry
+ }%
+ }%
+ {}%
+ }%
+ }%
}
\renewcommand*{\unicodecategoryfmt}[1]{\textsf{#1}}
+\renewcommand*{\bibglspassim}{}
\printunsrtglossary[type=index]
\end{document}
diff --git a/support/bib2gls/src/convertgls2bib.pod b/support/bib2gls/src/convertgls2bib.pod
index d5617dc00e..967b59aca4 100644
--- a/support/bib2gls/src/convertgls2bib.pod
+++ b/support/bib2gls/src/convertgls2bib.pod
@@ -5,7 +5,7 @@ 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
+commands like C<\newglossaryentry> and C<\newacronym> to
a B<.bib> file in the format required for B<bib2gls>.
=head1 OPTIONS
@@ -48,7 +48,93 @@ Ignore the B<sort> field (default).
Don't ignore the B<sort> field.
-=item B<--space-sub> I<value>
+=item B<--ignore-type>
+
+Omit the B<type> field. Default if B<--split-on-type>.
+
+=item B<--no-ignore-type>
+
+Don't omit the B<type> field. Default unless B<--split-on-type>.
+
+=item B<--split-on-type> or B<-t>
+
+Split the entries into separate files according to the B<type> field.
+This option automatically implements B<--ignore-type> and
+B<--no-overwrite>.
+
+=item B<--no-split-on-type>
+
+Don't split the entries into separate files according to the B<type>
+field (default).
+
+=item B<--ignore-category>
+
+Omit the B<category> field. Default if B<--split-on-category>.
+
+=item B<--no-ignore-category>
+
+Don't omit the B<category> field. Default unless B<--split-on-category>.
+
+=item B<--split-on-category> or B<-t>
+
+Split the entries into separate files according to the B<category> field.
+This option automatically implements B<--ignore-category> and
+B<--no-overwrite>.
+
+=item B<--no-split-on-category>
+
+Don't split the entries into separate files according to the B<category>
+field (default).
+
+=item B<--ignore-fields> I<list> or B<-f> I<list>
+
+Ignore all the fields in the comma-separated I<list>. If the
+list includes B<sort>, B<type> or B<category> it will automatically
+implement the corresponding B<--ignore-sort>, B<--ignore-type> or
+B<--ignore--category> option.
+
+This option isn't cumulative. An empty list will clear a previously
+set list but won't undo the sort, type or category ignore options.
+
+=item B<--overwrite>
+
+Overwrite existing .bib files. Default unless B<--split-on-type>
+used.
+
+=item B<--no-overwrite>
+
+Don't overwrite existing .bib files. Default if B<--split-on-type>
+used.
+
+=item B<--index-conversion> or B<-i>
+
+Any entries that would normally be converted to C<@entry> that don't
+have a description or just have the description set to
+C<\nopostdesc> or C<\glsxtrnopostpunc> will be converted to C<@index>
+and the B<description> field will be omitted.
+
+=item B<--no-index-conversion>
+
+Don't use C<@index> instead of C<@entry> if the description is empty or
+just C<\nopostdesc> or C<\glsxtrnopostpunc> (default).
+
+=item B<--absorb-see>
+
+Absorb C<\glssee> and C<\glsxtrindexseealso> into the data (default).
+
+=item B<--no-absorb-see>
+
+Don't absorb C<\glssee> and C<\glsxtrindexseealso> into the data.
+
+=item B<--preamble-only> or B<-p>
+
+Only parse the document preamble.
+
+=item B<--no-preamble-only>
+
+Parse the entire document (default).
+
+=item B<--space-sub> I<value> or B<-s> I<value>
Substitute spaces in labels with I<value>.
@@ -62,7 +148,7 @@ tag I<lang tag>. If there isn't an appropriate file, the B<en>
=head1 REQUIRES
-Java 7 and a TeX distribution.
+Java 8 and a TeX distribution.
=head1 LICENSE