Generalhow to compile the .bib file

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ma501th
Posts: 50
Joined: Tue Apr 08, 2008 7:31 pm

how to compile the .bib file

Post by ma501th »

Hi i am having problems getting the citation to be displayed in my pdf file. This is what is in my .tex file

Code: Select all


\documentclass[a4paper,10pt]{book}
\usepackage{times,a4wide}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage[round]{natbib}

\title{My Project Report - Story Builders for Young Children}
\author{Tanbir Hussain\\Supervisor: Dr R Kibble}
\date{\today}                                           % Activate to display a given date or no date
                                        % Activate to display a given date or no date
\begin{document}
\maketitle
\def\thepage{\arabic{page}}

\chapter{Introduction}
It builds on foundations created by Donald
Knuth's system 

The first is as follows:
\begin{quote}
\citet{ArticleA} Will this work
\end{quote}

\bibliographystyle{apalike}
\bibliography{sav}

\end{document}

and this is what i have in my sav.bib file

Code: Select all


@article{ ArticleA,
	author = {Ann Author and A. Second Author and A. Third Author},
	title = {The title of the paper},
	journal = {The name of the journal},
	year = {1927},
	volume = 1,
	number = 1,
	pages = {1--100}
	}

Everytime i compile the .tex file i get error:

Code: Select all

Package natbib Warning: Citation `ArticleA' on page 2 undefined on input line 2
5.
please can anyone advise me how i should do this

thanks

Recommended reading 2024:

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

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

yostsa
Posts: 11
Joined: Sat Apr 12, 2008 8:04 pm

Re: how to compile the .bib file

Post by yostsa »

Once you have compiled the .tex file using LaTeX or PDFLaTeX, you must run BibTeX on it, and the run LaTeX/PDFLaTeX twice more. That should do the trick.
-- Sandy
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

how to compile the .bib file

Post by Stefan Kottwitz »

Hi ma501th,

yostsa already told what's needed.
Just to explain shortly what running bibtex means: here is a small howto, see Compiling the Example. The document you posted should work.
I just want to add a remark: for file.tex one has to call exactly bibtex file, not bibtex file.tex as one may be used to with latex file.tex perhaps. Just to save time, I saw it happen.

Stefan
Post Reply