Open gusbrs opened 3 weeks ago
Yes changing the order helps.
But generally I think zref-titleref is (now) flawed. Instead of using its own command to store the title (\zref@titleref@current
) and patching lots of external commands so that they update the title info it should use \@currentlabelname
and make use of nameref. That would mean it would also support the growing number of packages and classes where commands set \@currentlabelname
directly.
But generally I think zref-titleref is (now) flawed. Instead of using its own command to store the title (
\zref@titleref@current
) and patching lots of external commands so that they update the title info it should use\@currentlabelname
and make use of nameref. That would mean it would also support the growing number of packages and classes where commands set\@currentlabelname
directly.
I can only concur. That would be awesome, of course. ;-)
An idea, in the spirit of "the least possible fuss": provide a zref-nameref
module which simply does:
\zref@newprop{name}{\@currentlabelname}
\zref@addprop\ZREF@mainlist{name}
Since \@currentlabelname
is ensured by the kernel anyway nowadays, this is safe regardless of the presence of nameref
. If nameref
is loaded, it should just work, shouldn't it?
And not much to worry also if anyone around is relying on specific stuff from zref-titleref
.
Currently, the
subcaption
package seems to defeatzref-titleref
for the caption names:Produces the labels:
Edit: Changing the respective load order changes the above results. If there are consequences of doing so for
subcaption
functionality, I don't know. If this indeed just a "load order issue", perhaps documenting it in the manual would be useful.Edit 2: As far as I can tell from just reading code, this seems to be a load order issue. Also:
\@caption
is coming fromcaption
which is loaded bysubcaption
.zref-titleref
it seems to expect to be loaded very late in general, not just for this particular interaction. If the above diagnostics are correct, again, a mention in the docs would be welcome. And just that would be sufficient.