Uwe Brauer <[email protected]> writes:
> I checked my minimal init file, and after adding
> (setq reftex-plug-into-AUCTeX t)
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
>
> Starting emacs -q and loading the minimal init file, the insertion of
> the label for titledquestion worked as expected.
>
> So the cuplrit was my own reftex-label setting
> I had for example
>
> (setq reftex-label-alist
> '(("equation" ?e "eq:%f:" "~(\\ref{%s})" t
> ("Equation" "Eq." "Eqn." "Gleichung" "Gl."))))
>
> You proposed a setting with `( which I have never seen before.
> So what to you suggest? How shall I modify my own reftex-latex-alist
> setting and include yours?
Ah, OK. If you have one file for your RefTeX settings, you can try
something like this:
--8<---------------cut here---------------start------------->8---
(require 'reftex)
(setq reftex-label-alist
'(("equation" ?e "eq:%f:" "~(\\ref{%s})" t
("Equation" "Eq." "Eqn." "Gleichung" "Gl."))))
(with-eval-after-load "exam"
(add-to-list 'reftex-label-alist
`("titledquestion"
,LaTeX-exam-reftex-quick-id-key
,(concat LaTeX-exam-label "%f:")
"~\\ref{%s}" nil ("ejercicio"))))
--8<---------------cut here---------------end--------------->8---
Note that `with-eval-after-load' was introduced in Emacs 24.4. If you
use older versions, you have to go for `eval-after-load' (which has a
different syntax).
HTH, Arash
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel