DATATOOL2BIB(1)

πŸ’– datatool2bib β€” the manual page πŸ’–

okay bestie, so you know datatool2bib, right? section 1 of the manual, it lives right here. this is the whole vibe: it takes your datatool databases and turns them into something bib2gls can actually eat. let's gooo πŸ¦‹


✨ SYNOPSIS ✨

datatool2bib [option]+ in-file bibfile

🌸 DESCRIPTION 🌸

so basically? this little icon converts a .tex file that's holding datatool.sty databases into a .bib file, in the exact format bib2gls wants. and yeah, it ships with bib2gls, they're a package deal fr fr 🫢

the TeX Parser Library is doing the actual parsing, and your input can be a DTLTEX file, a DBTEX file, or honestly any file that has database construction commands in it β€” think "\DTLnewdb" or "\DTLaction". and plot twist: if you pair it with --read, your input file can even be a CSV. slay. πŸ‘‘

now here's the cute part: datatool and datagidx are automatically implemented, so your input file does NOT need to pull them in with "\usepackage". no cap. and lowkey the best move in general is to not feed it your entire document, but instead a file that just has the database construction commands in it β€” because the TeX Parser Library only recognises a limited set of commands. so it's giving "keep it simple bestie" πŸ’…


πŸŽ€ OPTIONS πŸŽ€

GENERAL OPTIONS

  • --help or -h β€” shows you the help message and then dips. bye! ✌️
  • --version or -v β€” spills the version info and exits.
  • --silent or --quiet or -q β€” suppresses literally every message except errors. shhh 🀫
  • --verbose β€” turns verbose mode ON. talk to me baby πŸ—£οΈ
  • --no-verbose β€” turns verbose mode OFF.
  • --debug [n] β€” shows debugging messages. n optional, obvs.
  • --debug-mode setting β€” use this instead of --debug when you can't remember the level number (valid, honestly 😭). the value is the same as for bib2gls's --debug-mode option.
  • --no-debug β€” switches debugging mode off. it's equivalent to --debug 0.
  • --log-file filename β€” logs messages into the given file. mainly meant for debugging messages, so if you turn on debug mode it'll automatically create a transcript file β€” but otherwise no file gets created unless you use this option. iykyk πŸ“

ENCOSING AND LOCALISATION OPTIONS

  • --texenc name β€” sets the character encoding to name for the input .tex files.
  • --bibenc name β€” sets the character encoding to name for the output .bib files.
  • --locale lang tag β€” uses the language resource files tied to the given language tag lang tag. if there's no appropriate file for it, the en (English) file gets used instead. we love a fallback πŸ’œ

FILTERING OPTIONS

  • --preamble-only or -p β€” only parses the document preamble, meaning it stops parsing the moment it hits "\begin{document}". that's it, that's the whole job.
  • --no-preamble-only β€” parses the ENTIRE document. (this is the default.)
  • --ignore-fields list or -f list β€” ignores every field in the comma-separated list. each item in that list needs to identify the field by its original case-sensitive column key. this option is cumulative, so stack 'em up 🧚
  • --no-ignore-fields β€” cancels out the effect of --ignore-fields.
  • --skip-datagidx β€” skips the special datagidx internal database. (Default.)
  • --no-skip-datagidx β€” does NOT skip the special datagidx internal database.

OUTPUT FILE OPTIONS

  • --overwrite β€” overwrites existing .bib files. no mercy πŸ’€
  • --no-overwrite β€” doesn't overwrite existing .bib files. respect the elders πŸ™ˆ
  • --split β€” splits the entries into separate files according to the database.
  • --no-split β€” doesn't split the entries into separate files (default).

ADJUSTMENT OPTIONS

  • --space-sub value or -s value β€” substitutes spaces in labels with value.
  • --field-map mappings or -m mappings β€” adds source column key β†’ 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 but don't have a description field get converted to @index instead.
  • --no-index-conversion β€” doesn't replace @entry with @index if the description is missing (default).
  • --detect-symbols β€” attempts to detect entries that should be @symbol or @number, based on the value of the name field. detective mode πŸ”
  • --no-detect-symbols β€” doesn't attempt symbol detection (default).
  • --label col-key or -L β€” uses the column identified by col-key for the entry label. the default column key is Label, so if your database doesn't have a column with that key, you'll either need to specify a column with --label or use --auto-label. heads up: this option is ignored with --auto-label.
  • --auto-label or -a β€” auto-generates entry labels instead of using a column value. let the machine cook ✨
  • --no-auto-label β€” doesn't auto-generate entry labels; uses the column identified by --label for the entry label. (Default.)
  • --auto-label-prefix prefix β€” uses prefix when auto-generating entry labels. ignored with --no-auto-label.
  • --adjust-gls β€” adjusts 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. glow up 🌈
  • --no-adjust-gls β€” doesn'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 gets added to the field identified by field-name. the default is dependency, which will be ignored by bib2gls unless you instruct it otherwise (via field aliasing etc).
  • --no-dependency-field β€” doesn't save labels from any stripped "\glsadd" instances.
  • --strip β€” switches on ALL the strip options.
  • --no-strip β€” switches off ALL the strip options.
  • --strip-glsadd β€” strips "\glsadd" and its argument from field values. (Default.)
  • --no-strip-glsadd β€” doesn't strip "\glsadd" from field values.
  • --strip-acronym-font β€” strips "\acronymfont" from field values. (Default.)
  • --no-strip-acronym-font β€” doesn't strip "\acronymfont" from field values.
  • --strip-acronym-text β€” strips the text field for acronyms identified by "\newacro". (Default.)
  • --no-strip-acronym-text β€” doesn't strip the text field for acronyms.
  • --strip-acronym-name β€” strips the name field for acronyms identified by "\newacro". (Default.)
  • --no-strip-acronym-name β€” doesn't strip the name field for acronyms.
  • --strip-case-change β€” strips known case-changing commands (such as "\makefirstuc" or "\capitalisewords") from field values.
  • --nostrip-case-change β€” doesn't strip case-changing commands. (Default.)
okay bestie, notice that one is spelled --nostrip-case-change with no hyphen between no and strip, unlike literally every other one. that's not a typo on my part, that's just the name. type it exactly. fr fr 😭

OTHER OPTIONS

these options go with features that showed up in datatool.sty version 3.0 β€” that version has a setting which stores the numeric value AND the currency symbol (where applicable) when it's parsing data. so the original string (the formatted number), the numeric value, and the currency symbol all get stored in a special datum format. that format ordinarily expands to its original formatted text, but it also lets the previously parsed info be extracted super easily without having to reparse the data. bestie behaviour πŸ’…

  • --setup options β€” implements "\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 just parsing the input file as a normal .tex file, the source gets 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 gets 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 gets saved in a field whose name is constructed from the original field name followed by the given suffix.
  • --no-save-value β€” doesn't save the numeric value in a separate field. (Default.)
  • --save-currency suffix β€” if a field value is parsed and identified as currency data, the currency symbol gets saved in a field whose name is constructed from the original field name followed by the given suffix.
  • --no-save-currency β€” doesn't save the 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. that's the whole entry fee, bestie πŸ“


πŸ‘‘ 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.

translation: go off, remix it, share it, just don't come for them if it breaks. there is NO WARRANTY and they mean it πŸ’€

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/>


and that's the whole page bestie!! this one was generated by perl v5.40.0 and dated 2024-12-11 β€” so yeah, shoutout to perl and to that December day, they ate and left no crumbs πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from