auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] How to make the label ref's work?


From: Ralf Angeli
Subject: Re: [AUCTeX] How to make the label ref's work?
Date: Thu, 27 Jul 2006 20:31:41 +0200

* Adam Johnson (2006-07-25) writes:

> I also added RefTeX's the trick as follows.
>
> (setq reftex-insert-label-flags '(t t))
> (setq reftex-label-alist
>       '(("thm" ?h  "thm:" "~\\ref{%s}" t ("theorem" "thm.") -2)
>         ("lem" ?l  "lem:" "~\\ref{%s}" t ("lemma"  "lem.") -3)
>         ("defn" ?d "def:" "~\\ref{%s}" nil ("definition" "def.") -4)
>         ("cor" ?c  "cor:" "~\\ref{%s}" t ("corollary" "cor.") -5)
>         ))

Looks okay to me.

> When I used "M-x reftex-reference" command and select, for example, "h", it 
> listed all the new environments I used, but I could not select labels to 
> insert them.  For existing environments like "equation" etc., it works 
> perfectly.  How can I make it work?  Thanks.

Frankly, I don't know it.  I tried to find out what happens by
debugging involved functions but don't have time to do this
thoroughly.  I checked with the RefTeX version included in CVS Emacs
and with a simple file like

\documentclass{article}
\begin{document}
\begin{equation}
  \label{eq:1}
  
\end{equation}

\begin{lem}
  \label{lem:1}
  
\end{lem}
\end{document}

and saw that "lem:1" shows up in `reftex-docstruct-symbol-1' (an
undocumented internal variable) with an "s" indicator, whereas "eq:1"
shows up with "e".  So if you use `s' as the label type you will see
the "lem:1" label.  I don't know why.  It's probably best you ask
Carsten Dominik, the author of RefTeX, about the issue.

-- 
Ralf




reply via email to

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