[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] [RefTeX] reftex-reference ignores reference format se
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX-devel] [RefTeX] reftex-reference ignores reference format selection |
Date: |
Thu, 22 May 2014 00:09:02 +0200 |
Hi Tassilo,
2014-05-21 17:09 GMT+02:00 Tassilo Horn <address@hidden>:
> I don't have the ("e" . "~\\eqref{%s}") entry. The problem with that is
> that it's not matched by the regexp in `reftex-format-special'.
That's the culprit! Indeed, without that entry in the alist the
`form' variable in `reftex-reference' has the value "\\ref{%s}" and
(reftex-format-special "eq:foo" "\\ref{%s}" "\\pageref")
returns
"\\pageref{eq:foo}"
But I can't get why you don't have that entry in
`reftex-typekey-to-format-alist'. Up to my understanding this alist
is built in `reftex-compile-variables' and in my system, with the
default RefTeX settings, the first element processed in the outer
`while' loop
--8<---------------cut here---------------start------------->8---
(car
(reftex-uniquify-by-car
(reftex-splice-symbols-into-list
(append reftex-label-alist
(get reftex-docstruct-symbol
'reftex-label-alist-style)
reftex-default-label-alist-entries)
reftex-label-alist-builtin)
'(nil)))
--8<---------------cut here---------------end--------------->8---
is
(nil 101 nil "~\\eqref{%s}")
and thus ("e" . "~\\eqref{%s}") will be the last entry of my
`reftex-typekey-to-format-alist'. Do you customize some variable?
Anyway I still think `reftex-format-special' is somewhat awkward.
Thanks for your time,
bye,
Mosè