DATATOOL2BIB(1)

SYNOPSIS
datatool2bib [option]+ in-file bibfile

DESCRIPTION
Converts a .tex file containing datatool.sty databases to a .bib file in the format required for bib2gls. Distributed with bib2gls.

The TeX Parser Library is used to parse the input, which may be a DTLTEX or DBTEX file or a file that contains database construction commands, such as "\DTLnewdb" or "\DTLaction". The input file may also be a CSV file if used with --read.

The datatool and datagidx are automatically implemented so the input file does not need to include either them with "\usepackage". In general, it's best not to include the entire document but instead input a file that just contains the database construction commands, as the TeX Parser Library only has a limited set of commands that it recognises.

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 --debug where the level number is difficult to remember. Value same as for bib2gls's --debug-mode option.

--no-debug
    Switch off debugging mode. Equivalent to --debug 0.

--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 .tex files.

--bibenc name
    Set the character encoding to name for the output .bib files.

--locale lang 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. Each item in the list should identify the field by its original case-sensitive column key.

    This option is cumulative.

--no-ignore-fields
    Cancels the effect of --ignore-fields.

--skip-datagidx
    Skip the special datagidx internal database. (Default.)

--no-skip-datagidx
    Don't skip the special datagidx internal database.

  OUTPUT FILE OPTIONS

--overwrite
    Overwrite existing .bib files.

--no-overwrite
    Don't overwrite existing .bib files.

--split
    Split the entries into separate files according to the database.

--no-split
    Don't split the entries into separate files (default).

  ADJUSTMENT OPTIONS

--space-sub value or -s value
    Substitute spaces in labels with value.

--field-map mappings or -m mappings
    Add source column key to destination field label mappings. The argument should be a comma-separated list of col-key=bib-field pairs. This option is cumulative.

--no-field-map
    Cancels all mappings applied with --field-map.

--index-conversion or -i
    Any entries that would normally be converted to @entry that don't have a description field will be converted to @index.

--no-index-conversion
    Don't replace @entry with @index if the description is missing (default).

--detect-symbols
    Attempt to detect entries that should be @symbol or @number based on the value of the name field.

--no-detect-symbols
    Don't attempt symbol detection (default).

--label col-key or -L
    Use column identified by col-key for the entry label. The default column key is Label so if the database doesn't have a column with this key, you will either need to specify a column with --label or use --auto-label. This option is ignored with --auto-label.

--auto-label or -a
    Auto-generate entry labels instead of using a column value.

--no-auto-label
    Don't auto-generate entry labels. Use the column identified by --label for the entry label. (Default.)

--auto-label-prefix prefix
    Use prefix when auto-generating entry labels. Ignored with --no-auto-label.

--adjust-gls
    Adjust labels in commands like "\gls" in field values. (Default.) This will also replace the datagidx.sty commands like "\glsnl" with the closest glossaries.sty equivalent.

--no-adjust-gls
    Don't adjust labels in commands like "\gls" in field values.

--dependency-field field-name
    Sets the name of the dependency field. Has no effect with --no-strip-glsadd. With --strip-glsadd, the label from the stripped "\glsadd" argument will be added to the field identified by field-name. The default is dependency which will be ignored by bib2gls unless instructed otherwise (via field aliasing etc).

--no-dependency-field
    Don't save labels from any stripped "\glsadd" instances.

--strip
    Switch on all strip options.

--no-strip
    Switch off all strip options.

--strip-glsadd
    Strip "\glsadd" and its argument from field values. (Default.)

--no-strip-glsadd
    Don't strip "\glsadd" from field values.

--strip-acronym-font
    Strip "\acronymfont" from field values. (Default.)

--no-strip-acronym-font
    Don't strip "\acronymfont" from field values.

--strip-acronym-text
    Strip text field for acronyms identified by "\newacro". (Default.)

--no-strip-acronym-text
    Don't strip text field for acronyms.

--strip-acronym-name
    Strip name field for acronyms identified by "\newacro". (Default.)

--no-strip-acronym-name
    Don't strip name field for acronyms.

--strip-case-change
    Strip known case-changing commands (such as "\makefirstuc" or "\capitalisewords") from field values.

--nostrip-case-change
    Don't strip case-changing commands. (Default.)

  OTHER OPTIONS
These options correspond to features introduced to datatool.sty version 3.0, which has a setting that stores the numeric value and currency symbol (where applicable) when parsing data. The original string (formatted number), numeric value and currency symbol are stored in a special datum format, which ordinarily expands to its original formatted text but also allows the previously parsed information to be easily extracted without having to reparse the data.

--setup options
    Implement "\DTLsetup{"options"}" at the start. This can include options such as "store-datum", "new-value-expand", "new-value-trim" and "default-name".

--read options
    Instead of simply parsing the input file as a normal .tex file, the source is presented to the TeX parser as "\DTLread["options"]{"in-file"}" where the options can be used to specify the file format (for example, "format=tsv").

    If the options list is empty (after trimming white space) then this becomes equivalent to --no-read.

--no-read
    The input file is parsed as a normal .tex file, which may be the complete document or a file that can be "\input" into a document. (Default.)

--save-value suffix
    If a field value is parsed and identified as numeric, the unformatted numeric value will be saved in a field whose name is constructed from the original field name followed by the given suffix.

--no-save-value
    Don't save numeric value in a separate field. (Default.)

--save-currency suffix
    If a field value is parsed and identified as currency data, the currency symbol will be saved in a field whose name is constructed from the original field name followed by the given suffix.

--no-save-currency
    Don't save currency symbol in a separate field. (Default.)

--save-datum
    Equivalent to:

            --save-value '-value' --save-currency '-currency'

--no-save-datum
    Equivalent to --no-save-value --no-save-currency.

REQUIRES
Java 8 and a TeX distribution.

LICENSE
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

RECOMMENDED READING
The bib2gls manual:

        texdoc bib2gls

The glossaries-extra manual:

        texdoc glossaries-extra

The glossaries manual:

        texdoc glossaries

The datatool manual:

        texdoc datatool

AUTHOR
Nicola L. C. Talbot, <https://www.dickimaw-books.com/>