Open Udi-Fogiel opened 2 months ago
Alternatively, the creation of \thmt@contentsline
(line 229) can be deferred until \contentsline
is locally redefined in \listoftheorems
(line 86-88), thus patching order requirement is reduced as far as possible.
https://github.com/muzimuzhi/thmtools/blob/ced87d57f0ce3e4cf37de9c1d87ecf7266b9fd19/source/thm-listof.dtx#L80-L88
https://github.com/muzimuzhi/thmtools/blob/ced87d57f0ce3e4cf37de9c1d87ecf7266b9fd19/source/thm-listof.dtx#L223-L230
What do you think?
That would probably be safer, indeed.
consider the following example
Notice how the words are written from left to right. This is because
bidi
patches\contentsline
at thebegindocument
hook (because of hyperref), and sincebidi
must be loaded late,thmtools
saves the wrong definition of\contentsline
in\thmt@contentsline
. It can be solved by declaring a hook rule.