como alterar a fonte do número após o teorema

como alterar a fonte do número após o teorema

Quero alterar a fonte do número para \itshape, por exemplo, quero obter o Teorema {\itshape 1.1}. Existe alguma maneira de fazer isso no ambiente do teorema

Responder1

Supondo que você esteja usando apenas o amsthmpacote no seu documento, é assim que isso pode ser feito.

Se você deseja esse comportamento apenas para o estilo de teorema "simples", adicione as seguintes linhas em seu preâmbulo para redefinir o estilo simples:

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

e pronto.

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} 

Saída

insira a descrição da imagem aqui

Em vez disso, se você quiser esse comportamento para todos os estilos de teoremas, substitua o código acima por

\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} 

Saída

insira a descrição da imagem aqui

Responder2

Aqui está uma maneira com ntheoremo pacote. Eu redefino o plainestilo:

\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} 

insira a descrição da imagem aqui

Responder3

Se você não estiver usando nenhum pacote especializado em teoremas, você pode fazer

\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}

insira a descrição da imagem aqui

informação relacionada