## LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ Bibliography with Citation in Author-Year Format

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
august_month
Posts: 12
Joined: Sat May 07, 2011 3:03 pm

### Bibliography with Citation in Author-Year Format

Hello everyone,

I would like authors to be cited in the following format: Smith [1997].

Any ideas? Basic internet search did not return much.

Regards,
august_month

P.S.: I guess natbib offers some interesting functionality. Could anybody give me a link with example on how to use it (including citation and bibliography). It seems like bibliography needs to be in separate file. Sounds crazy to me.

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
august_month wrote:Any ideas? Basic internet search did not return much.

I really don't believe you.
Have a look at TeX{SX} for a starting point. There are also linked questions on the right hand side. Plaese have a look.

btw: just typing latex bibliography into my standard search engines directs me to WikiBook: LaTeX/Bibliography Management.

There is the same advice: Use biblatex in conjunction with biber.

If you are speaking german by any chance, please also have a look at GoLaTeX: Erstellung von Literaturverzeichnissen
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

august_month
Posts: 12
Joined: Sat May 07, 2011 3:03 pm
Thank you for the suggestion. It will take me some time to read through. However, at first glance none of links mention citation in the form: Smith [1997].

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
\usepackage[style=authoryear]{biblatex} should do the trick for you.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

august_month
Posts: 12
Joined: Sat May 07, 2011 3:03 pm
Thank you, again! I guess I need to read some basic stuff about biblatex. It seems to require to have bibliography in a separate file, while I used to have all my bibliography in the same file with main document.

1. \documentclass[12pt,oneside,reqno,fleqn]{article}
2. \usepackage{amsmath}
3. \usepackage{blindtext}
4. \usepackage[style=authoryear]{biblatex}
5. \setlength{\mathindent}{\parindent}
6. \begin{document}
7. \begin{align}
8. y_1=ax_1+b\\
9. y_2=ax_2+b
10. \end{align}
11.
12. \blindtext
13. blah, blah \cite{BL}
14.
15. \begin{thebibliography}{BH}
16.
17. \bibitem{BL} Black F. and Litterman R.:\textit{ Global Portfolio Optimization}, Financial Analysts Journal, September 1992, pp. 28–43
18.
19. \end{thebibliography}
20. \end{document}
Last edited by Stefan Kottwitz on Wed Dec 11, 2013 10:51 am, edited 1 time in total.
Reason: inline code changed to code block

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
In the following example, the external file is produced with filecontents. You can manage your references with Jabref.

Run latex (or pdflatex), biber, latex and latex again on the main file (without the ending), or just use latexmk

1. \RequirePackage{filecontents}
2. \begin{filecontents}{my\jobname.bib}
3. @book{ilias,
4. author = {Homer},
5. title = {Die Ilias},
6. date = 2004,
8. introduction = {Latacz, Joachim},
9. edition = 3,
10. publisher = {Artemis \& Winkler},
11. location = {D{\"u}sseldorf and Z{\"u}rich},
12. langid = {german},
13. sorttitle = {Ilias},
14. indextitle = {Ilias, Die},
15. shorttitle = {Ilias},
16. annotation = {A German translation of the \emph{Iliad}. Note the
17. \texttt{translator} and \texttt{introduction} fields and the
18. format of the \texttt{location} field in the database
19. file. Also note the \texttt{sorttitle} and \texttt{indextitle}
20. fields},
21. }
22. \end{filecontents}
23. \documentclass[12pt,oneside,reqno,fleqn]{article}
24. \usepackage{amsmath}
25. \usepackage{blindtext}
26. \usepackage[style=authoryear]{biblatex}
28.
29. \setlength{\mathindent}{\parindent}
30. \begin{document}
31. \begin{align}
32. y_1=ax_1+b\\
33. y_2=ax_2+b
34. \end{align}
35.
36. \blindtext
37. blah, blah \cite{ilias}
38.
39. \printbibliography
40. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.