News

This is my personal home page. If you are looking for the Cracklock utility go to this section. You can download other freewares that I have developed on this page, and if you want to know about my PhD research then go to this page.

PDF-Latex synchronization (continued) 
Update 21 May 2008: script file for emacs added

This is the dual of the previous post: I have now implemented forward-search in SumatraPDF, i.e. the ability to go from the source .tex file to the corresponding location in the PDF. The communication between the TeX editor and SumatraPDF relies on the DDE protocol. (Most TeX editors such as WinEdt and TeXnicCenter support it.)

Binary

If you want to give it a try, the updated binary can be downloaded here.

Configuring with WinEdt

For WinEdt, I have created a macro file to do all the stuff automatically. To install it, proceed as follows:

1- Download the macro file Sumatra-Find.edt.
2- Save it in the folder: C:\Program Files\WinEdt Team\WinEdt\Exec\
3- Edit the file: goto line 22 and replace the string 'd:\Tools\SumatraPDF-sync.exe' by the path to your local copy of Sumatra.
4- Go to the menu 'Option\Menu setup'. Create a new macro menu somewhere (under 'Accessories' for instance) and fill the options as follows:
Name: Sumatra Find
Macro: Exe('%b\Exec\Sumatra-Find.edt');
Requires File Filter: %P\%N.pdf
Start in: %P
Shortcut: F8

That's it! Now you can just press F8 anywhere in your .tex sources files and it will automatically locate the corresponding position in the PDF.

Configuring with TeXnicCenter

To setup forward-search with TeXnicCenter proceed as follows:
1- Menu 'Build\Define output profiles...'
2- Select the profile "Latex=>PDF"
3- Select the tab 'Viewer'
4- Fill the options as follows:
Path of executable: c:\tools\SumatraPDF-sync.exe
Forward search: select DDE command
Command: [ForwardSearch("%bm.pdf","%nc",%l,0)]
server: SUMATRA
topic: control

Configuring with ntEmacs

1- Download the script file sumatra-forward.el and load it from your init.el file.
2- Make sure that you have the ddeclient tools. (It is bundled with ntemacs)
3- Press F8 in the TeX document to trigger a forward-search

Synchronization in action

Screenshot

Enjoy! And feel free to post a comment to let me know how it works for you.


[ 14 comments ] ( 4448 views )   |  permalink  |   ( 3 / 1120 )

<Back | 1 | 2 | Next> Last>>