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 ...
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 ...
6
votes
Accepted
Proof environment produces "Proof Proof: ..." only when thmbox is used
Yes, it's a bug in thmtools, as far as I can see. However, the proof environment, as defined by thmbox, is not really what I'd like to use. You can reinstate the one by amsthm in the following way.
\...
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 ...
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 ...
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 ->\...
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=...
5
votes
Accepted
Custom QED Alignment with thmtools
You need to use \[...\] for your display math which sets \qedhere at the location you want. For the text-related adjustment, we redefine \qed to not include the \hfill:
\documentclass{article}
\...
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 ...
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[...
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 ...
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,
...
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{...
4
votes
Accepted
How to use cleveref names as theorem names with thmtools
Chicken or egg? ;-)
\cref@theorem@name is not yet defined when \newtheorem is issued. Solution: use \noexpand.
\documentclass[italian]{article}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\...
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}
\...
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=\...
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=.,
...
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}
\...
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 ...
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 ...
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=*,
]
\...
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,...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
thmtools × 279theorems × 113
amsthm × 67
mdframed × 22
cleveref × 20
cross-referencing × 19
spacing × 16
hyperref × 16
numbering × 15
table-of-contents × 13
environments × 12
tcolorbox × 10
page-breaking × 9
ntheorem × 9
errors × 7
amsmath × 7
parskip × 7
beamer × 6
lists × 6
indentation × 6
thmbox × 6
incompatibility × 5
color × 4
footnotes × 4
memoir × 4