auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Don't fold braces and brackets in math mode


From: Mosè Giordano
Subject: [AUCTeX-devel] Don't fold braces and brackets in math mode
Date: Sat, 7 Mar 2015 17:14:56 +0100

Hi all,

consider the following math environment:

--8<---------------cut here---------------start------------->8---
\begin{equation}
  \alpha[b]{c}
\end{equation}
--8<---------------cut here---------------end--------------->8---

It's folded to

--8<---------------cut here---------------start------------->8---
\begin{equation}
  α
\end{equation}
--8<---------------cut here---------------end--------------->8---

because the square brackets and braces are interpreted by AUCTeX as
arguments to the `\alpha' macro, but most of the commands to be folded
in math modes (e.g. greek letters) don't take arguments and square
brackets are often used as they are.

The attached patch fixes this issue by ignoring square brackets and
curly braces in math mode.  Comments welcome.

Bye,
Mosè

Attachment: math-folding.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]