2
votes

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:

  1. 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?
  2. When Skim lanuched, the opened file is test.dvi, but I wish it's test.pdf.
  3. 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).
1

1 Answers

2
votes
  1. Change (setq TeX-PDF-mode nil) to (setq TeX-PDF-mode t) will get pdf output.
  2. Add below configuration to remove the compile prompt:
(setq TeX-command-force "LaTeX") 
(setq TeX-clean-confirm t)
  1. Skim sounds like not support side-by-side view with emacs. but use DocView instead. Add below config to get better image quality:
(setq doc-view-resolution 600)