auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] coloring LaTeX code


From: Erich Subscriptions
Subject: Re: [AUCTeX] coloring LaTeX code
Date: Tue, 12 Nov 2013 00:19:45 +0100

The "\theoremstyle" macro comes from the amsmath package, which probably
is used quite a lot.
On 11 Nov 2013, at 09:51, Tassilo Horn <address@hidden> wrote:

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.





reply via email to

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