New answers tagged theorems
5
votes
Accepted
I cannot \pause in Beamer after defining a \newtheorem
You're getting an error because you are declaring a new theorem twice with the same name, which isn't allowed.
! LaTeX Error: Command \NewThm already defined.
Or name \end... illegal, ...
1
vote
Correct way to remove spaces when adding hooks to environment
Note that this answer contains NO working code.
Caveat emptor ...
First, as you seem to realise, the spacing is not introduced by your use of hooks. To see this, we can use simply
ABC\UseHook{mythm/...
1
vote
How make newtx option theoremfont work with thmtools?
At least with newtx version 1.732, we get slanted text for the body of theorems (but upright parentheses and brackets there) by using option thmslshape (without option theoremfont) together with ...
1
vote
Framing theorem and proof together
I found a solution to this as follows:
Problem 1: Use skipabove and skipbelow arguments of mdframed to set theorem's skipbelow and proof's skipabove to 0pt. This will place the boxes right after each ...
0
votes
Expansion in stored csname of restatable theorem
restatable doesn't perform expansion in its second argument (the label) and you want to expand it. The recent \ExpandArgs facility is your friend.
I made a few changes to the definition of \...
0
votes
Accepted
Expansion in stored csname of restatable theorem
Just use the \edef trick mentioned in this answer.
\documentclass{article}
\usepackage{kantlipsum,amsthm,thmtools}
\newcounter{savedthmcount}
\newcommand{\declaretheoremx}[2][]{
\declaretheorem[#...
-2
votes
Proof environment - line break after the "Proof."
Summarize your proof in one line, and // at the end.
because not everyone wants to read you proof word by word to know what you are saying.
Here's an example:
\documentclass{article}
\usepackage{...
3
votes
Accepted
Setting up a paired counter for exercise / solution theorems
I think one counter and the label-ref mechanism is enough:
\documentclass{article}
\usepackage{amsthm}
\newcounter{exercise}
\counterwithin{exercise}{section}
\NewDocumentEnvironment{exercise}{ m +b }{...
1
vote
Upright brackets in theorem body with bodyfont=\mdseries\itshape?
If you're willing to forgo verbatim material in your theorems, you can process the body of the theorem with embrac's \embrac_replace_brackets:N command.
\documentclass{article}
\usepackage{embrac}
\...
2
votes
Count theorems like Theorem part.chapter.number
I'm not seeing the point of this. When you start a new \part, the chapter number is not reset. So if you have this skeleton
\part{First part}
\chapter{A}
\begin{Thm} text \end{Thm}
\chapter{B}
\begin{...
3
votes
Accepted
Count theorems like Theorem part.chapter.number
Are you looking for the following?
\documentclass{scrreprt}
\usepackage{amsmath,amsthm,thmtools} %thmtools is used to share counters
\declaretheorem[numberwithin=chapter, name=Theorem]{Thm} %print ...
1
vote
Count theorems like Theorem part.chapter.number
The following does the trick:
\renewcommand\theThm{\thepart.\thechapter.\arabic{Thm}}
\makeatletter
\@addtoreset{Thm}{chapter}
\@addtoreset{chapter}{part}
\makeatother
Not sure if this is the ...
1
vote
Tagging theorems as one tags equations
Assuming you don't want this to step the theorem counter, one option is to use thmtools' internal \thmt@suspendcounter command. I've implemented it as the tag key to be used as the optional argument ...
2
votes
Accepted
Making normal brackets inside the theorem environment
The newtx and newpx font packages have a theoremfont option that produces italic text and upright delimiters in the plain style of amsthm. In other settings, the "theorem" font family can be ...
1
vote
Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?
One simple solution:
Copy the definition of subequations from amsmath
... but taking care to make sure you modify \the<counter> for each environment impacted $
\documentclass[12pt]{book}
%\...
0
votes
Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?
After staring at the thmtools code for a long time, I think I see a way to do this. The idea is to temporarily suspend the theorem counters in question (similar to thmtools' continues key), redefining ...
1
vote
Indentation and fonts conflict in theorem environment with amsbook
You can use hooks to change the indent without patching the commands. Here we set \thm@indent to \noindent before every theorem heading (the command \@begintheorem), and as amsbook's proof environment ...
2
votes
Hidden Theorem Style
You can use the comment package to ignore an environment as follows:
\documentclass{article}
\usepackage{amsthm,thmtools}
\usepackage{pifont}
\usepackage{comment}
\declaretheorem[
%style=...
2
votes
Accepted
Theorem numbering after redefining sections
\renewcommand\thetheorem{\arabic{section}.\arabic{theorem}} but that's going to confuse any reader.
0
votes
Label multiply defined warning but I only have one label LNCS template
As David Carlisle wrote, you can just use \autoref on the label for the \repeattheorem, and shouldn't use a separate \label in the theorem statement.
See the following, which should generate the ...
1
vote
Theorem environment : interaction with enumerate/itemize
The question suggests adding a blank first item to the list. Another simple solution is to add a zero width space before the enumerate environment. You could automate this.
\begin{thm}
\hspace{0px} %...
Top 50 recent answers are included
Related Tags
theorems × 1662numbering × 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