## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Monospaced Font Show Text Part by Default Condense Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Sender: Mailing list for the LaTeX3 project <[log in to unmask]> Date: Tue, 28 Jul 2020 16:58:16 +0200 Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]> MIME-Version: 1.0 Message-ID: <[log in to unmask]> In-Reply-To: <[log in to unmask]> Content-Type: text/plain; charset="UTF-8" From: Michal Hoftich <[log in to unmask]> Parts/Attachments: text/plain (61 lines) Hi Franks, thank you for your suggestions and fixes. It seems that it works correctly. > But basically the main issue is that in the old LaTeX \document started > out with \endgroup to cancel the \begingroup issued by \begin > > As \begin now offers hooks this \endgroup has moved into \begin to avoid > that the hook code is not canceled by the end of the group. > > The second issue is that the tex4ht calls \begin{document} inside > \begin{document} again. There is also a call to \end{document} inside > \document which doesn't do much other than breaking now. > > Furthermore LaTeX's enddocument hook is directly modified (and not > through \AtEndDocument and that fails because it is below the official > interfaces. > > %FMi close the group started by \begin{document} on second call > % \let\document\o:document > \def\document{\endgroup\o:document}% Yes, this works for now, thank you. > So without correcting/updating the redefinitions for \begin \end it has > to be > > \AddToHook{enddocument} > {\HtmlEnv\Configure{newpage}{}} > \AddToHook{enddocument/afterlastpage} > {\at:docend \csname export:hook\endcsname} > > > ------------------ > > with that everything seems to be working. > This results in missing HTML footer in the last generated HTML file. Fortunately, \AddToHook{enddocument}      {\HtmlEnv\Configure{newpage}{}\at:docend \csname export:hook\endcsname} works. > However, a lot of the lowlevel patching code inside tex4ht seems to be > only necessary because environment hooks are not available, so after > adjusting \begin and \end to use the kernel definitions it should be > possible to simplify a lot by simply using appropriate "env/foo/before" > and "env/foo/after" hooks. I hope it will be relatively easy to adapt our environment patching routine to the new LaTeX hook system. It should definitely simplify lot of the low-level code. Thanks again for all your comments and code. Michal