Skip to main content
7 votes
Accepted

Wrong theorem enumeration: "Theorem Appendix A.1"

That class does some interesting things with \appendix: \newcommand\appendix{\par \refstepcounter{appendix} \setcounter{section}{0}% \renewcommand\thesection{\appendixname\ \Alph{section}} ...
daleif's user avatar
  • 55.2k
6 votes
Accepted

Remove the dot after a specific theorem environment

I'm not sure why you wouldn't want the period in definitions. I see no reason for breaking the uniformity. Anyway, the correct way is to define suitable theorem styles. \documentclass{article} \...
egreg's user avatar
  • 1.1m
6 votes
Accepted

How to add a "qed square" at the end of a definition?

If you're submitting to a conference, you shouldn't try to modify their standard. Anyway, here's how you can do. \documentclass[acmtog,anonymous,review]{acmart} \AtEndPreamble{% \theoremstyle{...
egreg's user avatar
  • 1.1m
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, ...
cfr's user avatar
  • 208k
5 votes
Accepted

The action of \normalfont and \textit in the theorem heading

Question 1. No, it's not the recommended way. Question 2. In the plain theorem style (that's used by default), the label is boldface (from \bfseries). If you do {\normalfont\textit{Remark 1}} you get ...
egreg's user avatar
  • 1.1m
5 votes
Accepted

Problem with unnumbered theorem

Probably what you want: \documentclass[openany]{book} \usepackage[T1]{fontenc} \usepackage{amsmath,amsthm} \usepackage[vvarbb,ebgaramond,smallerops]{newtx} \usepackage{tikz-cd} \usetikzlibrary{...
cfr's user avatar
  • 208k
5 votes

How can I change the numbering of a lemma in Appendix?

(updated answer after the OP revealed that the elsarticle document class is in use) The elsarticle document class is known to redefine the \thesection macro in a rather faulty way when \appendix is ...
Mico's user avatar
  • 514k
4 votes
Accepted

QED box after equation inside lemma

You can define a wrapper environment noproof for statements that don't need a proof. You still need \qedhere if the statement ends with a display. You can use it with lemmas, propositions and even ...
egreg's user avatar
  • 1.1m
4 votes

LNCS proceedings template Command \proof already defined

The llncs class has its own way to define theorem-like environments and doesn't like to be called together with amsmath. It already defines a proof environment, namely \spnewtheorem*{proof}{Proof}{\...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Too much space between the math expression and the symbol at the end of a statment of theorem, remark etc

You want \qedhere for the cases when the QED symbol has to appear in a math display or at the end of a list (enumerate or itemize). However, you mustn't use $$: see Why is \[ ... \] preferable to $$ .....
egreg's user avatar
  • 1.1m
4 votes
Accepted

Change title of theorem in beamer

Behind the scenes, beamer uses the amsthm package to create theorems. This means you can use \newtheorem{assumption}{Assumption} to create a new theorem-like environment yourself: \documentclass[...
samcarter_is_at_topanswers.xyz's user avatar
3 votes
Accepted

How do we get Theorem environments without dot after the number?

You find the default parameters at https://tex.stackexchange.com/a/17555/4427 \newtheoremstyle{plain} {\topsep} % ABOVESPACE {\topsep} % BELOWSPACE {\itshape} % BODYFONT {0pt} % ...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Long url doesn’t break in theorem optional argument (under amsthm, hyperref, xurl)

The problem is that the url is math. The theorem code stores the optional argument in a box that it then unwraps later but TeX performs some optimization in this case and omits the implicite penalties....
Ulrike Fischer's user avatar
3 votes

Long url doesn’t break in theorem optional argument (under amsthm, hyperref, xurl)

You are under no obligation to use the optional argument of the theorem environment to place the URL string. This approach will have to be modified if the URL string contains certain TeX-special ...
Mico's user avatar
  • 514k
3 votes
Accepted

Different numeration for Theorems

Don't do \large at the beginning of the document Don't use preambles handed out by somebody Don't pile up preambles Why 1? Because it's wrong. Use the 12pt option instead. Why 2? Because most of the ...
egreg's user avatar
  • 1.1m
3 votes

QED box after equation inside lemma

You can use thmtools to define a qedlemma environment that always ends with a qed symbol, then use \qedhere inside the equation*. \documentclass{amsart} \usepackage{thmtools} \declaretheorem{lemma} \...
mbert's user avatar
  • 4,506
3 votes
Accepted

Counter of corollary updated both after theorems and lemmas

Assuming your code loads the amsthm or ntheorem package, I suggest you create two corollary-like environments: corrt and corrl, to be used for corollaries associated with theorems and lemmas, ...
Mico's user avatar
  • 514k
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 ...
Zarko's user avatar
  • 300k
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 }{...
Stephen's user avatar
  • 4,454
3 votes
Accepted

Appropriate parenthesizing of theorem title

Main problem: \label must go after the entire theorem header specification. There is no sensible way to support the syntax you seem to want that doesn't really make sense. Moreover \em doesn't take ...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Definition content first characters skipping to numbering box

The syntax of your definition is \begin{Definition}{Insert the title here}{label} ... \end{Definition} If you want a definition without title, you can leave the {} empty, but you cannot write the ...
samcarter_is_at_topanswers.xyz's user avatar
3 votes

How to add a "qed square" at the end of a definition?

I understood your question to mean that you want theorems, definitions, and remarks to all have of the same styling. In that case, I'll answer your questions out of order: How I add a new "...
bonk's user avatar
  • 875
3 votes
Accepted

Restatable theorem with difference in line breaks

You can make a new command \IfRestatedTF{<true code>}{<false code>} using the thmtools conditional \ifthmt@thisistheone. \documentclass{article} \usepackage{amsmath} \usepackage{thm-...
mbert's user avatar
  • 4,506
3 votes
Accepted

How to get 1.1 Definition of X

Here I leave out all details. You don't need \swapnumbers nor to patch \swappednumbers, because you fix the formatting in the theorem style. \documentclass{article} \usepackage{amsthm} \...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Number a theorem with subsection-number. thm-number, without chapter number

You can do it similar to https://tex.stackexchange.com/a/16283/277964, but add, e.g., \arabic{section}. before the theorem counter: \documentclass{report} \usepackage{amsthm} \newtheorem{theorem}{...
cabohah's user avatar
  • 14k
3 votes
Accepted

How can I get the title in tcolorbox partly framed and not framed?

tcolorbox has the IfEmptyTF key which you can use to check if the title is empty or not instead of manually setting the counters, use the auto counter,number within=chapter option to automatically ...
samcarter_is_at_topanswers.xyz's user avatar
3 votes

Reducing the gap in the Lemma environment with enumerate

It's easiest to just set the first element manually, then start an enumerate from 2 (using the optional argument supplied by enumitem. \documentclass{article} \usepackage{amsthm} \newtheorem{lemma}{...
Werner's user avatar
  • 607k
3 votes
Accepted

How to create a theorem box with multiple layers instead of just two

Here is an implementation modeled on that of the tabulars* and tabulars keys of tcolorbox and using nicematrix to make the colored table. The syntax is \begin{example} <text> \tcblower <table ...
mbert's user avatar
  • 4,506
2 votes

Prefixing theorem numbering with letter

Following Bernard's comment: \documentclass{article} \usepackage{amsthm} \newtheorem{corollary}{Corollary} \renewcommand{\thecorollary}{C.\arabic{corollary}} \begin{document} \begin{corollary} \...
mbert's user avatar
  • 4,506
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 ...
mbert's user avatar
  • 4,506

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