New answers tagged

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
  • 193k
1 vote

Correct way to remove spaces when adding hooks to environment

Note that this answer contains NO working code. Caveat emptor ... First, as you seem to realise, the spacing is not introduced by your use of hooks. To see this, we can use simply ABC\UseHook{mythm/...
cfr's user avatar
  • 193k
1 vote

How make newtx option theoremfont work with thmtools?

At least with newtx version 1.732, we get slanted text for the body of theorems (but upright parentheses and brackets there) by using option thmslshape (without option theoremfont) together with ...
murray's user avatar
  • 7,758
1 vote

Framing theorem and proof together

I found a solution to this as follows: Problem 1: Use skipabove and skipbelow arguments of mdframed to set theorem's skipbelow and proof's skipabove to 0pt. This will place the boxes right after each ...
kaba's user avatar
  • 565
0 votes

Expansion in stored csname of restatable theorem

restatable doesn't perform expansion in its second argument (the label) and you want to expand it. The recent \ExpandArgs facility is your friend. I made a few changes to the definition of \...
egreg's user avatar
  • 1.1m
0 votes
Accepted

Expansion in stored csname of restatable theorem

Just use the \edef trick mentioned in this answer. \documentclass{article} \usepackage{kantlipsum,amsthm,thmtools} \newcounter{savedthmcount} \newcommand{\declaretheoremx}[2][]{ \declaretheorem[#...
mbert's user avatar
  • 3,348
-2 votes

Proof environment - line break after the "Proof."

Summarize your proof in one line, and // at the end. because not everyone wants to read you proof word by word to know what you are saying. Here's an example: \documentclass{article} \usepackage{...
Ziyang Xu's user avatar
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
  • 2,795
1 vote

Upright brackets in theorem body with bodyfont=\mdseries\itshape?

If you're willing to forgo verbatim material in your theorems, you can process the body of the theorem with embrac's \embrac_replace_brackets:N command. \documentclass{article} \usepackage{embrac} \...
mbert's user avatar
  • 3,348
2 votes

Count theorems like Theorem part.chapter.number

I'm not seeing the point of this. When you start a new \part, the chapter number is not reset. So if you have this skeleton \part{First part} \chapter{A} \begin{Thm} text \end{Thm} \chapter{B} \begin{...
egreg's user avatar
  • 1.1m
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
  • 293k
1 vote

Count theorems like Theorem part.chapter.number

The following does the trick: \renewcommand\theThm{\thepart.\thechapter.\arabic{Thm}} \makeatletter \@addtoreset{Thm}{chapter} \@addtoreset{chapter}{part} \makeatother Not sure if this is the ...
Brauer Suzuki's user avatar
1 vote

Tagging theorems as one tags equations

Assuming you don't want this to step the theorem counter, one option is to use thmtools' internal \thmt@suspendcounter command. I've implemented it as the tag key to be used as the optional argument ...
mbert's user avatar
  • 3,348
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
  • 3,348
1 vote

Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?

One simple solution: Copy the definition of subequations from amsmath ... but taking care to make sure you modify \the<counter> for each environment impacted $ \documentclass[12pt]{book} %\...
Willie Wong's user avatar
  • 23.8k
0 votes

Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?

After staring at the thmtools code for a long time, I think I see a way to do this. The idea is to temporarily suspend the theorem counters in question (similar to thmtools' continues key), redefining ...
mbert's user avatar
  • 3,348
1 vote

Indentation and fonts conflict in theorem environment with amsbook

You can use hooks to change the indent without patching the commands. Here we set \thm@indent to \noindent before every theorem heading (the command \@begintheorem), and as amsbook's proof environment ...
mbert's user avatar
  • 3,348
2 votes

Hidden Theorem Style

You can use the comment package to ignore an environment as follows: \documentclass{article} \usepackage{amsthm,thmtools} \usepackage{pifont} \usepackage{comment} \declaretheorem[ %style=...
mbert's user avatar
  • 3,348
2 votes
Accepted

Theorem numbering after redefining sections

\renewcommand\thetheorem{\arabic{section}.\arabic{theorem}} but that's going to confuse any reader.
David Carlisle's user avatar
0 votes

Label multiply defined warning but I only have one label LNCS template

As David Carlisle wrote, you can just use \autoref on the label for the \repeattheorem, and shouldn't use a separate \label in the theorem statement. See the following, which should generate the ...
Willie Wong's user avatar
  • 23.8k
1 vote

Theorem environment : interaction with enumerate/itemize

The question suggests adding a blank first item to the list. Another simple solution is to add a zero width space before the enumerate environment. You could automate this. \begin{thm} \hspace{0px} %...
Steve Mitchell's user avatar

Top 50 recent answers are included