GeneralCorrectly formatting citations

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mungovan
Posts: 2
Joined: Mon Jun 13, 2011 9:29 pm

Correctly formatting citations

Post by mungovan »

Hi,

Anyone any ideas how to fix this, tried everything and can't find a solution:

Basically I'm using the standard Latex report format and I want to reference authors as in:

In Sterman (2000) we find that.... OR
Some research has shown (Sterman, 2000) that...

I had previously achieved this simply using the commands \citep{Sterman2000} and \citeyearpar{Sterman2000} respectively when using the elsarticle document class.

But using the report document class, no matter what I do, it references using the author name and last two digits of the year: In Sterman (Sterman 00) we find that ....OR
Some research has shown (Sterman 00) that....

That's fine for the latter case but looks bad in the former where the author's name is used twice in close succession.

In the tex file I've tried using:
\documentclass[authoryear,review,11pt]{report}
OR
\documentclass[11pt]{report} etc.

\usepackage[comma,authoryear]{natbib}
OR
\usepackage{natbib}
etc.

Noting works. Help!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Correctly formatting citations

Post by torbjorn t. »

It is not necessary to make two threads about the same problem, you could have used your first thread. Also, I forgot one thing in my other post: Your example, if minimal should be compilable. See http://latex-community.org/forum/viewto ... f=5&t=7878

You will have to make a complete example demonstrating the problem, the below code gives

Code: Select all

(Author, 2000)
as output.

Code: Select all

\documentclass[a4paper]{report}
\begin{filecontents}{demo.bib}
@book{example,
  book = {A Book},
  author = {An Author},
  year = {2000},
  publisher = {Pub Lisher},
  }
\end{filecontents}

\usepackage[authoryear,round]{natbib}
\begin{document}
\citep{example}
\bibliographystyle{plainnat}
\bibliography{demo}
\end{document}
The filecontents environment writes the content of the environment to the file test.bib.
Post Reply