[tex4ht] [bug #340] Math issues in the ODF export

William F Hammond hammond at csc.albany.edu
Wed Nov 23 19:47:40 CET 2016


Greetings Karl and Michal,

Michal Hoftich <michal.h21 at gmail.com> writes:

> Follow-up Comment #5, bug #340 (project tex4ht):
>
> I've just found that LO can read mathml files without
> prefix, I must had done some mistake previously when it
> didn't work. The issue with prefix-less mathml is that
> processing with xtpipes don't work.

For MathML I think it's better -- and sometimes more
inter-operable -- simply to insert the full MathML namespace
via the xmlns attribute in each <math> element and avoid
prefixing altogether.  Of course, if inside a <math> element
you want to insert something that is not MathML, that (a) is
probably going to cause a problem somewhere and (b) would
require either prefixing or inserting an xmlns attribute on
each external subelement.

With HTML5 (as text/html) using prefixes will cause
breakage.  Using an xmlns attribute on a <math> element in
HTML5 is unnecessary but should go as unrecognized and be
ignored by web browsers.  It is helpful when one wants the
code to work for both the text/html and the
application/xhtml+xml serializations of HTML5.  I'm guessing
that this technique would be good for xtpipes.

> I've also found interesting thread [1], where odt export
> from tex4ht is discussed. It seems that at least 7 years
> ago improving bugs in mathml import wasn't important for
> OO devs (I totally understand that they didn't had enough
> developers, moreover developers who understand mathml).
> ...

And, alas, failing to include presentation mathml in the
html namespace was a way to make support of mathml in web
browsers have secondary importance.  There are problems in
browser handling of HTML5 that result from having MathML be
external.  For example, a comma following an inline <math>
element may wind up on the following line, whereas a comma
following an (inline) <em> element will not.

                                    -- Bill



More information about the tex4ht mailing list