Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Do we need a BibTeX FAQ?

15 views
Skip to first unread message

Jody Klymak

unread,
Dec 14, 1998, 3:00:00 AM12/14/98
to
Hi David,

Hopefully I am not the hundredth person to write you this, but

> To get a reference with the authors' names in the text in both numerical
> and author-date referencing modes, the \citet{} command is provided. But
> here a second, related problem appears--how can one include a page
> reference with this type of citation:
> ...the opposite view is taken by Laughton [18, p. 35]...
> ...the opposite view is taken by Laughton (1968 p. 35)...
> Natbib.sty seems able to provide the numerical reference version of
> these two, but not the second (author-date) form, using either the
> \cite{} or the \citet{} command.

you do this in P. Daly's AGU macros by
\citet[][p.\ 50]{farmersmith80}
which I assume is true in natbib.sty as well.

> The third problem with natbib.sty is that it does not provide all of the
> functionality of cite.sty or overcite.sty in numerical mode. It does order
> the numbers and calculate ranges, but it does not fix spacing problems. In
> superscript form, it does not move the superscripts to the correct side of
> any punctuation the way that overcite.sty does.

I know nothing about how natbib handles this.

>
> For these three reasons, I prefer to use the first approach to this
> problem--typing the authors' names explicitly and defining a \citey{}
> type command.

Not as satisfying as \citet though!

Cheers, Jody


--
Jody Klymak APL/School of Oceanography,
Doctoral Candidate University of Washington
mailto:jkl...@apl.washington.edu (206)-685-9080
http://www.ocean.washington.edu/people/grads/jklymak/

David Hoadley

unread,
Dec 15, 1998, 3:00:00 AM12/15/98
to
I do notice that a lot of questions about BibTeX seem to recur on this
newsgroup, and they seem to cover areas that are not covered in the
comp.text.tex FAQ (well, not in the one I printed out quite some time
ago). I wrote a bit of a guide a while ago, and I thought I would post it
here for comment.
- Will it be useful?
- Is some of it now out of date? (e.g. are the reasons that I chose not
to use natbib still valid?)
- Are their major points of disagreement?
- Can someone please fill in the couple of questions I did not answer?

Regards,
David.
------------------------------------------
HOW TO USE BIBTEX
-----------------

The LaTeX and BibTeX manuals [1,2] describe how BibTeX works but they do
not tell you how to use it; that isn't their function. Where there is more
than one way to go about a problem, their job is to show you the
alternatives, not to tell you which one you should use. Each person will
have different needs. Nevertheless, some advice is generally applicable,
and new users could benefit from the experience of others before embarking
on a process of trial and error. This note aims to give such advice.

A similar argument applies to the many packages and style files that are
available on CTAN. Some of them address specific problems, some are useful
to almost everyone, many of them overlap in their functions--how does one
choose? A book like The LaTeX Companion [3] helps by describing many of
these packages, but it is not its job to pass judgement on them. This note
does select a few favourites. I expect that other peoples' opinions will
differ.

Finally, a number of BibTeX-related questions recur on internet newsgroups
but there does not seem to be a BibTeX FAQ. Perhaps this note will help.

The principle to remember when entering information into a BibTeX database
is that you are providing information for the convenience of your readers.
Therefore you should err on the side of including too much information,
not too little. Database information can always be omitted by BibTeX
according to the BibTeX style file (which I will call a bibstyle from
now on, to distinguish it from a LaTeX style file) if that is what you
need, but missing information can't be generated.


1. Put author's full name into database when you can.

If you want only initials in the reference list, use an appropriate
bibstyle (or create one, see 9) to generate this.


2. Put all the authors' names into the author list.

That is, do not put "and others", unless you don't actually know their
names. You never know when you might want to search for one of these
"other" authors' name(s). If you want "et al." to appear in the reference
list instead of all the names, use an appropriate bibstyle to generate this
(or create one, see 9).


3. Put your usual journal names into @string definitions, in a
separate file.

