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 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.

share|improve this question
    
tex.stackexchange.com/questions/53662/… was written some time ago, since then the usebib package is available. I think it should do what you want. –  Nicholas Hamilton Jun 20 '13 at 13:41

1 Answer 1

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.

share|improve this answer
    
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

 
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.