(no title)
vslavkin | 1 year ago
(use-package auctex
:ensure (auctex :pre-build (("./autogen.sh")
("./configure" "--without-texmf-dir" "--with-lispdir=.")
("make")))
:demand
:mode (("\\.tex\\'" . LaTeX-mode)
("\\.tex\\.erb\\'" . LaTeX-mode)
("\\.etx\\'" . LaTeX-mode))
:config
(with-eval-after-load 'preview
(dolist (env '("tikzpicture" "circuitikz")) ;; I want to preview tikzpictures and icrcuitikz
(add-to-list 'preview-default-preamble
(concat "\\PreviewEnvironment{" env "}") t))
(add-to-list 'preview-inner-environments "axis") ;; And axis (pgfplots)
(set-face-attribute 'preview-reference-face nil
:foreground "black"
:background "white")))
;; Tikz previews look better with a white background, if you don't use it, it's way cooler to preview latex with a "trasparent" background
```And then the usage:
Just continue using latex as you are, and then try to incorporate auctex commands. The most useful being =latex-environment= and =latex-section= + the previews. So don't write \begin{env}... nor \section{sec}, and instead use C-c C-e and C-c C-s (They seem hard, but they aren't) For the previews, use C-c C-p ... (there are a lot of options there, using which-key you can see them) And for compiling use C-c C-c. I recommend reading https://karthinks.com/software/latex-input-for-impatient-sch... and if you have the time, read bits of the manual
(Sorry, I can't get the code to display right. goto https://gitlab.com/vslavkin/emacs-config/-/blob/master/emacs... and search for the latex heading)
No comments yet.