2

I want to add a definition in my LaTeX file. However, I have a dot after the word definition. How can I remove it? I want:

Definition Here is the definition

NOT

Definition. Here is the definition

\newtheorem*{definition*}{Definition}                      
\begin{definition*}               
 Here is the definition               
\end{definition*}
Werner
  • 603,163

1 Answers1

2

The dot seems to be defined in the macro \@thm with the line

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

I use xpatch to change that.

\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}

enter image description here

For reference, here is the definition of \@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
}