[Tex/LaTex] Can’t open reference.aux

bibliographiesbibtex

This is my first time posting here a question and I'm also like a beginner using Latex. Here is my problem:
I can't compile my references, and always give me this mistake:

I couldn't open file name `reference.aux'

Probably I have to install a extra .lib but I don't know which of them.

I'll appreciate a lot if someone could give me some advices…

Best Answer

Let's suppose your references are written in a file called 'ref.bib' with entries like:

@article{latex1977,
    title={How to use latex},
    author={John Smith},
    journal={Journal of Latex},
    pages={1--50},
    volume={39},
    year={1977}
}

Now in your main file say 'main.tex' you have to have something like:

\documentclass{article}
\begin {document}

...
\cite{latex1977}
...

\bibliography{ref}
\bibliographystyle{plain}

\end{document}

To compile your document do this steps:

  1. compile 'main.tex' using latex or pdflatex => this step will generate main.aux file
  2. compile 'main.aux' (NOT 'ref.bib') using bibtex
  3. compile twice 'main.tex' using latex or pdflatex
Related Question