[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; ; ) |
Hi!
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-
open))
(pdf-tools-install)
(setq TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips
and gv") (output-dvi "xdvi") (output-pdf "PDF Tools") (output-html "xdg-
open"))))
(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-
buffer)
8= 8< 8= 8<8= 8< 8= 8< 8= 8< 8= 8<
The last line came from politza, who wrote PDF-Tools, see here:
https://github.com/politza/pdf-tools/issues/128
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.
So:
- 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,
Alexander
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX] Setup for new PDF-Tools,
AW <=