Free DNS provides easy shared DNS hosting & URL forwarding
Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

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).