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
The additions of this package fall into the following categories:
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
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.
Five new keybindings are defined for navigating between
sections/chapters. These are meant to be intuitive to people familiar
Goes forward to the next section-like command in the buffer (\part, \chapter, (sub)section, or (sub)paragraph, whichever comes first).
Goes backward to the previous section-like command containing this one. For instance, if you're inside a subsection it goes up to the section that contains it.
next-section, except it skips anything that's "lower-level" then the current one. For instance, if you're inside a subsection it finds the next subsection (or higher), skipping any subsubsections or paragraphs.
Skip over the next environment, or exit the current one, whichever comes first.
Exit the current environment, and skip over some whitespace afterwards. (Like
LaTeX-find-matching-end, but a little more useful.)
Same as above, but go backward.
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:
Completely cleans up the entire current environment. This involves:
- Removing extraneous spaces and blank lines.
- Filling text (and only text, not equations).
- Indenting everything.
Small User Experience Improvements
The buffer used to display LaTeX errors is typically a regular text
fundamental-mode. latex-extra switches it to
special-mode and adds some colors to the display.