auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] coloring LaTeX code


From: Tassilo Horn
Subject: Re: [AUCTeX] coloring LaTeX code
Date: Mon, 11 Nov 2013 09:51:22 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Erich Subscriptions <address@hidden> writes:

Hi Erich,

> I see surprising effects when using AucTeX 11.87 on OSX 10.9 with
> Emacs 24.3
>
> With the following code segment
>
> \newtheorem{thm}{Theorem}
> \theoremstyle{definition}
> \newtheorem{defn}{Definition}
>
> "\newtheorem" is colored purple, but "\theoremstyle" is colored grey.

That's because AUCTeX knows that \newtheorem is a valid macro whereas it
sees that you \theoremstyle as a macro, but it doesn't know it.

When AUCTeX sees a \usepackage{foobar}, it'll try to run a foobar.el
style file, and that has the chance to make AUCTeX aware of additional
macros and environments defined by that package which will also change
the fontification.  That \theoremstyle is just grey means that either
there is no style file for the package declaring it, or that style file
just doesn't add \theoremstyle as a valid macro.

> And in this segment
> $$
> A=\begin{pmatrix}
> a_0 & 0 & 0 & 0 & \dots \\
> a_1 & a_0 & 0  & 0 & \dots \\
> a_2 & a_1 & a_0 & 0 &  \dots \\
> a_3 & a_2 & a_1 & a_0 &  \dots \\
> \vdots & \vdots & \vdots & \vdots & \ddots
> \end{pmatrix}
> $$
>
> everything is colored brownish orange

Yes, every math environment should be brownish.

> bute here
>
> $$
> \T A =
> \begin{pmatrix}
> 0 & 0 & 0 & 0 & \dots \\
> 1 & 0 & 0 & 0 & \dots \\
> 0 & 1 & 0 & 0 & \dots \\
> 0 & 0 & 1 & 0 & \dots \\
> \vdots & \vdots & \vdots & \vdots & \ddots
> \end{pmatrix}
> $$
>
> "\begin" is purple, "pmatrix" is blue, the numbers are black, and the
> ampersands are red.

Hm, I could reproduce that, but after deleting and readding the
surrounding $$, it's also completely brownish and stays this way.  But
it should have been that way immediately from the start, so there might
be something wrong.

I'll try to have a look when I find some spare time.

Bye,
Tassilo




reply via email to

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