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.