[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with thmstools (and automatic insertion of labels (reftex)
From: |
Arash Esbati |
Subject: |
Re: problems with thmstools (and automatic insertion of labels (reftex) |
Date: |
Sat, 25 Mar 2023 23:11:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "AE" == Arash Esbati <arash@gnu.org> writes:
>
> Well what I mean I hit RET and *nothing* happens, no environment is
> inserted, so I have to chose another option.
Ah, I think now I understand. Can you please apply this patch to
thmtools.el and try it again?
diff --git a/style/thmtools.el b/style/thmtools.el
index dcf02db8..25ad3b92 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -205,8 +205,8 @@ Select the content of the optional argument with a key:
RET in order to leave it empty.")
(choice (read-char-choice
(TeX-argument-prompt
- nil nil "Heading (h), Key=val (k), Empty (RET)")
- '(?h ?k)))
+ nil nil "Heading (h), Key=val (k), Empty (RET), Help (C-h)")
+ '(?h ?k ?\r)))
(opthead (cond ((= choice ?h)
(TeX-read-string
(TeX-argument-prompt t nil "Heading")))
>> And finally, in order to get a label inserted automatically, you have to
>> set `LaTeX-label-alist' *and* `reftex-label-alist':
>
>> (add-to-list 'LaTeX-label-alist '("cor" . "cor:"))
>> (setq reftex-label-alist
>> '(("cor" ?C "cor:%f:" "~\\ref{%s}" t
>> ("Corollary" "Cor." "C."))))
>
> I am a bit confused, this would then insert cor:filename:number even if
> LaTeX-label-alist does not specify this?
Yes.
>> And then AUCTeX will delegate the generation of label to RefTeX.
Your RefTeX setting will win.
Best, Arash