jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.39k stars 259 forks source link

use-package + PDFTools + AucTeX (TeX-view-program-selection) #960

Closed liar666 closed 2 years ago

liar666 commented 2 years ago

Hi,

Thanks for the beautiful package.

I'm currently converting my dirty .emacs file into config.org + use-package.

There's only one thing I couldn't resolve: I'm using the following lines to make AucTeX use PDF Tools:

;; Use pdf-tools to open PDF files
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
      TeX-source-correlate-start-server t)

;; Update PDF buffers after successful LaTeX runs
(add-hook 'TeX-after-compilation-finished-functions
           #'TeX-revert-document-buffer)

From: https://emacs.stackexchange.com/questions/19472/how-to-let-auctex-open-pdf-with-pdf-tools

I've tried to put then in my (use-package auctex ...) :init and :config sections, to convert them into :hook & :custom, etc. but nothing worked...

If anyone could tell me how to make that work, I'd be very grateful!

liar666 commented 2 years ago

Sorry, I found here that this simpler version works: (output-pdf "PDF Tools") ;; <-- THIS one

ivanfernandezpelaez commented 7 months ago

I'm struggling with the same issue, I'd be grateful if you could share your full use-package declaration for latex/auctex