특정 정리 환경 뒤에 점을 제거합니다.

특정 정리 환경 뒤에 점을 제거합니다.

다음 코드는 모든 정리 환경에서 후행 점을 제거할 수 있습니다.

\makeatletter
\xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{}
\makeatother

보다amsthm 및 hyperref를 사용하여 정리 뒤의 점 제거

여기서의 문제는 조금 다릅니다. 때때로 우리는 정의와 아래의 "sta" 환경 내의 텍스트와 같은 특정 정리 환경에서만 점을 제거해야 합니다.

\documentclass{article}
\usepackage{amsthm}
\usepackage{xpatch}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}


\newtheorem{sta}{\normalfont}
\renewcommand{\thesta}{(\arabic{sta})\unskip}

\makeatletter
\xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{}
\makeatother
\begin{document}

\begin{definition}
A {\it cycle} in a graph is a non-empty trail in which only the first and last vertices are equal.
\end{definition}

\begin{theorem}
An undirected graph is bipartite if and only if it does not contain an odd cycle.
\end{theorem}

First, we note that:
\begin{sta}\label{seesall}
Every bipartite graph contains no odd cycles.
\end{sta}

This prove \ref{seesall}.
\end{document} 

여기에 이미지 설명을 입력하세요

답변1

왜 정의에 마침표를 원하지 않는지 잘 모르겠습니다. 통일성을 깨뜨릴 이유가 없다고 생각합니다.

어쨌든 올바른 방법은 적합한 정리 스타일을 정의하는 것입니다.

\documentclass{article}
\usepackage{amsthm}

% see https://tex.stackexchange.com/a/17555/4427
\newtheoremstyle{definitionnoperiod}
  {\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\normalfont}  % BODYFONT
  {0pt}       % INDENT (empty value is the same as 0pt)
  {\bfseries} % HEADFONT
  {}          % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {}          % CUSTOM-HEAD-SPEC
\newtheoremstyle{empty}
  {\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\itshape}  % BODYFONT
  {0pt}       % INDENT (empty value is the same as 0pt)
  {\normalfont} % HEADFONT
  {}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {\thmnumber{#2}}          % CUSTOM-HEAD-SPEC

\newtheorem{theorem}{Theorem}

\theoremstyle{definitionnoperiod}
\newtheorem{definition}{Definition}

\theoremstyle{empty}
\newtheorem{sta}{}
\renewcommand{\thesta}{(\arabic{sta})}

\begin{document}

\begin{definition}
A \emph{cycle} in a graph is a non-empty trail in which only the first 
and last vertices are equal.
\end{definition}

\begin{theorem}
An undirected graph is bipartite if and only if it does not contain an odd cycle.
\end{theorem}

First, we note that:
\begin{sta}\label{seesall}
Every bipartite graph contains no odd cycles.
\end{sta}

This proves \ref{seesall}.
\end{document} 

여기에 이미지 설명을 입력하세요

다음 {\it cycle}두 가지 이유로 잘못되었습니다.

  1. \it약 30년 동안 더 이상 사용되지 않았습니다.
  2. 그러한 경우에는 더 높은 수준의 \emph명령을 선택합니다.

답변2

\documentclass[12pt]{article}
\usepackage{mathtools,amsthm,amssymb}

\newtheorem{theorem}{Theorem}

\newtheoremstyle{definitionstyle}% name
  {0pt}% space above
  {0pt}% space below
  {}% body font
  {}% indent amount
  {\bfseries}% theorem head font
  {}% punctuation after theorem head
  {0.5em}% space after theorem head
  {}% theorem head spec

\theoremstyle{definitionstyle}
\newtheorem{definition}{Definition}


\begin{document}

\begin{definition}
A function $f: A \to \mathbb{R}$ is said to be \emph{continuous at a point} $c$ in its domain $A$ if, for every $\epsilon > 0$, there exists a $\delta > 0$ such that for all $x$ in $A$, if $|x - c| < \delta$, then $|f(x) - f(c)| < \epsilon$.
\end{definition}

\begin{theorem}
If $f: [a, b] \to \mathbb{R}$ is continuous on $[a, b]$ and differentiable on $(a, b)$, then there exists at least one $c$ in $(a, b)$ such that
\[ f'(c) = \frac{f(b) - f(a)}{b - a}. \]
\end{theorem}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보