77

How do I cite authors in LaTeX?

I tried using natbib package

---- doc.tex ----

...
\usepackage{natbib}
...
\citeauthor{736184}
...

---- doc.bib ----

@inproceedings{736184,
     author = {Broder, Andrei Z.},
...

but all I get is (author?) (in bold).

1 Answer 1

66

At a bare minimum, your LaTeX source file needs to contain these elements for \citeauthor to work:

---- doc.tex ----

\documentclass{article}
\usepackage[numbers]{natbib}

\begin{document}
    \citeauthor{goossens93}

    \bibliographystyle{plainnat}
    \bibliography{doc}
\end{document}

---- doc.bib ----

@book{goossens93,
    author    = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title     = "The LaTeX Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}

The correct compilation cycle for the document is then as follows:

latex doc
bibtex doc
latex doc
latex doc

The first compilation generates the list of cited works for BibTeX. Then BibTeX uses that information to generate a .bbl file from doc.bib containing all of the citations formatted according to the bibliography style you choose. The second compilation incorporates the .bbl into the document, and the third compilation updates all of the cross-references (e.g. citations).

Here is the output for the example above:

LaTeX output

5
  • 15
    plainnat was my problem. I didn't know that natbib uses different styles. I used alpha and I should have used alphanat. Unfortunately I do not have alphanat.bst and I couldn't find the file on internet (though the page you indicated says it provided by default). Do you know where to get it from? Also for some reason I don't see the indexes (eg. [4]) when using plainnat. Why?
    – Alexandru
    Jun 3, 2009 at 20:26
  • 2
    Whoops, there is no alphanat.bst--I've fixed the Wikibooks article (I wrote the table of natbib-compatible styles ;-) ). I believe plainnat.bst is the style you're looking for--the plain and alpha citation format appears to be the same, it's just that in the bibliography, plain uses numbers for the cross-references, whereas alpha uses abbreviated last names and two-digit years. natbib defaults to author-year cross-references, but it can also do numerical cross-references if you use "\usepackage[numbers]{natbib}" instead of "\usepackage{natbib}"
    – las3rjock
    Jun 3, 2009 at 21:47
  • 1
    I still have some problems obtaining numbers in the biography! instead of [4] Author, Title, I get only Author, Title I tried \usepackage[numbers]{natbib} and "plainnat" with no success.
    – Alexandru
    Jun 4, 2009 at 9:11
  • 3
    I've updated my example and included an image of the output. I hope that will help you track down your problem.
    – las3rjock
    Jun 4, 2009 at 17:49
  • 4
    The same thing also happens when using other bibliography styles. For exaple, using \bibliographystyle{unsrt} with command \citeauthor{some_id} produces (author?), whereas using \bibliographystyle{unsrtnat} with \citeauthor{some_id} produces the desired result.
    – tjanez
    Sep 3, 2013 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .