[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc
From: |
Arash Esbati |
Subject: |
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc |
Date: |
Tue, 20 Oct 2015 21:12:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 |
Hi Uwe,
Uwe Brauer <address@hidden> writes:
> I played around a bit the thing I miss most is the automatic insertion
> of labels, but that might be a job of reftex?!
Thanks, does it mean that everything else worked fine? If yes, I would
make a proper submission and update the style.
Reg. automatic label insertion, yes, you have to tell RefTeX about your
new environment and update `reftex-label-alist'. Note that `?e' is for
equations, choose another `key-type' acc. to your needs.
--8<---------------cut here---------------start------------->8---
\documentclass{article}
Eval with `C-x C-e':
(LaTeX-add-environments (list "lemma" (vector "Heading")))
(add-to-list 'reftex-label-alist
'("lemma" ?e "lem:" "~\\ref{%s}" nil ("Lemma" "lemma") nil))
\begin{document}
`C-c C-e lemma RET' inserts:
\begin{lemma}[Optional]
`C-c (' inserts \label{lem:1}
Text for short reference.
\end{lemma}
`C-) RET e RET' inserts \ref{lem:1}
\end{document}
--8<---------------cut here---------------end--------------->8---
Best, Arash
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, (continued)
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Tassilo Horn, 2015/10/12
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Arash Esbati, 2015/10/18
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Uwe Brauer, 2015/10/18
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Mosè Giordano, 2015/10/18
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Arash Esbati, 2015/10/20
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, David Kastrup, 2015/10/20
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Mosè Giordano, 2015/10/20
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Uwe Brauer, 2015/10/20
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc,
Arash Esbati <=
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Uwe Brauer, 2015/10/21
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Arash Esbati, 2015/10/21
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Uwe Brauer, 2015/10/22