Seweryn Kokot <[EMAIL PROTECTED]> writes:

> I'm using amsmath package in a tex file and I want that whenever I
> insert align environment, a label is put automatically as in equation
> environment. 
>
> In equation I get:
>
> \begin{equation}
>   \label{eq:11}
>  c = 5  
> \end{equation}
>
> but inserting align env (C-c C-e) I get:
>
> \begin{align}
>   a = &  3 + 5 \\
>   b = & 4 + 6
> \end{align}
>
> instead of:
>
> \begin{align}
>   \label{eq:12}
>   a = &  3 + 5 \\
>   \label{eq:13}
>   b = & 4 + 6
> \end{align}
>
> Should I insert labels manually or any other way? 

This works without problems here.  Type

C-c C-e align RET
a = & 3 + 5 M-RET
b = & 4 + 6 C-c . C-x C-x

(hm, the sequence to move past the environment is not actually pretty,
maybe we should have something nicer?  Or have C-c . move to the end
rather?).

I would suspect that you

a) have not enabled document parsing or
b1) have not used C-c RET for inserting \usepackage and
b2) have not reparsed the document by reloading or C-c C-n

so that AUCTeX has not yet seen the \usepackage{amsmath}.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex

Reply via email to