具有正常字体和节编号的 thmbox

具有正常字体和节编号的 thmbox

在 thmbox 环境中声明某些命令时,如何使用“普通字体”表示定义,使用“斜体”表示注释(以及类似的环境)。此外,我需要按“节”或“子节”进行编号。

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}

\usepackage{thmtools}
\declaretheorem[style=normalfont, thmbox=M, name=Definition]{definition}
\declaretheorem[style=remark, thmbox=M, name=Remark]{remark}
\begin{document}
\section{Trying}
\begin{remark}
This is a remark.
\end{remark}
\begin{definition}
This is a definition. i just need this as normal font.
\end{definition}
in addition, numbering should be in section (or subsection).
\end{document}

答案1

您必须将相应的选项传递给thmbox,因为当需要定义盒装定理时,这个包将接管。

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath,amsthm} % amsthm is important!
\usepackage{thmtools}

\declaretheorem[style=remark]{xyz}

\declaretheorem[
  style=plain,
  thmbox={style=M,bodystyle=\normalfont},
  name=Definition,
  within=section,
]{definition}

\declaretheorem[
  style=remark,
  thmbox={style=M,bodystyle=\normalfont,headstyle=\itshape Remark \upshape\theremark},
  name=Remark,
  within=section,
]{remark}

\begin{document}

\section{Trying}

\begin{remark}
This is a remark.
\end{remark}

\begin{definition}
This is a definition. I just need this as normal font.
\end{definition}

In addition, numbering should be in section (or subsection).

\end{document}

在此处输入图片描述

说这个结果简直糟透了。当然,这只是我的看法。

相关内容