Skip to main content
10 votes
Accepted

"Extra \else" error when combining breqn, thm-restate, and cleveref

Wow, that's a nice finding (if you can call it that). . . The order doesn't matter, but all three packages play a role in this (though cleveref is innocent). First, breqn redefines ...
Phelype Oleinik's user avatar
8 votes
Accepted

Latest update of Oberdiek package: \declaretheoremstyle not working anymore

As part of The Big Oberdiek Split™, the kvsetkeys package (loaded by thmtools) was removed from the Oberdiek bundle, and the etexcmds package was removed from kvsetkeys (probably because its ...
Phelype Oleinik'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
6 votes

Latest update of Oberdiek package: \declaretheoremstyle not working anymore

I uploaded a fixed version to CTAN that takes the dependency out, but it will take a couple of days to arrive. I don't consider myself the maintainer of the package though ... so anyone really ...
Frank Mittelbach's user avatar
6 votes

thmtools - Theorem does not change the title when I change the command that defines it

A complement to Schrödinger's cat fine answer. Try and comment out the definition of \testTitle. When you run LaTeX over the example, you'll receive ! Undefined control sequence. \thmt@thmname ->\...
egreg's user avatar
  • 1.1m
6 votes
Accepted

How to increase space above & below \tcolorboxenvironment for theorems?

The space above and below the tcolorbox can be controlled with before skip and after skip, for instance: \tcolorboxenvironment{theorem}{ colback=mythmback,coltitle=blue,colframe=mythmback, left=...
frougon's user avatar
  • 24.4k
5 votes
Accepted

Variable headpunct for theorem styles (using thmtools)

Here is a possible solution. I'm using thmtools' postheadhook key and enumitem's before* key, along with \everypar, to test whether there is a list environment at the start of a theorem and act ...
Circumscribe's user avatar
  • 10.9k
5 votes
Accepted

Styling amsthm theorem using thmtools

I propose this code entirely based on thmtools and the leftbar environment from the framed package: \pdfminorversion=7 \documentclass[a4paper, 12pt]{article} \usepackage[utf8]{inputenc} \usepackage[...
Bernard's user avatar
  • 273k
5 votes

Restate theorem without final sentence

\IfRestatementTF{<true>}{<false>} will leave <true> when it's used in a restatement, and <false> otherwise. Be careful to only use it in thmtools-defined theorems, since its ...
muzimuzhi Z's user avatar
5 votes
Accepted

Avoid a theorem environment's head to be the last line in a page

You can tell theorem that it should use \needspace{3\baselineskip}. \documentclass{book} \usepackage{amsthm,thmtools,needspace} \declaretheoremstyle[ headfont=\normalfont\bfseries, ...
egreg's user avatar
  • 1.1m
5 votes

parskip clashes with thmbox of thmtools

thmbox initializes the value of option leftmargin to \parindent. Thus if thmbox is loaded after parskip, leftmargin is set to 0pt and the problem reproduces: \documentclass[12pt]{article} \usepackage{...
muzimuzhi Z's user avatar
5 votes
Accepted

How unslant (emph) some text in a newtx theorem?

You basically can't. The slanted theorem font has \DeclareFontFamily{OT1}{ntxth-tlf}{\ntx@spacing} \DeclareFontShape{OT1}{ntxth-tlf}{m}{it}{<-> \ntx@scaled ntxth-\ntx@thrmshape-tlf-ot1}{} \...
egreg's user avatar
  • 1.1m
4 votes

Referencing named tcbtheorems

Credits go to Christian Hupfer for solving the requests in his answer. I can add a shorter way to implement Christians solution: \documentclass{article} \usepackage{nameref} \usepackage{hyperref} \...
Thomas F. Sturm's user avatar
4 votes

Total count of Theorem like environments - In all chapters

Declare a new total counter allprobs \newtotcounter{allprobs} and increment it each time you use the theorem by adding the following option to \declaretheorem: \declaretheorem[...,postheadhook=\...
gernot's user avatar
  • 50k
4 votes
Accepted

How remove space before optional argument in custom theorem-like environment?

You can use headformat: \documentclass[12pt]{article} \usepackage{amsthm} \usepackage{thmtools} \usepackage{lipsum} \makeatletter \declaretheoremstyle[ headfont=\sffamily\bfseries, headpunct=., ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

How make first letter upper-case in list of theorems?

Use \protect\makefirstuc, but in the definition of \ll@theorem: \documentclass{article} \usepackage{suffix} \usepackage{textcase} \usepackage{amsthm} \usepackage{thmtools} \usepackage{mfirstuc} \...
egreg's user avatar
  • 1.1m
4 votes
Accepted

List restated theorems only once

The restatable theorems in thmtools first do a generic theorem definition which contains all the information about that theorem, and then just use that definition. The way it distinguishes the main ...
Phelype Oleinik's user avatar
4 votes
Accepted

Some links disappear with \tcolorboxenvironment for theorem-like environments

The problem is typically caused by an overfull first box for breakable tcolorboxes. It is described by https://github.com/T-F-S/tcolorbox/issues/34. Unfortunately, I cannot do very much from side of ...
Thomas F. Sturm's user avatar
4 votes
Accepted

New environment with a glyph before its head

You can use headformat: \documentclass{book} \usepackage{fontspec} \usepackage{amsmath,amsthm,amssymb,thmtools} \newfontfamily{\miscsymbols}{Symbola}[ UprightFont=*, BoldFont=*, ] \...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Creating a solution label for an exercise using \declaretheoremstyle

An xsim attempt, based on the "Example 5: Crossreferencing between problems and answers" shown in package manual. \documentclass{article} \usepackage{amssymb} \usepackage{xsim,lipsum,...
muzimuzhi Z's user avatar
4 votes

Something went wrong when using `\declaretheoremstyle` and `\declaretheorem` in LaTeX 3

This is one of the rare instances where the error message Missing number, treated as zero. is not misleading. In fact, postheadspace has to be number but you set it to {}. From the thmtools ...
Henri Menke's user avatar
4 votes

Restate theorem without final sentence

Define a command \proofinappendix, that you can redefine when \appendix starts. \documentclass{article} \usepackage{amsthm,thmtools} \declaretheorem[name=Theorem]{thm} \newcommand{\proofinappendix}{%...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Define a thmtools theorem in beamer

You can use the notheorems option to prevent beamer from defining them (and if you are at it, remove the twoside option. It makes absolutely no sense with beamer). % !TEX TS-program = xelatex \...
samcarter_is_at_topanswers.xyz's user avatar
4 votes

How unslant (emph) some text in a newtx theorem?

Is this what you want? \documentclass{article} \usepackage{amsthm} \usepackage[trueslanted]{newtx} % <-- added option \usepackage{thmtools} \swapnumbers % see newtexdoc.pdf, page 12, end of ...
Sigur's user avatar
  • 37.5k
3 votes
Accepted

Why does thmtools not apply multiple theorem filters in \listoftheorems?

You should avoid spaces in the options to show: \listoftheorems[ignoreall, show={lemmathm,propositionthm,corollarythm,theoremthm}] By the way, you should use \cleardoublepage before the \...
egreg's user avatar
  • 1.1m

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