bug-auctex
[Top][All Lists]
Advanced

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

bug#28382: 11.90.2.2017-07-25; Wrapping content in an equation with LaTe


From: Ikumi Keita
Subject: bug#28382: 11.90.2.2017-07-25; Wrapping content in an equation with LaTeX-environment results in invalid LaTeX
Date: Sun, 10 Sep 2017 03:20:07 +0900

Hello Thibaut,

>>>>> Thibaut Verron <address@hidden> writes:
> If now you insert the equation first, select it, and use `C-c C-e` to
> wrap it in an "equation" environment, the result is

> \begin{equation}
> 2+2=4\label{eq:2}
> [point here]
> \end{equation}

Confirmed.  The reason for this behaviour is that `LaTeX-env-label' does
not take care of the case that the region is active.  In fact, it seems
that most of the functions to insert environments in latex.el don't,
either.

The attached quick hack basically gives the output you suggested as
option 2, though for `LaTeX-env-label' only.

I hope that anyone else makes out a comprehensive solution that covers
other functions as well...

Bye,
Ikumi Keita

Attachment: tentative-patch
Description: quick hack


reply via email to

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