Difference between revisions of "AUCTeX"

From WikEmacs
Jump to: navigation, search
(added some real info about AUCTeX)
(Helpful keybindings)
 
(2 intermediate revisions by 2 users not shown)
Line 17: Line 17:
 
(load "preview-latex.el" nil t t)
 
(load "preview-latex.el" nil t t)
 
</source>
 
</source>
 +
 +
=== Emacs 24 and ELPA ===
 +
If you install AUCTeX via ELPA in Emacs 24 the basic setup listed above is not necessary. AUCTeX just works out of the box (at least on Linux).
  
 
== Helpful keybindings ==
 
== Helpful keybindings ==
 +
 +
C-c C-e insert environment
  
 
== Common Customization ==
 
== Common Customization ==
  
 +
=== Switch all fonts to monospace ===
 +
AUCTeX's default fontification uses several different text sizes. If this behavior is not desired, it may be turned off by the following:
 +
<source lang="lisp">
 +
(setq font-latex-fontify-script nil)
 +
(setq font-latex-fontify-sectioning 'color)
 +
; modify Beamer as well
 +
(custom-set-faces
 +
'(font-latex-slide-title-face ((t (:inherit font-lock-type-face)))))
 +
(font-latex-update-sectioning-faces)
 +
</source>
 +
which should be loaded by a hook.
 
=== Use pdflatex ===
 
=== Use pdflatex ===
  

Latest revision as of 16:51, 10 October 2012

AUCTeX
Description LaTeX editing
Author David Kastrup
Maintainer David Kastrup
Source http://www.gnu.org/software/auctex/

AUCTeX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs. It supports many different TEX macro packages, including AMS-TEX, LaTeX, Texinfo, ConTEXt, and docTeX (dtx files). AUCTeX includes preview-latex which makes LaTeX a tightly integrated component of your editing workflow by visualizing selected source chunks (such as single formulas or graphics) directly as images in the source buffer.

Basic setup[edit]

(add-to-list 'load-path "~/.emacs.d/auctex")
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

Emacs 24 and ELPA[edit]

If you install AUCTeX via ELPA in Emacs 24 the basic setup listed above is not necessary. AUCTeX just works out of the box (at least on Linux).

Helpful keybindings[edit]

C-c C-e insert environment

Common Customization[edit]

Switch all fonts to monospace[edit]

AUCTeX's default fontification uses several different text sizes. If this behavior is not desired, it may be turned off by the following:

(setq font-latex-fontify-script nil)
(setq font-latex-fontify-sectioning 'color)
; modify Beamer as well
(custom-set-faces
 '(font-latex-slide-title-face ((t (:inherit font-lock-type-face)))))
(font-latex-update-sectioning-faces)

which should be loaded by a hook.

Use pdflatex[edit]

(setq TeX-PDF-mode t)

Configure view program[edit]

(setq TeX-view-program-selection
      '((output-dvi "DVI Viewer")
        (output-pdf "PDF Viewer")
        (output-html "HTML Viewer")))
;; this example is good for OS X only
(setq TeX-view-program-list
      '(("DVI Viewer" "open %o")
        ("PDF Viewer" "open %o")
        ("HTML Viewer" "open %o")))

See Also[edit]

Project Pages[edit]

Tutorial Pages[edit]