설명 환경의 이탤릭 콜론(`amsthm` 사용), 번호 매기기는 일반 글꼴입니다.

설명 환경의 이탤릭 콜론(`amsthm` 사용), 번호 매기기는 일반 글꼴입니다.

보통 나는 정리 헤더 뒤의 점이 마음에 들지 않습니다. 그래서 저는 서문에 다음 줄을 추가했습니다.

\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}

아주 잘 작동합니다. 하지만 이 옵션을 사용하면 헤더 뒤에 이탤릭체 콜론이 표시됩니다. remark이는 번호 매기기가 없을 때 좋지만 번호 매기기를 활성화하면 번호가 이탤릭체가 아닌 일반 글꼴로 작성됩니다. 숫자를 이탤릭체로 표시하거나 콜론을 일반 글꼴로 표시하는 것도 가능합니까?~ 아니다새로운 정리 스타일을 정의하고 있습니까?

콜론을 한 경우에는 일반 글꼴로, 다른 경우에는 기울임꼴로 동시에 표시하거나 숫자를 기울임꼴로 표시하고 싶습니다.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem*{remark*}{Remark}

\makeatletter
\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}
\makeatother

\begin{document}
    \begin{remark}
        Here is a numbered remark.
    \end{remark}
    \begin{remark*}
        Here is an unnumbered remark.
    \end{remark*}
\end{document}

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

업데이트:모든 곳에서 위쪽 모양의 콜론을 사용할 때의 문제는 번호가 없는 이탤릭체 머리글과 콜론 사이의 간격이었습니다. \/모든 것이 잘 작동 하면 아래 설명을 참조하세요.

답변1

패키지 는 머리글의 글꼴에 관계없이 숫자를 똑바로 유지하는 amsthm매크로를 내부적으로 정의합니다 . \@upn이를 빈 매크로로 재정의하면 숫자가 머리글꼴로 인쇄됩니다.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem*{remark*}{Remark}

\makeatletter
\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}
\renewcommand{\@upn}{} % to use the same font for the number as for the head
\makeatother

\begin{document}
    \begin{remark}
        Here is a numbered remark.
    \end{remark}
    \begin{remark*}
        Here is an unnumbered remark.
    \end{remark*}
\end{document}

답변2

이와 같은 변경 사항은 를 사용하여 해결하는 것이 가장 좋습니다 thmtools.

\documentclass{article}
\usepackage{amsthm,thmtools}

\declaretheoremstyle[
  headfont=\normalfont\itshape,
  headpunct=\textup{:},
  bodyfont=\normalfont,
]{myremark}

\declaretheoremstyle[
  headfont=\normalfont\itshape,
  headpunct=:,
  bodyfont=\normalfont,
]{myremarknonum}

\theoremstyle{myremark}
\newtheorem{remark}{Remark}
\theoremstyle{myremarknonum}
\newtheorem*{remark*}{Remark}

\begin{document}

Some text to show the context. Some text to show the context.
Some text to show the context. Some text to show the context.
Some text to show the context.

\begin{remark}
Here is a numbered remark.
\end{remark}

\begin{remark*}
Here is an unnumbered remark.
\end{remark*}

\end{document}

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

솔직히 말해서 두 경우 모두 직립 콜론을 선호합니다.

관련 정보