本弹性强迫症也来给一个briefly summary:
参考自tse上的另一个回答,大致有以下三种方案:
amsthm
宏包ntheorem
宏包thmtools
宏包
方案一:
\documentclass{ctexart}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{lipsum,zhlipsum}
\newtheoremstyle{no-bracket}
{\topsep}
{\topsep}
{\normalfont\itshape}
{0pt}
{\bfseries}
{} %{:}
{\newline}
%{\thmname{#1}~\thmnumber{#2}\thmnote{ \textlangle#3\textrangle}}
{\thmname{#1}~\thmnumber{#2}\thmnote{ #3: }}
\theoremstyle{no-bracket}
\newtheorem{theorem}{定理}[section]
\begin{document}
\noindent 使用\verb|amsthm|宏包的\verb|\newtheoremstyle|修改参数\verb|<CUSTOM-HEAD-SPEC>|实现
\section{这是一个章节}
\begin{theorem}[Fundamental Theorem of Algebra]
\lipsum[2]
\end{theorem}
\begin{theorem}[代数学基本定理]
Fundamental Theorem of Algebra
\end{theorem}
\begin{theorem}[代数学基本定理]
\zhlipsum[1]
\end{theorem}
\end{document}
方案二:
\documentclass[12pt]{ctexart}
\usepackage{amsmath}
\usepackage{lipsum,zhlipsum}
\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{no-bracket}
{
\item[
\rlap{\vbox{\hbox{\hskip\labelsep
\theorem@headerfont ##1\ ##2\theorem@separator}
\hbox{\strut}}}
]
}%
{
\item[
\rlap{\vbox{\hbox{\hskip\labelsep
\theorem@headerfont ##1\ ##2\ ##3: \theorem@separator}\hbox{\strut}}}
%冒号加在这里不会有空格
]
}
\makeatother
\theoremstyle{no-bracket}
%\theoremseparator{:} %出现空格
\newtheorem{theorem}{Theorem}
\begin{document}
\noindent 使用\verb|ntheorem|宏包的\verb|\newtheoremstyle|命令
\section{这是一个章节}
\begin{theorem}[Fundamental Theorem of Algebra]
\lipsum[2]
\end{theorem}
\begin{theorem}[代数学基本定理]
Fundamental Theorem of Algebra
\end{theorem}
\begin{theorem}[代数学基本定理]
\zhlipsum[1]
\end{theorem}
\end{document}
方案三:
\documentclass[10pt,a4paper]{ctexart}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{lipsum,zhlipsum}
\usepackage{thmtools} %
\declaretheoremstyle[
spaceabove=\topsep,
spacebelow=\topsep,
headfont=\normalfont\bfseries,
notefont=\bfseries,
notebraces={}{},
bodyfont=\normalfont\itshape,
postheadspace=\newline,
headpunct={:},
]{no-bracket}
\declaretheorem[style=no-bracket,name=Theorem]{theorem}
\begin{document}
\noindent 使用\verb|thmtools|宏包的\verb|\declaretheoremstyle|命令设置
\section{这是一个章节}
\begin{theorem}[Fundamental Theorem of Algebra]
\lipsum[2]
\end{theorem}
\begin{theorem}[代数学基本定理]
Fundamental Theorem of Algebra
\end{theorem}
\begin{theorem}[代数学基本定理]
\zhlipsum[1]
\end{theorem}
\end{document}
问 LaTeX 如何修改定理环境中的具体的定理名不由小括号包裹并后接冒号?