[texworks] %!TEX root =

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jan 1 20:10:17 CET 2009

Jonathan Kew wrote:
 > It's supposed to work. (See the function
> TeXDocument::findRootFilePath(). It uses a regexp to allow flexibility
> about spacing, perhaps that's why you didn't find it with a simple search.)
> AFAIK this has been working for others, so if it's not working for you,
> please try to come up with a precise example scenario that we can check.

Ah, I see the issue.  I have a sub-doc with !TEX root = <whatever>, and
in the main file !TEX program  = pdflatex. However, the default engine
is pdfTeX.  So when I Ctrl+T in the sub-doc, TeXworks ignores the engine
spec. in the main file and tries to pdfTeX it.  Result: compilation fails.

I'd expect the engine spec in the main file to be respected here, I think.
Joseph Wright

More information about the texworks mailing list