muzimuzhi / thmtools

New home for LaTeX package bundle thmtools
LaTeX Project Public License v1.3c
18 stars 3 forks source link

Use delimiters other than `(` and `)` #38

Open muzimuzhi opened 1 year ago

muzimuzhi commented 1 year ago

see https://tex.stackexchange.com/a/687473

muzimuzhi commented 1 year ago

I'm considering

diff --git a/source/thm-amsthm.dtx b/source/thm-amsthm.dtx
index b45a6c2..126131e 100644
--- a/source/thm-amsthm.dtx
+++ b/source/thm-amsthm.dtx
@@ -59,7 +59,9 @@
   \thmt@style@headstyle{%
     \def\NAME{\the\thm@headfont ##1}%
     \def\NUMBER{\bgroup\@upn{##2}\egroup}%
-    \def\NOTE{\if=##3=\else\bgroup\thmt@space\the\thm@notefont(##3)\egroup\fi}%
+    \def\NOTE{\if=##3=\else
+      \bgroup\thmt@space\the\thm@notefont
+      \thmt@note@begmark##3\thmt@note@endmark\egroup\fi}%
   }%
   \def\thmt@tmp{#1}%
   \@onelevel@sanitize\thmt@tmp
@@ -87,7 +89,7 @@

-\def\thmt@embrace#1#2(#3){#1#3#2}
+\def\thmt@embrace#1#2\thmt@note@begmark#3\thmt@note@endmark{#1#3#2}

 \def\thmt@declaretheoremstyle@setup{%
   \let\thmt@style@notebraces\@empty%

Moreover, it seems \thmt@note@begmark is not necessary.