[texworks] Multifile organisation

Ignasi nignasi at gmail.com
Sat Aug 25 17:41:15 CEST 2012

On Sat, 25 Aug 2012 12:51:58 +0200, Florian Müller <iflomll at gmail.com>  

> Hy,
> I have a projects with some *.tex files.
> _document.tex - This file includes the other *.tex files and build the  
> entry point for build process.
> 01_chapter.tex
> 02_chapter.tex
> If I working at the sub files like 01_chapter.tex and I press the  
> 'build' button to convert the LaTex document to PDF it can not work.  
> Before I am able to start the build process I must change to the right  
> document (_document.tex). So my question is:
> Is there a chance to configure the _document.tex as a main project file.  
> So if the file 01_chapter.tex is active and I press the build button it  
> will start to build from _document.tex.

Yes. You can include line

% !TeX root=_document.tex

at the beginning of all your subfiles and _document.tex will be the  
processed file.
Some more special 'tags' are explained at  


More information about the texworks mailing list