how to change the font of the number after theorem

I want to change the font of the number to \itshape, for example, I want to get Theorem {\itshape 1.1}. Is there any way to do it in the theorem environment

Supposing you are only using the amsthm package in your document, this is how it can be done.

If you want this behavior only for the "plain" theorem style, add the following lines in your preamble to re-define the plain style:

\makeatletter
\renewcommand{\th@plain}{%
\renewcommand\@upn{\textit}%
\itshape%
}
\makeatother


and you're done.

MWE

\documentclass{article}
\usepackage{amsthm}

\makeatletter
\renewcommand{\th@plain}{%
\renewcommand\@upn{\textit}%
\itshape%
}
\makeatother

\newtheorem{thm}{Theorem}[section]

\begin{document}

\section{Test}

\begin{thm}
This is a theorem.
\end{thm}

\end{document}


Output

Instead, if you want this behavior for all theorem styles, replace the above code with

\makeatletter
\renewcommand\@upn{\textit}
\makeatother


MWE

\documentclass{article}
\usepackage{amsthm}

\makeatletter
\renewcommand\@upn{\textit}
\makeatother

\newtheorem{thm}{Theorem}[section]
\theoremstyle{remark}
\newtheorem{rmk}[thm]{Remark}

\begin{document}

\section{Test}

\begin{thm}
This is a theorem.
\end{thm}

\begin{rmk}
And this is a remark.
\end{rmk}

\end{document}


Output

Here is a way with ntheorem package. I redefine the plain style:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[amsthm, thmmarks, thref]{ntheorem}
\usepackage{cleveref}

\makeatletter
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont ##1\ \textit{##2}\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont ##1\ \textit{##2}\ (##3)\theorem@separator]}
\makeatother
\newtheorem{thm}{Theorem}[section]

\begin{document}

\section{A first section}
\begin{thm}\label{testthm}
This is a test theorem.
\end{thm}
We see in \cref{testthm}…

\end{document}


If you're using no package specialized in theorems, you can do

\documentclass{article}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@opargbegintheorem}{#2}{\textit{#2}}{}{}
\patchcmd{\@begintheorem}{#2}{\textit{#2}}{}{}
\makeatother

\newtheorem{thm}{Theorem}

\begin{document}
\begin{thm}
Something
\end{thm}
\end{document}