View Single Post
Old 03-07-2025, 06:12 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,807
Karma: 6000000
Join Date: Nov 2009
Device: many
That Sigil ignores that namespace makes no sense. Adding the mathml namespace prefix "math" to the html tag and then using that prefix "math" for each math tag in the file (ie. each tag becomes math:math) should work. That is what namespace prefixes are for.

More importantly though math tags do NOT need a prefix at all under the html5 xhtml variant used for epub3 according to the spec. The math tag and its contents is autorecognized as a foreign tag (just like the svg tag) and modern parsers should understand it just fine without the need for declaring any namespace prefix for it.

Have you tried without any specific namespace prefix defined for mathml at all?

I wonder if this is a limitation of Qt6's webengine's new built in mathml support in some way?

Update: It is not. To test with Sigil I opened an epub full of mathml and did a global find and replace to remove all of the math tag namespace declarations that said no prefix needed:

ie:
xmlns="http://www.w3.org/1998/Math/MathML"

and made sure no mathml prefix namespace was defined on the html tag.

And sure enough no parsing errors or problems at all. All equations looked as expected.

So no math namespace prefix need be defined and no xmlns="http://www.w3.org/1998/Math/MathML" need be added to math tags as it is properly namespaced by the parser under the html5 xhtml variant used by epubs and by browser engines.

Not sure what problems you are seeing under Sigil.

Last edited by KevinH; 03-07-2025 at 06:31 PM.
KevinH is online now   Reply With Quote