auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [partially solved]


From: Arash Esbati
Subject: Re: [AUCTeX-devel] [partially solved]
Date: Mon, 08 May 2017 09:40:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2

Uwe Brauer <address@hidden> 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



reply via email to

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