auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] [Reftex] 2 patches to let users customize reftex-view


From: Ralf Angeli
Subject: Re: [AUCTeX-devel] [Reftex] 2 patches to let users customize reftex-view-crossref for citations
Date: Sun, 19 Dec 2010 15:41:14 +0100

* Damien Cassou (2010-12-14) writes:

>>> This patch is useful for me because I use macros such as \cauthor{XXX}
>>> and \ccauthor{XXX} to display the names of the authors along with the
>>> reference number.
>>
>> Does RefTeX know about these macros?  That means, have you added them to
>> `reftex-cite-format' or the like?  Because if RefTeX already knows the
>> macros, perhaps we could use this information to create the regexp above
>> without having to introduce a new variable.
>
> I didn't change these variables because I didn't know about them :-).

Then how do you insert them?  By hand?

> Do you prefer me to implement the same functionality using these
> variables instead?

Well, it's an idea.  The advantage of using the information available in
`reftex-cite-format' and `reftex-cite-format-builtin' (in contrast to a
new, separate user option) would be that the user does not have to
specify the cite macros at an additional place for the cross-references
to be displayed.  The disadvantage is that the implementation will be
more complicated.  In case an alist is used one will have to iterate
over the entries and extract the macro names from strings like
"\\cite[][]{%l}".  And one will likely have to take care of updating the
regexp that matches cite macros when the citation style is changed by
the user.  But I don't consider the latter mandatory.  I think it would
suffice if the regexp is updated when the mode is (re-)loaded.

Anyway, one has to weigh up the advantages of a sophisticated solution
and the effort that has to be spent to implement it and compare that to
the simple solution.  It might even be that the simple solution is
preferable.  But I haven't looked at the code and so I don't know which
way would be better.

By the way, do you have a copyright assignment for RefTeX or Emacs on
file at the FSF?  We'd need that in any case for the acceptance of any
code you might contribute.

-- 
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]