My configuration as below:
- OS: MacOSX Sierra v10.12
- Emacs: GNU Emacs 25.2.
- AucTex: auctex-11.90.0
- TexLive: 2016
- Skim: Version 1.4.28 (102)
I use below emacs configuration:
;; AucTeX
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(setq TeX-PDF-mode nil)
(setq preview-image-type (quote dvipng))
(add-hook 'LaTeX-mode-hook (lambda ()
(push
'("latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
:help "Run latexmk on file")
TeX-command-list)))
(add-hook 'LaTeX-mode-hook
(lambda () (local-set-key (kbd "<S-s-mouse-1>") #'TeX-view)))
(dolist (dir '("/Applications/Skim.app/Contents/SharedSupport"))
(add-to-list 'exec-path dir))
(setq TeX-view-program-list
'(("Preview.app" "open -a Preview.app %o")
("Skim" "open -a Skim.app %o")
("displayline" "displayline -g -b %n %o %b")
("open" "open %o"))
TeX-view-program-selection
'((output-dvi "open")
(output-pdf "Skim")
(output-html "open")))
I can use C-c C-c to compile my tex file. and use C-c C-v to launch preview (Skim).
But:
- the Skim will popup as a application, I wish it can be embbed into emacs as another window, just like DocView behavior. Is it possible to do that or my config is not good?
- When Skim lanuched, the opened file is test.dvi, but I wish it's test.pdf.
- When press C-c C-c first time, it will popup LaTex select window, after confirmed and press C-c C-c again, it will popup View select window and need to confirm view command then I see the document. Can I make everything as default so no need to select again and again? (C-c C-c, compile; C-c C-c again, preview).