Open mbertucci47 opened 10 months ago
A glance at the thm-restate
code shows the issue is with the true branch of \ifthmt@thisistheone
. A further glance shows the issue is in \thmt@rst@storecounters
, called on line 119. I don't really know what I'm talking about but I think the \label{thmt@@#1@data}
is inserting a "whatsit" that's adding the undesired space. If I comment it the space goes away
This TeXSE question shows how to fix this if hyperref is loaded. Redefining \thmt@rst@storecounters
as
\def\thmt@rst@storecounters#1{%
\bgroup
\def\@currentlabel{}%
\@for\thmt@ctr:=\thmt@innercounters\do{%
\thmt@sanitizethe{\thmt@ctr}%
\protected@edef\@currentlabel{%
\@currentlabel
\protect\def\@xa\protect\csname the\thmt@ctr\endcsname{%
\csname the\thmt@ctr\endcsname}%
\ifcsname theH\thmt@ctr\endcsname
\protect\def\@xa\protect\csname theH\thmt@ctr\endcsname{%
(restate \protect\theHthmt@dummyctr)\csname theH\thmt@ctr\endcsname}%
\fi
\protect\setcounter{\thmt@ctr}{\number\csname c@\thmt@ctr\endcsname}%
}%
}%
\Hy@SaveLastskip
\label{thmt@@#1@data}%
\Hy@RestoreLastskip
\egroup
}%
seems to work. Maybe thmtools can define its own versions of \Hy@SaveLastskip
and \Hy@RestoreLastskip
?
The theorem printed by the
restatable
has extra vertical space above it. The same goes for the restated theorem from arestatable*
(but not therestatable*
itself). There is no issue with the restated theorems from arestatable
environment or theorems using therestate
key. Here's an example:Apologies for the length; I wanted to show all possible behaviors with normal theorems interspersed. The space above the
restatable
environment theorem and the restated\blub
is too big.