Hello Michal, > We will need to make some changes to TeX4ht sources to support the metadata > block used before \documentclass, because TeX4ht is inactive at that moment, > so it doesn't track loaded files. It caused problems with my tests, namely > because it loaded the Amsmath package. There can be potentially much more > problems.
while there certainly can/will be problems, this error here seems to be unrelated to \DocumentMetadata. I get an error with make4ht also for this: \documentclass{article} \AddToHook{begindocument/before}{\RequirePackage{amsmath}} \begin{document} abc \end{document} Ulrike