It is interesting that \emph will switch the shape of font automatically based on the current font is italic or not, e.g.,
\emph{This is \emph{non-italic} italic}.
will produce something like:
This is non-italic italic
There are some cases I would like do the same for the body of a theorem. As far as I know, the theorem style is defined as
\newtheoremstyle{mythm} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape} % Body font
{} % Indent amount
{\scshape} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
An direct replace of the \itshape (option for Body font) by \emph is not working, I believe this is because \itshape is a switch (used by {\itshape text}) while \emph is a command (used by \emph{text}). The definition of \emph is (from latex by texdef -t latex -c minimal -F emph):
\emph :
\long macro:#1->\ifmmode \nfss@text {\em #1}\else \hmode@bgroup \text@command {#1}
\em \check@icl #1\check@icr \expandafter \egroup \fi
while
\itshape :
\long macro:->\not@math@alphabet \itshape \mathit \fontshape \itdefault \selectfont
Any idea?
THE MME
\documentclass{amsart}
\newtheoremstyle{mythm} % name
{\topsep} % Space above
{\topsep} % Space below
{\itshape} % Body font
{} % Indent amount
{\scshape} % Theorem head font
{.} % Punctuation after theorem head
{.5em} % Space after theorem head
{} % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mythm}
\newtheorem{thm}{Theorem}
\begin{document}
This is a test
\emph{This is \emph{non-italic} italic}.
\begin{thm}
This is italic
\end{thm}
\itshape
This is a test
\begin{thm}
This should be non-italic
\end{thm}
\end{document}
\emphis called\em. What exactly is your use case for this? To me it would seem to be strange to have an upright theorem al of a sudden – daleif Apr 04 '18 at 12:21\itshapewith\emnot work for me, I mean if the theorem is surrounded by italic fonts, then we should use the upright font shape instead. – user19832 Apr 04 '18 at 12:31amsthmsources (loaded byamsart). It issues\normalfontin an internal component and thus counters the\itshape. Without it, it does work, but as a reader I'd find it strange that the body font is not the same for all theorems – daleif Apr 04 '18 at 12:35\theoremstyle{definition}? it's identical in characteristics to\theoremstyle{plain}except for the fact that the body is upright roman. see Non italic text in theorems, definitions, examples for some commentary. – barbara beeton Apr 04 '18 at 15:15