auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Label prefix for customized environments


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Label prefix for customized environments
Date: Mon, 21 Sep 2015 09:35:03 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Arash Esbati <address@hidden> writes:

>>>> and then `reftex-label-alist' is your friend.  Or rather
>>>> `reftex-label-alist-builtin' in order to have the former be
>>>> completely in the user's hands.
>>>
>>> What would be best practice for a style?  Update `LaTeX-label-alist'
>>> for non-reftex users and check if `reftex-label-alist' is bound and
>>> then update it?
>>
>> Yes, exactly.  But I'd update `reftex-label-alist-builtin'.
>
> Thanks.  I went again through the docs of RefTeX and found:
>
> ,----
> | 6.8.2 Style Files
> | 
> | A style hook may contain calls to `reftex-add-label-environments' which
> | defines additions to reftex-label-alist.  The argument taken by this
> | function must have the same format as reftex-label-alist.  [...]
> | 
> | a package `myprop' defining a proposition environment with
> | \newtheorem might use
> | 
> | (TeX-add-style-hook "myprop"
> |    (lambda ()
> |      (LaTeX-add-environments '("proposition" LaTeX-env-label))
> |      (if (fboundp 'reftex-add-label-environments)
> |          (reftex-add-label-environments
> |           '(("proposition" ?p "prop:" "~\\ref{%s}" t
> |                            ("Proposition" "Prop.") -3))))))
> `----
>
> I tried this approach in my style and it works.
> `reftex-add-label-environments' seems more clear to me.  Should I
> stick with it or update `reftex-label-alist-builtin'?

After thinking about it, I think you can leave it this way.

Bye,
Tassilo




reply via email to

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