I cannot get AUCTeX to preview updates to multifile documents.

I have the following config:

 (use-package tex
    :ensure auctex
    (setq-default TeX-master nil)
    (setq TeX-source-correlate-start-server t
          TeX-source-correlate-method 'synctex)
    (setq TeX-auto-save t
          TeX-parse-self t)

    (add-hook 'LaTeX-mode-hook
              (lambda ()
                (setq reftex-plug-into-AUCTeX t)

    ;; Needed to sync TeX and PDF
    (add-hook 'LaTeX-mode-hook
              '(lambda ()
                 (TeX-source-correlate-mode 1)))
    (add-hook 'TeX-after-compilation-finished-functions

  (use-package company-auctex
    :ensure t
    :init (company-auctex-init))

  (use-package reftex
    :ensure t
    :defer t
    (setq reftex-cite-prompt-optional-args t))

I preview the documents in my external PDF viewer (PDF Expert). This sometimes works well with single documents (like the circ.tex doc included with AUCTeX). But I could not get the same behaviour with multifile documents. Now, I cannot get it work at all! Other potentially relevant info:

ProductName:    Mac OS X
ProductVersion: 10.14.6
BuildVersion:   18G3020
Emacs: 28.0.50
TeX 3.14159265 (TeX Live 2019) (installed via TinyTex, see https://yihui.org/tinytex/)
ghostscript: stable 9.50 (installed via homebrew)

I can build and compile the documents externally or from R using tinytex, however cannot build from AUCTeX.

What am I doing wrong? Am I missing a package? Am I missing a step in the process? Do I have an incorrect config? How do I get this to work?

Please let me know if you need any more info about my request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.