convertgls2bib1
Usage
convertgls2bib [option]
+
texfile
bibfile
Overview
Converts a .tex file containing glossary definitions using commands like "\newglossaryentry" and "\newacronym" to a .bib file in the format required for bib2gls. Distributed with bib2gls.
Options
General options
-
--help or -h -
Display help message and exit.
-
--version or -v -
Display version information and exit.
-
--silent or --quiet or -q -
Suppress all messages except for errors.
-
--verbose -
Switch on verbose mode.
-
--no-verbose -
Switch off verbose mode.
-
--debug [n] -
Display debugging messages.
-
--debug-mode setting -
May be used instead of
--debugwhere the level number is difficult to remember. Value same as forbib2gls's--debug-modeoption.
-
--no-debug -
Switch off debugging mode. Equivalent to
--debug0.
-
--log-file filename -
Log messages to given file. Intended primarily for debugging messages so enabling debug mode will automatically create a transcript file, but otherwise a file won't be created unless this option is used.
Encosing and localisation options
-
--texenc name -
Set the character encoding to name for the input
.texfiles.
-
--bibenc name -
Set the character encoding to name for the output
.bibfiles.
--localelang tag-
Use the language resource files associated with the given language tag lang tag. If there isn't an appropriate file, the
en(English) file will be used.
Filtering options
-
--preamble-only or -p -
Only parse the document preamble. That is, stop parsing if
"\begin{document}"encountered.
-
--no-preamble-only -
Parse the entire document (default).
-
--ignore-fields list or -f list -
Ignore all the fields in the comma-separated list. If the list includes
sort,typeorcategoryit will automatically implement the corresponding--ignore-sort,--ignore-typeor--ignore-categoryoption. Each item in the list should identify the field by its original case-sensitive key.This option is cumulative.
-
--no-ignore-fields -
Cancels the effect of
--ignore-fields.
-
--ignore-category -
Omit the
categoryfield. Default if--split-on-category.
-
--no-ignore-category -
Don't omit the
categoryfield. Default unless--split-on-category.
-
--ignore-type -
Omit the
typefield. Default if--split-on-type.
-
--no-ignore-type -
Don't omit the
typefield. Default unless--split-on-type.
-
--ignore-sort -
Ignore the
sortfield (default).
-
--no-ignore-sort -
Don't ignore the
sortfield.
Output file options
-
--overwrite -
Overwrite existing .bib files. Default unless
--split-on-typeused.
-
--no-overwrite -
Don't overwrite existing .bib files. Default if
--split-on-typeused.
-
--split-on-type or -t -
Split the entries into separate files according to the
typefield. This option automatically implements--ignore-typeand--no-overwrite.
-
--no-split-on-type -
Don't split the entries into separate files according to the
typefield (default).
-
--split-on-category or -c -
Split the entries into separate files according to the
categoryfield. This option automatically implements--ignore-categoryand--no-overwrite.
-
--no-split-on-category -
Don't split the entries into separate files according to the
categoryfield (default).
Adjustment options
-
--absorb-see -
Absorb
"\glssee"and"\glsxtrindexseealso"into the data (default).
-
--no-absorb-see -
Don't absorb
"\glssee"and"\glsxtrindexseealso"into the data.
-
--index-conversion or -i -
Any entries that would normally be converted to
@entrythat don't have a description or just have the description set to"\nopostdesc"or"\glsxtrnopostpunc"will be converted to@indexand thedescriptionfield will be omitted.
-
--no-index-conversion -
Don't use
@indexinstead of@entryif the description is empty or just"\nopostdesc"or"\glsxtrnopostpunc"(default).
-
--space-sub value or -s value -
Substitute spaces in labels with value.
-
--field-map mappings or -m mappings -
Add source key to destination field label mapping. The argument should be a comma-separated list of src-field=dest-field pairs. This option is cumulative.
The deprecated
--key-mapis a synonym of--field-map.
-
--no-field-map -
Cancels all mappings applied with
--field-map. The deprecated--no-key-mapis a synonym of--field-map.
-
--internal-field-map mappings -
Adds the given mappings to the default set of internal field to key mappings. (For example,
descis the internal field label of thedescriptionkey.) This option is cumulative.This option is only needed if the internal field label is supplied in the argument of command such as
"\glssetnoexpandfield".
Requires
Java 8 and a TeX distribution.
Recommended reading
The bib2gls manual:
texdoc bib2gls
The glossaries-extra manual:
texdoc glossaries-extra
The glossaries manual:
texdoc glossaries
History
- Arch Linux 2026-11-01 to Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm)
--debug-mode since Debian 13 (Trixie);
--field-map since Debian 13 (Trixie);
--internal-field-map since Debian 13 (Trixie);
--log-file since Debian 13 (Trixie);
--no-debug since Debian 13 (Trixie);
--no-field-map since Debian 13 (Trixie);
--no-ignore-fields since Debian 13 (Trixie);
--no-verbose since Debian 13 (Trixie);
--quiet since Debian 13 (Trixie);
-c since Debian 13 (Trixie);
-m since Debian 13 (Trixie);
-q since Debian 13 (Trixie).