Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to show the author names using \citet but I get just the reference number. Here is a minimal code:

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{natbib}

\begin{document}

 The author \citet{toschi09} has shown that ..

\bibliographystyle{plain}
\bibliography{foo}

\end{document}

And here is foo.bib

@article{toschi09,
author = {Toschi, F. and Bodenschatz, E.},
title = {Lagrangian Properties of Particles in Turbulence},
journal = {Annual Review of Fluid Mechanics},
volume = {41},
number = {1},
pages = {375-404},
year = {2009}, 
}

What I get is:

The author (author?) [1] has shown that ..

Any help will be more than welcome, thank you!

share|improve this question
2  
Does switching to \bibliographystyle{plainnat} help? –  Torbjørn T. Mar 21 at 10:46
    
@TorbjørnT. yes Thank you! it works! but what is the file which is created .aux I got a message with regard to it –  Strömungsmechanik Mar 21 at 10:58
    
The .aux file is a temporary file that is created when you compile a document. It contains among other things all the citation commands you used. When you run bibtex, it reads this file, finds all those citations, extracts the corresponding information from the .bib file, and generates the bibliography (the .bbl file). The next time you run pdflatex, this bbl file is read, and you get a bibliography. –  Torbjørn T. Mar 21 at 11:08
    
@TorbjørnT. Thank you a lot for your explanations –  Strömungsmechanik Mar 21 at 11:11

2 Answers 2

up vote 7 down vote accepted

The plain bibliography style is for numerical references only, while \citet only makes sense for author-year citations. Use natbibs own version of plain, called plainnat, instead, and this works fine. I.e. change to

\bibliographystyle{plainnat}

This is in fact documented on page 7 of natbibs manual:

The authors can only be listed if the .bst file supports author–year citations. The standard .bst files, such as plain.bst are numerical only and transfer no author–year information to LaTeX. In this case, \citet prints “(author?) [21].”

share|improve this answer
    
Thank you for your powerful answer!! –  Strömungsmechanik Mar 21 at 10:59

I was getting this problem with a custom-generated bibliography style (using Patrick Daly's custom-bib generator, merlin.mbs). The solution (pointed out to me very helpfully by Patrick) is to generate a style using author-year citations, but use the "numbers" option in the LaTeX document, i.e. in the .dbj file produced by merlin.mbs, uncomment the line

ay,%: Author-year

and in the .tex file specify

\usepackage[numbers]{natbib}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.