auctex
[Top][All Lists]
Advanced

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

[AUCTeX] LaTeX-environment on region inserts new-lines


From: Adam
Subject: [AUCTeX] LaTeX-environment on region inserts new-lines
Date: Sun, 1 Jul 2012 15:39:15 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hello.

I would like to ask if it is possible to avoid this:

1. I write

    ... foo
    \[
    some math
    \]
    bar ...

2. After some time I realize that I need to label previous equation hence I 
delete '\[' and '\]', select 'some math' and do 'LaTeX-environmant' (via C-ce 
or 
M-x LaTeX-environment) on that region.

The result is this:

    ... foo
    \begin{equation}
    some math\label{eq:my-label}

    \end{equation}

    bar ...

Is it possible to avoid that two new-lines (empty lines) in equation 
environment 
and after \end{equation}? To clarify:

    ... foo
    \begin{equation}
    some math\label{eq:my-label}
--> This empty line gives error. <--
    \end{equation}
--> This empty line brakes paragraph. <--
    bar ...

Of course I can delete them manually but I would be grateful if AUCTeX can do 
this automatically. I can also use equation* instead of \[ and \] but I like \
['s.

Best regards
Adam




reply via email to

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