使用 amsthm 包,我为我的笔记定制了一个定理环境。定理标题是粗体和倾斜的。但我还希望数字倾斜。(它已经是粗体了,但它是直立的。)在代码中,标题应该是这样的:
\textbf{\textsl{Theorem 1}.}.
答案1
您必须覆盖头部规范。
\documentclass{article}
\usepackage{amsthm}
% see https://tex.stackexchange.com/a/17555/4427
\newtheoremstyle{boldslanted}
{\topsep} % ABOVESPACE
{\topsep} % BELOWSPACE
{\itshape} % BODYFONT
{0pt} % INDENT (empty value is the same as 0pt)
{\bfseries\slshape} % HEADFONT
{.} % HEADPUNCT
{5pt plus 1pt minus 1pt} % HEADSPACE
{\thmname{#1}\ \thmnumber{#2}{\thmnote{\normalfont\ (#3)}}} % CUSTOM-HEAD-SPEC
\theoremstyle{boldslanted}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
This is a difficult theorem.
\end{theorem}
\begin{theorem}[Easy]
This is an easy theorem.
\end{theorem}
\end{document}