
Now $ is a shortcut, provided that you're in TeX mode and you did not type \$. If you just want to typeset $ $ and get the cursor amidst, with only one key, you can make $ an active string adding these lines at the end of ActiveStrings.ini: STRING="$" You'll have access to this menu item with a right click on a selected text.

You can also add two lines just above theĮND="SelectedPopup" line in PopupMenus.ini: ITEM="Insert $ $" Its job is to insert a $ $ pair on either side of a selection, selecting first the closest word if no selection is done. MACRO="Exe('%b\Local\macros\insmath.edt')" Add just above this line the item: ITEM="InsertSel $ $"

Then you add an item to the SHORTCUTS menu in MainMenu.ini, and locate the line:ĮND="Shortcuts".

That is to be stored in %b\Local\macros\, say, as insmath.edt. Now locate the line BUTTON="Emphasize_(Italic)"Īnd just before it, insert the line BUTTON="$.$"Īs before, press Shift+Ctrl+F9 to incorporate the changes.Īnother solution is to use the following macro, heavily inspired by the fonts macros: BeginGroup A local copy of the file Toolbar.ini will be opened. In the same branch of the "Option Interface", double-click on "Toolbar". If you also want a button in the toolbar that is associated with that command, do the following. Now press Shift+Ctrl+F9 to incorporate the changes and you're done.Īs you can see in the "Insert" -> "LaTeX" menu, now the item "$.$" has the proper shortcut.

A local copy of the file MainMenu.ini will be opened.Īt this point, locate the item ITEM="$.$" To do this (assuming you have version 7 or greater), go to "Options" -> "Options Interface" and, in the branch "Menus and Toolbar", double-click on "Main Menu". There's no predefined shortcut for this in WinEdt.Īnyway you can add one, for instance Ctrl+J which is not used anywhere else.
