[OS X TeX] key bindings in ``math mode'' only

Herbert Schulz herbs at wideopenwest.com
Thu May 23 18:33:59 EDT 2013


On May 23, 2013, at 5:23 PM, Gary L. Gray <gray at psu.edu> wrote:

> On May 23, 2013, at 4:52 PM, Nicolae Garleanu <garleanu at haas.berkeley.edu> wrote:
> 
>> I was thinking about key bindings again today, and one thing I wish I could do is the following: continue to obtain _{} every time I type _, but only inside a math environment, between $ signs, etc. As an example, if I want to write in my tex file the name of another file (say, a graphics file to include) that contains the character `_', now I have to erase curly brackets. One option is to avoid such characters from file names. If there is a simple way of applying the bindings only in math mode, though, then I could implement that. (Anything complicated will probably not be worth anyone's time.) Is there one?
> 
> I must say that after many years of using TeXShop's default "_{}" when an underscore is typed, I have switched it off. TeX is more than happy with $x_A$, and using $x_{A}$ is extra key strokes to get myself out of those darn curly braces. If I have a more involved subscript requiring the {} pair, I would rather type them in myself.
> 
> That's my wisdom for the day. I am spent.
> 
> Gary

Howdy,

Just curious... did you switch off all bindings or just remove that one? 

I guess it depends upon how often you need the brace pair. If you have multi-character sub/super-scripts often it will be two keystrokes (either {->{#INS} and another to go past the } -- or -- { and } if you don't have that keybinding). On the other hand if you usually have just one character, e.g., x^2 or x_i, you are right. I've messed that up way too often so having ^->^{#INS}, etc., doesn't bother me.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list