Emacs + Synctex + Skim: How to correctly set up synchronization? [none of the existing methods worked properly]

后端 未结 2 1523
野性不改
野性不改 2020-12-12 19:30

I\'m working with GNU Emacs 23.3 (9.0) on Mac OS X 10.7.2. I would like to use synctex to jump between .tex and .pdf files. Although there are many different approaches on t

相关标签:
2条回答
  • 2020-12-12 20:19

    When you press C-c C-v (which runs TeX-view) it should open Skim with the bar on the current line. This is what you set up with the TeX-output-view-style. You can't get that behaviour from latexmk -pvc since it doesn't know which line you are on. All latexmk knows is that the file changed. In order to do a forward search you need to run TeX-view.

    You can bind CMD + shift + click to run TeX-view by adding

    (define-key LaTeX-mode-map [M-S-mouse-1] 'TeX-view)
    

    or possibly

    (define-key LaTeX-mode-map [s-S-mouse-1] 'TeX-view)
    

    to your TeX-mode-hook. It depends on your settings which you need, but can find out by pressing C-h C-k and then CMD+shift+click. Of course adding both shouldn't cause a problem.

    0 讨论(0)
  • To enable the clicking feature of the sync, I added:

    (add-hook 'LaTeX-mode-hook
              (lambda () (local-set-key (kbd "<S-s-mouse-1>") #'TeX-view))
              )
    

    to my .emacs file.

    NOTE: make sure that you are in PDF mode (use (setq TeX-PDF-mode t)).

    0 讨论(0)
提交回复
热议问题