auctex-devel
[Top][All Lists]
Advanced

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

Re: some new extension of xr-hyperref/hyperref


From: Arash Esbati
Subject: Re: some new extension of xr-hyperref/hyperref
Date: Sat, 02 Dec 2023 00:32:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Uwe Brauer <oub@mat.ucm.es> writes:

> Fair enough, but then you might try later to add some modified reftex
> support? I will try to send a patch later (against the latest master).

There is really no need to add modified RefTeX support.  Suppose you
write a refcount.el which looks like this:

--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
 "refcount"
 (lambda ()
   (TeX-add-symbol
    '("setcounterref" TeX-arg-counter TeX-arg-ref)
    '("getrefbykeydefault"
      TeX-arg-ref
      (TeX-arg-completing-read ("page" "title" "name" "anchor" "url"))
      "Default")))
 ;; RefTeX reference style
 (and LaTeX-reftex-ref-style-auto-activate
      (fboundp 'reftex-ref-style-activate)
      (reftex-ref-style-activate "Refcount"))
 TeX-dialect)
--8<---------------cut here---------------end--------------->8---

You only need to adjust `reftex-ref-style-alist' via customize or the
code you sent, say in your init file:

  (add-to-list 'reftex-ref-style-alist
               '("Refcount" "refcount" (("\\getrefbykeydefault" ?G)))
               t)

For you, it should work, and for others without this entry, RefTeX
should discard to code in the .el file silently (at least this is the
theory).

> BTW I had no time to test your patch for which you called for testers,
> sorry.

No problem, our usual process is to put code into testing via an ELPA
release ;-)

> I know you and others are not very fond of the idea to mix reftex code
> into auctex, but then nobody is forced to use that code....

The point is that I'm not fond of the idea to add a hard-coded entry to
a user custom variable, in this case ?G for instance.  Others may use ?G
for a different macro, how do we make sure there is no such clash?




reply via email to

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