Uwe Brauer <[email protected]> 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 mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel