[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plain TeX mode
Emil Hedevang Lohse
Re: Plain TeX mode
Thu, 04 Dec 2003 07:57:58 +0100
Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux)
Stefan Monnier <address@hidden> writes:
>> Having successfully gotten an answer I will try to ask another
>> question: I write a lot in danish where we have the letters æ, ø,
>> å, Æ, Ø, Å (in Plain TeX: \ae, \o, \aa, etc.). I do
>> known how to make TeX understand them directly, but I would also
>> like Emacs to properly colour my macro names. Currently "\red" is
>> coloured light blue; but with "\rød" the backslash and "r" are
>> colored light blue but the "ø" and "d" are not. Is there some way
>> I can tell Emacs to include these letters into its colour coding
> Change the font-lock-keywords patterns.
> It's not very convenient, tho.
Can I get a hint on how to do that?
> But I'm wondering: does TeX understand such a macro name (i.e. does
> it consider Ã¸ to be a letter that can be used inside a macro name)
> ? If it does, then your problem is not just a preference but a bug
> which I should fix.
Not out of the box. Every character of category code 11 (for example
the letters a-z and A-Z) can be used as a part of a macro name. Other
characters are of category code 12 unless they are not, that is,
unless they have been given another category code. If I recall
correctly (by looking on page 37 of the TeXbook) Plain TeX has the
following assignments of category codes:
a-z and A-Z 11 <--- Usable in a macro name.
So the characters æøåÆØÅäéöüÄÉÖÜ and so on are of category code 12 and
therefore cannot be a part of a macro name. But by saying
I change the category code of æ and henceforth I am able to use æ in a
macro name. This is convenient if I would like to give the macros
Danish names and if I do not care about portability.
Emil Hedevang Lohse <http://home.imf.au.dk/emil/>
Alle spørgsmål er lige dumme.
Og spørgsmålet "Kan ænder flyve?" er ikke dumt.
Re: Plain TeX mode, Sean Richards, 2003/12/02