[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc |
Date: |
Mon, 12 Oct 2015 07:58:49 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes:
Hi Uwe,
> Is it is possible to have automatically inserted theorem, lemmas etc
> when using either amsmath or amsthm style. I cannot get it to work so
> I have
>
> (defun LaTeX-thm-insert (environment) ;Version:1.20
> (if (y-or-n-p
> (format "Do you want a title "))
> (let ((title (read-input "(optional) Title: ")))
> (LaTeX-insert-environment "thm" (concat "[" title "]"))
> (and (LaTeX-label environment)
> (newline-and-indent)))
> (LaTeX-insert-environment "thm")
> (and (LaTeX-label environment)
> (newline-and-indent))))
>
> But is this necessary?
amsmath or amsthm do not provide a thm environment, at least not in the
version v2.20.2 which is provided by TeXLive 2015.
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{amsthm}
\begin{document}
% ERROR: LaTeX Error: Environment thm undefined.
\begin{thm}
This is a theorem.
\end{thm}
\end{document}
--8<---------------cut here---------------end--------------->8---
But when I define a new theorem environment, that will show up in `C-c
C-e'.
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{amsthm}
\newtheorem{mythm}{My cool Theorem} %% \newtheorem shows up in C-c RET
\begin{document}
\begin{mythm} %% mythm now shows up in C-c C-e
This is a test.
\end{mythm}
\end{document}
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
- [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc, Uwe Brauer, 2015/10/09
- Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc,
Tassilo Horn <=
- 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