3

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 Answers2

6

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 key LaTeX-math-abbrev-prefix to allow easy typing of mathematical symbols. ` will read a character from the keyboard, and insert the symbol as specified in LaTeX-math-default and LaTeX-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 variable LaTeX-math-abbrev-prefix.

To enable LaTeX Math mode by default, add the following in your .emacs file:

  (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

User Option: LaTeX-math-abbrev-prefix
A string containing the prefix of LaTeX-math-mode commands; 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-list allows you to add your own mappings.

egreg
  • 1,121,712
1

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.

subham soni
  • 9,673