Texmaker + SumatraPDF, forward and inverse search

g4233For the forward search, go to Texmaker > Options > Configure Texmaker, switch to External PDF viewer and set:

"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" "%.pdf" -reuse-instance -forward-search "#.tex" @

To make this working, you need to pass -synctex=1 (or -synctex=-1, for zipped and non-zipped synctex files, respectively) to pdflatex.

For the inverse search, go to SumatraPDF > Settings > Options and enter the command below in the inverse search box with your own path for texmaker.exe:

"C:\Program Files (x86)\Texmaker\texmaker.exe" "%f" -line %l

Note: I have encountered documents where inverse search didn’t jump to the proper line in the source. I’ve found empirically that the pdfsync package can help in such cases, although it is considered deprecated and can interfere with other packages. So, if it doesn’t work with the above settings for you either, try


in the preamble of your LaTeX document.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s