I'm getting this error constantly, since setting up a new TexLive instillation with TexStudio on a new laptop. This compiled fine on my desktop, and I'm stuck in knowing what the real root of the issue is.
There are lots of questions that have "File ended while scanning for use of <something>" however each problem seems somewhat independent. I can't see anyone else with <something>="\documentclass".
In my main file, I'm using the subfile package to write different chapters of my document (you can see structure on the LHS). When I try to compile, TexStudio seems to throw a parsing error for interpreting the subfile header.
I dug a bit deeper into the error log as well, and it seems that I'm getting some "Runaway arguments" where there is an additional space at certain points in my compilation. For example, see "R = \frac{h}{q^2}" on the selected line, and then the "runaway argument" error for "R = \frac {h}{q^2}..." (extra space between \frac and arguments).
I take it this spacing mismatch is what is causing my parsing errors. Any idea what is going on? The raw file in the editor looks fine, and compiled fine on my other PC.
