我遇到了以下问题。因此,在我的文档中,我定义了新的定理环境问题,使用以下前导码
\theoremstyle{plain}
\newtheorem{eg}[theorem]{Example}
\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{problem}[theorem]{Problem}
代码适用于前三部分。但是当我添加第四部分时,\begin{problem} 命令并没有给出下图所示的结果, 它给了我这个 同样的问题也发生在证明环境中。我想得到这个(通过使用命令 \begin{proof}[Euler's arcargument]) 但这就是我得到的 这里奇怪的是,这个问题只出现在第四部分,而不是前三部分。
这就是我的问题。如果有人能帮我解决这个问题,我将不胜感激。提前致谢。
PS. 以防万一,以下是我的完整序言
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb,amsthm,amscd,graphicx,enumerate}
\usepackage{asymptote}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz,tkz-tab}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{thmtools}
\usepackage[framemethod=TikZ]{mdframed}
\mdfdefinestyle{mdwhitebox}{%
roundcorner = 10pt,
linewidth=1pt,
skipabove=12pt,
innerbottommargin=9pt,
skipbelow=2pt,
linecolor=black,
nobreak=true,
backgroundcolor=White!5,
}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{Black},
mdframed={style=mdwhitebox},
headpunct={\\[3pt]},
postheadspace={0pt}
]{lembox}
\mdfdefinestyle{mdrecbox}{%
linewidth=0.5pt,
skipabove=12pt,
frametitleaboveskip=5pt,
frametitlebelowskip=0pt,
skipbelow=2pt,
frametitlefont=\bfseries,
innertopmargin=4pt,
innerbottommargin=8pt,
nobreak=true,
backgroundcolor=White!5,
}
\declaretheoremstyle[
headfont=\bfseries\color{Black},
mdframed={style=mdrecbox},
headpunct={\\[3pt]},
postheadspace={0pt},
]{defbox}
\mdfdefinestyle{mdbluebox}{%
roundcorner = 10pt,
linewidth=1pt,
skipabove=12pt,
innerbottommargin=9pt,
skipbelow=2pt,
linecolor=blue,
nobreak=true,
backgroundcolor=TealBlue!5,
}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{MidnightBlue},
mdframed={style=mdbluebox},
headpunct={\\[3pt]},
postheadspace={0pt}
]{thmbluebox}
\declaretheorem[style=thmbluebox,name=Theorem,numberwithin=section]{theorem}
\declaretheorem[style=defbox,name=Definition,numberwithin=section]{defn}
\declaretheorem[style=lembox,name=Lemma,sibling=theorem]{lemma}
\newenvironment{soln}{\begin{proof}[Solution]}{\end{proof}}
\theoremstyle{plain}
\newtheorem{eg}[theorem]{Example}
\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{problem}[theorem]{Problem}
\numberwithin{equation}{section}
\oddsidemargin 0in
\textwidth 6.5in
\textheight 9in
\topmargin 0in
\headheight 0in
\headsep 0in
%link refrence set up
\usepackage{xcolor}
\usepackage[colorlinks=true]{hyperref}
\hypersetup{urlcolor=RubineRed,linkcolor=RoyalBlue,citecolor=ForestGreen}
\usepackage[nameinlink]{cleveref}
\newcommand{\vocab}[1]{\textbf{\color{blue} #1}}
编辑1:这是人们要求的 MWE。
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb,amsthm,amscd,graphicx,enumerate}
\usepackage{asymptote}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz,tkz-tab}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{thmtools}
\usepackage[framemethod=TikZ]{mdframed}
\mdfdefinestyle{mdwhitebox}{%
roundcorner = 10pt,
linewidth=1pt,
skipabove=12pt,
innerbottommargin=9pt,
skipbelow=2pt,
linecolor=black,
nobreak=true,
backgroundcolor=White!5,
}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{Black},
mdframed={style=mdwhitebox},
headpunct={\\[3pt]},
postheadspace={0pt}
]{lembox}
\mdfdefinestyle{mdrecbox}{%
linewidth=0.5pt,
skipabove=12pt,
frametitleaboveskip=5pt,
frametitlebelowskip=0pt,
skipbelow=2pt,
frametitlefont=\bfseries,
innertopmargin=4pt,
innerbottommargin=8pt,
nobreak=true,
backgroundcolor=White!5,
}
\declaretheoremstyle[
headfont=\bfseries\color{Black},
mdframed={style=mdrecbox},
headpunct={\\[3pt]},
postheadspace={0pt},
]{defbox}
\mdfdefinestyle{mdbluebox}{%
roundcorner = 10pt,
linewidth=1pt,
skipabove=12pt,
innerbottommargin=9pt,
skipbelow=2pt,
linecolor=blue,
nobreak=true,
backgroundcolor=TealBlue!5,
}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{MidnightBlue},
mdframed={style=mdbluebox},
headpunct={\\[3pt]},
postheadspace={0pt}
]{thmbluebox}
\declaretheorem[style=thmbluebox,name=Theorem,numberwithin=section]{theorem}
\declaretheorem[style=defbox,name=Definition,numberwithin=section]{defn}
\declaretheorem[style=lembox,name=Lemma,sibling=theorem]{lemma}
\newenvironment{soln}{\begin{proof}[Solution]}{\end{proof}}
\theoremstyle{plain}
\newtheorem{eg}[theorem]{Example}
\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{problem}[theorem]{Problem}
\numberwithin{equation}{section}
\oddsidemargin 0in
\textwidth 6.5in
\textheight 9in
\topmargin 0in
\headheight 0in
\headsep 0in
%link refrence set up
\usepackage{xcolor}
\usepackage[colorlinks=true]{hyperref}
\hypersetup{urlcolor=RubineRed,linkcolor=RoyalBlue,citecolor=ForestGreen}
\usepackage[nameinlink]{cleveref}
\newcommand{\vocab}[1]{\textbf{\color{blue} #1}}
\begin{document}
\title{Notes}
\author{}
\date{}
\maketitle
\tableofcontents
\eject
\section{Section 1}
\begin{problem}
Works fine here
\end{problem}
\newpage
\section{Section 2}
\begin{problem}
Works fine here
\end{problem}
\newpage
\section{Section 3}
\begin{problem}
Works fine here
\end{problem}
\begin{remark}
A tikz diagram
\begin{center}
\begin{tikzpicture}
\tkzInit[xmin=-0.8,ymin=-1.3,xmax=5.2,ymax=1.3]
\tkzAxeX[
label=\hspace{4mm}{$x$},
very thick, % increase width of axes lines
label options={font=\Large}, % increase font size
orig=false % don't print zeros
]
\tkzAxeY[
label=\raisebox{4mm}{$y$},
very thick, % increase width of axes lines
label options={font=\Large,}, % increase font size
orig=false % don't print zeros
]
\draw (0,1)--(2,1)--(2.5,-1)--(3,1)--(10/3,-1)--(11/3,1)--(4,1)--(17/4,-1)--
(18/4,1)--(19/4,-1)--(5,1);
\end{tikzpicture}
\end{center}
Something happen after this tikz diagram
\end{remark}
\section{Test}
\begin{problem}
Fails here
\end{problem}
\end{document}