Tuesday, May 15, 2012

LATEX: Texniccenter and Okular forward and reverse search

Prerequsites:
Proper configured Texniccenter for dvi , dvi > ps and dvi > ps > pdf output.
Kde for Windows with Okular.

Latex->DVI profile,
  • Latex ribbon, Arguments for compiler:
    --src -interaction=nonstopmode "%Wm" -synctex=-1
  • Viewer ribbon:
    Application path > C:\ProgramData\KDE\bin\okular.exe
    Command Line Arguments: '%bm.dvi#src:%l %Dc/%nc' --unique
    Search in output: '%bm.dvi#src:%l %Dc/%nc' --unique
    Do not close
Extension to PS and PDF should be straightforward.

Okular reverse search:
Setting > Configure Okular > Editor:
  • Dropdown box: Custom Text Editor
  • Command:"C:\Program Files (x86)\TeXnicCenter\TEXCNTR.exe" /ddecmd "[goto('%f', '%l')]"
Note that you have to adjust the paths, e.g. "c:\..." to your custom installation.