[Top][All Lists]

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

Re: [AUCTeX] Modify environments interactively

From: Lars Madsen
Subject: Re: [AUCTeX] Modify environments interactively
Date: Mon, 16 Feb 2015 09:26:43 +0000

Not as a first env

I was thinking more on the lines of


then some macro would transform this into


i.e. if the env to be deleted is on lines of their own, then those lines are 

BTW: I haven't switched to 11.88 yet, was hooks added to 
LaTeX-modify-environment? AFAIR we can add environment hooks to C-c C-e but not 
to C-u C-c C-e (I think someone mentioned at one point that that should be 
added as well.

Why is this needed: I add cleanup hooks to certain envs, so if I mark a region 
and insert an env around it, then it clean up the contents. But at least with 
11.87 no such hook fires if you change an env.

An example of such a cleaner is for a hint env, used in exercises to make sure 
all hints are formatted the same way. Authors often forget this, thus the text 
is often

Hint: Blah blah...

My clean up hook here removes the 'Hint: '

/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: / More information:

From: address@hidden address@hidden on behalf of Tassilo Horn address@hidden
Sent: 16 February 2015 07:56
To: address@hidden
Subject: Re: [AUCTeX] Modify environments interactively

Igor Sosa Mayor <address@hidden> writes:

>> related, is there a build in feature for deleting a given env?
>> This is sometimes handy when editing other peoples work. (some people
>> are very messy)
> this would be a good idea...

I guess doing `C-u C-c C-e' and then deleting the environment name could
do that, i.e., modifying an environment so that is has an empty name.
But there's no good way to delete an environment.  I mean, deleting the
\begin/\end is easy, but you'd probably also want to delete its \items
in case its an enumerate/itemize, etc.


auctex mailing list

reply via email to

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