[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with thmstools (and automatic insertion of labels (reftex)
From: |
Uwe Brauer |
Subject: |
Re: problems with thmstools (and automatic insertion of labels (reftex) |
Date: |
Sat, 25 Mar 2023 18:35:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi all
> I have to work with a file that uses thmtools (which is not supported by
> auctex, as far as I can tell, nor by reftex)
I have to correct myself, it is supported, I just checked out the wrong
branch (I really struggle with git, I should stick to mercurial and the
hg-git plugin).
But my problem remains, how can I convince thmtools to insert
automatically a label, Arash, you wrote that package it seems, any idea?
> By it as it may
> Here is a sample file
> ,----
> | \documentclass[10pt]{book}
> | \usepackage{thmtools}
> | \declaretheorem[name=Lemma,Refname={Lemma,Lemmas},numberwithin=section]{lem}
> |
> \declaretheorem[name=Proposition,Refname={Proposition,Proposition},numberwithin=section]{prop}
> |
> \declaretheorem[name=Theorem,Refname={Theorem,Theorems},numberwithin=section]{thm}
> |
> \declaretheorem[name=Corollary,Refname={Corollary,Corollaries},numberwithin=section]{cor}
> |
> \declaretheorem[name=Definition,Refname={Definition,Definitions},numberwithin=section]{defn}
> |
> \declaretheorem[name=Remark,Refname={Remark,Remarks},numberwithin=section]{rem}
> | \declaretheorem[name=Proof,Refname={Proof,Proofs}]{proof}
> |
> | \begin{document}
> |
> |
> | \end{document}
> `----
> I now run LaTeX-environment and now something strange happens
> The minibuffer offers me
> heading (h) key=val (k) Empty (RET)
> Now, RET does not work, nothing happens, h leads to a heading (title)
> which is ok, but then no label is inserted as I am used to by
> (setq reftex-label-alist
> ("cor" ?C "cor:%f:" "~\\ref{%s}" t ("Corollary" "Cor."
> "C.")))
> And
> (defun LaTeX-cor-insert (environment) ;Version:1.20
> (if (y-or-n-p
> (format "Do you want a title "))
> (let ((title (read-string "(optional) Title: ")))
> (LaTeX-insert-environment "cor" (concat "[" title "]"))
> (and (LaTeX-label environment)
> (newline-and-indent)))
> (LaTeX-insert-environment "cor")
> (and (LaTeX-label environment)
> (newline-and-indent))))
> So I don't see why this does not work! Of course
> the command
> reftex-label inserts the correct label, but that is a annoying extra step.
> Anybody has an idea what is going on
> (Maybe in the long run, I would give it a try to write a style file for
> thmtools, but it is a huge package with many many options)...
Well I rather shall not....
> Regards
> Uwe Brauer
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
smime.p7s
Description: S/MIME cryptographic signature
- problems with thmstools (and automatic insertion of labels (reftex), Uwe Brauer, 2023/03/25
- Re: problems with thmstools (and automatic insertion of labels (reftex),
Uwe Brauer <=
- Re: problems with thmstools (and automatic insertion of labels (reftex), Arash Esbati, 2023/03/25
- Re: problems with thmstools (and automatic insertion of labels (reftex), Uwe Brauer, 2023/03/25
- Re: problems with thmstools (and automatic insertion of labels (reftex), Arash Esbati, 2023/03/25
- Re: problems with thmstools (and automatic insertion of labels (reftex), Uwe Brauer, 2023/03/26
- Re: problems with thmstools (and automatic insertion of labels (reftex), Arash Esbati, 2023/03/27
- Re: problems with thmstools (and automatic insertion of labels (reftex), Uwe Brauer, 2023/03/27
- Re: problems with thmstools (and automatic insertion of labels (reftex), Arash Esbati, 2023/03/28
- Re: problems with thmstools (and automatic insertion of labels (reftex), Uwe Brauer, 2023/03/27
- Re: problems with thmstools (and automatic insertion of labels (reftex), Arash Esbati, 2023/03/27