2018-01-01 20:48:23 +01:00
|
|
|
#+TITLE: :lang latex
|
|
|
|
|
|
|
|
* Module Description
|
|
|
|
Provide a helping hand when working with LaTeX documents.
|
|
|
|
|
|
|
|
** Feature:
|
|
|
|
+ Sane defaults
|
|
|
|
+ Fontification of many popular commands
|
|
|
|
+ Pretty indentation of wrapped lines using the ~adaptive-wrap~ package
|
|
|
|
+ Spell checking with ~flyschek~
|
|
|
|
+ Change PDF viewer to Okular or ~latex-preview-pane~
|
|
|
|
+ Bibtex editor
|
|
|
|
+ Autocompletion using ~company-mode~
|
|
|
|
+ Ivy or Helm for selecting bibliography
|
|
|
|
+ Compile your .tex code only once using LatexMk
|
|
|
|
|
|
|
|
|
|
|
|
* Customization
|
|
|
|
|
|
|
|
** Custom Variables
|
|
|
|
Two custom variables state where AUCTeX will search for bibliography files and their corresponding PDFs.
|
|
|
|
Set these variables in your private configuration with:
|
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(set! :latex-bibtex-file "./your/bib/file.bib")
|
|
|
|
(set! :latex-bibtex-pdfs-dir "./dir/with/bib/pdfs/")
|
|
|
|
#+END_SRC
|
|
|
|
If the variables are not set, they are ignored.
|
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
** Choose View Program
|
|
|
|
You have four options to choose from for the viewer of your PDF rendered files.
|
|
|
|
*** Okular
|
|
|
|
Use Okular as default PDF viewer.
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
Activate with the flag '+okular' of the latex module in your private init.el.
|
2018-01-01 20:48:23 +01:00
|
|
|
#+BEGIN_SRC emacs_lisp
|
2018-04-11 13:02:58 +02:00
|
|
|
(latex +okular)
|
2018-01-01 20:48:23 +01:00
|
|
|
#+END_SRC
|
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
*** Skim
|
|
|
|
For Mac users. Use Skim to preview your PDFs.
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
Activate with the flag '+skim' of the latex module in your private init.el.
|
2018-01-01 20:48:23 +01:00
|
|
|
#+BEGIN_SRC emacs_lisp
|
2018-04-11 13:02:58 +02:00
|
|
|
(latex +skim)
|
2018-01-01 20:48:23 +01:00
|
|
|
#+END_SRC
|
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
*** PDF Tools
|
|
|
|
Use the PDF Tools package to preview your PDFs. Requires the tools module ~pdf~ enabled in your configuration.
|
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(:tools pdf)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Activate with the flag '+pdf-tools' of the latex module in your private init.el.
|
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(latex +pdf-tools=)
|
|
|
|
#+END_SRC
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
*** Preview Pane
|
|
|
|
You may wish to use the old school package ~latex-preview-pane~ instead of the
|
|
|
|
other alternatives. ~latex-preview-pane~ uses a ~DocView~ instead.
|
2018-01-01 20:48:23 +01:00
|
|
|
|
2018-04-11 13:02:58 +02:00
|
|
|
Activate with the flag '+preview-pane' of the latex module in your private init.el.
|
2018-01-01 20:48:23 +01:00
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(latex +preview-pane)
|
|
|
|
#+END_SRC
|
2018-04-11 13:02:58 +02:00
|
|
|
|
|
|
|
** LatexMk
|
|
|
|
Use LatexMk instead of normal LaTeX to compile documents. LatexMk only needs to
|
|
|
|
run once to get all references, bibliography and other things right.
|
|
|
|
|
|
|
|
Activate with the flag '+latexmk' of the latex module in init.el.
|
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(latex +latexmk)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
You can enable both a custom view program and LatexMk with a call such as:
|
|
|
|
#+BEGIN_SRC emacs_lisp
|
|
|
|
(latex +latexmk +okular)
|
|
|
|
#+END_SRC
|