Skip to main content
34 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
14 votes
Accepted

"Unknown theoremstyle" warning with Springer Nature template

The template is set up with this preamble outline in sn-article.tex: \documentclass[sn-mathphys,Numbered]{sn-jnl}% Math and Physical Sciences Reference % <some more package loading> \usepackage{...
Werner's user avatar
  • 607k
13 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
  • 497
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,576
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
12 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,618
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

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,302
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,651
11 votes
Accepted

Package amsthm Warning: The \qedhere command... in Documenta style

As mentioned in another answer, amsthm should be loaded after amsmath. As described in a comment on that answer, this warning is produced when amsthm is incorrectly loaded before amsmath.
Coby Viner's user avatar
  • 1,949
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
  • 20.3k
10 votes
Accepted

Customize a theorem environment in ConTeXt

Here is an alternative solution. Let's start with a version that doesn't break across pages. We'll fix that later. First, let's try to get the basic layout without the frames. Unlike the other ...
Aditya's user avatar
  • 62.6k
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
  • 273k
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
10 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
  • 50k
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
  • 607k
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.5k
9 votes
Accepted

Custom Theorem Style

(edited the answer after the OP provided more information about the desired appearance of the theorem-like environment. I would like to suggest that you use the amsthm package and define a new ...
Mico's user avatar
  • 514k
9 votes
Accepted

Nested theorem label

To have the reflection environments be numbered consecutively -- 1, 2, etc -- and be reset each time either a new proposition or question environment comes along, you should delete the instruction \...
Mico's user avatar
  • 514k
9 votes

Nested theorem label

You can easily number reflection according to either proposition or question: \documentclass[10pt,a4paper]{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{proposition}{...
egreg's user avatar
  • 1.1m
8 votes

Remove the qed symbol from only one proof environment, not all

I handle such cases as follows. \begin{proof}\phantom{\qedhere} No QED symbol. \end{proof} \begin{proof} QED symbol. \end{proof} \begin{proof} \begin{itemize} \item \textellipsis \item QED symbol ...
bkarpuz's user avatar
  • 2,487
8 votes

How to rename theorem (or lemma) in Beamer?

You can use the block env. \begin{frame}[fragile]\frametitle{} \begin{block}{Any Title} Simmons Hall is composed of metal and concrete. \end{block} \end{frame}
Leticia's user avatar
  • 81
8 votes
Accepted

Theorem, Lemma etc numbering

Your main problem here is in the understanding of \newtheorem. Since you're using amsthm, let's look at the documentation (specifically, section 3 Theorem numbering): In addition to the two ...
Werner's user avatar
  • 607k

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