BIBORDER 1 "06 April 2014" "Version 0.16"

Table of contents


biborder - order key fields in a BibTeX bibliography file


biborder [-alphabetical] [-bimonthly m1/m2/m3/m4/m5/m6] [-check-missing] [-help] [-isbn-13] [-monthly] [-quarterly m1/m2/m3/m4] [-version] < infile > outfile
biborder [-alphabetical] [-bimonthly m1/m2/m3/m4/m5/m6] [-check-missing] [-help] [-isbn-13] [-monthly] [-quarterly m1/m2/m3/m4] [-version] BibTeXfile(s) > outfile


biborder filters one or more BibTeX bibliographies, or bibliography fragments, from the specified files, or from its standard input if no filenames are provided, printing on standard output a bibliography in which key fields have been put into a standard order: author, editor, key, booktitle, title, crossref, chapter, journal, volume, type, number, howpublished, institution, organization, publisher, school, address, edition, pages, day, month, year, CODEN, DOI, EAN, ISBN, ISBN-13, ISSN, ISSN-L, LCCN, MRclass, MRnumber, MRreviewer, bibdate, bibsource, note, price, series, URL, and ZMnumber. All other key fields are output in alphabetical order following the standard ones.

A consistent key field order makes BibTeX entries easier to read, and also facilitates identification and removal of duplicates, such as with bibsort -u.


Command-line options may be abbreviated to a unique leading prefix.

To avoid confusion with options, if a filename begins with a hyphen, it must be disguised by a leading absolute or relative directory path, e.g. /tmp/-foo.bib or ./-foo.bib.

Output all keys in strict alphabetical order, rather than in the standard order given previously.
-bimonthly m1,m2,m3,m4,m5,m6
If this option is specified, all of the journals in the BibTeX file entries are assumed to appear at two-month intervals. The six month names that correspond to each such interval must be given as a single argument following -bimonthly, with the names separated by (any number of) non-letters. A typical example is feb-apr-jun-aug-oct-dec, specifying that issue number 1 appears in February, and number 6 in December.
If this option is specified, missing expected key fields are supplied, with the key field name prefixed with OPT, and the value string set to a pair of question marks, e.g.
  OPTvolume =    "??",
The OPT prefix ensures that the key is ignored by BibTeX, so that the question marks do not appear in an output .bbl file. The GNU Emacs bibtex-mode editing support has functions for removing the OPT prefixes, and so does bibclean(1).

The doubled question marks are distinguished from single ones that might legitimately appear in value strings, and also serve as a convenient regular-expression pattern for bibextract(1), allowing easy preparation of a printed listing of just those entries that have incomplete bibliographic data:

     bibextract '' '[?][?]' BibTeXfiles |  lpr
Because the 10-digit International Standard Book Number (ISBN) system introduced in 1972 is running out of assignable numbers, effective 2007-01-01, it is replaced by a new 13-digit system based on the European Article Numbering (EAN) system. The name for the new system is ISBN-13, and such values are also EAN values.

The 12-digit Uniform Product Code (UPC) transitioned to the EAN-13 system on 2005-01-01,

Both the ISBN and UPC numbers appear on printed books produced since those systems were introduced, but library catalogs normally record only ISBN data, not UPC values.

ISBN-13 translations of ISBN-10 data consist of the prefix 978- followed by the first 9 digits of the ISBN-10 value with the same (optional) hyphenation as before, followed by a hyphen and a new check digit. The latter is computed by a different algorithm, and does not in general match the tenth digit (the check digit) of the ISBN-10 value.

As an aid to converting BibTeX files with ISBN data to the new format, the -isbn-13 option requests that biborder generate companion ISBN-13 key/value pairs, provided that an ISBN-13 key does not already exist, and that ISBN values are properly hyphenated. Existing ISBN assignments are preserved, and the ISBN numbers are merely converted for use in a new key/value pair. Thus, an input assignment

    ISBN =    "1-55798-243-0 (hardcover),
               1-55798-241-4 (paperback)",
on output becomes
    ISBN =    "1-55798-243-0 (hardcover),
               1-55798-241-4 (paperback)",
    ISBN-13 = "978-1-55798-243-8 (hardcover),
               978-1-55798-241-4 (paperback)",

Similarly, if ISBN-13 values with 978- prefix are supplied, and ISBN 10-digit values are absent, then old-style ISBN fields are generated. Thus, an input assignment

    ISBN-13 = "978-1-55798-243-8 (hardcover),
               978-1-55798-241-4 (paperback)",
on output includes both ISBN and ISBN-13 values, as shown earlier.

More information on the changes to the ISBN system can be found on the Web at:

At some future time, EAN identifiers will grow to 14 digits and be called a Global Trade Identifier Number: a new leading digit will then provide for a ten-fold expansion in the number of available identifiers. For details, see:

If this option is specified, all of the journals in the BibTeX file entries are assumed to appear monthly, 1 in January, 2 in February, ..., 12 in December.

If only one of the number and month values is supplied, biborder supplies the other automatically, but names it OPTmonth or OPTnumber to distinguish it from existing keys. A simple editor string substitution, or bibclean(1), can subsequently normalize the appearance.

-quarterly m1,m2,m3,m4
If this option is specified, all of the journals in the BibTeX file entries are assumed to appear quarterly. The four month names that correspond to each quarter must be given as a single argument following -quarterly, with the names separated by (any number of) non-letters. Some examples are jan-apr-jul-oct, mar////jun.sep:dec, Spring\ Summer\ Fall\ Winter, and 'Spring Summer Fall Winter'. The last two examples show that when space separators are used, they must be backslashed, or else the list must be surrounded by quotes, to force UNIX shells to interpret the quarter names as a single argument.

The options -bimonthly, -monthly, and -quarterly are mutually exclusive; biborder refuses to run if more than one of them is specified. They should normally only be used in journal-specific bibliographies, because number-month pairing does not hold for all journals.

Failure to supply the correct number of month names for -bimonthly or -quarterly also causes immediate termination.


biborder issues warning messages in the following cases: biborder issues an error message and terminates with exit code 1, and incomplete output, in the following cases:


BibTeX has loose syntactical requirements that the current simple implementation of biborder does not support. In particular, outer parentheses may not be used in place of braces following ``@keyword'' patterns. If you have such a file, you can use bibclean(1) to prettyprint it into a form that biborder can handle successfully.


bibcheck(1), bibclean(1), bibdup(1), bibextract(1), bibjoin(1), biblabel(1), biblex(1), bibparse(1), bibsort(1), bibtex(1), bibunlex(1), citesub(1), emacs(1).


Nelson H. F. Beebe
University of Utah
Department of Mathematics, 110 LCB
155 S 1400 E RM 233
Salt Lake City, UT 84112-0090
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: <>, <>, <>