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
--helpor-hβ shows you the help message and then dips. bye! βοΈ--versionor-vβ spills the version info and exits.--silentor--quietor-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--debugwhen you can't remember the level number (valid, honestly π). the value is the same as forbib2gls's--debug-modeoption.--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.texfiles.--bibenc nameβ sets the character encoding to name for the output.bibfiles.--locale lang tagβ uses the language resource files tied to the given language tag lang tag. if there's no appropriate file for it, theen(English) file gets used instead. we love a fallback π
FILTERING OPTIONS
--preamble-onlyor-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 listor-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 specialdatagidxinternal database. (Default.)--no-skip-datagidxβ does NOT skip the specialdatagidxinternal database.
OUTPUT FILE OPTIONS
--overwriteβ overwrites existing.bibfiles. no mercy π--no-overwriteβ doesn't overwrite existing.bibfiles. 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 valueor-s valueβ substitutes spaces in labels with value.--field-map mappingsor-m mappingsβ adds source column key β destination field label mappings. the argument should be a comma-separated list ofcol-key=bib-fieldpairs. this option is cumulative.--no-field-mapβ cancels ALL mappings applied with--field-map.--index-conversionor-iβ any entries that would normally be converted to@entrybut don't have adescriptionfield get converted to@indexinstead.--no-index-conversionβ doesn't replace@entrywith@indexif the description is missing (default).--detect-symbolsβ attempts to detect entries that should be@symbolor@number, based on the value of thenamefield. detective mode π--no-detect-symbolsβ doesn't attempt symbol detection (default).--label col-keyor-Lβ uses the column identified by col-key for the entry label. the default column key isLabel, so if your database doesn't have a column with that key, you'll either need to specify a column with--labelor use--auto-label. heads up: this option is ignored with--auto-label.--auto-labelor-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--labelfor 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 thedatagidx.stycommands like"\glsnl"with the closestglossaries.styequivalent. 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 isdependency, which will be ignored bybib2glsunless 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 thetextfield for acronyms identified by"\newacro". (Default.)--no-strip-acronym-textβ doesn't strip thetextfield for acronyms.--strip-acronym-nameβ strips thenamefield for acronyms identified by"\newacro". (Default.)--no-strip-acronym-nameβ doesn't strip thenamefield 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-changewith no hyphen betweennoandstrip, 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.texfile, 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.texfile, 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 π
π 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/>
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
- fedora 44: texlive-bib2gls 12:svn76845-105.fc44 Β· GPL-3.0-or-later
- fedora 44: texlive-bib2gls 12:svn76845-111.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms