I would like to write a macro with a trigger
#[a-z] that, dependent on the character in the trigger, writes the corresponding Greek letter. That is, the trigger
#a should produce
\alpha, the trigger
#b should give
\beta in the editor, and so on.
The trouble is that the trigger is removed immediately after it is written so that the script does not know if
b, or another letter has been used. Of course I could write specific macros for each Greek letter, but this would exhaust even the limit of 40 macros easily (if also capital letters are used). I know I could place the macro under the first ten macros and use the shortcut Shift+F1 or the like, but this is less intuitive.
Does anyone know of a method to access the trigger letter?
Edit: I now use a workaround. If the order of trigger and letter is reversed, the problem disappears. Instead of
#a, the trigger is now universally
a#will remove the
# and leave the
a which can then be used in the script to be converted to
\alpha. However, this cramps my typewriting style somewhat so that I would still like to know the answer to the question.