0

I am currently having problems importing my .bib file to my latex file.

the bib file's name is reference.bib, it was compiled using JabRef and it contains the following

@Book{alexander2009market,
  Title                    = {Market Risk Analysis, Value at Risk Models},
  Author                   = {Alexander, Carol},
  Publisher                = {John Wiley \& Sons},
  Year                     = {2009},
  Volume                   = {4}
}

I made sure that the reference.bib was in the same directory as the tex file.

When inputing

\bibliographystyle{plain}
\bibliography{reference}

nothing happens. Additionally, the font changes when I input the \bibliography command to bold blue unlike the \bibliographystyle that remains with the standard command font.

John
  • 41
  • 2
    welcome, do you mind posting a full minimal example? We cannot see which document class you have been using. Secondly, have you run bibtex? Have you actually referenced that item? Thirdly, I do not think the latex3 tag is relevant here. – daleif Oct 09 '14 at 10:35
  • I'm not sure what you meant

    \begin{document}

    \bibliographystyle{plain} \bibliography{refs}

    \end{document}

    In which the \bibliography command appears in bold blue but \bibliographystyle appears in red-ish font.

    I have compiled my database in JabRef and opened this same database in LaTeX as "reference.bib". Is this what you mean by running bibtex?

    Thirdly, the tag was a typo, please disregard!

    \bibliographystyle{plain} \bibliography{refs}

    – John Oct 09 '14 at 10:49
  • you need to run latex then bibtex then latex again to see the references – David Carlisle Oct 09 '14 at 10:52
  • @john, update your question instead. The code you are posting, does not contain any documentclass, plus it also does not contain any references to alexander2009market. Remember that RabRef has nothing to do with LaTeX or BibTeX. JabRef is a tool to edit .bib files. You still physically need to run bibtex to extract the data from the .bib and format something for LaTeX to use. – daleif Oct 09 '14 at 11:06
  • the \documentclass{article}. How do I run the bibtex? – John Oct 09 '14 at 11:21
  • 1
    This looks like a duplicate of http://tex.stackexchange.com/q/63852/15925 – Andrew Swann Oct 09 '14 at 13:28
  • Whenever I run the .bib file in Tex I get the message "! LaTeX Error: Missing \begin{document}" – John Oct 09 '14 at 14:27
  • @John You don't run LaTeX on the .bib file, you run LaTeX, BibTeX, LaTeX and LaTeX again on the .tex file. – Joseph Wright Oct 09 '14 at 16:28

1 Answers1

2

I assume you are using some editor compatible with LaTeX, and then it is likely that you can run bibtex by providing some information. In TeXnic Center 2, for instance, there are some values to set under 'Build -- Define output profiles...' were you can enter that bibtex should be used in this profile. Then, a LaTeX run automatically also runs bibtex. In other editors there should also be some option for that, but naturally its a bit different in all editors. You should find information about that in the editor documentation.

If you are working via command line you run bibtex as you would run LaTeX. A full run might look as follows:

latex <File>
bibtex <File>
latex <File>

The second latex run is necessary (also when you run bibtex directly via the editor) so that the entries in the bbl-file produced by bibtex can be resolved.