The standard bibstyles (plain, abbrv, unsrt, alpha) do contain some
journal names, all computing-related. This is not really a sensible place
since bibstyles are intended to set the format for the publication you
are contributing TO, not keeping a complete list of the publications you
read and cite FROM. But if you want the ability to choose full or
abbreviated titles, you must go one step further and create two files.
For example, in one file (called jrnllong.bib) I have
@string{ieee-pas="IEEE Transactions on Power Apparatus and Systems"}
and in the other (called jrnlabbr.bib)
@string{ieee-pas="IEEE Trans. Power Appar. Syst."}
and many other entries. Note: both have the same id-strings. To select
full or abbreviated titles, I place the appropriate file in my
\bibliography{} list (first in the list).


4. Put full stops (periods) after abbreviated words in journal
names.

If you are required to supply abbreviated journal names without the
full stops, use a bibstyle to create this (see 9).


5. Create a separate file for crossref'd entries.

Typically this will be conferences (@proceedings) or @books.
Again, you may wish to create two files, one with full and one with
abbreviated titles, and select the appropriate one. Since crossref'd
entries must appear AFTER entries which reference them, it is better to
put them in a separate file. Then you need not be worried about using
any database access software (like BIBDB, bibview, hyperbibtex etc) which
might sort or re-order your database files.


6. Use form \bibliography{jrnl-names,other-database(s),conf-names}

This ensures that all @strings are defined first, and @proceedings entries
(or other crossref'd entries) all appear after any (@inproceedings)
entries which reference them. Selection of abbreviated journal or
conference titles is just a matter of selecting the files in this list.
With this method, abbreviation of titles does not need to be coupled to
the abbreviation of authors' names to initials (the way standard bibstyle
'abbrv' works) so you have more flexibility.


7. Special characters are entered as {\"a} not \"{a}.

This is actually documented in the BibTeX manual [2], but it still trips
people up. See the manual for a complete description.


8. Design for multiple database files.

Assume that you will eventually end up with more than one BibTeX dababase
(.bib) file, perhaps covering different subject areas. Therefore ensure
that the key you choose for each item contains a part that identifies the
file, so that there is no chance of ambiguous or duplicated keys when
using multiple database files simultaneously.

For example, my electrical engineering references, in file elec.bib, are
of the form @article{elec:smith91,...} and my software ones, in file
soft.bib, are of the form @article{soft:smith91,...} (assuming these
are two different articles, probably by different Smiths. Don't put
the one reference in more than one file.)


9. Use Patrick Daly's makebst package.

Not only can you make bibstyles to order, but makebst versions of standard
bibstyles may well be better than the originals. Your bibstyles can strip
periods from journal names (rule 4), or generate limited author lists
followed by "et al." (rule 2) and many many other variations.


10. For multiple reference lists, use chapterbib.sty.

This is a frequently asked question--"I need a bibliography at the end of
each chapter. How do I do it?" The easiest way is with Niel Kempson and
Donald Arseneau's chapterbib.sty.

----------

One of the aims of LaTeX is to enable the author to think about the
structure of a piece of writing rather than its visual appearance. This
principle should also apply to citations: one should be able to write
without considering the citation format until later. Unfortunately, this
is not always possible. Indeed, one of the reasons for Patashnik's
dislike of author-date referencing is that it affects one's writing style,
encouraging vagueness and the passive voice [2, section 4]. But it is
worth attempting. The following points relate to the appearance of the
citations in the text and to writing for a choice of numerical or
author-date referencing styles.


11. Place \cite{} commands ahead of any punctuation like commas or
full stops (periods), not just after them.

This applies even if you are intending to use superscripts for your
references, despite the fact that superscripts should appear after
such punctuation (see 12).


12. Use Donald Arseneau's cite.sty, overcite.sty and drftcite.sty.

If you are using a numerical referencing style (the standard form) obtain
these three files and always use one of them. Cite.sty and overcite.sty
both order index numbers and replace consecutive numbers with a range
(e.g. [7,9,5,6,4,3] becomes [3-7,9]). They also allow spaces after commas
in the \cite{} lists. Cite.sty will fix up any spacing problems, and
overcite.sty will place superscripts after any punctuation (which is the
correct behaviour) even when you have obeyed rule 11.


13. Use harvard.sty (or chicago.sty) for author-date references.

If you use exclusively an author-date style of citations, your choice of
style may be dictated by the publications you write for. If there is an
existing bibstyle that exactly suits your needs, use it. Otherwise, choose
harvard.sty (or chicago.sty) and use makebst to generate the bibstyles
you need.


If you are also using chapterbib.sty (see 10), harvard.sty works without
alteration, but chicago.sty must be modified according to the instructions
in chapterbib.sty. Use makebst to create your bibstyle because it can
produce a better one than the ones supplied. For example, chicago.bst does
not handle crossrefs from @inproceedings entries to @proceedings entries
correctly, but its makebst equivalent does.


Don't bother with authordate1-4.sty--harvard.sty and chicago.sty are much
more flexible. If neither of these can be made to suit your needs,
consider natbib.sty. It has great adaptability, but it has some
disadvantages (more later).


14. Writing for both numerical and author-date referencing styles:

In principle, you should write so that you can change the referencing
style when required without re-writing everything. A standard citation
presents no problems:
The phase-coordinate representation [18] requires...
The phase-coordinate representation (Laughton 1968) requires...
A standard \cite{} command will produce whichever of these is determined
by the style/bibstyle combination.

Where problems do arise is with the use of authors' names integrated into
the text:
Laughton [18] developed the theory...
Laughton (1968) developed the theory...
The author-date styles provide a means of generating both the authors'
names and the date in this form, using a variation to the \cite{} command,
but the standard numerical styles do not.

There are two approaches to getting around this problem when writing for
both styles. One is not to use the facilities of author-date styles for
supplying this format, but to type the names into the text explicitly
just as you would have done if using only the numeric form of citation.
This means you must check the consistency and spelling of the authors'
names yourself, which is unfortunate.

Following the authors' names must be a citation command which (if using
numerical referencing) will generate a reference number in the usual way,
but if using author-date referencing, will generate only a date (not a
full reference). The first requires a \cite{} command, the second a
\citeyear{} command (with harvard.sty or chicago.sty). This can be done
by defining a new command, say \citey{}, and using that.
Laughton \citey{soft:laughton68} developed the theory...
For numerical referencing, you would define it:
\newcommand{\citey}{\cite}
and for author-date referencing, it would be:
\newcommand{\citey}{\citeyear}

