1

I'm new to latex and Ive been having some trouble making a bibliography in my latex document. To test it I made a new document with the following code

\documentclass[10pt]{article}
\begin{document}
Article \cite{greenwade93} and \cite{DrineasPetros2016Rrnl}
\bibliographystyle{plain}
\bibliography{mybib}
\end{document}

Heres my bib file:

@article{greenwade93,
    author  = "George D. Greenwade",
    title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",    
year    = "1993",
journal = "TUGBoat",
volume  = "14",
number  = "3",
pages   = "342--351"
}

@article{DrineasPetros2016Rrnl,
issn = "0001-0782",
abstract = "<p><p>Randomization offers new benefits for large-scale linear 
algebra computations.</p></p>",
journal = "Communications of the ACM",
pages = "80--90",
volume = "59",
publisher = "ACM",
number = "6",
year = "2016",
title = "RandNLA: randomized numerical linear algebra",
language = "eng",
author = "Drineas, Petros and Mahoney, Michael",
keywords = "Engineering ; Computer Science ; Mathematics",
month = "May",
}

This works perfectly and does exactly what I want it to, however if I put this exact same code in the document I'm working on it throws up an error when bibtex runs.

error message

If you could help me find what the problem is I would appreciate it. Thanks

4
  • 2
    Welcome to TeX.SX! Please do not paste code as images, but as code. Have you tried deleting the aux file?
    – TeXnician
    Nov 10, 2017 at 18:23
  • Sorry, I'll edit it and put the code in. I tried deleting the Aux file and it didn't make any difference.
    – John 545
    Nov 10, 2017 at 18:35
  • 2
    you show \bibliographystyle{plain} but the error message is about apalike which suggests you have \bibliography{apalike} somewhere in your file. Nov 10, 2017 at 18:36
  • Thankyou so much! Im such an idiot haha, turns out I already had the bibliography style in my preamble without realising. Once I removed it, it works fine. Sorry for asking a stupid question.
    – John 545
    Nov 10, 2017 at 18:44

1 Answer 1

1

you show

\bibliographystyle{plain}

but the error message is about apalike which suggests you have

\bibliography{apalike}

somewhere earlier in your document.

You must log in to answer this question.

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