I am using Auctex in Emacs for typing mathematical documents. I am very new to emacs and tex in general. I heard it from a friend that `a will expand as \alpha and so on in auctex, but this is not happening for me. Please help
2 Answers
From the AUCTeX manual
2.5 Entering Mathematics
TeX is written by a mathematician, and has always contained good support for formatting mathematical text. AUCTeX supports this tradition, by offering a special minor mode for entering text with many mathematical symbols. You can enter this mode by typing
C-c ~.Command: LaTeX-math-mode
(C-c ~) Toggle LaTeX Math mode. This is a minor mode rebinding the keyLaTeX-math-abbrev-prefixto allow easy typing of mathematical symbols.`will read a character from the keyboard, and insert the symbol as specified inLaTeX-math-defaultandLaTeX-math-list. If given a prefix argument, the symbol will be surrounded by dollar signs.You can use another prefix key (instead of
`) by setting the variableLaTeX-math-abbrev-prefix.To enable LaTeX Math mode by default, add the following in your
.emacsfile:(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)User Option: LaTeX-math-abbrev-prefix
A string containing the prefix ofLaTeX-math-modecommands; This value defaults to`.The string has to be a key or key sequence in a format understood by the kbd macro. This corresponds to the syntax usually used in the manuals for Emacs Emacs Lisp.
The variable
LaTeX-math-listallows you to add your own mappings.
-
Thank You so much, it helped, math-mode was not enabled, thats why I ran into that problem. – Tiju Cherian John Jul 17 '14 at 15:32
In your .emacs file, append the following code:
inoremap <buffer> `a \alpha
inoremap <buffer> `b \beta
inoremap <buffer> `c \chi
inoremap <buffer> `d \delta
inoremap <buffer> `e \varepsilon
inoremap <buffer> `f \varphi
inoremap <buffer> `g \gamma
inoremap <buffer> `h \eta
Restart emacs.
These should help you out to achieve what you wanted.
- 9,673
.emacsfile. – Svend Tveskæg Jul 17 '14 at 13:52