2

I am using natbib for citations. And I want to dislpay the whole name of the author while citing in the body of the text

\citep{smith1990}        

give usually only the family name (Smith, 1990).

I want an option that would display the whole name something like: (John Smith,1990). It seems as an obvious question but I cannot find the correct trick.

6
  • Welcome to TeX.SE. Which bibliography style do you use? (It's the bibliography style, and not natbib, that determines things such as the name labels used in citation call-outs.) – Mico Apr 29 '16 at 13:05
  • Hi, thanks. I use plainnat .... My problem is not the bibliography in itself at the end of a report. But the citation in the body of the text......! – Claude Apr 29 '16 at 13:06
  • @Claude, I am not familiar with plainnat, but you may want to check if it still sticks to the specs to cite that way. In case it does or it isn't really important, you may use double braces for the author in your .bib, as explained here: [tex.stackexchange.com/questions/85966/cite-authors-full-name] – Rafael Apr 29 '16 at 13:23
  • @Rafael: thanks, the trick of putting double braces, works perfectly!!!!! – Claude Apr 29 '16 at 13:31
  • 1
    @Rafael - The method proposed in the link you've provided has the following, potentially serious, drawback: The entries will be sorted in the bibliography by the authors' first names instead of their last names. – Mico Apr 29 '16 at 13:35
1

The formatting of the names used in the citation call-outs is governed not by the natbib package but by the bibliography style that's in use.

I'm assuming that you'll want to show the first names of all authors, rather than just those of of selected authors. While you're at it, I'll also assume that you'd want to show any "junior" name components, if present. Finally, you'll want the entries still sorted by author's surnames rather than by their first names, right?

Since you're using the plainnat bibliography style, I suggest you proceed as follows:

  • Find the file plainnat.bst in your TeX distribution and make a copy of this file. Call the copy, say, plainnat-full.bst. (Don't edit or modify a file from the TeX distribution directly.)

  • Open the file plainnat-full.bst in a text editor. The editor you use for your tex files will do fine.

  • In plainnat-full.bst, locate the function format.lab.names. (In my copy of the the file, this function starts on line 1101.)

  • In this function, replace the line

    s #1 "{vv~}{ll}" format.name$
    

    with

    s #1 "{ff }{vv~}{ll}{, jj}" format.name$
    
  • Still in the same function, replace the line

                { " and " * s #2 "{vv~}{ll}" format.name$ * }
    

    with

                { " and " * s #2 "{ff }{vv~}{ll}{, jj}" format.name$ * }
    
  • If you don't want to show the "junior" components, leave off the {, jj} substrings in the preceding two steps.

  • Save the file plainnat-full.bst, and store it either in the directory that contains your main .tex file or in a directory that's searched by BibTeX. If you select the latter option, be sure to update the filename database of your TeX distribution as well.

  • In your main tex file, change the instruction \bibliographystyle{plainnat} to \bibliographystyle{plainnat-full} and recompile the document by re-running LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Happy BibTeXing!


enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{bibx.bib}
@misc{smith:3001,
  author = "Smith, Jr., John and Smythe, III, Anna",
  title  = "Thoughts",
  year   = 3001,
}
\end{filecontents}

\documentclass{article}
\usepackage{natbib}
\bibliographystyle{plainnat-full}

\begin{document}
\citet{smith:3001}

\citep{smith:3001}
\bibliography{bibx}
\end{document}

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