# Sharelatex 'swallows' 80 pages of my work when compiling pdf

I'm extremely new to LaTeX, since I have to use it for my thesis. Anyway, when compiling the PDF Sharelatex kind of swallows at least 80 pages of my thesis?! Anybody know what could be causing this error?

Any help is deeply appreciated.

Thanks

Sorry for giving so little info. No \end{document} is in fact at the end of the document. I'm writing in the document class {book} and am using the following packages:

\documentclass[11pt,a4paper,english,oneside]{book}
\usepackage{etex}
\usepackage[left=1in, right=1in]{geometry}
\usepackage[Lenny]{fncychap}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{dsfont}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage[hang,bottom,stable,multiple]{footmisc}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash]
\usepackage{chngcntr}
\usepackage{etoolbox}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{datetime}
\usepackage{graphicx,listings,xcolor,textcomp}
\usepackage{hyperref}
\usepackage{xparse}
\usepackage{cleveref}
\usepackage{arydshln}
\usepackage{array,hhline}
\usepackage{amssymb,amsmath}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{graphicx}
\graphicspath{{Images/}}
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={((},close={))}}


Further I have an awful high amount of Pictures, Graphs, and Tables in my thesis and interestingly it swallows everything after the start of mathematical equations up to the point of the Appendix if that helps...

• you don't give much of a clue but I would guess you have \end{document} at the point it stops. – David Carlisle Jul 5 '14 at 14:35
• It is hard to say, without any document you are working on, which configuration... and welcome to TeX.SX ;-) – user31729 Jul 5 '14 at 14:36
• Do you get any error messages? – clemens Jul 5 '14 at 15:10
• This misses an actual package \usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash] it probably is {caption}. amsmath is loaded multiple times... Maybe do a cleanup of your preamble first? – Martin H Jul 5 '14 at 15:10
• It will be difficult to impossible for others to diagnose your problem as-is. Whether you keep using sharelatex or find another TeX install, you'll need to make a copy of your thesis, and start systematically commenting out chapters, sections and other lines until you get to the simplest possible document that shows the problem. During that process, you may find the root cause of your problem. If not, you'll have a document that stands a chance of being examined and fixed. – Mike Renfro Jul 5 '14 at 16:10

Commencing crystal ball here

When you get an error about missing \begin{document} it is almost always the case that you do something dangling in the preamble. So probably you have an input statement somewhere. Or even in this limited code snippet, you have one line that misses the package name,

\usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash]


which is probably coming from caption package. So I've used the lipsum package (amazingly even that is loaded too) and made a document with all those packages and no error is introduced.

\documentclass[11pt,a4paper,english,oneside]{book}
\usepackage{etex}
\usepackage[left=1in, right=1in]{geometry}
\usepackage[Lenny]{fncychap}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{dsfont}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage[hang,bottom,stable,multiple]{footmisc}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash]{caption}
\usepackage{chngcntr}
\usepackage{etoolbox}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{datetime}
\usepackage{graphicx,listings,xcolor,textcomp}
\usepackage{hyperref}
\usepackage{xparse}
\usepackage{cleveref}
\usepackage{arydshln}
\usepackage{array,hhline}
\usepackage{amssymb,amsmath}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{graphicx}
\graphicspath{{Images/}}
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={((},close={))}}

\begin{document}
\lipsum[1-20]
\end{document}


With all respect tell your supervisor that this template is not gonna fly as it is and if it is an issue ask her/him if you can make your own. Most of the packages are duplicated and some of them have unnecessary and problematic options.

You won't do yourself any good by copy pasting random code that is lying around addressing different anachronistic problems. Best thing to do is add something when you need it either asking here or reading about it.