[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reftex-reference and insert \eqref{} not (\ref{})
From: |
Arash Esbati |
Subject: |
Re: reftex-reference and insert \eqref{} not (\ref{}) |
Date: |
Tue, 03 Dec 2019 21:21:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 |
Uwe Brauer <address@hidden> writes:
>> Uwe Brauer <address@hidden> writes:
>
>> Not my experience for using amsmath and document parsing enabled. Does
>> the mathtools package load amsmath? If it does, then maybe AUCTeX
>> should have an appropriate style file?
AUCTeX has a style file for the mathtools package which contains[1]:
(TeX-run-style-hooks "amsmath")
> I have both, amsmath and document parsing enabled. I attach the file in
> question.
>
> What does work is
> (setq reftex-label-alist '(AMSTeX))
Yes, that would be expected (see below).
> However that overrides my other settings. So I tried
>
> (setq reftex-label-alist
> '(("equation" ?e "eq:%f" "~(\\ref{%s})" t
> ("Equation" "Eq." "Eqn." "Gleichung" "Gl."))
This is the problematic portion. RefTeX has to consolidate all the
built-in and user options and it goes after the type key. With your
setting above, you overwrite the setting for ?e key. If you want to set
the label-format and/or magic words for built-in type keys, just do:
(setq reftex-label-alist
'((nil ?e "eq:%f" nil t
("Equation" "Eq." "Eqn." "Gleichung" "Gl."))))
Best, Arash
Footnotes:
[1] http://git.savannah.gnu.org/cgit/auctex.git/tree/style/mathtools.el#n251