[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: Adding new environments to
From: |
Tyler Smith |
Subject: |
[AUCTeX] Re: Adding new environments to |
Date: |
Fri, 24 Dec 2010 12:11:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Ralf Angeli <address@hidden> writes:
> * Tyler Smith (2010-12-22) writes:
>
>> I don't understand how the style files work though. I used the example
>> from the manual as a template, and put my own tws.el file in the default
>> style file directory "/home/tyler/.emacs.d/auctex/style" (which is listed in
>> TeX-style-path):
>>
>> (TeX-add-style-hook
>> "latex"
> [...]
>> However, this doesn't appear to get run when I open a .tex file.
>
> The name of the file should match a feature used by the document,
> e.g. the document class or a LaTeX package which is loaded by the
> document. The first argument of `TeX-add-style-hook' should be the same
> as the name of the file. This is demonstrated in the first example
> about style files in the manual: the file is named book.el and the
> parameter for `TeX-add-style hook' is "book".
Ah, now I've got it, thanks. I had tried various permutations of file
location, file name, and the name passed as the first argument to
TeX-add-style-hook, but apparently hadn't tried setting the filename
and the first argument to the same string.
I had read the pertinent sections of the manual, including
(info "(auctex)Simple Style")
(info "(auctex)Automatic")
As you say, the correct syntax is implicit in the book.el example, but I
didn't find any explicit statement about the relationship between the
file name, STYLE argument, and the class invoked. If this is generally
self-evident, I accept the bug is in my own interpretation, but if not
maybe something could be added to the docs?
In any case, thanks for your patience!
Tyler