Hi Regina, Thank you very much for the prompt reply - this is indeed very helpful. I was also testing with v25.2, but on Ubuntu.
Most importantly, it appears there are good workflows for MathML interoperability that are in active use. That is great to see. I will do some more reading of the resources you referenced, and some more experimenting, but am already encouraged! Greetings, Deyan On Thu, Aug 14, 2025 at 5:48 PM Regina Henschel <[email protected]> wrote: > Hi Deyan, > > Deyan Ginev schrieb am 14.08.2025 um 21:52: > > Hello everyone, > > > > In our W3C meeting today a question was raised if new versions of > > LibreOffice have made any updates to the MathML workflows, and what may > be > > the recommendations for productive use. > > > > We may need more details if there is a specific concern, but testing with > > v25.2 Writer, it seems possible to > > > > 1. create math via Insert / OLE object / Formula object > > LibreOffice uses "OLE object" not only in Writer but in Calc, Draw, and > Impress as well. The editing is "in place". Not all UI options are > available in this mode. To get the full set of options use the Math > module directly, in start center on left side "Math Formula", or from > menu File > New > Formula. The saved result can then be inserted in > other documents via Insert > OLE > from file. > > > 2. export to MathML, via File / Export / type XHTML (.html;.xhtml) > > In module Math you can save in OpenDocument Format Formula (*.odf) or > save as standalone MathML 2.0 (*.mml). > > The export to XHTML uses an XSL-transformation. > > > > > I did not succeed in getting the following import recipe work: > > 3. File / New / Formula then Tools / Import MathML from Clipboard > > What do you have in the Clipboard and what version of LibreOffice do you > use? Best is, if the clipboard contains a standalone MathML including > the <?xml ...?> prolog. The current LibreOffice versions import as well, > if the clipboard starts with the <math> element. But it must contain the > xmlns="http://www.w3.org/1998/Math/MathML" attribute. > > > > > Which appears to not lead to any behavior after copying some MathML. I > got > > the same lack of change when I ran "Tools / Import Formula..." from a > file. > > In which LibreOffice version do you try it? It works here without > problems in LibreOffice 25.2.5.2 on Windows 11. You find the version > info in menu Help > About. Click on the button there to put the info > into Clipboard. You can import a standalone MathML *.mml file, an > OpenDocument Format *.odf file or the formula files that where created > by OpenOffice.org 1.0 (*.sxm). > > > > > I was also wondering why the "File / Send / Create HTML Document" path > > creates images for the formulas rather than MathML, which seems different > > than the Export path. > > Saving to HTML uses very old code and is no longer active maintained. It > uses images because the native support for MathML by browsers was not > given at that time. > > > > > Are there workflows that I am missing? > > The workflow for using "Math Formula" in text document needs additional > considerations in regard the fact, that the formula is a shape object. > That is, how it is anchored, or how the text wraps around the object, or > its vertical position relative to the surrounding text, for example. > > When a formula is embedded in a document, you need to consider the font > size of the surrounding text. In a presentation you likely need a larger > size then in a text document. You can adapt the font size that is used > inside the formula via Format > Font Size. But that is not > interoperable, because the size is stored in the settings of the OLE > object and not directly in the MathML markup. For better > interoperability you should set the font size directly inside the > formula via the size attribute. Then you get a <mstyle mathsize="..."> > element in the markup. > > It is possible to have Math objects as AutoText. An example is included > in LibreOffice as "Formula Numbering" AutoText. > > You can get more info about the formula editor in LibreOffice by the > online help > > https://help.libreoffice.org/master/en-US/text/smath/main0000.html?DbPAR=MATH > or by the "Math Guide". Look at > https://documentation.libreoffice.org/en/english-documentation/ for > download or view in browser. > > And of cause ask here on this list or ask on > https://ask.libreoffice.org/c/english/5. > > Kind regards, > Regina > -- To unsubscribe e-mail to: [email protected] Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
