0

I keep getting the following error when I try and Build and View/Compile my main TEX file:

\begin{thebibliography} on input line 1 ended by \end{document}. \end{document}

This is a new error, and I cannot work out why it is occurring. My bibliography has been functioning as expected until recently. Below is the code for my main TEX file, which uses a .bib file called "References.bib" which can be seen below the TEX file code. I have cut out a lot of the chapters in a bid to give the question more clarity, but I saw it appropriate to include all of the preamble. It is the very last line of this file "\end{document}" that shows the error.

The main TEX file called "thesis.tex":

\documentclass{report}

\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{natbib}
\AtBeginDocument{\renewcommand{\bibname}{References}}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\graphicspath{ {images/} }
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{titlesec}
\usepackage{pgfornament}
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{0pt}{\Huge}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{nomencl}
\makenomenclature

\begin{document}

\chapter{Conclusion}
\chaptermark{}
\input{chapters/conclusion}

\addcontentsline{toc}{chapter}{References}
\bibliographystyle{agsm}
\bibliography{References}

\appendix
\chapter{Appendix}
\chaptermark{}
\input{chapters/appendix}

\chapter{Project Management}
\chaptermark{}
\input{chapters/management}

\chapter{Self- Review}
\chaptermark{}
\input{chapters/review}

\end{document}

Here is the contents of the "References.bib" file:

    @conference{Xconference1,
    author    = "Avinash Gautam and Sudeept Mohan",
    title     = "A review of research in multi-robot systems",
    booktitle = " Industrial and Information Systems (ICIIS)",
    year      = "2012",
    month    = "August",
    publisher= "IEEE",
}

@misc{ultrasonic_diagram,
    author = "Senix",
    title = "How-Do-Ultrasonic-Sensors-Work.png",
    note = "Online; accessed May 07, 2018",
    url = "https://senix.com/frequently-asked-questions/",
    %year = "",
}

@misc{iRobot,
    author = "Army-Technology",
    title = "iRobot 510 PackBot Multi-Mission Robot",
    note = "Online; accessed September 12, 2017",
    url = "http://www.army-technology.com/projects/irobot-510-packbot-multi-mission-robot/
    Coastguard National Database",
    %year = "",
}

@misc{analog_v_digital,
    author = "Tarun Agarwal",
    title = "Types of Analog and Digital Sensors with Applications",
    note = "Online; accessed May 08, 2018",
    url = "https://www.elprocus.com/types-analog-digital-sensors/",
    %year = "",
}

@misc{sensorscite,
    author = "P.S Kang",
    title = "01 introduce to lego ev3 20140917.",
    note = "Online; accessed December 12 2017",
    url = "https://www.slideshare.net/JasonYang35/01-introduce-to-lego-ev3-20140917",
    year = "2015",
}

@misc{polling,
    author = "Linus Atorf",
    title = "How accurate is the ultrasound sensor when moving?",
    note = "Online; accessed May 08 2018",
    url = "https://bricks.stackexchange.com/questions/1257/how-accurate-is-the-ultrasound-sensor-when-moving/7",
    year = "2012",
}

If anyone could help me figure out why this is happening, I'd be very appreciative. I have tried to add the following code to the References.bib file, but it did not work:

\begin{thebibliography}

     %Some references 

\end{thebibliography}
2
  • 1
    i'm not in a position to test, but this looks suspiciously like something is causing the .bbl file to end abruptly. sure enough, there is a % sign in your data: %year = "", in the analog_v_digital entry. bibtex knows nothing about % so it just passes it through, and it acts like a comment (and causes everything following it to be ignored) when processed by (la)tex. get rid of that line and try again. (remove the .bbl and .aux files before rerunning.) May 9, 2018 at 2:57
  • 1
    the % is mentioned in this answer: Are comments discouraged in a BibTeX file?, so this can be considered a duplicate. May 9, 2018 at 17:20

0

Browse other questions tagged .