doomemacs/modules/lang/latex
2020-03-27 01:25:30 -04:00
..
+fontification.el lang/latex: general refactor 2018-07-30 03:43:43 +02:00
+ref.el Fix evil keybinds in reftex-mode 2020-03-11 22:53:48 -04:00
+viewers.el lang/latex: fix end-of-file syntax error 2019-11-21 14:04:55 -05:00
autoload.el lang/latex: fix autofill in \item's #1849 2019-10-03 20:49:04 -04:00
config.el General, minor refactor & reformatting 2020-03-27 01:25:30 -04:00
packages.el Bump :lang latex 2020-03-06 15:42:35 -05:00
README.org Add cdlatex support in latex: +cdlatex 2020-02-07 13:06:14 +02:00

lang/latex

Description

Provide a helping hand when working with LaTeX documents.

  • Sane defaults
  • Fontification of many popular commands
  • Pretty indentation of wrapped lines using the adaptive-wrap package
  • Spell checking with flycheck
  • 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

Module Flags

  • +latexmk Use LatexMk instead of LaTeX to compile documents.
  • +cdlatex Enable cdlatex for fast math insertion.

TODO Prerequisites

TODO Features

Customization

Specifying the location of a bibtex file & corresponding PDFs

The reftex and bibtex-completion packages have two variables that allow you to specify where it should find your bibliography file(s) and their corresponding PDFs:

(setq reftex-default-bibliography "/your/bib/file.bib")
;; Optionally specifying a location for the corresponding PDFs
(setq bibtex-completion-library-path (list "/your/bib/pdfs"))

Changing the PDFs viewer

This module provides integration for four supported pdf viewers. They are

  • Skim.app (MacOS only)
  • Evince
  • Sumatra PDF
  • Zathura
  • Okular
  • pdf-tools (requires :tools pdf module)

They are searched for in this order. See +latex-viewers to change the order, or remove tools from the search altogether. If you want to exclusively use one tool, for instance:

(setq +latex-viewers '(zathura))

If none of these tools are found, latex-preview-pane (uses DocView in Emacs) is used as a fallback. You can use this exclusively by setting +latex-viewers to nil.

Using cdlatex's snippets despite having yasnippet

cdlatex has a snippet insertion capability which is disabled in favor of yasnippet when using :editor snippets. If you still wanna use it, simply rebind the TAB key for cdlatex, which takes care of snippet-related stuff:

(map! :map cdlatex-mode-map
    :i "TAB" #'cdlatex-tab)

This would favor yasnippet's expansion and cursor movement over cdlatex's expansion and movement, but that shouldn't matter if you're not using yasnippet in latex buffers.