- Install & setup SumatraPDF and Texniccenter (including the output profiles of TexnicCenter).
- Open the Output profiles window (Alt+F7).
- Select the Latex => PDF output profile.
- 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).
- 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.
- 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.
A mix of how-tos, notes, and gotchas that I might need again sometime in the future.
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:
Subscribe to:
Post Comments (Atom)
Thank you very much, this works!
ReplyDeleteFinally found a working solution! You may want to adnotate that "if you have an x64 operating system, then you have enter path of exe:
ReplyDeleteC:\Program Files (x86)\SumatraPDF\SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]\""
Thanks, this ended my search!
ReplyDeleteExellent, thank you.
ReplyDeleteA 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')]\""
Thank you.
Deletethis 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.
ReplyDeleteFor xelatex=>pdf on texniccenter what settings need to be made for sumatra?
ReplyDeleteBrilliant! :)
ReplyDeleteXelatex=>pdf on texniccenter to forward and reverse search setting help pleease
ReplyDelete