Table of Contents


Using Sumatra with WinEdt#

Add the following to "WinEdt\Exec\Acrobat OpenDoc.edt", before the line: // GSView?

// Sumatra?

  FindInString(`%$('AcroRead')`,'SumatraPDF',1,2,1000,1);
  IfOK(!"Relax;",!"JMP('not_sumatra')");
  Run('%$("AcroRead"); -reuse-instance -inverse-search "\"%B\WinEdt.exe\" \"[Open(|%%f|);SelPar(%%l,8);]\"" "%P\%N.pdf"','%P',0,0,'%N.pdf - SumatraPDF',1,1);
  DDEOpen('',"SUMATRA","control",1);
// send a DDE command to perform forward-search
// the format of the DDE command is [ForwardSearch("<pdffilepath>","<sourcefilepath>",<line>,<column>[,<newwindow>, <setfocus>])]
//    if newwindow = 1 then a new window is created even if the file is already open
//    if focus = 1 then the focus is set to the window
// e.g. [ForwardSearch("c:\file.pdf","c:\folder\source.tex",298,0)]
  DDEExe('[ForwardSearch("%P\%N.pdf","%q%n%t",%!l,0,0,0)]');
  DDEClose;
  RestoreRegisters(1111111111);
  Exit;

:not_sumatra:: ===================================================

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 21-May-2009 17:18 by LingyunWu