[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] TeX-insert-macro no braces in math mode

From: Tassilo Horn
Subject: Re: [AUCTeX] TeX-insert-macro no braces in math mode
Date: Mon, 25 Feb 2013 13:06:59 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Uwe Siart <address@hidden> writes:

Hi Uwe,

> TeX-insert-macro in math mode does not behave like I would expect. But
> I can't tell if it is a bug or not:
> In text mode when I mark a letter (say "A") as region and type "C-c RET
> macro" I get \macro{A} with braces around A.
> The same in math mode gives me \macroA (no braces).
> Is this intended? It does not make much sense to me since \macroA
> certainly won't work.

This happens only with macros where AUCTeX thinks they can't have any
arguments and macros that are unknown to AUCTeX.  For example, when you
use the amsmath package that provides a \text macro with one argument,

  $$ foo $$

with marked foo will become

  $$ \text{foo} $$

But you are probably right that this is a strange behavior for unknown
arguments and an active region.  I've changed that now: when there's an
active region, you'll get the {...} also in math modes.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]