{theorems} are environments which are commonly numbered. They are extensively used in math texts. Examples of such environments are theorems, corollaries, lemmas, propositions, remarks and definitions. Popular packages are {amsthm}, {ntheorem}, and {thmtools}. Covers discussion on proofs too.
50
votes
3answers
3k views
Theorem packages: which to use, which conflict?
As far as I know, one can create theorem environments using any of amsthm, ntheorem, thmtools and probably more.
How should I define my theorem environments? Is one package clearly superior? Which ...
34
votes
7answers
6k views
How do I repeat a theorem number?
Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section.
I'd like to include the statement of these theorems twice over, ...
21
votes
1answer
1k views
How to place all proofs automatically in appendix?
Can I place all proofs to theorems in appendix automatically? Usually proofs are written in the LaTeX codes immediately after the theorems. Without physically moving proofs to appendix, how can I ...
18
votes
1answer
3k views
Problem with qedhere
In a paper I'm writing, I end a proof with a displayed equation that has some cases in it. The relevant code looks something like the following:
\[f(x) = \begin{cases}
2x & \text{if $x<0$}\\
...
17
votes
3answers
1k views
How to make the optional title of a theorem bold with amsthm?
I use the code mentioned in Title of the theorem:
\begin{theorem}[The title]
Some statement
\end{theorem}
However with amsthm the optional title -- above: "The title" -- is neither bold nor italic, ...
17
votes
2answers
626 views
Recalling a theorem
Suppose I have some theorem in the paper
Section 1
Theorem 1.1. Let ...
And then later in the paper I want to recall the theorem by reprinting it
Section 4
We recall Theorem 1.1:
...
16
votes
5answers
7k views
Changing style of Proof
I'm using the \begin{proof} of the amsthm package. And I want to change the style of the Proof word that is added in the beginning. By default it is italic, I want to make it bold. How can I do it?
16
votes
4answers
6k views
A better way to reference theorem-like environments?
I know how to use \label and \ref to get a reference to a result(or whatever else really) that I have made previously in the document. But this is tedious and requires me to create a label name every ...
15
votes
5answers
575 views
How to put a star (or other symbol) in sections that are “special” (difficult, optional, etc)?
I'm currently writing a book, and I'd like some of the sections to be clearly marked as "difficult" or "optional". Not only sections, but also exercises (I'm using the exercise package) and theorems ...
15
votes
4answers
1k views
How to prevent paragraph breaks after theorem environments?
By default, the list environments (such as itemize) have the nice property that if you add a blank line after it, it starts a new paragraph, and if you don't, the paragraph continues. So
The ...
14
votes
3answers
418 views
What style/font is this?
Does anyone know how to create numbering for Theorem/lemma/… like this one in the image below, also any idea about the font name?
14
votes
4answers
432 views
A problem with thmtools and cleveref
I am trying to use thmtools and cleveref and I am getting a quite peculiar error. Here's a minimal example.
\documentclass{article}
\usepackage{thmtools}
\usepackage{cleveref}
...
13
votes
3answers
4k views
How to change the way theorems are displayed?
I am in the process of writing a large document containing some theorems, lemma, and propositions. Currently, I am using packages amsmath and amsthm. I defined my own environment for theorems by ...
13
votes
2answers
340 views
Breaking a theorem between pages
I currently have this custom myexample theorem environment that is working absolutely great.
\newtheoremstyle{myexamplestyle}{}{}{}{}{\bfseries}{.}{ }{}
...
13
votes
4answers
821 views
Nice formatting for theorems
I'm writing an article with some theorems and I would like to use special formatting for the theorems - my idea is putting a grey line in the side of the theorem. Can you please show me how to do this ...
13
votes
1answer
3k views
amsthm: what are the newtheoremstyle parameters for the default styles?
The package amsthm contains the predefined theorem styles plain, definition and remark which you can employ using \theoremstyle before your \newtheorem.
You can also create new theorem styles like ...
12
votes
5answers
4k views
Customizing theorem name
Suppose I have a series of theorems that I would like displayed as
Jim's Theorem.
Bob's Theorem.
Will's Theorem.
rather than as “Theorem (Jim).”, “Theorem (Bob).”, and “Theorem ...
11
votes
3answers
6k views
Non italic text in theorems, definitions, examples
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 ...
11
votes
3answers
768 views
tombstones and beer mugs
I'm trying to find an alternative to the standard tombstone qed symbol for more informal papers.
I initially thought of an empty square with Pub written inside, but what would actually be better would ...
11
votes
2answers
851 views
Difference between \begin{theorem}…\end{theorem} and {\theorem …}
I see that both attempts to display a theorem in the following code generates similar output.
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\begin{document}
...
11
votes
2answers
749 views
Different colorcoded theorems
I'm using this code to frame my theorems:
\documentclass[a4paper,12pt]{scrreprt}
\usepackage[table]{xcolor}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage[amsmath,thmmarks,framed]{ntheorem}
...
11
votes
1answer
478 views
How to cross-reference theorems with “Theorem”?
I use
\begin{lemma} \label{aaa} ... \end{lemma}
\begin{theorem} \label{bbb} ... \end{theorem}
and many other similar kinds in the same document.
When I cross-reference those lemmas and theorems ...
11
votes
3answers
3k views
Theorem environment with hanging indentation
I would like to define a theorem environment with custom layout. In particular, I want the body of the theorem to be indented, like this
Text body. Text body. Text body.
Theorem 1 (Pythagoras).
...
11
votes
3answers
1k views
Theorem name and number in margin, note in text
I'm using thmtools to make ultra-fancy theorems. I would like the Theorem name and number (e.g., "Theorem 1") to jut out into the left margin of the text, and the note (e.g., "The Fundamental Theorem ...
11
votes
2answers
444 views
A theorem and its proof in different places
I have a couple of theorems, proofs of which are quite boring and longish. I would like to place theorem formulations in a usual place and stack up the proofs at the end of the chapter. How to do ...
11
votes
1answer
224 views
Is there an “endproof” package?
You may be familiar with the endfloat package, which moves all figures and tables to the end of your document.
Is there a similar package for achieving that kind of results with proof environments ...
10
votes
6answers
2k views
How to remove the “.” in the proof environment?
Using amsthm, is there a possibility to remove the dot when typing
\begin{proof}...\end{proof}? This would be typeset as "Proof." If you change your proofname \begin{proof}[Proof:]...\end{proof} you ...
10
votes
2answers
970 views
How do I produce Theorems and equations which are numbered by hand?
I'd like to be able to write a LaTex document with numbered theorems and equations, but I would like not to have them numbered automatically, but rather put in by hand. Ideally, I'd like to be able ...
10
votes
2answers
160 views
Counting the total number of theorems
I have:
\usepackage{amsthm}
\newtheorem{problem}{Problem}
....
\begin{problem}...\end{problem}...
...
\begin{problem}...\end{problem}...
In the first page of the document, how can I know the number ...
10
votes
2answers
177 views
How to create *local* labels/refs in LaTeX?
Concise question:
Is there any way to limit the scope in which a \label is visible to a \ref?
Motivation:
My current goal is to create a rather large document, containing many exercises and their ...
10
votes
1answer
266 views
Enumerate environments within theorems
How to create an environment for enumerating that allows one to identify the enumeration with the theorem environment?
Example:
Definition 1.1 Let X be a set. An algebra over X is a collection C ...
10
votes
2answers
5k views
Theorem without numbering
Is it possible to have single theorems without numbering? I would like to be able to switch them off individually with asterisk-* or have a nono-theorem environment.
\newtheorem{theorem}{Theorem}
...
10
votes
1answer
1k views
Including end mark in definitions and examples (using amsthm)
I am using the amsthm package, and I have this in the preamble:
\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]
\newtheorem{example}[definition]{Example}
\theoremstyle{plain}
...
10
votes
1answer
177 views
beamer: \nameref calls the name of the section instead of the name of the theorem environment
In my LaTeX documents, I am playing with a lot of axioms which I write under a theorem environment, while using the following math packages:
\usepackage{amsmath}
\usepackage{amsfonts}
...
10
votes
1answer
540 views
How do I get the numbers for theorems, lemmas, examples, etc. before the type?
I am using the article document class with amsthm. I would like number the theorems/corollaries/examples, etc., consecutively as follows:
1.1 Theorem
1.2 Example
1.3 Example
1.4 ...
10
votes
1answer
382 views
Move QED symbol to the left, i.e. at the end of the sentence
I want to make the qed symbol at the end of a proof appear at the end of the last sentence, not at the far right of the same line.
Would like to do this the simplest way possible.
All I can find ...
10
votes
3answers
518 views
Enumerate alignment problem in theorem environment
I'm using amsart. When I create an enumeration inside a theorem environment, the numbering is not aligned properly:
Theorem 14. (1)
(2)
(3)
(4)
How do I shift the (2),(3),... to be aligned with ...
10
votes
1answer
632 views
How to change the word “Proof” in the proof environment?
I want to change the word "Proof" into "Solution". Of course the following works.
\begin{proof}[Solution] \end{proof}
But it's quite cumbersome to add this additional [Solution] every time. Is ...
10
votes
1answer
302 views
A problem with thmtools
I updated my TeXLive yesterday and thmtools is being problematic...
Running pdflatex on the following minimal example
\documentclass{article}
\usepackage{thmtools}
\begin{document}
Hello
...
9
votes
3answers
278 views
Numbering theorem-like environments
I would like all my theorem-like environments (theorem, example, etc.) to be numbered but such that the number appears before the environment's name, more or less like this:
1. Theorem
2. Example
...
9
votes
2answers
499 views
Remove the qed symbol of only a proof environment, not everyone else
I have seen several posts on how to remove the qed symbol in a proof, but that affects all proof environments. I would like to know how to remove the qed symbol in a particular proof because I have a ...
9
votes
1answer
2k views
9
votes
5answers
722 views
Is it possible to skip the first line in a theorem environment?
I'm currently writing up some solutions, and I like to rewrite the problem before answering it.
I've set exercise to be a theorem environment, and the code I'm using is
\begin{exercise}
...
9
votes
1answer
456 views
Theorem Name/Numbering in Margin
I have seen the previous discussion on this same issue before (see Theorem name and number in margin, note in text), however this did not resolve anything as clearly as I had hoped.
Basically, I ...
9
votes
3answers
3k views
box around theorem statement
Is there an easy way to put a box around a theorem in LaTeX? For example to state an important theorem.
I tried using page 20 of the ntheorem documentation ...
9
votes
1answer
2k views
How can one cite theorems of references?
I would like to cite the item (iii) of proposition 3 of a reference. How can I do it? Which ways do you suggest?
This is a question not only about LaTeX, but also about style.
One option I have seen ...
9
votes
1answer
1k views
Italic in theorem environment
Consider the following theorem:
\begin{theorem}
If $x=0$, then $xy$ is equal to 0.
\end{theorem}
The first "0" will be typeset in upright typeface and the second one in italic. Including amsthm ...
9
votes
1answer
309 views
How to customise (e.g. make thicker) the end-proof symbol in Beamer?
I would like to change the symbol for the end of proofs (the square) used in Beamer. It is quite thin, not very visible in some colorthemes. How can I have a thicker border and still in the structure ...
9
votes
1answer
2k views
Theorem numbering as chapter.section.subsection.theorem number
This might be a simple question but it's weird that I couldn't find the answer anywhere on the internet.
If I set as
\newtheorem{-}{-}[section]
then I get the numbering as Theorem ...
9
votes
2answers
319 views
How to add theorem number by the \qed mark at the end of proof environment
I use amsthm. All theorem-like environments use a common counter.
As I have some very long proofs I want to add the theorem number to which the proof refers at the end of proof just next to the ...
