这是 MWE
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}
\setcounter{section}{3}
\begin{lemma}[something]
test
\end{lemma}
\end{document}
我想让“something”后面的 DOT 的字体与“something”相同。请提供任何建议。
答案1
您可以使用\newtheoremstyle
宏来实现这一点。下面给出了一个工作示例:
\documentclass{article}
\usepackage{amsthm}
\newtheoremstyle{newtheorem}% name
{.5\baselineskip \@plus5\p@}% Space above
{.5\baselineskip \@plus5\p@}% Space below
{\itshape}% Body font
{}% Indent amount 1
{\bfseries}% Theorem head font
{\normalfont.}% Punctuation after theorem head
{.4em}% Space after theorem head 2
{}% Theorem head spec (can be left empty, meaning `normal'
\theoremstyle{newtheorem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}
\setcounter{section}{3}
\begin{lemma}[something]
test
\end{lemma}
\end{document}
第七个参数\normalfont
使点变为非粗体。
答案2
标准\thmhead
命令将注释/属性排版为一个组。最简单的方法是删除该组。我还添加了不同风格的环境以显示行为是统一的。
\documentclass{article}
\usepackage{amsthm}
\makeatletter
\def\thmhead@plain#1#2#3{%
\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
\thmnote{ \the\thm@notefont(#3)}}% no group inside \thmnote
\let\thmhead\thmhead@plain
\makeatother
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\begin{document}
\setcounter{section}{3}
\begin{lemma}[something]
test
\end{lemma}
\begin{lemma}
test
\end{lemma}
\begin{definition}[something]
test
\end{definition}
\begin{definition}
test
\end{definition}
\end{document}