Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I include the .bib file in the latex file. I have tried:

\documentclass{report}
\usepackage{natbib}
\bibilographystyle{plainnat}
\begin{document}
\include{reference}
\end{document}

Opened a new file whose chapter heading is Reference as:

\chapter{Reference}
\bibilography{Ref.bib}

This is not showing any results included in the Ref.bib file in bibtex. I have used Jabref to create a .bib file.

share|improve this question
    
Welcome to TeX.SX. You don't have to add a signature to your post, since it is automatically added. I've also formatted your code using the {} button and using backticks ` `. –  Werner Aug 13 '11 at 20:11
add comment

3 Answers

I’m not sure what your problem is.

If you want to create a bibliography it is not enaugh to inclued the bib-file you also need to run (pdf)latex - biblatex - (pdf)latex maby more than one time. See any better beginners guide for more information or consult Google. If you just want to add the bibliography heading to the ToC use \addcontentsline{toc}{<sectin/chapter/…>}{References} or use a KOMA-Script (e. g. class scrreprt instead of report) and its bibliography=totoc-option, see the manual for more information.

share|improve this answer
add comment

You also need to add citations to the items in your bibliography. If you want every citation from Ref.bib included, use \nocite{*} right before the \bibliography line.

Also there is no need for the line \chapter{Reference}. By default, a new chapter will be created for the bibliography anyway. By default, that chapter will be named "Bibliography". If you want it named "Reference" or something else, then use \renewcommand{\bibname}{Reference} in the preamble.

share|improve this answer
add comment

@Reshma: You seem to have a couple of typos in your example file -- the commands should be bibliographystyle{plainnat} and \bibliography{ref}. (You have bibilography both times.) Note that you do not need to create a separate chapter before starting in the bibliography: LaTeX will do this for you when it encounters the command \bibliography{ref} -- assuming that the bib file is called ref.bib, of course.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.