[Top][All Lists]

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

Re: [AUCTeX] Labels for theorems and RefTeX

From: Ralf Angeli
Subject: Re: [AUCTeX] Labels for theorems and RefTeX
Date: Wed, 07 Feb 2007 20:45:06 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

* JohnnyK (2007-02-06) writes:

> I'm trying to reference definitions, theorems etc. using RefTeX. I added
> entries for my various theorem types to my reftex-label-alist. I looks like
> this:
> '(reftex-label-alist (quote (
>     ("satz" 97 "satz:" "~\\ref{%s}" 1 ("Satz" "Theorem") -3)
>     ("korollar" 107 "kor:" "~\\ref{%s}" 1 ("Korollar") -3)
>     ("definition" 100 "def:" "~\\ref{%s}" 1 ("Definition" "Def.")-3)
> ("lemma" 108 "lem:" "~\\ref{%s}" 1 nil -3)))))
> Adding labels works perfectly. If I specify an additional parameter to the
> theorem environment, e.g. something like "\begin{definition}[useful
> definition]...", it takes the text for the label from the additional
> parameter, else it takes it from the first sentence of the body of the
> environment.
> The problem arises when I try to reference the labels. Only the labels of
> environments without an additional parameter are selectable in the TOC that
> comes up, when I insert an reference. The others appear in the list, but
> aren't selectable (just as if there wasn't a label). How can I get labels in
> environments like "\begin{definition}[useful definition]..." to be
> selectable in the TOC?

Which version of RefTeX and Emacs are you using?

I checked with the attached file and a relatively recent CVS Emacs
which I called like this

emacs -Q -eval '(progn (load "auctex.el" nil t t) (add-hook (quote 
LaTeX-mode-hook) (quote turn-on-reftex)) (setq reftex-plug-into-AUCTeX t))' 

and it worked, i.e. both entries were selectable when trying to create
a reference with `C-c )'.  When opening the file make sure that the
form in the local variables stanza is being evaluated.  Otherwise the
`satz' environment won't be added to `reftex-label-alist'.


Attachment: file.tex
Description: Text Data

reply via email to

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