Initial dotfiles commit
Laptop config: zsh, emacs (with WSL detection for work), ghostty, tmux, ranger, newsboat, neomutt + mbsync + msmtp (Outlook OAuth2), neomutt signature. Work config: emacs with C#/TS/JS/CSS/HTML dev settings for WSL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
34
laptop/.config/emacs/latex-settings.el
Normal file
34
laptop/.config/emacs/latex-settings.el
Normal file
@@ -0,0 +1,34 @@
|
||||
;;; latex-settings.el --- AUCTeX / LaTeX configuration
|
||||
|
||||
(use-package auctex
|
||||
:defer t
|
||||
:init
|
||||
(setq TeX-auto-save t ; cache style info in auto/ for faster opens
|
||||
TeX-parse-self t ; parse document on open for completions
|
||||
TeX-PDF-mode t ; compile to PDF by default
|
||||
TeX-source-correlate-mode t ; SyncTeX: link editor positions to PDF
|
||||
TeX-source-correlate-start-server t)
|
||||
:hook
|
||||
((LaTeX-mode . LaTeX-math-mode)
|
||||
(LaTeX-mode . flyspell-mode)
|
||||
(LaTeX-mode . reftex-mode))
|
||||
:config
|
||||
(setq reftex-plug-into-AUCTeX t)
|
||||
;; Use zathura as the PDF viewer (SyncTeX: click in PDF jumps to source line)
|
||||
(add-to-list 'TeX-view-program-selection '(output-pdf "Zathura"))
|
||||
;; LatexMk handles multiple pdflatex passes, bibliography, index automatically
|
||||
(add-to-list 'TeX-command-list
|
||||
'("LatexMk" "latexmk -pdf -interaction=nonstopmode %s"
|
||||
TeX-run-TeX nil t :help "Run latexmk"))
|
||||
(setq TeX-command-default "LatexMk")
|
||||
|
||||
(defun rh/latex-build-pdf ()
|
||||
"Compile the current LaTeX buffer to PDF using latexmk."
|
||||
(interactive)
|
||||
(TeX-command "LatexMk" #'TeX-master-file))
|
||||
|
||||
(with-eval-after-load 'latex
|
||||
(define-key LaTeX-mode-map (kbd "C-c C-b") #'rh/latex-build-pdf)))
|
||||
|
||||
(provide 'latex-settings)
|
||||
;;; latex-settings.el ends here
|
||||
Reference in New Issue
Block a user