What package should I use, or what setting can I make to the font in theorems so that the text wouldn't be italic. I use amsmath, and from default, everything I write in theorem environments becomes italic and I don't want that. Thank you
5 Answers
amsthm
has three separate predefined styles:
\theoremstyle{plain}
is the default. it sets the text in italic and adds extra space above and below the \newtheorem
s listed below it in the input. it is recommended for theorems, corollaries, lemmas, propositions, conjectures, criteria, and (possibly; depends on the subject area) algorithms.
\theoremstyle{definition}
adds extra space above and below, but sets the text in roman. it is recommended for definitions, conditions, problems, and examples; i've alse seen it used for exercises.
\theoremstyle{remark}
is set in roman, with no additional space above or below. it is recommended for remarks, notes, notation, claims, summaries, acknowledgments, cases, and conclusions.
these recommendations are listed in the amsthm
documentation; type texdoc amsthm
if you have a tex live installation, or read it here.
Addendum
A comment has suggested mentioning more clearly how to use this.
Specify the style before defining the theorems that use the style:
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{definition}
\newtheorem{defn}{Definition}
...
-
Maybe a useful observation: you can put the '\theoremstyle' tag right after the import of 'amsthm' (\usepackage(amsthm)) and also put the '\newtheorem' at the end.– lfvvJul 21 at 19:16
-
1@lfvv -- Yes, that's what I'd use myself, or recommend if I were writing documentation. I always recommend being a neatnik when building a preamble. Jul 21 at 21:41
-
For completeness, I would suggest explaining exactly how to use the
\theoremstyle
command. (You put it before defining new theorem environments that you want to use that style.)– tparkerSep 7 at 2:48
The amsthm
package has the option to define the custom theorem
environment from scratch as stated in the manual (I am copying for the convenience)
\newtheoremstyle{note}% <name>
{3pt}% <Space above>
{3pt}% <Space below>
{}% <Body font>
{}% <Indent amount>
{\itshape}% <Theorem head font>
{:}% <Punctuation after theorem head>
{.5em}% <Space after theorem headi>
{}% <Theorem head spec (can be left empty, meaning `normal')>
You can change {\itshape}
to {\upshape}
. On the other hand you can simply use the remark
or definition
templates.
-
I know this is a little off-topic but What if I want to use an existing theorem environment and make changes? For example
\theoremstyle{break}
.– user7013Jul 19, 2012 at 7:26 -
1@JayeshBadwaik You already need to select a theorem style with
\newtheorem{thm}{plain}
or something similar globally as in barbara's answer. Instead ofplain
you can select your existing environment, saybreak
, take that definition\newtheorem{break}{your customized style}
.– percusseJul 19, 2012 at 7:59
Try the following:
\documentclass{article}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\normalfont If $A$, then $B$.
\end{theorem}
\end{document}
Also look here: https://www.sharelatex.com/learn/Theorems_and_proofs
-
3This approach has the potentially serious drawback of not respecting the font style that's in force outside the
theorem
environment. E.g., if\sffamily
("sans serif") is in force for the text font style, this approach will use an upright roman or serif font rather than an upright sans-serif font for the body of thetheorem
. The body of the theorem will look very odd next to the theorem's header, which will be typeset with bold sans-serif glyphs. What's the correct approach, then? Use\upshape
, not\normalfont
.– MicoNov 22, 2016 at 17:06
I've looked in other answers on similar questions, but I didn't find an explicit one to this particular problem, so here it is: say
\theoremstyle{definition}
before defining all your theorem-like environments, after having declared
\usepackage{amsthm}
However, I consider this bad style, as theorems are important and they should stand out in some way or another. The simplest (and most used method) is to typeset them in italics.
-
10I must say I don't like putting whole paragraphs in italic. (Mainly because I want to mark single words and phrases consistently in italic.) Making a theorem stand out is good. But there are many other ways to highlight it. Also often, and in the recommended setup, every little lemma, proposition and corollary is highlighted in this same way. So the effect you want to achieve is further diminished.– bodoJun 20, 2012 at 19:00
-
3Theorems are already emphasized, by having a bold "Theorem X.Y" in front of them.– 0 _Apr 19, 2016 at 19:43
-
@IoannisFilippidis -- the bold "Theorem X.Y" marks the beginning of a theorem statement, but there is nothing to mark the end. that's one of the major functions of the italic. May 19, 2016 at 18:15
-
@egreg Can you clarify what you mean by "put into evidence" above? I am not sure what you mean here from context.– ZaydHJun 20, 2022 at 11:29
-
1
If you happen to use the ntheorem package to set up theorem-like environments (including one called, say, definition
), you should insert the instruction
\theorembodyfont{\upshape}
ahead of
\newtheorem{definition}{Definition}
to get LaTeX to typset the body of this environment in the upright font shape.
A full MWE:
\documentclass{article}
\usepackage{ntheorem,lipsum}
\theorembodyfont{\upshape}
\newtheorem{definition}{Definition}
\begin{document}
\begin{definition}[Lipsum]
\lipsum*[2] % filler text
\end{definition}
\end{document}