.-3[NAME]
.-2[SYNOPSIS]
.-1[DESCRIPTION]
Top
.+1[BIBTEX FILE PARTS]
.+2[CAVEATS]
.+3[PROGRAMMING NOTES]
For the sort order options beginning -by, the last one seen overrides all earlier ones.
All options are parsed before any input bibliography files are read, no matter what their order on the command line.
Except for the options described below, command-line words beginning with a hyphen are assumed to be options to be passed to sort(1).
The leading hyphen that distinguishes an option from a filename may be doubled, for compatibility with GNU and POSIX conventions. Thus, -author and --author are equivalent.
All remaining command-line words are assumed to be input files. Should such a filename begin with a hyphen, it must be disguised by a leading absolute or relative directory path, e.g. /tmp/-foo.bib or ./-foo.bib.
The sort(1) -f option to ignore letter case differences is always supplied. The -r option reverses the order of the sort. The -u option removes duplicate bibliography entries from the input stream; however, such entries must match exactly, including all white space.
Sort keys are constructed from several parts of the BibTeX entry. If non-numeric values are found where numbers are normally expected (that is, for BibTeX day, number, pages, volume, and year, keys), they are replaced by large integers that will sort higher than any reasonable integer value likely to be present. Nondigits after the first character are ignored, so 20S will reduce to 20: such values are occasionally seen for volume, number, and pages values.
However, uncertain year values of the form 19xx or 20xx are sorted at the end of their century.
With -byday sorting, a day keyword is recognized (it will be standard in BibTeX 1.0), but for backward compatibility, month entries of the form
"daynumber " # monthname "daynumber~" # monthname {daynumber } # monthname {daynumber~} # monthname monthname # "daynumber " monthname # "daynumber~" monthname # {daynumber } monthname # {daynumber~}
are also recognized, and will yield both a day and a month. If a day number is not available, a very large value is assumed, which will sort the entry after others that have day values in the same year and month.
The reason for ignoring the issue number is that some journal databases lack that information. If -byvolume were used, then articles lacking issue numbers would be sorted separately from those with issue numbers, which makes it harder to check for duplicates, or to compare entries with original journal issues.
With -byvolume sorting, warnings are issued for any entry in which any of these fields are missing, and a value of the missing field is supplied that will sort higher than any printable value.
Because -byvolume sorting is first on journal name, it is essential that there be only one form of each journal name; the best way to ensure this is to always use @String{...} abbreviations for them. Order -byvolume is convenient for checking a bibliography against the original journal, but less convenient for a bibliography user.
.-3[NAME]
.-2[SYNOPSIS]
.-1[DESCRIPTION]
Top
.+1[BIBTEX FILE PARTS]
.+2[CAVEATS]
.+3[PROGRAMMING NOTES]