[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] How to make the label ref's work?
From: |
Adam Johnson |
Subject: |
[AUCTeX] How to make the label ref's work? |
Date: |
Tue, 25 Jul 2006 13:16:31 -0400 |
Hey,
I defined some new environments for Definition, Theorem, etc. as below in my
.emacs:
(add-hook 'LaTeX-mode-hook
(lambda ()
(LaTeX-add-environments
'("lem" LaTeX-env-label)
'("thm" LaTeX-env-label)
'("defn" LaTeX-env-label)
'("cor" LaTeX-env-label)
)
))
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)
))
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.
--
Adam
- [AUCTeX] How to make the label ref's work?,
Adam Johnson <=