According to an AUCTeX reference card, ` a inserts \alpha{}
and this works well in my setup. I just don't see any reason I ever used a greek letter with curly braces. This means I always have to delete them. Is there a way to have AUCTeX insert just \alpha
when typing ` a?
2 Answers
There may not be any reason to disable this behavior since the braces are omitted if used inside math mode. When you do ` a inside any structure that enables math mode, such as inside \( \)
, $ $
, equation
or align
, AUCTeX will omit the braces. For example the behavior for equation
is the following:
(cursor)
is not really in the code but just to mark where the cursor is.\begin{equation} (cursor) \end{equation}
You press ` a.
\begin{equation} \alpha \end{equation}
You can also put the line
(setq TeX-insert-braces nil)
into your init file to keep the braces from ever being inserted when AUCTeX inserts a macro.
\( \)
or$ $
, it will omit the curly braces.