Open muzimuzhi opened 4 years ago
qed=<value>
will redefine \qedsymbol
to <value>
. To allow input qed=\qedsymbol
and avoid self-reference, currently thmtools
uses \protected@edef\qedsymbol{<value>}
. This makes strong assumption on not only the definition of \qedsymbol
, but also the whole <value>
.
A possible fix: always use mirrored \thmqedsymbol
in qed=<value>
diff --git a/source/thm-amsthm.dtx b/source/thm-amsthm.dtx
index b45a6c2..3d6c081 100644
--- a/source/thm-amsthm.dtx
+++ b/source/thm-amsthm.dtx
@@ -137,14 +137,19 @@
% }
}
+\@ifl@t@r\fmtversion{2020/10/01}
+ {\def\thmt@let{\DeclareCommandCopy}}
+ {\def\thmt@let{\let}}
+
\define@key{thmdef}{qed}[\qedsymbol]{%
+ \thmt@let\thmqedsymbol\qedsymbol
\thmt@trytwice{}{%
\addtotheorempostheadhook[\thmt@envname]{%
- \protected@edef\qedsymbol{#1}%
+ \def\qedsymbol{#1}%
\pushQED{\qed}%
}%
\addtotheoremprefoothook[\thmt@envname]{%
- \protected@edef\qedsymbol{#1}%
+ \def\qedsymbol{#1}%
\popQED
}%
}%
beamer
hasThis makes
fail because currently
thmtools
does https://github.com/muzimuzhi/thmtools/blob/16b11550988fb5d24907572ad17081b7805f8173/source/thm-amsthm.dtx#L140-L151See TeX-SX question https://tex.stackexchange.com/q/565808.