OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office] Enable MathML for browsers


hi Regina,

On 08.10.19 13:56, Regina Henschel wrote:
Hi all,

from https://www.mathjax.org/#gettingstarted

is the tip to include the following lines in the HTML code

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6";></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";></script>

For XHTML you need a little change, because attributes without values are not possible:

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6";></script> <script id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";></script>

I have put it before the </head> tag. Then indeed Google Chrome and Microsoft Edge render MathML. I cannot set Internet Explorer 11 to use script, so for Internet Explorer it does not work for me. I have no environment to test Safari.

that's great, i think this is by far the simplest fix here.


The XTML filter in LibreOffice generates the attribute display="block" in the <math> element. I think, that should be changed to display="inline".

this is actually already in the flat-ODT that is the input to the XHTML filter.

i've got a hack to export XHTML with formulas as images ... at first i thought it's just a 1 line tweak to the XSLT, but then it turned out the image i got was a horrible StarView MetaFile, which has even poorer support in browsers than MathML :(

i was able to get it to write a PNG in addition, but of course this requires C++ changes...

images also have the problem that they have poor accessibility compared to MathML (presumably), so if we can keep the MathML with the MathJax polyfill then i'm all for it.

regards,

Âmichael

--

Michael Stahl
Senior Software-Entwickler LibreOffice
âââ
CIB software GmbH
GeschÃftsstelle Hamburg
Flachsland 10
22083 Hamburg
âââ
T +49 (40) / 28 48 42 -296
F +49 (40) / 28 48 42 -100
Michael.Stahl@cib.de
www.cib.de
âââ
Sitz: MÃnchen
Registergericht MÃnchen, HRB 123286
GeschÃftsfÃhrer: Dipl.-Ing. Ulrich Brandner



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]