24
votes
Accepted
New theorem environment with manual theorem number
Quite easy! ;-) 1
\documentclass{article}
\usepackage{amsthm}
\newtheorem{manualtheoreminner}{Theorem}
\newenvironment{manualtheorem}[1]{%
\renewcommand\themanualtheoreminner{#1}%
\...
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
Why align and equation environment do not tolerate empty lines?
The error message tells exactly why it is problematic:
Paragraph ended before \align was complete.
In standard (La)TeX, an empty line signifies a paragraph break.
Since it does not make sense to ...
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 ...
15
votes
Accepted
Clash between newtxmath and amsthm packages
\openbox is defined by a number of packages
As a quick workaround, you could undefine \openbox before loading amsthm
\documentclass[letterpaper, 10pt, oneside]{book}
\usepackage{XCharter}
\...
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 ...
14
votes
Why align and equation environment do not tolerate empty lines?
By design latex tries to give commands a consistent syntax, the environment syntax in particular here makes it clear what is intended to be in math, and what is not.
However the error message comes ...
12
votes
pdfTeX warning: destination with same identifier has been already used, duplicate ignored (weird behavior)
try
\usepackage[hypertexnames=false]{hyperref}
12
votes
Accepted
texlive 2016 hyperref/cleverref incompatibility
UPDATE
This is fixed in hyperref release 6.83q 2016-06-24
The change to hyperref was to fix this issue
https://github.com/ho-tex/hyperref/issues/11
which I have just re-opened, pointing here.
...
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 ...
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
Do the line breaking algorithms of TeX have a penalty for a QED symbol on a single line?
amsthm defines \qed by
\DeclareRobustCommand{\qed}{%
\ifmmode \mathqed
\else
\leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
\quad\hbox{\qedsymbol}%
\fi
}
so it already assigns ...
10
votes
Accepted
Anti-italic in an Italic Environment
A good idea would be to use enumitem and to define a special environment for “theorem enumerations”, so as to ensure consistency across the document.
documentclass{article}
\usepackage{amsthm}
\...
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
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.
9
votes
Accepted
Stars left to theorem (for exercises)
The main problem is the double optional argument. I suggest using a different syntax in order to distinguish between them.
\documentclass{article}
\usepackage{amsthm,xparse}
\theoremstyle{definition}...
9
votes
Accepted
Reduce font size within all proofs
Welcome! Use \AtBeginEnvironment in your preamble:
\documentclass{article}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\AtBeginEnvironment{proof}{\footnotesize}
\...
9
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{...
8
votes
Accepted
How to start a list right after the heading in a redefined proof environment?
You have two errors:
there should be [...] after \item, whereas you have {...}
\hskip\labelsep should go inside the optional argument
\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
\...
8
votes
Empty proof as standalone
Embedding the proof inside a minipage works:
\documentclass{standalone}
\usepackage{amsthm}
\begin{document}
\begin{minipage}{5cm}
\begin{proof}
\end{proof}
\end{minipage}
\end{document}
7
votes
Problem with numbering theorem by section
Actually I have tried the solution of egreg's, and then find out that you don't need to create the command \spnewtheorem{xx}{XX}[section]
It is the option envcountsect in the svjour3 class that ...
7
votes
Accepted
why does proof use trivlist?
Trivlist handles many things not handled by the simpler version for example
xxx
\begin{proof}
zzz
\end{proof}
xxx
\begin{proof}
zzz
\end{proof}
you need to correctly handle ending the previous ...
7
votes
Accepted
\emph not working well in amsthm's "plain" style using XeLaTeX or LuaLaTeX
This has to do with the redefinition of \em performed by fontspec, which doesn't take into account the context, but only nesting of \em inside \em.
The following workaround should work:
\...
7
votes
Accepted
Dash after theorem number: e.g. Theorem 1'
Use the manualtheorem I gave you in another answer. There is no need that the primed theorem immediately follows the original one; it could also come before it, because we use the \label-\ref ...
7
votes
Accepted
How to obtain non Italic theorem text
The amsthm package provides several "theorem styles". While the default style, also known as the plain style, is programmed to typeset its body in italics, the remark and definition styles employ ...
7
votes
Accepted
How to avoid an hyperref bug (?) in theorems
That is a known problem, but hyperref can't do much here currently (and don't want to) as the problem is in amsthm. See also https://github.com/latex3/hyperref/issues/48
As mentioned in the comment, ...
6
votes
How to use autoref or cleveref when the theorem environments are in the class file?
You can redefine the theorem-like environments after hyperref and cleveref are loaded, using the same scheme in the class.
\documentclass{lmcs}
\usepackage{hyperref}
\usepackage{cleveref}
\...
6
votes
Is there a \renewtheorem equivalent of \renewcommand, using amsthm and not ntheorem?
Reducing @antonio's answer: you can get a more robust result with only the first block of code; instead of a \renewtheorem, one can just as easily use a \cleartheorem as below:
\makeatletter
\def\...
6
votes
Accepted
Reset counter at beginning of proof
There are numerous ways to achieve the desired behavior. A relatively clean (and general) way is to use \AtBeginEnvironment from the etoolbox package to reset the counter associated with your claim ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
amsthm × 701theorems × 267
thmtools × 67
numbering × 61
environments × 54
amsmath × 47
cleveref × 38
spacing × 35
hyperref × 33
cross-referencing × 33
newtheorem × 27
ntheorem × 24
indentation × 22
counters × 22
lists × 19
line-breaking × 17
lyx × 16
macros × 15
math-mode × 14
formatting × 14
vertical-alignment × 14
enumerate × 14
page-breaking × 14
tcolorbox × 14
mdframed × 14