This is impossible because LaTeX needs everything you have in your .tex file in order to make an output. For this reason, I like to do the following:
- Run LaTeX (or whatever your preferred flavor is) immediately to see if you can create an empty document. It should have a
\maketitle, and should include any \usepackage commands, and obviously must include \begin{document} and \end{document}, but nothing else. This is mainly to test if your packages are imported correctly.
- Run and rerun LaTeX often, and always check to see if it ran without errors.
- If you get an error and you don't know what's causing it, comment out your code chunk by chunk with the
% symbol. If you comment out a single equation and it compiles correctly, you now know where your bug is from.
These rules will help guide you through your coding. Also, if your error message is really confusing, try running it straight from terminal. I don't use TexWorks, but I've used others which try to "read your error message for you", and the best solution is usually to run it yourself and see what's really happening.