[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Setup for new PDF-Tools

From: AW
Subject: [AUCTeX] Setup for new PDF-Tools
Date: Wed, 18 Nov 2015 19:05:04 +0100
User-agent: KMail/4.14.10 (Linux/4.3.0-1-default; KDE/4.14.12; x86_64; ; )


Somebody on the orgmode list mentioned PDF-Tools. I'm struggeling with the 
setup to use it with AUCTeX. But it surely is very fast!

Installation under openSuse Tumbleweed wasn't out of the box. In the end, I 
installed with Elpa (or was it Melpa?). At the first run it tried to compile 
the source code, but doing it the wrong way for openSuse. So I downloaded the 
source code, compiled it and put the stuff to ~/.emacs.d/elpa/...

But how to customise it for AUCTeX? I figured this out for my .emacs:

8= 8< 8= 8<8= 8< 8= 8< 8= 8< 8= 8<

(eval-after-load 'org '(require 'org-pdfview))
(add-to-list 'org-file-apps '("\\.pdf\\'" . org-pdfview-open))
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . org-pdfview-


(setq TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips 
and gv") (output-dvi "xdvi") (output-pdf "PDF Tools") (output-html "xdg-

(add-hook 'doc-view-mode-hook 'auto-revert-mode) 
(setq revert-without-query (quote (".*.pdf")))
(add-hook 'TeX-after-TeX-LaTeX-command-finished-hook 'TeX-revert-document-

8= 8< 8= 8<8= 8< 8= 8< 8= 8< 8= 8<

The last line came from politza, who wrote PDF-Tools, see here:

OK, now the PDF is being updated, _if_ I start the compilation of my *.tex 
file from AUCTeX, e.g. with C-c C-c.

But if I use latexmk, the PDF is not updated. I usually start latexmk from 
command line, independently from Emacs. 


- if the lisp code in my .emacs can be improved, please tell me. Is "(load 
"pdf-tools")" necessary?

- how to get an updated PDF with PDF-Tools every time latexmk recompiles the 
*.tex file?


Kind regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]