17.4.15

Synchronizing WinEdt and pdf files

Tomado de http://robjhyndman.com/hyndsight/synchronizing-winedt-and-pdf-files/

Being able to go from a line in WinEdt to the cor­re­spond­ing place in a com­piled doc­u­ment is extremely use­ful and saves a lot of time. This has long been pos­si­ble using Yap with dvi doc­u­ments, but Yap is slow and ugly and the dvi files usu­ally have to be con­verted to pdf before send­ing them to any­one else.
So I tend to use pdf­tex­ify to cre­ate pdf files directly, but I miss hav­ing syn­chro­niza­tion between what I write and the pdf file that is created.
How­ever, I’ve found a solu­tion that is not too dif­fi­cult to imple­ment and seems to work well. It replaces the Adobe pdf reader with Suma­traPDF.  There is some fid­dling of set­tings in WinEdt as explained in the instruc­tions below. The infor­ma­tion below is adapted from William Blum’s web­site.
  1. Down­load Suma­traPDF and install it to the (default) direc­tory c:\Program files\SumatraPDF
  2. For Winedt 6.0
    Run WinEdt and go to Options/​Execution Modes. Click on the “PDF Viewer” tab and click the “Suma­tra PDF” but­ton. Make sure the box under “Sync Tex” is ticked. Then click “OK”. That’s it!
  3. For Winedt 5.6.
    1. Down­load Acro­bat OpenDoc.edt and Sumatra-Find.edt and save them to C:\Program Files\WinEdt Team\WinEdt\Exec
    2. Run WinEdt and go to Options/​Execution Modes. Click on the “Acro­bat” tab and replace the path to the “PDF Viewer Exe­cutable” with"C:\Program files\SumatraPDF\SumatraPDF.exe" -reuse-instance. Like this: 
    3. Before clos­ing the dia­log box, go to the “Con­sole Appli­ca­tions” tab and select “PDF­Tex­ify”. Change the switches field to--pdf --tex-option=--synctex=-1Sim­i­larly, for PDFLa­TeX and PDF­TeX, change the switches fields to--synctex=-1Then click “OK”.
    4. In WinEdt, go to the menu ‘Option/​Menu setup’. Cre­ate a new macro menu some­where (under ‘Acces­sories’ for instance) and fill the options as follows:
        Name: Sumatra Find
        Macro: Exe('%b\Exec\Sumatra-Find.edt');
        Requires File Fil­ter: %P\%N.pdf
        Start in: %P
        Short­cut: Shift-F8
      Now when edit­ing a .tex file in WinEdt, you can go to the cor­re­spond­ing line in the pdf doc­u­ment by press­ing Shift-​​F8.

Update

  • The above instruc­tions only work with Mik­TeX (tested on Mik­TeX 2.7 and 2.8). If you use TeXLive, or some other LaTeX imple­men­ta­tion, then you will need to fig­ure it out for yourself.
  • You should not use the pdfsync package.
  • Some peo­ple have reported trou­ble with beamer. I have had no dif­fi­cul­ties using beamer with the above settings.
  • The above instruc­tions have now been updated (8 Sep 2009) to take account of all com­ments below.

No hay comentarios:

Publicar un comentario