Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
2  
If you do it inside math mode, e.g. inside \( \) or $ $, it will omit the curly braces. –  N.N. Apr 8 '12 at 20:54
    
Great! I should have experimented a bit more first :-) –  Marius Hofert Apr 8 '12 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 '12 at 6:47

2 Answers 2

up vote 6 down vote accepted

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}
    
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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