7

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?

3
  • 2
    If you do it inside math mode, e.g. inside \( \) or $ $, it will omit the curly braces.
    – N.N.
    Apr 8, 2012 at 20:54
  • Great! I should have experimented a bit more first :-) Apr 8, 2012 at 20:57
  • You should have but this is a problem I am sure others have stumbled upon too so I think the question make sense. Since it helped you I converted my comment into an answer.
    – N.N.
    Apr 9, 2012 at 6:47

2 Answers 2

8

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:

  1. (cursor) is not really in the code but just to mark where the cursor is.

    \begin{equation}
      (cursor)
    \end{equation}
    
  2. You press ` a.

    \begin{equation}
      \alpha
    \end{equation}
    
4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.