auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] labels in align env (amsmath style)


From: David Kastrup
Subject: Re: [AUCTeX] labels in align env (amsmath style)
Date: Thu, 09 Nov 2006 16:50:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Seweryn Kokot <address@hidden> 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




reply via email to

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