I have a project which consists of multiple .tex files, which I am typesetting using Texworks. Clicking the source code in any file while holding the Alt key shows correctly the corresponding position in the pdf and vice versa. However, clicking the typeset button only works in main.tex or main.pdf but does not work e.g. in chapter1.tex (does not have the header and is not a standalone .tex file and Texworks does not realize it needs to start building main.tex which includes chapter1.tex).

It is quite upsetting as I am mostly editing the chapters and clicking the button in the toolbar just gives me errors and then I have to go and search for main.tex and click it there. Is there a way to script Texworks or annotate the .tex files so that the typeset button works from any file?

For now I have hidden the toolbar in the chapter windows so that I dont click it by mistake but it is still not very user-friendly.



Browse other questions tagged or ask your own question.