Added check for \begin{document} in PreParser
If the source has not \begin{document} but only content the Preparser adds it.