bibtexconv(1)
π NAME π
okay so listen β bibtexconv. She's the BibTeX Converter, and she is genuinely that girl π
this is the bibtexconv(1) manual page, General Commands Manual, and we're about to get into it bestie π«Ά
β¨ SYNOPSIS β¨
bibtexconv BibTeX_file [...]
[-B bibtex_file_name | --export-to-bibtex bibtex_file_name]
[-b bibtex_file_prefix| --export-to-separate-bibtexs bibtex_file_prefix]
[-X xml_file_name | --export-to-xml xml_file_name]
[-x xml_file_prefix | --export-to-separate-xmls xml_file_prefix]
[-C custom_file_name | --export-to-custom custom_file_name]
[-D directory | --store-downloads directory]
[-m name:mapping_file:key_column:value_column | --mapping name:mapping_file:key_column:value_column]
[-s string | --nbsp string]
[-l string | --linebreak string]
[-n | --non-interactive]
[-U | --check-urls]
[-u | --only-check-new-urls]
[-w | --ignore-updates-for-html]
[-a | --add-url-command]
[-i | --skip-notes-with-isbn-and-issn]
[-I | --add-notes-with-isbn-and-issn]
[-q | --quiet]
[-h | --help]
[-v | --version]
πΈ DESCRIPTION πΈ
so basically π bibtexconv is a BibTeX file converter that lets you export BibTeX entries to other formats, including customly defined text output (yes, you literally get to define your own output template, main character energy fr).
on top of that, she also gives you the possibility to check URLs β and we mean including MD5, size and MIME type computations β¨ β and to verify ISBN and ISSN numbers. very thorough, very iconic.
and then there's the interactive mode, which is usually used in the form of export scripts π and which allows for fine-granular selection of entries, sorting, and export template specification. like, full control bestie, no cap. π
π OPTIONS π
The following arguments may be provided:
BibTeX_File [...]β the BibTeX input file π«Ά and yes, multiple files may be provided, she's flexible like that.-B bibtex_file_name,--export-to-bibtex bibtex_file_nameβ write the results as BibTeX into the given file πΎ-b bibtex_file_prefix,--export-to-separate-bibtexs bibtex_file_prefixβ write the results as BibTeX, but each entry gets its own file π the filename is generated from the given prefix (e.g."/tmp/MyBibTex-"), plus the entry key, plus".bib".-X xml_file_name,--export-to-xml xml_file_nameβ write the results as XML into the given file β¨ and not just any XML β this is the XML as used by IETF Internet Draft processing tools.-x xml_file_prefix,--export-to-separate-xmls xml_file_prefixβ write the results as XML, one file per entry π the filename is generated from the given prefix (e.g."/tmp/MyBibTex-"), plus the entry key, plus".xml".-C custom_file_name,--export-to-custom custom_file_nameβ write the results as custom output into the given file π your template, your rules.-D directory,--store-downloads directoryβ combined with--check-urls, all checked references get downloaded and stored in the given directory π₯ heads up bestie: existing files will be overwritten β like, gone. so pick your directory carefully π-m name:mapping_file:key_column:value_column,--mapping name:mapping_file:key_column:value_columnβ read the key and value columns from a mapping file into a mapping with the given name ποΈ-s string,--nbsp stringβ replace non-breakable space by the given string. for example," "when writing HTML πΈ-l string,--linebreak stringβ replace linebreak by the given string. for example,"<br />"when writing HTML π-n,--non-interactiveβ turns on non-interactive mode. super useful for just performing URL checks and ISBN/ISSN verification π-U,--check-urlsβ check URLs by downloading the content file and adding MD5, size and MIME type entries πβ¨-u,--only-check-new-urlsβ combined with--check-urls, checks are only performed for new entries where MD5, size and/or MIME type are still unknown π no reruns, we're efficient.-w,--ignore-updates-for-htmlβ ignore changes in HTML files when checking URLs π this is useful for dynamically-generated web pages, where each retrieval creates a new, different HTML file. (iykyk, those pages will gaslight your diff otherwise π)-a,--add-url-commandβ add\url{}commands to url tags in BibTeX export β¨-i,--skip-notes-with-isbn-and-issnβ when reading the BibTeX file, ignore"note"items with ISBN and ISSN π-I,--add-notes-with-isbn-and-issnβ when writing a BibTeX file, create"note"items with ISBN and ISSN π-q,--quietβ reduces output verbosity π€«-h,--helpβ prints command-line parameters π«Ά-v,--versionβ prints program version β
π COMMANDS π
okay this part is important so pay attention bestie π after startup, bibtexconv accepts the following commands from standard input β and here's the thing β not as command-line arguments! not a single one of these goes on the command line. stdin only. periodt π
cite key [custom1 ... custom9]β select a specific entry in the input BibTeX file, given by key. optionally, up to nine custom strings may be attached to the selected entry π―citeAllβ select all entries in the input BibTeX file πclearβ remove all selected citations, i.e. no citation will be selected π§Ήsort key/[A|D] ...β sort the selected citations, according to key and ascending (A) or descending (D) ordering π the key corresponds to a key in the BibTeX file. multiple keys may be defined, e.g.sort year/D month/D day/D title/A.echo stringβ write the given string to standard output π’exportβ export selected entries to standard output, according to the configured printing template β¨include fileβ include another export script, given by file name πmonthNames jan feb mar apr may jun jul aug sep oct nov decβ changes the textual representation of month names ποΈ this is necessary when non-English names are required for export.nbspβ changes the textual representation of the "non-breakable space", for example in HTML or~in BibTeX πΈtemplatenewβ begin a new template definition π initially, the template will be empty.template+ template_stringβ add the provided template string to the template β¨template+allows one to define a complex template consisting of multipletemplate+lines, to enhance readability. within the template, the following placeholders can be used:%{abstract}β insert the BibTeX"abstract"content (i.e. the abstract of the publication) π%{address}β insert the BibTeX"address"content (i.e. the address of the publication, usually the conference or publisher location) π%{booktitle}β insert the BibTeX"booktitle"content (i.e. the book title of the publication) π%{custom-1}| ... |%{custom-9}β insert the corresponding value provided ascustom1...custom9to the"cite"command π some conversions may be applied when using"xmlStyle"(see below).%{custom-1-as-is}| ... |%{custom-9-as-is}β insert the corresponding value provided ascustom1...custom9to the"cite"command π«Ά no conversions are applied.%{day}β insert the BibTeX"day"content (i.e. the publication day of the publication) π%{doi}β insert the BibTeX"doi"content (i.e. the DOI number of the publication) π%{edition}β insert the BibTeX"edition"content (i.e. the edition of the publication) π%{editor}β insert the BibTeX"editor"content (i.e. the editor of the publication) βοΈ%{howpublished}β insert the BibTeX"howpublished"content (i.e. the publication type of the publication) π·οΈ%{institution}β insert the BibTeX"institution"content (i.e. the institution of the publication) ποΈ%{isbn}β insert the BibTeX"isbn"content (i.e. the ISBN of the publication) π’%{issn}β insert the BibTeX"issn"content (i.e. the ISSN of the publication) π’%{issue}β insert the BibTeX"issue"content (i.e. the issue of the publication) ποΈ%{journal}β insert the BibTeX"journal"content (i.e. the journal containing the publication) π°%{keywords}β insert the BibTeX"keywords"content (i.e. the keywords of the publication) π%{language}β insert the BibTeX"language"content (i.e. the language of the publication) π%{location}β insert the BibTeX"location"content (i.e. the location of the publication, usually the publisher location) π%{month}β insert the BibTeX"month"content (i.e. the publication month of the publication) ποΈ%{note}β insert the BibTeX"note"content (i.e. some additional information about the publication) ποΈ%{number}β insert the BibTeX"number"content (i.e. the number of the publication) #οΈβ£%{numpages}β insert the BibTeX"numpages"content (i.e. the number of pages of the publication) π%{organization}β insert the BibTeX"organization"content (i.e. the organization of the publication) π’%{pages}β insert the BibTeX"pages"content (i.e. the pages range of the publication) π%{publisher}|%{$}β insert the BibTeX"publisher"content (i.e. the publisher of the publication) π’β¨ two ways, same vibe.%{school}β insert the BibTeX"school"content (i.e. the school of the publication) π%{series}β insert the BibTeX"series"content (i.e. the series of the publication) π%{title}β insert the BibTeX"title"content (i.e. the title of the publication) π%{type}β insert the BibTeX"type"content (i.e. the type of the publication) π·οΈ%{url}β insert the BibTeX"url"content (i.e. the url of the publication) π%{url.checked}β insert the BibTeX"url.checked"content. it contains the date of the last URL check β° this field is a custom field used by BibTeXConv.
okay bestie we're back and the placeholder list is STILL going π here's the rest of the template lore:
%{url.keywords}β slots in the BibTeXurl.keywordscontent. This one holds the keywords of the download fromurl(like, PDF keywords inside a PDF file πΈ). Custom field, used by BibTeXConv.%{url.md5}β slots in the BibTeXurl.md5content. It's the MD5 sum of the download fromurl. Also a custom field used by BibTeXConv.%{url.mime}β slots in the BibTeXurl.mimecontent. That's the MIME type of the download fromurl, e.g.application/pdffor a PDF. Yep, custom field used by BibTeXConv π%{url.pagesize}β slots in the BibTeXurl.pagesizecontent. It's the paper format of the download fromurl, e.g.595.276 x 841.89 pts (A4)for DIN A4 or612 x 792 pts (letter)for US Letter π Custom field used by BibTeXConv.%{url.size}β slots in the BibTeXurl.checkedcontent. It holds the date of the last URL check. Custom field used by BibTeXConv.%{content-language}β slots in the BibTeXcontent-languagecontent. This is the language of the actual publication content, which is lowkey not the same as the language of the metadata. For instance,content-languagecould bechinese, while title and abstract (given bylanguage) isenglishπ Custom field used by BibTeXConv.%{urn}β slots in the BibTeXurncontent. It's the Uniform Resource Name (URN) number, which lots of national libraries use π Custom field used by BibTeXConv.%{volume}β slots in the BibTeXvolumecontent (the volume of the publication, bestie).%{year}β slots in the BibTeXyearcontent (the publication year of the publication).
The template also lets you evaluate blocks, with and without error containment β this is where it gets iconic π¦
[ ... ]: Blocks with error containment β blocks in square brackets get evaluated. If a referenced placeholder, e.g.%{url}, doesn't exist, the block gets emptied out. So you can add content like the URL if it's chillin' in the BibTeX reference, but produce nothing at all when that info just isn't available. Perfect lil conditional, no cap β¨( ... ): Blocks without error containment β same energy as[ ... ], except if the evaluation fails, that failure gets propagated to the next upper level. So a construct like[ ... ( ... )]will produce no output if the inner block evaluation fails (the parentheses push the failure up to the next upper block). Meanwhile[ ... [ ... ]]would only result in an empty inner block π
Note: parentheses in the template need to be escaped, i.e.\(and\). Unescaped parentheses are interpreted as block definition! Do not skip this bestie, it will ruin your whole vibe π
And bc blocks exist, you can do some conditional evaluation:
%{is?COMPARISON}β success, if the block until the placeholder is equal to COMPARISON.%{is-not?COMPARISON}β success, if the block until the placeholder is not equal to COMPARISON.%{is-less-than?COMPARISON}β success, if the block until the placeholder is less than COMPARISON.%{is-less-than-or-equal?COMPARISON}β success, if the block until the placeholder is less than or equal COMPARISON.%{is-greater-than?COMPARISON}β success, if the block until the placeholder is greater than COMPARISON.%{is-greater-than-or-equal?COMPARISON}β success, if the block until the placeholder is greater or equal COMPARISON.%{map:NAME}β success, if the mapping NAME contains a mapping from the block until the placeholder. The block is evaluated to this mapping.
Last but iconic: the author list of a publication has its very own special placeholders, bc of course it does π
%{begin-author-loop}β begin the loop over all authors. Inside the loop, the following placeholders apply to the current author in the loop.%{author-family-name}β inserts the current author's family name.%{author-give-name}β inserts the current author's given name.%{is-first-author?}β success, if the current author is the first author.%{is-not-first-author?}β success, if the current author is not the first author.%{is-last-author?}β success, if the current author is the last author.%{is-not-last-author?}β success, if the current author is not the last author.%{end-author-loop}β ends the author loop you started with%{begin-author-loop}. Close your loops, bestie, main character energy π
and then the export-script side of things:
headerheader_string β adds the header string you provide before each exported publication entry β¨trailertrailer_string β adds the trailer string you provide after each exported publication entry β¨utf8Styleβ uses UTF-8 style conventions, i.e. exports characters with no conversion at all. Raw. Unfiltered. πxmlStyleβ uses XML style conventions, i.e. exports characters with some conversions to handle the special characters that XML won't allow, e.g.&for&,<for<, etc. XML said "not today" and so we convert π
β¨ EXAMPLES β¨
Go peek into /usr/share/doc/bibtexconv/examples/ (or wherever that path lands on your system) for example export scripts π«Ά The export scripts contain the commands which are read by bibtexconv from standard input.
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
--export-to-bibtex=UpdatedReferences.bib \
--check-urls --only-check-new-urls --non-interactive
Checks URLs of all entries in /usr/share/doc/bibtexconv/examples/ExampleReferences.bib, adds MD5, size and MIME type items, and writes the results out to UpdatedReferences.bib. It's giving glow-up π
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
</usr/share/doc/bibtexconv/examples/web-example1.export
>MyPublications.html
Uses the export script /usr/share/doc/bibtexconv/examples/web-example1.export to export references from /usr/share/doc/bibtexconv/examples/ExampleReferences.bib to MyPublications.html as XHTML 1.1 π
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
</usr/share/doc/bibtexconv/examples/text-example.export
>MyPublications.txt
Uses the export script /usr/share/doc/bibtexconv/examples/text-example.export to export references from /usr/share/doc/bibtexconv/examples/ExampleReferences.bib to MyPublications.txt as plain text πΈ
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
</usr/share/doc/bibtexconv/examples/yaml-example.export
>MyPublications.yaml
Uses the export script /usr/share/doc/bibtexconv/examples/yaml-example.export to export references from /usr/share/doc/bibtexconv/examples/ExampleReferences.bib to MyPublications.yaml as a YAML file according to the Debian Upstream MEtadata GAthered with YAml (UMEGAYA) format (see https://wiki.debian.org/UpstreamMetadata) π¦
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
--non-interactive --export-to-separate-xmls=reference.
Convert all references to XML references to be includable in IETF Internet Drafts. For each reference, an own file is generated, named with the prefix reference., for example reference.Globecom2010.xml for entry Globecom2010 π
bibtexconv \
/usr/share/doc/bibtexconv/examples/ExampleReferences.bib \
--non-interactive --export-to-separate-bibtexs=
Convert all references to BibTeX references. For each reference, an own file is generated, named with the prefix "", for example Globecom2010.bib for entry Globecom2010. One file per reference, no sharing, very much only-child energy π
and that's the whole page bestie, you ate π
This lil masterpiece is from bibtexconv(1), dated April 29, 2025 β go forth and convert those BibTeX files, fr fr πβ¨π
π¦ where this page comes from
- ubuntu stonking: bibtexconv 2.1.1-1build1 Β· GPL-3.0-or-later
- Copyright (C) 2010-2026 by Thomas Dreibholz
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms