我的 MWE 是:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amssymb}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\begin{document}
\section{Introduction}
\theoremstyle{definition}
\begin{definition}[something]
A fibration is a mapping between two topological spaces that has the homotopy lifting property for every space $X$.
\end{definition}
\end{document}
答案1
按照评论中 Bernard 的建议,您可以使用 thmtools 样式键来执行此操作headformat
。
\documentclass{article}
\usepackage{amsthm,thmtools}
\declaretheoremstyle[
headformat={\NAME\ \NUMBER.\NOTE\,},
headpunct={},
notefont=\bfseries,
spaceabove=\topsep,
spacebelow=\topsep
]{mydefstyle}
\declaretheorem[
style=mydefstyle,
parent=section
]{definition}
\begin{document}
\section{Introduction}
\begin{definition}[something]
A fibration is a mapping between two topological spaces that has the homotopy lifting property for every space $X$.
\end{definition}
\begin{definition}
A fibration is a mapping between two topological spaces that has the homotopy lifting property for every space $X$.
\end{definition}
\end{document}