I'm writing up some old math notes that closely follow a textbook, and I have a tex file for each section of the book I worked through. I keep all these section files in a directory tex, and then on the level of that same directory I have a main.tex file that \inputs each section file into a book.

I'm using Texmaker to edit the individual section files. Is there some way to configure Texmaker to compile main.tex whenever I hit Quick Build while working on a section file, and then have the resulting main.pdf file show up in the PDF viewer and jump to the section I was working on?

1 Answer 1


1) Have the `main.tex' as the active window in TeXMaker.

2) Select from the top menu bar, Options, and then Make Current Document the Master Document

3) Then just compile with any window active and your main document will compile

CAUTION: This choice remains in effect until it is reversed at the place as 2). This means if you open a new file and attempt to compile even in another directory it will continue to use this Master Document. Also this does not persist after you close TeXmaker and restart it.

  • @touhami Thanks, fixed it. The last time I was using TeXmaker for multifile documents, it had that feature or bug:) Commented Jul 10, 2015 at 23:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .