# Make \cite{my reference} show name and year

I am trying to figure out how to make author's name and year show up every time I make a reference.

For example:

my_bibtex.bib has this entry:

@article{Franklin1999,

author = {Franklin Allen and Risto Karjalainen},
title = {Using genetic algorithms to find technical trading rules},
year = {1999},
volume = {51},
pages = {245-271},
journal = {Journal of Financial Economics}

}


If in my_paper.tex I use this line:

Important result has been found by \cite{Franklin1999}


My output looks like:

Important result has been found by [1]


But I want it too look like:

Important result has been found by Franklin 1999


I there a way to do it?

My bibliographystyle is set to plain

\bibliographystyle{plain}

\bibliography{my_bibtex}

-
The plain bibliography style isn't easily adapted to authoryear-style citations. Better to use the plainnat bibliography style, the natbib package (load it with option authoryear), and commands such as \citet and \citep ("textual" and "parenthetical" citations -- macros provided by the natbib package). – Mico Sep 29 '13 at 18:44
Probably »biblatex« would be a suitable option here. – Thorsten Donig Sep 29 '13 at 18:50

Here's a solution that uses the natbib citation management package and the plainnat bibliography style. (Note that the plain bibliography style is not well-suited for authoryear-style citations.) As always, run latex, bibtex, and latex twice more to generate the bibliography and compile the document.

\documentclass{article}
\usepackage[round]{natbib}   % omit 'round' option if you prefer square brackets
\bibliographystyle{plainnat}
\begin{document}
\citet{Franklin1999}
\bibliography{my_bibtex}
\end{document}

-
Thank for your answer, for some reason when I run your code. I get this error: ! Package natbib Error: Bibliography not compatible with author-year, I asked another question about it, about the same time you posted this answer: citations.tex.stackexchange.com/questions/135668/… – Akavall Sep 29 '13 at 20:13
@Akavall - When switching from one bibliography style to another, e.g., from plain to plainnat, it's prudent to wipe out all auxiliary files (including the .aux and .bbl files) prior to rerunning latex/bibtex/latex/latex. Please check if deleting the previous batch of auxiliary files does the trick. – Mico Sep 29 '13 at 20:17
Yes. It did the trick! Thank You very much! – Akavall Sep 29 '13 at 20:21

The simplest way is to use the bibliography style: apalike, instead of plain. Here is:

\bibliographystyle{apalike}
\bibliography{References}


A more powerful package is natbib. In your case, use citet for textual citations.

\usepackage{natbib}

\citet     #textual citations, print the abbreviated author list
\citet*    #textual citations, print the full author list

\citep     #parenthetical citations, print the abbreviated author list
\citep*    #parenthetical citations, print the full author list

\citealt    #the same as \citet but without any parentheses.
\citealp    #the same as \citep but without any parentheses.

\citeauthor{ale91}         #Alex et al.
\citeauthor*{ale91}        #Alex, Mathew, and Ravi

\citeyear{ale91}           #1991
\citeyearpar{ale91}        #(1991)

-

What you probably want is something like the authoryear citation style of the biblatex package. If you are trying to follow a particular citation style, it would be best to say which in your original question; a biblatex style likely exists for it.

To compile this example, run

pdflatex my_paper
biber my_paper
pdflatex my_paper
pdflatex my_paper


### my_paper.tex:

\begin{filecontents*}{my_bibtex.bib}
@article{Franklin1999,
author = {Allen Franklin and Karjalainen Risto},
title = {Using genetic algorithms to find technical trading rules},
year = 1999,
volume = 51,
pages = {245--271},
journaltitle = {Journal of Financial Economics}
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}


Is there a ready-made biblatex style that emulates the "classic" plain (or plainnat) bibliography style? – Mico Sep 29 '13 at 20:10
@Mico I believe just leaving the style as the default (numeric) does this, but I would take a look at tex.stackexchange.com/questions/14045/… as well (in case I don't understand what you're asking) – Sean Allred Sep 29 '13 at 20:28
Thanks. I've checked out the answers you've linked to. It would appear that the option FirstInits=true, stated in the second answer, may not be a correct implementation of the plainnat style. By the way, the default look of biblatex's authoryear setup doesn't look all that close to that of plainnat either. (For the record, I actually prefer the look produced by biblatex!) – Mico Sep 29 '13 at 20:43