将 Theorem 环境从斜体改为倾斜

将 Theorem 环境从斜体改为倾斜

我想将 Theorem 环境中的字体从默认的斜体文本更改为倾斜文本,因为后者很清晰,而前者有点模糊。有人能帮我吗?

编辑:不完整的MWE:

\documentclass[psamsfonts]{amsart}
%-------Packages---------
\usepackage{amssymb}
\usepackage[all,arc]{xy}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage[margin=0.8in]{geometry}
\usepackage{bbm}
%\usepackage{uhmath}
\usepackage[english]{babel}
\usepackage{latexsym}
\usepackage{math dots} %??
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{todonotes}
\usepackage{enumitem}
...
 \begin{thm}  
 \end{thm}

答案1

你只需要改变 的定义\th@plain。我趁机给你的代码添加了一些注释。

\documentclass{amsart} % psamsfonts is obsolete

%-------Packages---------
\usepackage{amssymb}
\usepackage[all,arc,cmtip]{xy} % add cmtip to get decent arrow tips
%\usepackage{enumerate} % incompatible with enumitem
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage[margin=0.8in]{geometry}
\usepackage{bbm}
%\usepackage{uhmath}
\usepackage[english]{babel}
%\usepackage{latexsym} % not needed with amssymb
\usepackage{mathdots} % if you need it, but no space
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{todonotes}
\usepackage{enumitem}

\makeatletter
\renewcommand\th@plain{\slshape}
\makeatother

\newtheorem{thm}{Theorem}

\begin{document}

\begin{thm}
This is slanted.
\end{thm}

\end{document}

在此处输入图片描述

恕我直言,我非常不同意 Knuth 关于倾斜字体的观点,我觉得倾斜字体很丑陋,而且很难与直立字体区分开来。

为了获得倾斜类型的“证明”,您需要修补\proof。关于 AMS 是否提供钩子用于此目的一直存在争议,但目前还不可用。

\documentclass{amsart} % psamsfonts is obsolete

%-------Packages---------
\usepackage{amssymb}
\usepackage[all,arc,cmtip]{xy} % add cmtip to get decent arrow tips
%\usepackage{enumerate} % incompatible with enumitem
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage[margin=0.8in]{geometry}
\usepackage{bbm}
%\usepackage{uhmath}
\usepackage[english]{babel}
%\usepackage{latexsym} % not needed with amssymb
\usepackage{mathdots} % if you need it, but no space
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{todonotes}
\usepackage{enumitem}
\usepackage{xpatch}

\makeatletter
\renewcommand\th@plain{\slshape}
\xpatchcmd{\proof}{\itshape}{\slshape}{}{}
\makeatother

\newtheorem{thm}{Theorem}

\begin{document}

\begin{thm}
This is slanted.
\end{thm}

\begin{proof}
The word ``Proof'' is slanted too.
\end{proof}

\end{document}

在此处输入图片描述

答案2

请尝试以下代码:

\documentclass{amsart}
%-------Packages---------
\usepackage{amssymb}
\usepackage[all,arc]{xy}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage[margin=0.8in]{geometry}
\usepackage{bbm}
%\usepackage{uhmath}
\usepackage[english]{babel}
\usepackage{latexsym}
\usepackage{math dots} %??
\usepackage{mathtools}
\usepackage{relsize}
\usepackage{todonotes}
\usepackage{enumitem}

\begin{document}
\makeatletter
\newtheoremstyle{common}
    {6pt plus 5\p@ minus 2\p@}% above space (default)
    {6pt plus 5\p@ minus 2\p@}% below space
    {\slshape}% body
    {0em}% indent
    {\bfseries}% head
    {}% punct
    {.5em}% space
{\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }{#2}}%
 \thmnote{ {(#3)}}}% theorem head
\makeatother
\theoremstyle{common}

\newtheorem{thm}{Theorem}

 \begin{thm}  
This is for test
 \end{thm}

\end{document}

PS:请注意,这slshape是不可取的......

相关内容