LaTeX forum ⇒ Generalhow to compile the .bib file

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

how to compile the .bib file

Postby ma501th » Mon Apr 14, 2008 10:26 pm

Hi i am having problems getting the citation to be displayed in my pdf file. This is what is in my .tex file
  1. \documentclass[a4paper,10pt]{book}
  2. \usepackage{times,a4wide}
  3. \usepackage{graphicx}
  4. \usepackage{amssymb}
  5. \usepackage{epstopdf}
  6. \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
  7. \usepackage[round]{natbib}
  8.  
  9. \title{My Project Report - Story Builders for Young Children}
  10. \author{Tanbir Hussain\\Supervisor: Dr R Kibble}
  11. \date{\today} % Activate to display a given date or no date
  12. % Activate to display a given date or no date
  13. \begin{document}
  14. \maketitle
  15. \def\thepage{\arabic{page}}
  16.  
  17. \chapter{Introduction}
  18. It builds on foundations created by Donald
  19. Knuth's system
  20.  
  21. The first is as follows:
  22. \begin{quote}
  23. \citet{ArticleA} Will this work
  24. \end{quote}
  25.  
  26. \bibliographystyle{apalike}
  27. \bibliography{sav}
  28.  
  29. \end{document}
  30.  


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

  1. @article{ ArticleA,
  2. author = {Ann Author and A. Second Author and A. Third Author},
  3. title = {The title of the paper},
  4. journal = {The name of the journal},
  5. year = {1927},
  6. volume = 1,
  7. number = 1,
  8. pages = {1--100}
  9. }
  10.  


Everytime i compile the .tex file i get error:
  1. Package natbib Warning: Citation `ArticleA' on page 2 undefined on input line 2
  2. 5.


please can anyone advise me how i should do this

thanks

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

Postby yostsa » Mon Apr 14, 2008 11:34 pm

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: 9434
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Apr 15, 2008 1:27 am

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


Return to “General”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 12 guests