Scroll to navigation

DATATOOL2BIB(1) datatool2bib 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

Display help message and exit.
Display version information and exit.
Suppress all messages except for errors.
Switch on verbose mode.
Switch off verbose mode.
Display debugging messages.
May be used instead of --debug where the level number is difficult to remember. Value same as for bib2gls's --debug-mode option.
Switch off debugging mode. Equivalent to --debug 0.
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

Set the character encoding to name for the input .tex files.
Set the character encoding to name for the output .bib files.
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

Only parse the document preamble. That is, stop parsing if "\begin{document}" encountered.
Parse the entire document (default).
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.

Cancels the effect of --ignore-fields.
Skip the special datagidx internal database. (Default.)
Don't skip the special datagidx internal database.

OUTPUT FILE OPTIONS

Overwrite existing .bib files.
Don't overwrite existing .bib files.
Split the entries into separate files according to the database.
Don't split the entries into separate files (default).

ADJUSTMENT OPTIONS

Substitute spaces in labels with value.
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.
Cancels all mappings applied with --field-map.
Any entries that would normally be converted to @entry that don't have a description field will be converted to @index.
Don't replace @entry with @index if the description is missing (default).
Attempt to detect entries that should be @symbol or @number based on the value of the name field.
Don't attempt symbol detection (default).
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-generate entry labels instead of using a column value.
Don't auto-generate entry labels. Use the column identified by --label for the entry label. (Default.)
Use prefix when auto-generating entry labels. Ignored with --no-auto-label.
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.
Don't adjust labels in commands like "\gls" in field values.
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).
Don't save labels from any stripped "\glsadd" instances.
Switch on all strip options.
Switch off all strip options.
Strip "\glsadd" and its argument from field values. (Default.)
Don't strip "\glsadd" from field values.
Strip "\acronymfont" from field values. (Default.)
Don't strip "\acronymfont" from field values.
Strip text field for acronyms identified by "\newacro". (Default.)
Don't strip text field for acronyms.
Strip name field for acronyms identified by "\newacro". (Default.)
Don't strip name field for acronyms.
Strip known case-changing commands (such as "\makefirstuc" or "\capitalisewords") from field values.
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.

Implement "\DTLsetup{"options"}" at the start. This can include options such as "store-datum", "new-value-expand", "new-value-trim" and "default-name".
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.

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.)
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.
Don't save numeric value in a separate field. (Default.)
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.
Don't save currency symbol in a separate field. (Default.)
Equivalent to:

        --save-value '-value' --save-currency '-currency'
    
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/>

2024-12-21 perl v5.40.0