[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: |
Sun, 18 Oct 2015 12:06:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 |
Hi Uwe,
Uwe Brauer <address@hidden> writes:
> Maybe I am missing something elementary.
> 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?
Besides the discussion about `subfiles' package, I think `amsthm.el'
could do a better job reg. new environments defined and optional
headings. Further it has a bug in the way it uses `TeX-arg-length':
--8<---------------cut here---------------start------------->8---
'("newtheoremstyle" "Style name" (TeX-arg-length nil "Space above")
(TeX-arg-length nil "Space below") "Body font" "Indent amount"
"Theorem head font" "Punctuation after head"
(TeX-arg-length nil "Space after head") "Theorem head spec"))
--8<---------------cut here---------------end--------------->8---
The string "Space above" for example becomes `Initial-Input' and not
`Prompt'. I'm attaching an improved version of `amsthm.el'. Could you
give it a try? I have never used the package so I would be grateful if
you could test it and give some feedback here.
Best, Arash
amsthm.el
Description: application/emacs-lisp
- [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, 2015/10/12
- 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/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, 2015/10/20
- 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