我怎样才能让 \newtheorem... 环境引用其 thmnote?

我怎样才能让 \newtheorem... 环境引用其 thmnote?

我目前正在使用\newtheoremstyle来产生以下输出:

当前的

问题:我如何才能轻松修改我的 MWE(见下文),以便A我的 QED 框中写的是“事物名称”、“不同事物”等等?

以下是我想要的:

期望

这是我的 MWE:

\documentclass[12pt]{article}
\usepackage{amsthm}

\newtheoremstyle{underlinenonum}% name
{-1.5mm}           % Space above, empty = `usual value'
{}                 % Space below
{}                 % Body font
{\parindent}       % Indent amount (empty = no indent, \parindent = para indent)
{}                 % Thm head font
{}                 % Punctuation after thm head
{ }                % Space after thm head: \newline = linebreak
{\noindent{\underline{\thmnote{#3:}}}}

\theoremstyle{underlinenonum}
\newtheorem*{subcase}{subcase}
    \let\mtendsubcase\endsubcase
    \renewcommand{\endsubcase}{\renewcommand\qedsymbol{\tiny\fbox{a}}\qed\mtendsubcase}

\begin{document}
    \begin{subcase}[Name of Thing] This is a thing I would like to say.\end{subcase}
    \begin{subcase}[A Different Thing] This is a \textit{different} thing I would like to say, and I need a QED to automatically reflect \textit{its} argument.\end{subcase}
\end{document}

请注意,我想将“事物名称”、“不同事物”等作为参数纳入subcase定理环境,并让 QED 框自动从该参数中提取。

我也曾尝试使用\fbox{\thmnote}}等代替 ,fbox{a}但每次迭代都会产生错误。我也尝试过谷歌搜索 sXe,但无济于事。

编辑1:正如以下评论所述,我不要想要手动将静态参数输入 QED 框中,因为将会连续使用多个这样的环境,并且我希望每个 QED 框都能反映其各自的thmnote

答案1

将类似定理的环境包装在一个新的环境中,您可以更轻松地吸收名称并根据需要使用它。

我修改了语法,使其subcase具有强制参数,这在语义上更合理。我还删除了下划线:抱歉,但我无法忍受。

\documentclass[12pt]{article}
\usepackage{amsthm}

\newtheoremstyle{underlinenonum}% name
{-1.5mm}           % Space above, empty = `usual value'
{}                 % Space below
{}                 % Body font
{\parindent}       % Indent amount (empty = no indent, \parindent = para indent)
{}                 % Thm head font
{}                 % Punctuation after thm head
{ }                % Space after thm head: \newline = linebreak
{\noindent\textbf{\thmnote{#3:}}}

\theoremstyle{underlinenonum}

\newtheorem*{subcaseinner}{subcase}
\newenvironment{subcase}[1]
 {%
  \renewcommand\qedsymbol{\subcaseqed{#1}}%
  \subcaseinner[#1]%
 }
 {\qed\endsubcaseinner}
\newcommand{\subcaseqed}[1]{\fbox{\tiny #1}}

\begin{document}

\begin{subcase}{Name of Thing}
This is a thing I would like to say.
\end{subcase}

\begin{subcase}{A Different Thing}
This is a \textit{different} thing I would like to say, and I need 
a QED to automatically reflect \textit{its} argument.
\end{subcase}

\end{document}

在此处输入图片描述

相关内容