I'm trying to make a .sty file with all the packages and things that I use often, but I'm getting an egregious number of errors. Most of them are to do with the specific packages I am using
(for instance: Package geometry Error: \paperwidth (0.0pt) too short.) even though these packages cause no problems in my other documents,
but the one that I think is crucial is "Emergency stop. <*> main.sty *** (job aborted, no legal \end found)"
Here is the code:
\RequirePackage[utf8]{inputenc}
\RequirePackage{ upgreek }
.... %a whole bunch of packages
\newcommand{\R}{\mathbb{R}}
.... %a whole bunch of commands
\endinput
I've tried various random things such as removing \endinput and putting \begin{document} \end{document} at the end, and adding a \documentclass{article} at the top, but I don't really know what I'm doing and none of them have worked.
I am using overleaf, if that makes a difference.
main.sty
instead of running it on a document that does\usepackage{main}
(and has\end{document}
which that error is telling you is missing)