I have problem displaying the author name in citation when using natbib. I wrote

This is explained in \citeauthor{lamport94}, and what I get is:

enter image description here

, and my entire code is given by:


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.


This is explained in \citeauthor{lamport94}.

\bibitem{lamport94}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1994.

I wonder what is wrong?

Note: I'm using LyX. I'm aware of thread Author not appearing, but there's no resolution there, and I use \citeauthor{} insteand of \citet{}.

  • 2
    With natbib the bibliography entry must have a specific format (so that natbib can extract the author information) which is described in the documentation. (2.2 The Syntax of the thebibliography). – Ulrike Fischer Mar 11 '13 at 9:47
  • @UlrikeFischer Oh, I see. By the way, if I use Bibtex the problem will disappear ? – user26939 Mar 11 '13 at 10:05
  • 1
    Only if you use a bibliography style which is adapted to natbib and so "produce" correct entries. – Ulrike Fischer Mar 11 '13 at 10:07

Using the command \citeauthor, which is provided by the natbib citation management package, only makes sense if you use an authoryear-style citation method. However, you're loading the natbib package with the numbers option, i.e., you're telling it to use a numeric-style citation method.

Hence, if you want to use numeric-style citations, don't use \citeauthor. Aside: When natbib is loaded with the numbers option, the command \citet is modified to behave like \cite and will thus create a numeric-style rather than an authoryear-style callout to the piece in question. However, the \citeauthor command isn't aliased to \cite when the numbers option is set, and that's why you're receiving the error message you're reporting.

Alternatively, if you do wish to use authoryear-style citations along with the natbib package, you should (i) not specify the numbers option when loading the natbib package and (ii) augment the entry in the thebibliography environment to include the optional argument [Lamport (1994)], as is done in the following modified form of your MWE:



\bibitem[Lamport (1994)]{lamport94}Leslie Lamport,   \emph{\LaTeX: 
   A Document Preparation System}.   Addison Wesley, Massachusetts,   
   2nd Edition,   1994.

enter image description here

| improve this answer | |
  • 1
    Thanks. I think the problem in my MWE is that I only have \bibitem{lamport94} ... instead of \bibitem[Lamport (1994)]{lamport94}. I've tried that the \PassOptionsToPackage{square,numbers}{natbib} still allow me to use \citeauthor{} – user26939 Mar 12 '13 at 8:18
  • @user26939 - I'm glad you've found a workable solution. Don't forget to upvote and/or accept answers that you found useful. :-) – Mico Mar 12 '13 at 10:55
  • Ok, done ! .... – user26939 Mar 12 '13 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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