The second approach to this problem is to use a style which can supply
authors' names integrated into the text, even when using numerical
referencing. This is what Patrick Daly's natbib.sty does. But there are
a few problems with its use. One of these inconsistent behaviour between
its numerical and author-date modes. In numerical mode, the standard
\cite{} command produces a normal numeric reference, but in author-date
mode it does not produce a standard reference, but instead places the
authors names outside the parentheses. For example, the standard \cite{}
command will produce the following when using natbib:
The phase-coordinate representation [18] requires...
The phase-coordinate representation Laughton (1968) requires...
which is not desirable.

To get consistent behaviour between the two referencing styles you must
change all your \cite{} commands to either \cite[]{} or \citep{}.

To get a reference with the authors' names in the text in both numerical
and author-date referencing modes, the \citet{} command is provided. But
here a second, related problem appears--how can one include a page
reference with this type of citation:
...the opposite view is taken by Laughton [18, p. 35]...
...the opposite view is taken by Laughton (1968 p. 35)...
Natbib.sty seems able to provide the numerical reference version of
these two, but not the second (author-date) form, using either the
\cite{} or the \citet{} command.

The third problem with natbib.sty is that it does not provide all of the

functionality of cite.sty or overcite.sty in numerical mode. It does order
the numbers and calculate ranges, but it does not fix spacing problems. In
superscript form, it does not move the superscripts to the correct side of
any punctuation the way that overcite.sty does.

For these three reasons, I prefer to use the first approach to this


problem--typing the authors' names explicitly and defining a \citey{}
type command.


15. If you must include URLs, use Donald Arseneau's url.sty.

Think carefully about references to World Wide Web or other internet-based
addresses. Your readers should be able to follow up the references you
give them. If they might be reading years after you have written, will the
URLs you give still exist? Will the contents at those addresses still be
the same, or might someone have modified them? If you decide that it is
appropriate to supply URLs (or e-mail addresses, or whatever), use url.sty
to control the format of them.

Harvard.sty recognises a URL field, and formats it using the \harvardurl{}
command. The results are not as good as those produced by url.sty. But
url.sty can be used with harvard.sty - to do so, place
\renewcommand{\harvardurl}[1]{URL: \url{#1}}
in your document preamble somewhere after loading harvard.sty. If you are
using some other style or bibstyle, which dos not recognize a special URL
field in the .bib file, place \url{your-URL-string} into the NOTE field.

----------

Other frequently asked questions.

16. Why do I get errors when I put \cite{} commands in the
captions of figures or tables?

You are using a version of LaTeX that is older than December 1995. You
might even be still using LaTeX 2.09. The best thing to do is to update
your LaTeX, but you can get around the problem by preceding the \cite{}
command with "\protect".


17. How do I get the bibliography/references list into the table
of contents?

The simple answer to this question is to insert the line
\addcontentsline{toc}{chapter}{\bibname} (if you are using book
or report class), or
\addcontentsline{toc}{section}{\refname} (if you are using
article class), or
\addcontentsline{toc}{section}{whatever you want}
immediately after the line containing \begin{thebibliography}{..}. The
problem here (if you are using BibTeX) is that this line will occur in
the .bbl file (created by BibTeX) not the .tex source created by you.
The better solution requires modifying the document class file to
redefine the "thebibliography" environment.


18. How do I alter the spacing between items in the references
list?

???????


19. How do I get numbers in the references list to appear without
the square brackets around them?

Before the \begin{document} command, insert the following:
\makeatletter
\renewcommand\@biblabel[1]{#1.\hfill}
\makeatother


References

[1] Leslie A. Lamport. LaTeX: A Document Preparation System. Addison
Wesley, 1986.

[2] Oren Patashnik. BibTeXing. Documentation for general BibTeX users.
1988.

[3] Michel Goossens, Frank Mittelbach and Alexander Samarin. The LaTeX
Companion. Addison-Wesley 1994.


--
-----------------------------------------------------------------------------
David Hoadley Internet: s840...@minyos.its.rmit.edu.au
Electrical Engineering, RMIT
Melbourne, Australia Ph: +61 3 9925 4847, Fax: +61 3 9925 2007

Sven Utcke

unread,
Dec 15, 1998, 3:00:00 AM12/15/98
to
David Hoadley <s840...@minyos.its.rmit.edu.au> writes:

> - Will it be useful?

You bet! Where have you been when I started using BibTeX (many years
ago)?

Thanks

Sven
--
_ _ Lehrstuhl fuer Mustererkennung und Bildverarbeitung
| |_ __ | |__ Sven Utcke
| | ' \| '_ \ phone: +49 761 203 8274 Am Flughafen 17
|_|_|_|_|_.__/ fax : +49 761 203 8262 79110 Freiburg i. Brsg.
mailto:ut...@informatik.uni-freiburg.de www.informatik.uni-freiburg.de/~utcke

eeryit

unread,
Mar 3, 2005, 6:52:06 AM3/3/05
to
Hello. I am about two days into learning LaTex to help my husband
format his thesis, which is due to the reviewers today. We don't have
the companion book or others, but have been using several helpful
tutorials on the internet.

My question: He has put together his bibliography file by collecting a
number of different reference lists from many different previous
papers. Consequently, the same reference sometimes shows up with a
different key, depending on the original source. Can multiple keys
point to a single entry (and produce only one copy of it in the
bibliography)?

Here's an example of what he tried to bootleg that didn't work:

@unpublished{SPIE25, CLEO04-3,
author = "M. A. Wistey and S. R. Bank and H. B. Yuen and J. S.
Harris",
title = "Real-Time Ion Count from Nitrogen Plasma Source,",
year = "2003",
note = "North American MBE Conf., session P2-9"
}

We would like for SPIE25 and CLEO04-3 to point to the same entry.

I thought crossref or the alias feature could do this, but don't know.

0 new messages