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

Herbert Schulz herbs at wideopenwest.com
Fri May 24 00:06:27 CEST 2013


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?
> Thank you.
> Nicolae
> 

Howdy,

Easiest thing to do is to create a Macro that only has _,  call it, e.g., Quoted _ and assign Shift-Cmd-- to it.


Enclosed is exactly that macro in the Quoted_.plist file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Quoted_.plist
Type: application/octet-stream
Size: 427 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20130523/996e333b/attachment.obj>
-------------- next part --------------


To install it Click on Msacros->Open Macro Editor? and then there will be a new Menu item under the Macro Menu, Macros->Add macros from file? . AFter clicking that maneuver to the directory with the Quoted_.plist file and double click on it to load it into the Macro Editor's Menu list. You can then shift it around in the list and Save it. I've got tieems like that for several things like that; e.g., ", ^ and {, which are normally bound to other things on my keyboard.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)





More information about the macostex-archives mailing list