[Top][All Lists]

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

Re: [AUCTeX] Adding curly braces in math mode

From: Ralf Angeli
Subject: Re: [AUCTeX] Adding curly braces in math mode
Date: Tue, 01 Nov 2005 17:13:27 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* Jens Kubieziel (2005-11-01) writes:

> when typing sub- or superscripts in math mode I often need curly braces.
> So I want to customize AUCTeX that everytime when I press `_' or `^' it
> automagically appends `{}' and places the cursor inside. I guess this
> can be done like described in 'Style Files' in But actually
> I'm not sure how to do it in detail (without any lisp knowledge).

How about the attached patch?  Maybe the respective variable and
function should be named `TeX-insert-exp-and-subscript' instead of
`TeX-electric-exp-and-subscript' because the functionality does not
really feel like true electricity.  Other suggestions for the name?

Also, does anybody know why `TeX-electric-escape'/`TeX-electric-macro'
is implemented in a way that Emacs has to be restarted for a change of
`TeX-electric-escape' to take effect?  If nobody objects I can change
it, so that typing `\' will always call `TeX-electric-macro' (maybe
renamed) and the function will then check the value of

> Furthermore I'm looking for a way to expand math operators with indices
> to its last values.
> Example: I typed $\sum_{i=1}^n ...$. Later I type `$\sum_' and now I want
> AUCTeX to print `\sum_{i=1}^n '. How can this be done?

Hm, isn't something like this only useful in special cases?


Attachment: txtHpLqAPnpM9.txt
Description: Text Data

reply via email to

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