The following list explains 's new features and how to use them.
\nocite{*}
'
you can now include in the reference list
every entry in the database files, without having to explicitly
\cite
or \nocite
each entry.
Giving this command, in essence,
\nocite
s
all the enties in the database, in database order,
at the very spot in your document
where you give the command.@STRING( WGA = " World Gnus Almanac" )then it's easy to produce nearly-identical title fields for different entries:
@BOOK(almanac-66, title = 1966 # WGA, . . . @BOOK(almanac-67, title = 1967 # WGA,and so on. Or, you could have a field like
month = "1~" # jan,which would come out something like `
1~January
' or `1~Jan.
' in the bbl file,
depending on how your bibliography style defines
the jan abbreviation.
You may concatenate as many strings as you like
(except that there's a limit to the overall length
of the resulting field);
just be sure to put the concatenation character `#',
surrounded by optional spaces or newlines,
between each successive pair of strings.\cite{no-gnats}
in your document,
and suppose you have these two entries in your database file:
@INPROCEEDINGS(no-gnats, crossref = "gg-proceedings", author = "Rocky Gneisser", title = "No Gnats Are Taken for Granite", pages = "133-139") . . . @PROCEEDINGS(gg-proceedings, editor = "Gerald Ford and Jimmy Carter", title = "The Gnats and Gnus 1988 Proceedings", booktitle = "The Gnats and Gnus 1988 Proceedings")Two things happen. First, the special crossref field tells BibTeX that the no-gnats entry should inherit any fields it's missing from the entry it cross references, gg-proceedings. In this case it in inherits the two fields editor and booktitle. Note that, in the standard styles at least, the booktitle field is irrelevant for the PROCEEDINGS entry type. The booktitle field appears here in the gg-proceedings entry only so that the entries that cross reference it may inherit the field. No matter how many papers from this meeting exist in the database, this booktitle field need only appear once.
The second thing that happens:
BibTeX automatically puts the entry gg-proceedings
into the reference list if it's cross
referenced by two or more entries that you
\cite
or \nocite
,
even if you don't \cite
or \nocite
the gg-proceedings entry itself.
So gg-proceedings will automatically appear
on the reference list if one other entry
besides no-gnats cross references it.
To guarantee that this scheme works, however, a cross-referenced entry must occur later in the database files than every entry that cross-references it. Thus, putting all cross-referenced entries at the end makes sense. (Moreover, you may not reliably nest cross references; that is, a cross-referenced entry may not itself reliably cross reference an entry. This is almost certainly not something you'd want to do, though.)
One final note: This cross-referencing feature is completely unrelated to the old 's cross referencing, which is still allowed. Thus, having a field like
note = "Jones \cite{jones-proof} improves the result"is not affected by the new feature.
author = "Kurt G{\"o}del", year = 1931,and if you're using the alpha bibliography style, then BibTeX will construct the label [Göd31] for this entry, which is what you'd want. To get this feature to work you must place the entire accented character in braces; in this case either
{\"o}
or {\"{o}}
will do.
Furthermore these braces must not themselves be
enclosed in braces (other than the ones that might delimit
the entire field or the entire entry);
and there must be a backslash
as the very first character inside the braces.
Thus neither {G{\"{o}}del}
nor {G\"{o}del}
will work for this example.
This feature handles all the accented characters and all but the nonbackslashed foreign symbols found in Tables 3.1 and 3.2 of the LaTeX book. This feature behaves similarly for ``accents'' you might define; we'll see an example shortly. For the purposes of counting letters in labels, BibTeX considers everything contained inside the braces as a single letter.
author = "Jean-Paul Sartre",and if you're using the abbrv style, then the result is `J.-P. Sartre'.
@PREAMBLE
command
for the database files.
This command's syntax is just like @STRING
's,
except that there is no name or equals-sign, just the string.
Here's an example:
@PREAMBLE{ "\newcommand{\noopsort}[1]{} " # "\newcommand{\singleletter}[1]{#1} " }(note the use of concatenation here, too). The standard styles output whatever information you give this command (LaTeX macros most likely) directly to the bbl file. We'll look at one possible use of this command, based on the
\noopsort
command just defined.
The issue here is sorting (alphabetizing). BibTeX does a pretty good job, but occasionally weird circumstances conspire to confuse : Suppose that you have entries in your database for the two books in a two-volume set by the same author, and that you'd like volume 1 to appear just before volume 2 in your reference list. Further suppose that there's now a second edition of volume 1, which came out in 1973, say, but that there's still just one edition of volume 2, which came out in 1971. Since the plain standard style sorts by author and then year, it will place volume 2 first (because its edition came out two years earlier) unless you help . You can do this by using the year fields below for the two volumes:
year = "{\noopsort{a}}1973" . . . year = "{\noopsort{b}}1971"According to the definition of
\noopsort
,
LaTeX will print nothing but the true year for these fields.
But BibTeX will be perfectly happy pretending that
\noopsort
specifies some fancy accent
that's supposed to adorn the `a' and the `b';
thus when BibTeX sorts it will pretend that
`a1973' and `b1971' are the real years,
and since `a' comes before `b', it will place volume 1 before volume 2,
just what you wanted.
By the way, if this author has any other works included
in your database, you'd probably want to use instead something like
{\noopsort{1968a}}1973
and
{\noopsort{1968b}}1971
,
so that these two books would come out in a reasonable spot
relative to the author's other works
(this assumes that 1968 results in a reasonable spot,
say because that's when the first edition of volume 1 appeared).
There is a limit to the number of @PREAMBLE
commands
you may use, but you'll never exceed this limit if
you restrict yourself to one per database file;
this is not a serious restriction,
given the concatenation feature (item 2).