Hi Uwe,
Uwe Brauer <[email protected]> writes:
> And in style/mythmtools-setup
>
> \ProvidesPackage{mythmtools-setup}[2025/09/29 v2.0]
> \declaretheorem[name=Claim,Refname={Claim,Claims},numberwithin=section]{claim}
>
> Then LaTeX-environment does *not* insert the environment «claim»
>
> Any idea how to solve this?
You have to write a small AUCTeX style mythmtools-setup.el for your
mythmtools-setup.sty. This can look like this:
--8<---------------cut here---------------start------------->8---
;;; -*- lexical-binding: t; -*-
(TeX-add-style-hook
"mythmtools-setup"
(lambda ()
(TeX-run-style-hooks "thmtools")
(LaTeX-add-thmtools-declaretheorems "claim")
(LaTeX-thmtools-auto-cleanup))
:latex)
--8<---------------cut here---------------end--------------->8---
Put this file in a directory where AUCTeX can find it; check the value
of `TeX-style-private'. Next issue will probably be that AUCTeX won't
load the file since it parses "style/mythmtools-setup" and not
"mythmtools-setup". So you have to put the package in a directory which
is searched by kpsewhich or fool AUCTeX like this:
--8<---------------cut here---------------start------------->8---
\documentclass[12pt,reqno]{amsart}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{thmtools}
\usepackage{style/mythmtools-setup}
\iffalse
\usepackage{mythmtools-setup}
\fi
\begin{document}
\end{document}
--8<---------------cut here---------------end--------------->8---
This is all untested, of course.
Best, Arash