Hi Simon,

2014-08-14 7:39 GMT+02:00 Simon Campese <[email protected]>:
> Hello,
>
> I just recognized that when typing mathematics inside align or align*
> environments (which are provided by the amsmath package), \intertext
> macros are not recognized as being typeset on a new line by auctex. For 
> example,
> autoindenting the code
>
> \begin{align*}
> F_1 &= 1 \\
> F_2 &= 2
> \intertext{and}
> F_{n+1} &= (n+1) F_n
> \end{align*}
>
> yields
>
> \begin{align*}
>   F_1 &= 1 \\
>   F_2 &= 2
>         \intertext{and}
>         F_{n+1} &= (n+1) F_n
> \end{align*}
>
> instead of
>
> \begin{align*}
>   F_1 &= 1 \\
>   F_2 &= 2
>   \intertext{and}
>   F_{n+1} &= (n+1) F_n
> \end{align*}
>
> Unfortunately I don't know enough Elisp to fix this myself but I guess
> that the parser just checks for '\\' to recognize a new line and a
> simple cases statement including '\intertext' has to be added.
> And while you're at it, I guess the same is true for '\shortintertext'
> from the mathtools package.

From the amsmath user's guide:

    \intertext may only appear right after a \\ or \\* command.

If you insert a \\ before the \intertext command AUCTeX is able to
correctly align the & separators and the problem goes away.

Bye,
Mosè

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

Reply via email to