I am using the memoir class in Texmaker.

As far as I understand adding


to the LaTeX and PDFLaTeX command will make the output document open up at the cursor position of the code. So if I left my cursor at the start of a particular piece of text on a random page the pdf will open up at that page.

It also enables the "click to jump to line".

Since I am typing a large document I an using \include to include all my chapters. This means when I compile I have to compile a master document. This means the cursor is now wherever I left it in the master document.

This is a huge pain since the pdf output is sometimes nowhere near the most recently edited part that I want to view. If I am working in Chapter 5 I can go leave the cursor after


but then the output is always on the last page of the chapter and I still need to scroll to the relevant part.

As you can imagine this becomes very tiresome very quickly. So I need help configuring Texmaker so that the PDF output opens up at the last place that I edited.

EDIT: I found a workaround. I followed this answer: Typesetting multiple TeX files

to be able to compile each chapter individually. And it worked 100%.

  • 1
    Not massively familiar with Texmaker: am I correct in understanding that you can't simply press/choose 'typeset' (or similar) from e.g. chapterfive.tex?
    – Joseph Wright
    Jul 8, 2014 at 13:10
  • 1
    Does it not work if you put the cursor at the edited portion of of the included file? I'm not too familiar with Texmaker, but this has always worked for me in TeXnicCenter. Jul 8, 2014 at 13:11
  • I'm not 100% sure, but I believe synctex is only responsible for backwards search (the "click to jump to line"). Also, the answer to the very general question written in the title is probably "yes" because it does work seemlessly in my workflow (both forward and backward), but sadly I am not using TeXmaker so I cannot help you more with that.
    – T. Verron
    Jul 8, 2014 at 13:11
  • @PaulGessler no I tried that. Didn't work.
    – lukasmvv
    Jul 8, 2014 at 13:15
  • @JosephWright I am not sure what you mean by press/choose 'typeset'. Could you elaborate?
    – lukasmvv
    Jul 8, 2014 at 13:16

1 Answer 1


For me, the following works correctly:

  • Load your main file in Texmaker
  • Choose Options -> Define Current Document as 'Master Document'
  • Open a subfile
  • Edit subfile, etc.
  • Press 'Quick Build'
  • Main file builds but 'current' file stays visible, etc.
  • SyncTeX linking is possible from source to PDF and the reverse

You must log in to answer this question.

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