latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
23 stars 5 forks source link

option missing to test if the new footnote code is loaded #63

Open u-fischer opened 4 months ago

u-fischer commented 4 months ago

extracted from #62

If a package or class wants to adapt the footnote marker in the footnote this can be done with the new code like this:

\DocumentMetadata{testphase={new-or}}

\documentclass{article}
\makeatletter
\NewSocketPlug{fntext/mark}{mypackage/mark}{%
   \makebox[2.3em][r]{\@thefnmark.\,\,}}
\AssignSocketPlug{fntext/mark}{mypackage/mark}   
\begin{document}
abc\footnote{Test}

\end{document}

image

But there is an interface missing for a package to test if this code works: \IfDocumentMetadataTF can't be used as it doesn't imply that the new-or code is loaded, testing for active tagging is wrong too, as the code above works also without tagging. Testing that the file is loaded works only temporarly as the code will move. Testing for some internal definition doesn't sound right either ...

FrankMittelbach commented 3 months ago

I'm not so sure there should be an interface in this particular case or if it would be better to simply wait until we move after which the question becomes what LaTeX release is current.

On the other hand, if we want to have some more general interface then perhaps something like \IfSocketExistsTF might help in several such situations, without having something special for each and every update that is moved to sockets and hooks.

u-fischer commented 3 months ago

Yes in the long run, most things can be handled with \IfDocumentMetadataTF + format. But I like the idea of \IfSocketExistsTF. It would help now and not break down when things move (if we don't rename the socket).