Free DNS provides easy shared DNS hosting & URL forwarding

Thursday, January 21, 2010

Setting up Synctex for Sumatra PDF and TexnicCenter

Everytime I need this information I have to search for it on forums, then filter out the broken solutions in order to find out the corect one. So, I'm posting it here to have it for future reference:
  1. Install & setup SumatraPDF and Texniccenter (including the output profiles of TexnicCenter).
  2. Open the Output profiles window (Alt+F7).
  3. Select the Latex => PDF output profile.
  4. In the Latex section, add -synctex=-1 at the end of Command line arguments to pass to the compiler textbox (leave a space between this and the previous arguments).
  5. In the Viewer section, set the Path of executable textbox to C:\Program Files\SumatraPDF\SumatraPDF.exe -inverse-search "\"c:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]\"". This will start SumatraPDF as the PDF viewer and will provide it with the program to run whenever a back search is performed.
  6. Still in the Viewer section, set for View project's output and Forward search the following options: Enable DDE Command and set Command to [ForwardSearch("%bm.pdf","%Wc",%l,0)], Server to SUMATRA, and Topic to Control. This will allow forward search to work.
Update: Step 5 refers to an older version of TeXnicCenter installed on Windows XP. Read the comments to find out the updated folder (for Windows 7) and file name (latest TexnicCenter).


  1. Thank you very much, this works!

  2. Finally found a working solution! You may want to adnotate that "if you have an x64 operating system, then you have enter path of exe:

    C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]\""

  3. Exellent, thank you.
    A little addition: The name of the TeXnicCenter executable has been changed to TeXnicCenter.exe, so the path would be:

    C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""

  4. this doesn't work having same problem as by other sites [Forward Search("%bm.pdf","%Wc",%l,0,0,1)] Cannot execute the command. Please reply soon.

  5. For xelatex=>pdf on texniccenter what settings need to be made for sumatra?

  6. Xelatex=>pdf on texniccenter to forward and reverse search setting help pleease