Closed jlelong closed 3 years ago
This is to be expected. v2.0 uses still the same technique for skipping stuff as, say the verbatim or comment package. For this to work, it is necessary that \begin{document}
starts at the beginning of the line. See also the tips in the trouble-shooting section of the documentation.
The next version, v2.1, uses another method for skipping the preamble, which ignores these spaces. This version is currently only available on Github, see subfiles.sty
in the top directory.
Thanks for your detailed answer and sorry for not reading the troubleshooting section carefully enough.
No need to be sorry. The old behavior of subfiles
is surprising for a normal user, it is reasonable to fix it. And who reads the docs anyway? ;-)
And thanks for reporting! Better to report than to live with the bugs ...
Consider the following example
main.tex
sub/a.tex
Note the space before
\begin{document}
. Runninglatex main
yields the errorRemoving the leading space in front of
\begin{document}
fixes the issue.This happens with
subfiles
v2.0
.