Text Formattingquestion about natbib

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

question about natbib

Post by Stefan Kottwitz »

lynnlee wrote:But when I run pdfLaTeX, the error is \begin{document} is missing. And when I run BibTex, nothing produced.
Run pdfLaTeX on the .tex document, not on the .bib document. The .bib document just needs to be there and will automatically be used.
lynnlee wrote:Is it necessary to write all these references in tex file within \begin{filecontents*} ?
No, as I wrote above.

Stefan
LaTeX.org admin

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Re: question about natbib

Post by lynnlee »

Thank you, Stefan.

It works perfect now.

Another question: I find only cited references are listed. What I need is to list all references, cited and non-cited. Any code I need to add or adjust? Thank you.

Lynn
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

question about natbib

Post by cgnieder »

Use \nocite{}. It is used like \cite{} to add non-cited reference to the bibliography. \nocite{*} adds all entries from the bib file to the bibliography.

Regards
site moderator & package author
lynnlee
Posts: 50
Joined: Fri Jan 04, 2013 10:15 am

Re: question about natbib

Post by lynnlee »

Thank you, Cgnieder.

Lynn
Post Reply