Skip to main content
25 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}% \...
egreg's user avatar
  • 1.1m
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 ...
Paul Gessler's user avatar
  • 29.8k
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} \...
samcarter_is_at_topanswers.xyz's user avatar
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 ...
David Carlisle'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

pdfTeX warning: destination with same identifier has been already used, duplicate ignored (weird behavior)

try \usepackage[hypertexnames=false]{hyperref}
Zhenyao Sun's user avatar
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. ...
David Carlisle'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

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
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

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 ...
David Carlisle's user avatar
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} \...
egreg's user avatar
  • 1.1m
10 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} \...
Bernard's user avatar
  • 273k
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}...
egreg's user avatar
  • 1.1m
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}
frougon's user avatar
  • 24.4k
8 votes
Accepted

`section` is reset upon changing a chapter?

The AMS documentation is not taking in to account a 2015 improvement in \stepcounter the latex format sources (ltcounts.dtx) say: % \changes{v1.1h}{2015/01/10}{Reset all within counters in one go (...
David Carlisle's user avatar
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: \...
egreg's user avatar
  • 1.1m
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 ...
David Carlisle's user avatar
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 ...
egreg's user avatar
  • 1.1m
7 votes
Accepted

Avoid linebreak when starting “proof” environment with “align” environment

I suggest you use an {aligned} environment with a [t] positioning specifier. \documentclass{article} \usepackage{amssymb,amsmath,amsthm} \theoremstyle{plain} \newtheorem{theorem}{Theorem} \begin{...
Mico's user avatar
  • 515k
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 ...
Mico's user avatar
  • 515k
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, ...
Ulrike Fischer's user avatar
6 votes

No indentation after theorem environment with amsthm

You can fix this on a single theorem type basis by patching \end<name>: \documentclass{article} \usepackage{etoolbox} \usepackage{amsthm} \newtheoremstyle{abcd}% name {}% Space above, ...
egreg's user avatar
  • 1.1m
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\...
oricha's user avatar
  • 321
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} \...
egreg's user avatar
  • 1.1m
6 votes
Accepted

QED symbol after statements without proof

First let me show an example where \null\hfill\qedsymbol doesn't do the right thing. Note that adding \null\hfill\qedsymbol explicitly is the same as doing it with \AtEndEnvironment, with the only ...
egreg's user avatar
  • 1.1m
6 votes
Accepted

\verb in theorem environment option

You don't want to use \verb for this, because it can never go in the argument to another command. It's better to define a proper command for such objects. Here's a possibility (\detokenize is used for ...
egreg's user avatar
  • 1.1m
6 votes
Accepted

Avoid parentheses around optional header material in theorem environment for ams style?

\defbeamertemplate{theorem begin}{ams style} is defined in beamerbaseauxtemplates.sty, ll. 771. To remove the parenthesis: \documentclass{beamer} \setbeamertemplate{theorems}[ams style] \newtheorem{...
samcarter_is_at_topanswers.xyz's user avatar
6 votes

thmtools: Footnotes in theorem names and notes

Of course, after carefully phrasing a question and preparing a MWE, I figured out how to achieve the desired result. This seems to be the common problem of a fragile command in a moving argument and ...
Christoph's user avatar
  • 678

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