32
votes
How do I add \begin{definition} … \end{definition}?
Just define it using \newtheorem like you have done for environment theorem:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{definition}{Definition}
\begin{document}
\begin{definition}
This ...
25
votes
Non italic text in theorems, definitions, examples
Try the following:
\documentclass{article}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\normalfont If $A$, then $B$.
\end{theorem}
\end{document}
Also look here: ...
17
votes
Accepted
cleveref and amsthm -- incorrect environment name
You just need to move the definitions of your theorem-like environments to after the loading of cleveref package:
\documentclass{memoir}
\usepackage{amsthm}
\usepackage[capitalise]{cleveref}
% ...
16
votes
Accepted
Definitions and theorems in beamer
If you disable the automatic creation of Theorem blocks by beamer and do like the usual way using amsthm you can format all easily.
So, the option notheorems disable the automatic process and then ...
15
votes
Accepted
Marking the end of a definition
The amsthm isn't the best on its own; however, thmtools provides a really neat 'front-end' for amsthm and other theorem packages.
In particular, thmtools includes a prefoothook and postfoothook which ...
14
votes
Is there a \renewtheorem equivalent of \renewcommand, using amsthm and not ntheorem?
If one systematically needs different theorems definitions in the same documents, egreg approach is convenient. But many of us might have a mymath.tex with common shortcuts and settings, which is a ...
13
votes
Accepted
Theorem environment with a line break after label and before an enumerate environment
Why don't you simply go for something like that?
\documentclass{article}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theo}{Theorem}% Regular theorem env.
\begin{document}
\begin{theo}[...
13
votes
Accepted
How do I add a colored box around my theorems?
Use tcolorbox:
\documentclass{article}
\usepackage{tcolorbox}
\usepackage{amssymb}
\tcbuselibrary{theorems}
\newtcbtheorem
[]% init options
{definition}% name
{Definition}% title
{%
...
13
votes
Accepted
theorems and definitions boxes (numbering should be chapter-wise)
\documentclass{book}
\usepackage{amsmath}
\usepackage{cleveref}
\usepackage[most]{tcolorbox}
\newtcbtheorem[number within=chapter]{Theorem}{}{
enhanced,
sharp corners,
attach ...
12
votes
Theorem/Definition/Lemma problem --- Numbering
You can do something like this
\newtheorem{theorem}{Theorem}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}...
12
votes
Accepted
Why does LaTeX have \newtherorem rather than define environments for theorem, lemma, etc.?
"Why" questions can always be answered in several different ways, not all giving consisent conclusions. A few, in no particular order.
Leslie Lamport did it that way in LaTeX 2.0x and we ...
11
votes
Theorem numbering as chapter.section.subsection.theorem number
Alternatively, you can do
\newtheorem{mytheorem}{Theorem}[subsection]
11
votes
amsthm with shared counters messes up autoref references
The package thmtools fixes this. From the documentation:
A.1.7 Fixing autoref and friends
hyperref’s \autoref command does not work well with theorems that share a counter: it’ll always think ...
11
votes
Accepted
How to cross-reference an unnumbered theorem using hyperref and cleveref
You have two types of theorems in your document -- numbered ones, of type plain, and unnumbered ones, of type named. As you've already discovered and pointed out, it's easy to assign a \label to a ...
11
votes
Accepted
Retrieving the title of a theorem, e.g. "My name" from "Lemma 1 (My name)"
The thmtools package allows to do that easily:
\documentclass{article}
\usepackage{hyperref}
\usepackage{thmtools}
\declaretheorem{Theorem}
\begin{document}
\begin{Theorem}[My Theorem]\label{thm}
$...
11
votes
Accepted
How can I create this environment
Here is something for you to get start with:
\documentclass{article}
\usepackage{amsthm}
\usepackage[many]{tcolorbox}
\usepackage{blindtext}
\begin{document}
\newtheoremstyle{basic}
{0pt}{0pt}{...
11
votes
Accepted
How to deindent text within itemize
Instead of inserting the proof in the list and adapting the indentation, you could just resume the enumeration after using enumitem's resume keyword.
\documentclass{article}
\usepackage{amsmath, ...
10
votes
Accepted
Proof-like environment
Package amsthm has three styles: plain (title is in \bfseries and body is in \itshape), definition (title is in \bfseries and body is in \rmfamily) and remark (title is in \itshape and body is in \...
10
votes
Accepted
Remove dot after theorem with amsthm and hyperref
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{}
\makeatother
\begin{...
10
votes
Accepted
How do you reprint a theorem, proposition, etc. in its entirety?
The thmtools defines restatable theorems. Here is how it goes. B.t.w., the thm theorem style does not exist, as this is defined by thmtools. I suppose you meant the plain style. Also, I had to ...
10
votes
Accepted
Font used in Munkres "Topology"
It's definitely a Times font.
\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage{times,newtxmath}
\newtheoremstyle{slanted}
{\topsep}% Space above
{\topsep}% Space below
{\...
9
votes
Accepted
How do I show the labels of theorems, definitions, etc
With showlabels
\documentclass{article}
\usepackage{showlabels}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{Zzzz}
zzz
\begin{theorem}\label{fact1}
Important math statement.
\end{...
9
votes
Marking the end of a definition
I really can't see the need for it. But since you're asking,
\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}
\theoremstyle{definition}
\newtheorem{defi/}{Definition}
\...
9
votes
Cite a theorem by its name and number
Here are two approaches. First, you can combine \ref and \nameref to format as desired. Second, you can use \mylabel to save preformatted text. The advantage of the latter is that it is implemented ...
9
votes
Theorem numbering without the section and subsection numbers
Specify the theorem to renew with every \subsection, and then remove the subsection counter from the theorem counter representation:
\documentclass{article}
\newtheorem{thm}{Theorem}[subsection]% ...
9
votes
How do you reprint a theorem, proposition, etc. in its entirety?
You can \label the theorem that has to be dublicated and then reuse its counter when you rewrite it via \ref:
\newenvironment{usethmcounterof}[1]{%
\renewcommand\thethm{\ref{#1}}\thm}{\endthm\...
9
votes
No counter 'theorem' defined
Rearrange the \newtheorems as follows, and use [thm] instead of [theorem].
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{rem}[thm]{Remark}
\...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
theorems × 1663numbering × 304
amsthm × 267
environments × 153
cross-referencing × 149
thmtools × 113
ntheorem × 100
spacing × 83
beamer × 77
formatting × 71
amsmath × 64
newtheorem × 64
tcolorbox × 62
counters × 61
lists × 60
hyperref × 51
mdframed × 51
indentation × 47
enumerate × 46
cleveref × 46
table-of-contents × 40
line-breaking × 39
sectioning × 38
math-mode × 36
lyx × 36