Can be used only in the preamble error - and yes, it's in the preamble

. when I try to compile this with texmaker using MiKTeX Windows 10, I get the error that lines 3, 4 and 5 (the ones with \usepackage) should be in the preamble. Aren't they? These are the only errors in the project, my commands.tex is getting recognized just fine.

273k 13 13 gold badges 157 157 silver badges 372 372 bronze badges asked Dec 26, 2019 at 15:16 Frederik Steinmetz Frederik Steinmetz 101 2 2 bronze badges

The preamble can terminate early, but you should get a message for that as well. BTW, I crash on your document class.

Commented Dec 26, 2019 at 15:28

it is very hard to debug a fragment of code that references files not shown, please edit the question to provide a test file (or files) that shows the problem.

Commented Dec 26, 2019 at 15:33

Sorry, I was hoping this was a fairly common error. I'll try to reduce the project to a minimum and if the error persists, I'll get back to you. Just FYI: the .tex is in a folder called Chapters, it's included in the main.tex which is in the root folder, using the package subfiles.