5

I have been looking for a way to cite full authors with natbib. I have found some answers that I are (to me) somewhat incomprehensible, seeing that I am still a novice at Latex. So I'll ask here... I just want both the first and the last name displayed, along with the publishing year, like this: "According to John Doe (1978) one third of the moon is made of cheese, and two thirds are made of macaroni!"

I only want this displayed, whenever I choose to do so, so I don't want the first citation of a new author to be like this. I have looked through the manuals I could find for natbib, but none contained a command for this.

I trust you don't need a test document or anything, since it isn't really the case that something isn't working, just that I cannot seem to find what is in my mind, a fairly straight forward function.

3

Firstly create a dummy bibtex database having filename localbib.bib

\begin{filecontents}{localbib.bib}
    @book{  mykey,
        title = {The Title},
        year = {2013},
        author = {Doe, John},
        address = {Antarctica}
    }

\end{filecontents}

For the actual document, assuming `localbib.bib' as the database.

%Declare document class
\documentclass{article}

%Use Natbib and declare style options
\usepackage[numbers,square,sort&compress]{natbib}

%State database filename
\def\mybibtexdatabase{localbib} % <----- Change `localbib` here for your actual filename

%Import usebib package and declare the fields that can be used.
\usepackage{usebib}
\newbibfield{author} 
\newbibfield{address} 
\bibinput{\mybibtexdatabase}

%Now write the document    
\begin{document}
    %Example of usebibentry
    Example of field citation is that %
           \usebibentry{mykey}{author} is from \usebibentry{mykey}{address}, %
           the publication was made in \usebibentry{mykey}{year}\citep{mykey}

    %Existing methodology
    \citeauthor{mykey} is the standard name citation.

    %Bibliography
    \bibliographystyle{apacite}
    \bibliography{\mybibtexdatabase}
\end{document}

NOTE: In order to be able to use additional fields (ie for example doi, title, editor etc...) via the \usebibentry{KEY}{FIELD} command, a \newbibfield{FIELD} directive needs to be added to the preamble, just like it has been done ere for author and address.

  • 2
    Thank you for trying. But I have no idea what half of that does... and the thing is, if I have to write additional code for all of my references i.e. your example: \begin{filecontents}{localbib.bib} @book{mykey, title = {The Title}, year = {2013}, author = {Doe, John}, address = {Antarctica} } \end{filecontents} It just seems too much work instead of just writing the first name before citing. Is there no way just to add the command to natbib? I use \bibliographystyle{apacite} by the way... if it matters. – Faergen Jun 22 '13 at 20:36
  • That is just a dummy bibtex file entry, filecontents writes it to file firstly so it can be used as a real bibtex database. – Nicholas Hamilton Jun 23 '13 at 2:32
  • @Faergen, kindly see my updated answer. – Nicholas Hamilton Jun 23 '13 at 2:44

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.