1

I do not know what I am doing wrong but I have been stuck for about an hour now trying to get bibtex to work. Here is my latex code

\documentclass{article}
\begin{document}

hallo \cite{Saad:2003:IMS:829576}
\bibliographystyle{ieeetr}
\bibliography{bibfile.bib}

\end{document}

and here is my bibtex file

@book{Saad:2003:IMS:829576,
 author = {Saad, Y.},
 title = {Iterative Methods for Sparse Linear Systems},
 year = {2003},
 isbn = {0898715342},
 edition = {2nd},
 publisher = {Society for Industrial and Applied Mathematics},
 address = {Philadelphia, PA, USA},
} 

Now it is not citing correctly, I do have the bibfile in the right directory. Something strange is happening, I got a citation to work earlier for a different book but not for this one. Now I deleted this other book from the bibfile.bib file but it is still showing up in my bibliography?!?! And like I said I cannot reference Saad's book. I do not know why. I am using Texmaker and everytime I run the bibtex file and then build the pdf but it does not work.

Here is an imgur link to what the output is. I hope someone can help

image

The book in the reference list is the one I got the citation working for.

11
  • Did you run BibTeX again?
    – egreg
    Commented Mar 28, 2015 at 13:53
  • Try to delete the LaTeX file (not .tex and .bib) to force the process. Commented Mar 28, 2015 at 13:55
  • I run BiBTeX like crazy :) Many times and then PDFLaTeX many times as well. It is very strange and highly frustrating the way that reference I do not want just keeps popping up.
    – Slugger
    Commented Mar 28, 2015 at 13:57
  • Try \bibliography{bibfile} instead of \bibliography{bibfile.bib}.
    – Mico
    Commented Mar 28, 2015 at 13:59
  • Can you show us the contents of the blg file?
    – Johannes_B
    Commented Mar 28, 2015 at 14:03

1 Answer 1

1

(Too long for a comment, hence posted as an answer.)

I encounter no problems if I replace the instruction \bibliography{bibfile.bib} with \bibliography{bibfile}, i.e., if I omit the filename extension.

enter image description here

The bibliography file ('bibfile.bib'):

@book{Saad:2003:IMS:829576,
  author = {Saad, Y.},
  title = {Iterative Methods for Sparse Linear Systems},
  year = {2003},
  isbn = {0898715342},
  edition = {2nd},
  publisher = {Society for Industrial and Applied Mathematics},
  address = {Philadelphia PA},
} 

The main tex file (say, 'test.tex'):

\documentclass{article}
\begin{document}
\cite{Saad:2003:IMS:829576}
\bibliographystyle{ieeetr}
\bibliography{bibfile}
\end{document}
3
  • Thanks for your answer. Even copying that exact file does not work for me. Very weird. I tried using the online compiler of sharelatex and it does work. So I guess something is either wrong with my setup of TeXmaker or I should try a different compiler which I will do. Thanks a lot for your help!
    – Slugger
    Commented Mar 28, 2015 at 14:47
  • @Slugger - Did you run the compilation sequence LaTeX-BibTeX-LaTeX-LaTeX?
    – Mico
    Commented Mar 28, 2015 at 14:50
  • Ok so after running BibTeX and LaTeX a bunch of times it suddenly works. Thanks a lot for bearing with me :) !
    – Slugger
    Commented Mar 28, 2015 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .