Malabarba / latex-extra

A series of usability improvements for Emacs latex-mode.
GNU General Public License v3.0
69 stars 14 forks source link

latex-extra Build Status

Defines extra commands and keys for LaTeX-mode. To activate, install from melpa and add the following to your init.el file:

(add-hook 'LaTeX-mode-hook #'latex-extra-mode)

Note, this will move the key binds C-c C-q, C-c C-f, and C-c C-p. To understand why (or disable it) look into the variables latex/override-font-map, latex/override-fill-map, and latex/override-preview-map.

The additions of this package fall into the following categories:

1-Key Compilation

Tired of hitting C-c C-c RET 4 times (latex, bibtex, latex, view) for the document to compile? That's 12 keys! This defines a much needed command that does everything at once, and even handles compilation errors!

Content Folding

Similar to how org-mode hides and displays of subtrees, if you hit TAB on a section header latex-extra will hide the contents of that section for you. Hitting tab twice will expand it again.
This will not interfere with whatever with other keybinds you have set for TAB, such as yasnippet or auto-completion.

Shift-TAB will do the same for the entire buffer.

Of course, the same goes for chapters, subsections, etc.

Navigation

Five new keybindings are defined for navigating between sections/chapters. These are meant to be intuitive to people familiar with org-mode.

Whitespace Handling

latex-extra.el improves auto-fill-mode so that it only applies to text, not equations. To use this improvement, just activate auto-fill-mode as usual.

It also defines a new command:

Small User Experience Improvements

The buffer used to display LaTeX errors is typically a regular text buffer in fundamental-mode. latex-extra switches it to special-mode and adds some colors to the display.