PDF math tagging and TeX4ht #1019
-
Brief outline of the bugI've tried the new development version of LaTeX with the support for tagging of math. It seems that it clashes with math redefinitions of TeX4ht. I've got bunch of errors, and the resulting HTML doesn't display math correctly. If I remove the
Minimal example showing the bug\RequirePackage{latexbug}
\DocumentMetadata{testphase={phase-III,math}}
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\section{Does section work?}
\[
a = \frac{b^2}{\sqrt{c}}
\]
\end{document} To compile with Make:htlatex {htlatex = "latex-dev"} Compile using:
Log file (required) and possibly PDF fileThis is the resulting HTML (notice missing fraction): |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That is not really surprising, is it (at this stage at least)? I'm not quite sure what you expect, but With respect to the math tagging, this loads amsmath as part of the setup, but somehow your additional code manages to move in before that so that the primitive
As a result the saved version As I said in the announcement and in ltnews37, this is a prototype that is expected to work with basic documents conforming to what is described in Lamport's manual ... anything else is a plus, but adding packages that overwrite internals are most likely not going to work at all (unless they account for the new setup (which obviously they can't at this stage). And clearly, that is what happens as part of make4ht. So this is not a bug of the prototype and I'm going to move this over to discussions for now. |
Beta Was this translation helpful? Give feedback.
-
The PDF management is enabled if you use only The interesting stuff begins if you load additional/new code with the testphase key (or if this code moves later into the kernel). This new code does basically two things:
It is easy to deactivate tagging (or not activate it) if tex4ht is detected and that would avoid your error, but it is also possible that tex4ht can actually make use of the tagging commands. After all the A larger problem are the redefinitions: the changes here ranges from (currently) small changes which only adding some tagging commands to complete rewrites, e.g lists have been reimplemented with xtemplate. These changes are not only for tagging but also add new functionality, extend the optional arguments, or add better support for hyperlinks. It would naturally be possible for tex4ht to suppress all these redefinitions and to stick to "legacy" LaTeX, but imho in the long run users will want to use the improved interfaces with tex4ht too, so it would be better if tex4ht would work with the new definitions too. |
Beta Was this translation helpful? Give feedback.
The PDF management is enabled if you use only
\DocumentMetadata{}
and there should normally be no problem with make4ht (your example works fine) as it basically only adds some pdf related tools and xmp metadata.The interesting stuff begins if you load additional/new code with the testphase key (or if this code moves later into the kernel). This new code does basically two things:
It is easy to deactivate tagging (or not activate it) if tex4ht is detected and that would avoid your error, but it is also possible that tex4ht can actually ma…