use-package auctex

This commit is contained in:
larstvei 2023-06-11 21:48:42 +02:00
parent 9521ff0240
commit 89426bfbe5

View File

@ -206,8 +206,7 @@
(let* ((package--builtins nil)
(packages
'(auctex ; Integrated environment for *TeX*
chatgpt-shell ; Interaction mode for ChatGPT
'(chatgpt-shell ; Interaction mode for ChatGPT
cider ; Clojure Interactive Development Environment
clj-refactor ; Commands for refactoring Clojure code
company ; Modular text completion framework
@ -1287,40 +1286,18 @@
#+end_src
** LaTeX and org-mode LaTeX export
=.tex=-files should be associated with =latex-mode= instead of =tex-mode=.
** LaTeX
#+begin_src emacs-lisp
(add-to-list 'auto-mode-alist '("\\.tex\\'" . latex-mode))
;; Integrated environment for *TeX*
(use-package auctex
:ensure t
:defer t)
#+end_src
Use [[http://mg.readthedocs.io/latexmk.html][latexmk]] for compilation by default.
#+begin_src emacs-lisp
(add-hook 'LaTeX-mode-hook
(lambda ()
(add-hook 'hack-local-variables-hook
(lambda ()
(setq-local compile-command
(concat "latexmk -pdf -pvc "
(if (eq TeX-master t)
(file-name-base (buffer-name))
TeX-master))))
t t)))
#+end_src
Use ~biblatex~ for bibliography.
#+begin_src emacs-lisp
(setq-default bibtex-dialect 'biblatex)
#+end_src
* Org-mode LaTeX export
I like using the [[https://code.google.com/p/minted/][Minted]] package for source blocks in LaTeX. To make org use
this we add the following snippet.
@ -1335,9 +1312,9 @@
Because [[https://code.google.com/p/minted/][Minted]] uses [[http://pygments.org][Pygments]] (an external process), we must add the
=-shell-escape= option to the =org-latex-pdf-process= commands. The
=tex-compile-commands= variable controls the default compile command for
Tex- and LaTeX-mode, we can add the flag with a rather dirty statement (if
anyone finds a nicer way to do this, please let me know).
=tex-compile-commands= variable controls the default compile command for Tex-
and LaTeX-mode, we can add the flag with a rather dirty statement (if anyone
finds a nicer way to do this, please let me know).
#+begin_src emacs-lisp
@ -1356,8 +1333,8 @@
#+end_src
For my thesis, I need to use our university's LaTeX class, this snippet
makes that class available.
For my thesis, I need to use our university's LaTeX class, this snippet makes
that class available.
#+begin_src emacs-lisp