# Sudden error in TeXShop: “I found no \bibdata” and “I found no \bibstyle”

I am new to LaTeX, so apologies for any naivety.

I am working on a project and report and was adding a new reference when suddenly the BibTeX report console produced this:

This is BibTeX, Version 0.99d (TeX Live 2015)
The top-level auxiliary file: EPQReport.aux
I found no \bibdata command---while reading file EPQReport.aux
I found no \bibstyle command---while reading file EPQReport.aux
(There were 2 error messages)


I have looked around other StackExchange posts and found that often an \end{document} before the

bibliographystyle{apalike}
\bibliography{/Users/Dan/Dropbox/LaTeXProject/references/epqref.bib}


can cause such problems. I don't see this as the source of the problem in my code. Here are my .tex source and .bib source with the majority of the content stripped:

\documentclass{article}

\usepackage{lipsum}
\usepackage{indentfirst}
\usepackage[margin=1in,includefoot]{geometry}
\usepackage{graphicx} % import images
\usepackage{float} % control float positions
\usepackage[hidelinks]{hyperref} % Allows clickable reference lists
\usepackage[none]{hyphenat} %Stops breaking up words in table
\usepackage{array}
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}} \newcolumntype{^}{>{\currentrowstyle}} \newcommand{\rowstyle}[1]{\gdef\currentrowstyle[#1] #1\ignorespace} \usepackage{mhchem} % Write chemistry equations \usepackage{xfrac} % Allows for slanted fractions \usepackage{csquotes} % Indented, nicer, quotations \usepackage{caption} \captionsetup[table]{skip=10pt} <MAIN BODY OF CODE REMOVED> \cleardoublepage \bibliographystyle{apalike} \bibliography{/Users/Dan/Dropbox/LaTeXProject/references/epqref.bib} \addcontentsline{toc}{section}{\numberline{}References} \cleardoublepage \appendix \section{Appendix: Evaluation of Sources} Table, referred to in log, to go here. \end{document}  My references file (.bib) is on Pastebin here also: http://pastebin.com/07KXLztv (I didn't know how to redact it without removing something potentially faulty). I'd be very grateful if anyone could point out my (likely idiotic) errors. • Have you tried deleting your auxiliary files and recompiling? – Alan Munn Mar 27 '16 at 19:41 • If I do this, the LaTeX file then compiles with no problems (and PDF shown, but with no references of course). If I then recompile the BibTeX it shows no errors. But, when recompiling again, the LaTeX build then shows multiple errors, and the same "I found no \bibdata" and "I found no \bibstyle" resurface in the BibTeX build. I hope this makes sense. – Daniel Lawson Mar 27 '16 at 20:00 • What happens if you put your .bib file in the same folder as your .tex file? (and change to \bibliography{epqref}? – Alan Munn Mar 27 '16 at 20:09 • The same as before - on first recompiling there are no errors but on second recompiling there are several errors in LaTeX and the same initial errors in BibTeX. – Daniel Lawson Mar 27 '16 at 20:12 • The .bib file you posted has an unbalanced brace in it, although that doesn't replicate the error. Unrelated, (but important more generally) you should not specify any formatting in your .bib file for things like titles etc., so you shouldn't have title={\emph{...}} etc. since the formatting will vary depending on the bibliography style. Sometimes markup us necessary, e.g. if a title contains an italicized word, then it would be put inside \emph{} but otherwise you should not add any formatting directives in the .bib file at all. – Alan Munn Mar 27 '16 at 20:29 ## 2 Answers Well, the problem with your code is a wrong bib entry and a not compiling not so minimal MWE ... Please see thechanges I did to your entry: @misc{ref:iqhistory, Author = {A.C.E Intelligence}, Howpublished = {\url{http://www.aceintelligence.com/detailed_history_of_iq.php}}, Month = {June}, Note = {Last accessed 22 Mar, 2016}, Title = {\emph{Detailed History of IQ}}, Url = {http://www.aceintelligence.com/detailed_history_of_iq.php}, Year = {2007}, Bdsk-Url-1 = {\url{http://www.aceintelligence.com/detailed_history_of_iq.php}}}  If you want to add an url to field howpublished or to field Bdsk-Url-1 you need to add command \url to avoid the error you got caused by the _ in the given url. To use command \url you need to load package url. I commented the not needed packages for your problem in your code, added package url and completed the code to be compilable. Then with the following mwe (including bib file): \RequirePackage{filecontents} \begin{filecontents*}{\jobname.bib} %% This BibTeX bibliography file was created using BibDesk. %% http://bibdesk.sourceforge.net/ %% Created for Daniel Lawson at 2016-03-27 19:31:34 +0100 %% Saved with string encoding Unicode (UTF-8) @article{ref:gott, Author = {Linda Susanne Gottfredson}, Date-Added = {2016-03-21 01:19:21 +0000}, Date-Modified = {2016-03-21 01:20:36 +0000}, Journal = {Intelligence}, Number = {4}, Pages = {343-397}, Title = {Dissecting practical intelligence theory: Its claims and evidence}, Volume = {31}, Year = {2003}} @article{ref:gardrefl, Author = {Howard Gardner}, Date-Added = {2016-03-20 23:59:40 +0000}, Date-Modified = {2016-03-21 00:00:35 +0000}, Journal = {Phi Delta Kappan}, Pages = {200-209}, Title = {Reflections on multiple intelligences: Myths and messages}, Volume = {77}, Year = {1995}} @article{ref:thursmult, Author = {Louis Leon Thurstone}, Date-Added = {2016-03-20 23:23:07 +0000}, Date-Modified = {2016-03-20 23:24:40 +0000}, Journal = {The Psychological Review}, Month = {January}, Number = {1}, Pages = {1-32}, Title = {The Vectors of Mind}, Volume = {41}, Year = {1934}} @article{ref:spear2fac, Author = {Richard H Williams and Donald W Zimmerman and Bruno D Zumbo and Donald Ross}, Date-Added = {2016-03-20 18:13:35 +0000}, Date-Modified = {2016-03-20 18:14:45 +0000}, Journal = {Human Nature Review}, Month = {March}, Pages = {114-118}, Title = {{Charles Spearman: British Behavioral Scientist}}, Volume = {3}, Year = {2003}} @misc{ref:factoran, Author = {Elizabeth Garrett-Mayer}, Howpublished = {http://ocw.jhsph.edu/courses/statisticspsychosocialresearch/pdfs/lecture8.pdf}, Month = {April}, Note = {Last accessed 20 Mar, 2016}, Title = {\emph{Statistics in Psychosocial Research - Lecture 8 - Factor Analysis I}}, Url = {http://ocw.jhsph.edu/courses/statisticspsychosocialresearch/pdfs/lecture8.pdf}, Year = {2002}, Bdsk-Url-1 = {http://ocw.jhsph.edu/courses/statisticspsychosocialresearch/pdfs/lecture8.pdf}} @misc{ref:iqhistory, Author = {A.C.E Intelligence}, Howpublished = {\url{http://www.aceintelligence.com/detailed_history_of_iq.php}}, Month = {June}, Note = {Last accessed 22 Mar, 2016}, Title = {\emph{Detailed History of IQ}}, Url = {http://www.aceintelligence.com/detailed_history_of_iq.php}, Year = {2007}, Bdsk-Url-1 = {\url{http://www.aceintelligence.com/detailed_history_of_iq.php}}} @misc{ref:binetsite, Author = {{Human Intelligence}}, Howpublished = {http://www.intelltheory.com/binet.shtml}, Month = {August}, Note = {Last accessed 22 Mar, 2016}, Title = {\emph{Alfred Binet}}, Url = {http://www.intelltheory.com/binet.shtml}, Year = {2004}, Bdsk-Url-1 = {http://www.intelltheory.com/binet.shtml}} @misc{ref:modal, Author = {{General Psychology}}, Howpublished = {http://general-psychology.weebly.com/what-are-the-different-theories-of-multiple-intelligence.html}, Month = {October}, Note = {Last accessed 21 Mar, 2016}, Title = {\emph{What are the Different Theories of Multiple Intelligence?}}, Url = {http://general-psychology.weebly.com/what-are-the-different-theories-of-multiple-intelligence.html}, Year = {2012}, Bdsk-Url-1 = {http://general-psychology.weebly.com/what-are-the-different-theories-of-multiple-intelligence.html}} @misc{ref:savant, Author = {Dave Hiles}, Bdsk-Url-1 = {http://www.psy.dmu.ac.uk/drhiles/Savant Syndrome.htm}, Bdsk-Url-2 = {http://www.psy.dmu.ac.uk/drhiles/Savant Syndrome.htm}, Howpublished = {http://www.psy.dmu.ac.uk/drhiles/Savant Syndrome.htm}, Month = {February}, Note = {Last accessed 21 Mar, 2016}, Title = {\emph{Savant Syndrome}}, Url = {http://www.psy.dmu.ac.uk/drhiles/Savant Syndrome.htm}, Year = {2002}, Bdsk-Url-3 = {http://www.psy.dmu.ac.uk/drhiles/Savant Syndrome.htm}} @misc{ref:triarchic, Author = {{Instructional Design}}, Howpublished = {http://www.instructionaldesign.org/theories/triarchic-theory.png}, Month = {July}, Note = {Last accessed 21 Mar, 2016}, Title = {\emph{Triarchic Theory Diagram}}, Url = {http://www.instructionaldesign.org/theories/triarchic-theory.png}, Year = {2012}, Bdsk-Url-1 = {http://www.instructionaldesign.org/theories/triarchic-theory.png}, Bdsk-Url-2 = {http://www.instructionaldesign.org/theories/triarchic-theory.png}} @misc{ref:corcoef, Author = {{Emory University Psychology}}, Howpublished = {http://www.psychology.emory.edu/clinical/bliwise/Tutorials/SCATTER/scatterplots/effect.htm}, Month = {August}, Note = {Last accessed 20 Mar, 2016}, Title = {\emph{Effect Size}}, Url = {http://www.psychology.emory.edu/clinical/bliwise/Tutorials/SCATTER/scatterplots/effect.htm}, Year = {2003}, Bdsk-Url-1 = {http://www.psychology.emory.edu/clinical/bliwise/Tutorials/SCATTER/scatterplots/effect.htm}} @book{ref:thomyoung, Author = {Andrew Robinson}, Date-Added = {2016-02-20 21:49:42 +0000}, Date-Modified = {2016-02-20 21:50:10 +0000}, Publisher = {Pi Press}, Title = {The Last Man who Knew Everything: Thomas Young, the Anonymous Polymath who Proved Newton Wrong, Explained how We See, Cured the Sick, and Deciphered the Rosetta Stone, Among Other Feats of Genius}, Year = {2006}} @article{ref:scholspear, Author = {Charles Spearman}, Date-Added = {2016-02-20 20:38:05 +0000}, Date-Modified = {2016-02-20 20:59:13 +0000}, Journal = {The American Journal of Psychology}, Month = {April}, Number = {2}, Pages = {201-292}, Title = {{General Intelligence, Objectively Determined and Measured}}, Volume = {15}, Year = {1904}} @book{ref:waisrman, Author = {David Wechsler}, Date-Added = {2016-02-20 18:58:12 +0000}, Date-Modified = {2016-02-20 19:01:34 +0000}, Publisher = {New York: Psychological Corporation}, Title = {Manual for the Wechsler Adult Intelligence Scale - Revised}, Year = {1981}} @book{ref:dicintel, Author = {Chambers}, Date-Added = {2016-02-19 22:43:15 +0000}, Date-Modified = {2016-02-19 23:18:59 +0000}, Pages = {741}, Publisher = {WR Chambers Ltd and Cambridge University Press}, Title = {Chambers English Dictionary}, Year = {1988}} @article{ref:intmeasymp, Author = {E. Thorndike and L. Terman and F. Freeman and S. Colvin and R. Pintner and B. Ruml and S. Pressey and V. Henmon and J. Peterson and L. Thurstone and H. Woodrow and W. Dearborn and M. Haggerty and B. Buckingham}, Date-Added = {2016-02-19 22:22:12 +0000}, Date-Modified = {2016-02-19 22:26:37 +0000}, Journal = {Journal of Educational Psychology}, Number = {3}, Pages = {123-147}, Title = {{Intelligence and Its Measurement: A Symposium}}, Volume = {12}, Year = {1921}} @article{ref:apaknown, Author = {Ulric Neisser and Gwyneth Boodoo and Thomas J. Bouchard and A. Wade Boykin and Nathan Brody and Stephen J. Ceci and Diane F. Halpern and John C. Loehlin and Robert Perloff and Robert J. Sternberg and Susana Urbina}, Date-Added = {2016-02-19 21:13:30 +0000}, Date-Modified = {2016-02-19 21:25:06 +0000}, Journal = {American Psychologist}, Month = {February}, Number = {2}, Pages = {77-101}, Title = {{Intelligence: Knowns and Unknowns}}, Volume = {51}, Year = {1996}} @book{ref:miff, Author = {David J. Bartholomew}, Date-Added = {2016-02-15 23:19:25 +0000}, Date-Modified = {2016-02-15 23:20:43 +0000}, Publisher = {Cambridge University Press}, Title = {Measuring Intelligence Facts and Fallacies}, Year = {2004}} @book{ref:avsi, Author = {Ian J. Deary}, Date-Added = {2016-02-15 23:03:41 +0000}, Date-Modified = {2016-02-19 23:18:13 +0000}, Publisher = {Oxford University Press}, Title = {Intelligence: A Very Short Introduction}, Year = {2001}} \end{filecontents*} \documentclass{article} \usepackage{lipsum} \usepackage{indentfirst} \usepackage[margin=1in,includefoot]{geometry} %\usepackage{graphicx} % import images %\usepackage{float} % control float positions \usepackage[hyphens]{url} % <=========================================== \usepackage[hidelinks]{hyperref} % Allows clickable reference lists \usepackage[none]{hyphenat} %Stops breaking up words in table %\usepackage{array} %\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
%\newcolumntype{^}{>{\currentrowstyle}}
%\newcommand{\rowstyle}[1]{\gdef\currentrowstyle[#1] #1\ignorespace}
%\usepackage[version=4]{mhchem} % Write chemistry equations
%\usepackage{xfrac} % Allows for slanted fractions
%\usepackage{csquotes} % Indented, nicer, quotations
%\usepackage{caption}
%\captionsetup[table]{skip=10pt}

\begin{document} % <====================================================

\nocite{*} % <==========================================================
\bibliographystyle{apalike}
\bibliography{\jobname} % <===== to use bib file created by filecontents

\cleardoublepage
\appendix
\section{Appendix: Evaluation of Sources}
Table, referred to in log, to go here.

\end{document}


you get the result:

This happened to me. Turned out I had updated the figure PDFs and one of them was corrupt. Since the compiler got stuck here, it wouldn't read some of the commands including the bibliography ones.

If you don't have a duplicated \end{document}, I would try to verify every included file for corrupted documents.

• The OP doesn't mention anything regarding images, so I don't think that's the issue. – Werner Oct 8 '16 at 18:33
• Yes. The error message and log files did NOT include anything regarding the actual problem in my case as well. The OP also does not specify what "<MAIN BODY OF CODE REMOVED>" has... – Miguel Oct 8 '16 at 18:44
• This solved my issue. I had a duplicated \end{document} and received the above error message. Thank you! – Sphery Dec 7 '18 at 20:06
• I have also found that if I \input{} or \include a file that contains an \end{document}, the error will occur, because of the duplicate in that inputted or included file. – bishopcranmer Jul 25 '19 at 20:53