Uwe Brauer <[email protected]> writes:

>> Uwe Brauer <[email protected]> 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

Reply via email to