Code folding for LaTeX in Emacs

Posted by ShreevatsaR on Stack Overflow See other posts from Stack Overflow or by ShreevatsaR
Published on 2010-04-15T01:37:03Z Indexed on 2010/04/15 1:43 UTC
Read the original article Hit count: 613

Filed under:
|
|
|

Is there an Emacs minor-mode (or piece of elisp code) that lets you selectively hide/show environments while in LaTeX mode? For instance, I would like to move to the beginning of a long \begin{figure} block, hit a keystroke, and have the contents of that figure environment hidden from view. Similarly with \begin{proof} and so on, and ideally even with \subsections.

Is this possible? I just tried hs-minor-mode, allout-mode, and outline-minor-mode, but most of them don't recognize LaTeX's environments, e.g. hs-minor-mode fails with "scan error: unbalanced parentheses". I would prefer not to have to enter explicit folding marks like {{{ as in folding-mode.

[Ideally it would be great if the folding were persistent, but I see that that question doesn't have an accepted answer yet.]

© Stack Overflow or respective owner

Related posts about emacs

Related posts about emacs-lisp