Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop auctex-latexmk with your own configs tips (replace TeX-run-TeX with TeX-run-format) #47

Open
tshu-w opened this issue Aug 16, 2023 · 1 comment

Comments

@tshu-w
Copy link

tshu-w commented Aug 16, 2023

I'm dropping auctex-latexmk from my configuration as it's not maintained.
According to this report, we can replace TeX-run-TeX with TeX-run-format to avoid using the complex Latexmk-sentinel:

  (add-to-list 'TeX-expand-list
               '("%(-PDF)"
                 (lambda ()
                   (if TeX-PDF-mode
                       (cond
                        ((eq TeX-engine 'default) "-pdf")
                        ((eq TeX-engine 'xetex) "-pdfxe")
                        ((eq TeX-engine 'luatex) "-pdflua")) ""))))
  (add-to-list 'TeX-command-list
               '("LaTeXmk" "latexmk %(-PDF) -%(PDF)%(latex)='%`%l%(mode)%'' %(output-dir) %t"
                 TeX-run-format nil (latex-mode doctex-mode) :help "Run Latexmk"))
  (with-eval-after-load 'latex
    (setq LaTeX-clean-intermediate-suffixes
          (append LaTeX-clean-intermediate-suffixes '("\\.fdb_latexmk" "\\.fls"))))
@titanofold
Copy link

titanofold commented Nov 27, 2023

In addition to what @tshu-w contributed, I've added a hook to set LaTeKmk as the default. When LaTeX-mode is invoked for each file/buffer, it overrides the user's prior setq declaration, so the hook is needed to actually align with the user's preference.

(add-hook 'LaTeX-mode-hook (lambda () (setq TeX-command-default "LaTeXmk")))

Stolen from: https://www.reddit.com/r/emacs/comments/vl38v0/comment/idv0ips/?utm_source=share&utm_medium=web2x&context=3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants