1

I use

(setq TeX-view-program-list (quote (("Emacs" "emacsclient -e '(split-window-horizontally 88) 'emacsclient -e '(other-window 1)'; emacsclient %o;"))))
(setq TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-html "xdg-open") (output-pdf "Emacs"))))

to view the pdf files in a split window.

I would like to extend the first command a little bit (right now it splits the window, changes to the other window and opens the pdf file there)

  • The split command leaves the new (pdf) buffer active, but I would like to have the original one active.
  • I would like to sync the position in the source file with the pdf file.

I can do this by hand by calling other window and pdf-sync-forward-search right after the latex view command, but I am sure this can be done automatically.

I tried to add emacsclient -e '(other-window 1)', but it looks like I don't quite understand how the commands work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.