This is a question a friend of mine had; figured posting here might give quick responses.
Old version in new language, après
NameHow do I define the mapping
^|-->^while^^|-->^{}. Similarly, for_.Old Version
Is there a way to modify the electric braces for superscript and subscript to behave as follows:
Insert no empty pair of braces when a carat
^or underscore_is entered.Insert a empty pair of braces when a carat
^(resp. underscore_) is entered following a^carat (resp._underscore) sign.
Any answer would be helpful.
/p/s/ The motivation is to minimise having to jump out of braces when the subscript or superscript is just really a character long.