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 ...
Schweinebacke's user avatar
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: ...
skylander's user avatar
  • 465
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} % ...
Andrew Swann's user avatar
  • 94.9k
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 ...
Sigur's user avatar
  • 37k
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 ...
JP-Ellis's user avatar
  • 8,859
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 ...
antonio's user avatar
  • 1,426
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}[...
Clément's user avatar
  • 5,407
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 {% ...
Henri Menke's user avatar
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 ...
Georg's user avatar
  • 1,566
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}...
Trect's user avatar
  • 467
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 ...
David Carlisle's user avatar
11 votes

Theorem numbering as chapter.section.subsection.theorem number

Alternatively, you can do \newtheorem{mytheorem}{Theorem}[subsection]
Stéphane Laurent's user avatar
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 ...
Josse's user avatar
  • 437
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 ...
Mico's user avatar
  • 496k
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} $...
Clément's user avatar
  • 5,407
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}{...
Jinwen's user avatar
  • 8,092
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, ...
Vincent's user avatar
  • 19.9k
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 \...
user94293's user avatar
  • 4,194
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{...
samcarter_is_at_topanswers.xyz's user avatar
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 ...
Bernard's user avatar
  • 270k
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 {\...
egreg's user avatar
  • 1.1m
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{...
David Carlisle's user avatar
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} \...
egreg's user avatar
  • 1.1m
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 ...
John Kormylo's user avatar
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]% ...
Werner's user avatar
  • 598k
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\...
Ruben's user avatar
  • 13.4k
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} \...
gernot's user avatar
  • 48.7k

Only top scored, non community-wiki answers of a minimum length are eligible