改变定理的标题样式

改变定理的标题样式

我需要改变定理标题的样式(标题后加粗并且没有标点):

\documentclass[french,a4paper,12pt]{report}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{amsmath,amsfonts,amstext,amssymb}
\usepackage{times}
\usepackage{setspace}
\usepackage{Lettrine}
\usepackage{fancyhdr}
\usepackage{multirow}
\usepackage{pslatex}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{array}
\usepackage{enumerate}
\usepackage{color}
\usepackage{version}
\usepackage{newcent}
\usepackage{nestochp}
\usepackage{anysize}
\usepackage{amsthm}
\makeatletter
\g@addto@macro\th@remark{\thm@headpunct{ }}
\makeatother
\theoremstyle{remark}
\newtheorem{Def}{Définition}
\newtheorem*{pre}{Preuve}
\newtheorem{The}{Théorème}
\newtheorem{Lem}{Lemme}
\newtheorem*{Rem}{Remarque}
\newtheorem{pro}{Proposition}
 \numberwithin{equation}{chapter}

当我使用上面的代码时,定理标题后没有标点符号,但字体不是粗体。

我怎样才能解决这个问题?

答案1

因为根据示例代码中样式的使用情况来判断remark,您想要粗体头部、头部后没有标点符号且正文使用普通字体,所以您可以轻松地定义一种具有以下要求的新样式:

\documentclass[french,a4paper,12pt]{report}
\usepackage{babel}
\usepackage{amsthm}    

\newtheoremstyle{mystyle}% name
  {\topsep}% Space above
  {\topsep}% Space below
  {\normalfont}% Body font
  {}% Indent amount
  {\bfseries}% Theorem head font
  {}%Punctuation after theorem head
  {.5em}%Space after theorem head
  {}% theorem head spec
\theoremstyle{mystyle}
\newtheorem{Lem}{Lemme}

 \begin{document}

\begin{Lem}
A test lemma.
\end{Lem}

\end{document}

在此处输入图片描述

答案2

如果您只想要带有粗体标题且没有标点符号的定理,那么可以这样做:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\newtheorem{theorem}{Theorem}

\begin{document}    
    \begin{theorem}
        This is a simple theorem with bold title an no punctuation after the title. 
        As simple as it gets...
        $$a^2+b^2=c^2$$
    \end{theorem}
\end{document}

相关内容