我有以下样式。想让标题字体变为粗体斜体。但我需要修改吗?
\newtheoremstyle{mystyle} % name of style
{8pt} % measure of space above example, e.g. {3pt}
{8pt} % measure of space below example, e.g. {3pt}
{\itshape} % name of font for body of example
{} % measure of space to indent, e.g. {3pt}
{\bfseries} % name of font for heading
{.} % punctuation between heading and body
{ } % space after theorem heading; { } defines an interword space
{ {\thmname{\textbf{\textit{#1}}}}
\textcolor{DarkOrange3}{\textbf{\thmnumber{#2}}}
\thmnote{ \textit{\texttt{\textsf{({#3})}}}} }
\theoremstyle{mystyle}
\newtheorem{theorem}{\textcolor{Green4}{Theorem}}[section]
答案1
用作{\bfseries\itshape}
标题字体的名称,并在最后一行进行更改,以避免在定理编号后出现多余的空格。
正文和注释将使用相同的字体,但可以稍后修改。
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsthm}
\usepackage[x11names]{xcolor}
\newtheoremstyle{mystyle} % name of style
{8pt} % measure of space above example, e.g. {3pt}
{8pt} % measure of space below example, e.g. {3pt}
{\itshape} % name of font for body of example
{} % measure of space to indent, e.g. {3pt}
{\bfseries\itshape} % name of font for heading % changed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
{\textcolor{DarkOrange3}{.}}% punctuation between heading and body % changed <<<<<<<<<<<<<<
{ } % space after theorem heading; { } defines an interword space
{\thmname{#1}\enspace\textcolor{DarkOrange3}{\thmnumber{#2}}\thmnote{#3}} % changed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\theoremstyle{mystyle}
\newtheorem{theorem}{\textcolor{Green4}{Theorem}}[section]
\begin{document}
\section{One}
\begin{theorem}{\sffamily\footnotesize (The note argument is optional.)}\label{thm-main1}
\begin{equation}\label{detB1}
\det\mathbf{B}=
\sum^n_{l =0}\sum_{I_l \subseteq n}
\prod_{i\in I_l}(b_{ii}-\lambda_i)
\det\mathbf{B}^{(\lambda)}(I_l |I_l ),
\end{equation}
where $I_l =\{i_1,\dots,i_l \}$ and $\mathbf{B}^{(\lambda)}(I_l |I_l )$
is the principal submatrix obtained from $\mathbf{B}^{(\lambda)}$
by deleting its $i_1,\dots,i_l $ rows and columns.
\end{theorem}
\end{document}