如何去掉“.”在定義中

如何去掉“.”在定義中

我想在我的 LaTeX 檔案中新增定義。但是,我在單字定義後面有一個點。我怎麼刪除它?我想:

定義 這是定義

不是

定義。這是定義

\newtheorem*{definition*}{Definition}                      
\begin{definition*}               
 Here is the definition               
\end{definition*}

答案1

該點似乎是在巨\@thm集中用該行定義的

\thm@headpunct{.}% add period after heading

我用來xpatch改變這一點。

\documentclass{article}
\usepackage{amsthm,xpatch}
\makeatletter
\xpatchcmd{\@thm}{.}{}{}{}
\makeatother
\begin{document}
\makeatletter
\newtheorem*{definition*}{Definition}                      
\begin{definition*}               
 Here is the definition               
\end{definition*}
\end{document}

在此輸入影像描述

\@thm作為參考,以下是in的定義amsthm.sty

\def\@thm#1#2#3{%
  \ifhmode\unskip\unskip\par\fi
  \normalfont
  \trivlist
  \let\thmheadnl\relax
  \let\thm@swap\@gobble
  \thm@notefont{\fontseries\mddefault\upshape}%
  \thm@headpunct{.}% add period after heading
  \thm@headsep 5\p@ plus\p@ minus\p@\relax
  \thm@space@setup
  #1% style overrides
  \@topsep \thm@preskip               % used by thm head
  \@topsepadd \thm@postskip           % used by \@endparenv
  \def\@tempa{#2}\ifx\@empty\@tempa
    \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
  \else
    \refstepcounter{#2}%
    \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
  \fi
  \@tempa
}

相關內容