Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: be977aade9
Fetching contributors…

Cannot retrieve contributors at this time

75 lines (64 sloc) 2.273 kB

Starter Kit LaTeX

This is part of the Emacs Starter Kit.

Starter Kit LaTeX

Support for editing LaTeX.

Load Packages

Load AucTeX

(load "auctex.el" nil t t)

Load Preview LaTeX

(load "preview-latex.el" nil t t)

Load RefTeX

(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode

Configure AucTeX

Use pdfLaTeX

  • Take this out to compile to DVI, instead.
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode)

Set a Path to Executables (optional)

  • The location of the LaTeX excecutables is system dependent. AUCTeX calls everything through a shell, so you may or may not need this. This source-code block is turned off by default as it should be added to the user’s personal configuration as needed.
(setenv "PATH" (concat "/usr/texbin:" (getenv "PATH")))

Configure RefTeX

Default Bibliography

  • This is important when editing source code in Org-babel, since the LaTeX source code block being edited probably doesn’t include the \bibliography{} command that RefTeX uses to find bibliographic database(s). Make certain also that RefTeX has a path to the bibliographic databases. This source-code block is turned off be default as it should be configured by the user in a personal file/directory.
(setq reftex-default-bibliography
       ("user.bib" "local.bib")))

Configure Org-babel

  • Add LaTeX to the list of languages Org-babel will recognize.
;; (org-babel-add-interpreter "latex")
;; (add-to-list 'org-babel-tangle-langs '("latex" "tex"))
;; ; (require 'org-babel-latex)
  • Add LaTeX to a list of languages that raise noweb-type errors.
(add-to-list 'org-babel-noweb-error-langs "latex")
Jump to Line
Something went wrong with that request. Please try again.