[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX-devel] amsmath, amsthm automatially insert thm, lemma etc |
Date: |
Mon, 19 Oct 2015 00:09:05 +0200 |
Hi Arash,
2015-10-18 12:06 GMT+02:00 Arash Esbati <address@hidden>:
> 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.
Thanks for your contribution. I didn't have the time to actually test
it, but it looks good. Just out of curiosity: isn't
(format "%s" heading)
the same as
heading
?
Cheers,
Mosè
- [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, 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 <=
- 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