[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reftex support for nameref and user defined refs
From: |
Arash Esbati |
Subject: |
Re: reftex support for nameref and user defined refs |
Date: |
Sun, 20 Aug 2023 10:23:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Uwe Brauer <oub@mat.ucm.es> writes:
> no, I want reftex-ref
> to pop up the keybindings, and one of them say f will insert
> \fullref{label-in-question} instead of autoref, ref eqref etc etc
> but the labels I don't want to touch
> I want to insert fullref, for regular labels, sec, equations etc. the
> code I sent does this
In this case, it should suffice to write an AUCTeX style like this:
--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
"fulllabel"
(lambda ()
(TeX-run-style-hooks "hyperref")
(TeX-add-symbols
'("fullref" TeX-arg-ref))
;; Check if reftex-vars.el is loaded:
(when (featurep 'reftex-vars)
;; Add a new reference style
(add-to-list 'reftex-ref-style-alist
'("Fulllabel" "fulllabel" (("\\fullref" ?l)))
t)
;; And activate it
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
(reftex-ref-style-activate "Fulllabel")))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("fullref" "{"))
'reference)))
TeX-dialect)
;;; fulllabel.el ends here
--8<---------------cut here---------------end--------------->8---
Best, Arash