auctex-devel
[Top][All Lists]

[AUCTeX-devel] Re: RefTeX: More flexible reference style selection

 From: Michael Hoffman Subject: [AUCTeX-devel] Re: RefTeX: More flexible reference style selection Date: Fri, 04 Jan 2008 13:10:42 +0000 User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Ralf Angeli wrote:

Hi,

following up on the discussion about the support for \autoref on the
auctex' mailing list I've tried to come up with something more flexible
than the current approach where you are limited to fancyref and varioref
(through customizing reftex-{vref,fref}-is-default').  The idea is that
there is a list of styles which can be cycled through when selecting the
reference for insertion.  This list includes all reference styles,
i.e. the macros \ref, \vref, \fref, etc.  If RefTeX has information
about the LaTeX packages used in the document, the list can be limited
to the macros made available by the packages.

Attached you may find a patch which demonstrates the idea.  The code is
not finished yet.  For example the logic for restricting the available
macros is not there yet, the chosen style is not remembered yet and it
does not honor reftex-{vref,fref}-is-default' for backwards
compatibility.  An interesting part of the patch is likely the variable
reftex-ref-style-alist' which can be adapted by the user to include
more referencing macros and information on the LaTeX package they are
defined in.

If people think this is an approach worth pursuing I'll try to develop
it further.



I can't comment on the implementation, but I think anything that allows users to add their own referencing macros sounds great. In general this idea seems pretty good to me.