auctex-devel
[Top][All Lists]

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

 From: Ralf Angeli Subject: [AUCTeX-devel] RefTeX: More flexible reference style selection Date: Wed, 02 Jan 2008 21:56:22 +0100

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.

--
Ralf


ref-style.patch
Description: Text Data