This redefinition of the key bindings assumes that you are using a standard US keyboard layout. Note that for the Windows part I assume you are running the package from my home page.
Quick Guide (Unix/Linux)
Although NEdit is an X client, it works fully under MS Windows with any X server. Also note that the macros need certain key bindings contained in the '.Xdefaults' file in the 'latexmode-0.9.1' folder.
Detailed Installation
Uninstalling
The list of menu items imported by LATEX-MODE can be found in the file 'latexmode-0.9.1/uninstall.txt'. The uninstall macro saves a backup of your preferences in the 'nedit.rc.bak' file.
Windows (Cygwin Port)
Remark on X Defaults
One of the advantages3 of the X Window system is that you have complete control over an application, for example which keyboard. In this context, note that some LATEX-MODE macros are of general use. Indeed, the same macro is used to fill in constructs such as while and for loops of the NEdit macro language when editing '*.nm' files.
I now describe first the macros located in the Macro menu and then those located in the Background menu in order of menu appearance. Note that almost all macros have been made language-dependent, meaning you'll only see them when you're in the language mode they're defined for. In addition to the core LATEX-MODE macros, which of course are only active if you are editing LATEX files, there are also macros. for DTX, Bib files, Log files and some general purpose macros.
If NEdit is in LATEX mode, you should see the following entries in the macro menu, where the entry "LTXMode" contains the core part of LATEX-MODE.
The spell check macro works for both English and German texts (in which German is selected by switching with ALT+.). After the document has been spell-checked, a suspected misspelled word is selected and a dialog is displayed with a list of suggestions for correcting the word. Select a suggestion and click on "Correct all" (or on "Correct" . to correct only this occurrence - then the macro moves to the next occurrence if there is one).
If a correctly spelled word is selected as misspelled (because it's not in the spell checker's dictionary), you can skip it.
NMacro
LTXMode → Main File
In the macro itself, you can set a variable for the maximum number of errors or warnings to consider. It displays all Greek letters in the help system and you can simply click on them to insert them into your document. What you can't see in the menu are the macros that do the work, that is, you don't see the auto-complete macro or the list.
This means that every time you type SPACE or SHIFT+RETURN, a space or new line is not inserted into your document, but one of these macros is executed.8 The binding of SPACE is done by means of key translations9, while SHIFT+ RETURN is bound as accelerator key. After expanding, the first such field will be selected, so you can type your text for the field. Write your statement, statement, or the like, select the text after it, and invoke the macro by right-clicking and selecting “Statements” from the Window Background menu.
So you can jump to the appropriate place in the source file by clicking in the preview window. You can see this if, for example, you bind the SPACE key to a macro by binding the accelerator in the macro menu. Additionally, key translations are more flexible in the sense that you can bind macros to X events.
LTXMode → Run
LTXMode → Insert
These macros simply insert environments, various templates of LATEX constructions, symbols, math symbols, and BibTEX items into your text. There are some editors that try to impress you with some kind of graphical user interface, i.e. they show images of mathematical symbols that you can click on and the appropriate command will be inserted into your text. Using the Help system, see 5.1.7, is more flexible for such matters than “Insert → Greek Letters” might look.
Calling "Insert → quotation marks" by pressing CTRL+' will insert the correct quotation marks - left or right, also taking into account whether you are typing German (ALT+., cf.7). The entries in the Window Background menu are just calls to the menu entries here (via the macro menu command). The reason for this is that it is not possible to define accelerator keys for the menu entries of the window's background menu.
So having it this way allows you to define additional accelerator keys for these macros if you want to do so.
LTXMode → Structures
Placing the cursor on the label after changing the environment and calling "Structures→The/Ref (alpha)" will automatically loop through all your project files (if a main file is defined).
LTXMode → Help
One of the advantages of the above approach is that it is cross-platform and does not depend on a specific editor program. The images of the Greek letters are Png files in base64 encoding (which is not necessary to do - I just didn't want a huge collection of single Png files. By encoding them you can put them in a single save file). You can automatically extract entire formulas from your Dvi file as Png images and save them for later use.
You can then look through them with a Tcl/Tk script and a simple click on the formula will insert it into your document.
Editing → Complete Word
Note that the decision whether to attempt a word or code completion is simple: if your word starts with a backslash, a code is completed, otherwise it is a word completion. Note that for a completion file, an entire line is considered a completion, so you can enter multiple words where you only need to write the beginning of the first word in your file and press F4 to get the full completion. If there are multiple possible completions, you can cycle through them by pressing F4 repeatedly, or press F5, which will bring up a list of all possible completions, where you can choose the one you want.
Bookmarks
Help
Expander Macros
- Remark
Set the menu items for the macros to an undefined language mode (I chose "@keys" because the keyboard shortcuts for that have been redefined) so that you never see them in the menu. The features of the expander are that you can expand abbreviations recursively11 and that you can expand an abbreviation with a selection. Recursive expansion means the following: If you place an already defined abbreviation between|>..<|in the definition of another abbreviation, this field will be expanded recursively.
Also, you can set the cursor anywhere in the extension by setting an empty field|><|. Afterwards you can jump to the next field with "Next field" or define a shortcut such as CTRL+X. So pressing space directly after bgin will expand the above example before you can type the rest.
A solution would be to have a different key binding and change it to your liking.
Key Board
Note that if Smart Indentation is turned on, you can move between parentheses or the dollar sign by typing spaces, ie. slash) or dollar sign will move the cursor and the last space after the parenthesis or dollar sign. Enter punctuation that should be after the parentheses or dollar sign, within the parentheses or dollar signs - moving through the parentheses/dollar will automatically move the parentheses/dollar signs.
Window Background Menu
- Theorems
- Equations
- Matrices
- Lists
- Format and Sections
- Snippets
- Comments
If no semicolon is found, the macro checks for a binary relation and inserts an ampersand (&) before the first binary relation found on the line. Just give the entries of your matrix, separate the columns with a blank space, if this is not possible, define a different separator, eg, a semicolon. This is why you can give snippets names (instead of a short abbreviation) and the start and end parts of the snippets appear along with the names in the list dialog menu from which you select them.
Source special means that line numbers and the names of your source files are included in the Dvi output. Yap must also be configured appropriately, that is, you find the command line to invoke the editor in the file 'yap-com.txt' which is also included in the LATEX-MODE. Therefore, the rough idea was to define the key which in the US layout is the semicolon (and colon if the SHIFT key is held down) to insert '¨o', and to define SHIFT+; to insert '¨O', and so on for the other umlauts and the ß, exactly as it is for the German layout (so write texts as if a German layout were used).
Note that some key bindings have changed and that there are changes in the extension macro, see 5.1.11. One is by way of key translations in your X resource file, the other is by defining accelerator keys in the macro menu and the shell menu. So, if you don't want to call the macros through the menu every time, you need to define accelerator keys for them, which is simply done in the macro and window background command menus (“Preferences→Defaults→Customize Menus”) .