Bug 101643 - Automatically convert MathML embedded in html5 to equations
Summary: Automatically convert MathML embedded in html5 to equations
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 101644 (view as bug list)
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2016-08-21 20:18 UTC by Gunter Königsmann
Modified: 2017-09-09 15:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The rtf file that isn't taken from the clipboard if there is a bitmp version of the data, as well. (1.23 KB, application/rtf)
2016-08-21 20:18 UTC, Gunter Königsmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunter Königsmann 2016-08-21 20:18:03 UTC
Created attachment 126944 [details]
The rtf file that isn't taken from the clipboard if there is a bitmp version of the data, as well.

In order to compensate for https://bugs.documentfoundation.org/show_bug.cgi?id=98292 I tried to make wxMaxima put equations in several formats on the clipboard:
 - "math embedded in rtf"
 - MathML 
 - plain text
 - and bitmap.

Instead of the attached data libreoffice prefers the bitmap it can find on the clipboard and pastes the image instead of the equation into the document.

I am not completely sure if I got something wrong in the RTF export.
wxMaxima publishes the RTF data as "Rich Text Format" and as "text/richtext". It offers bitmaps as "image/bmp", "image/jpeg" and "image/png" (both at 75dpi and about 1kb long), the text as "text/plain" and the MathML data as the appropriate MimeType, as "MathML" and as "text/html" as it technically is a HTML5 element.

If I want it to import whole documents libreoffice uses the RTF code instead, though.

That is all I know about this problem.
Comment 1 Gunter Königsmann 2016-08-21 20:47:52 UTC
*** Bug 101644 has been marked as a duplicate of this bug. ***
Comment 2 Gunter Königsmann 2016-08-21 20:54:12 UTC
Perhaps I should have told why the rtf version is preferable: My bitmap is quite lo-res, but bitmaps always have a limited resolution. It therefore normally depends on the application if the bitmap is too small. RTF on the other hand potentially contains scaleable objects that can be rendered in the right resolution for any task.
Comment 3 V Stuart Foote 2016-08-21 21:08:23 UTC
@Regina?
Comment 4 Regina Henschel 2016-08-21 21:22:28 UTC
The attached rtf-file does not contain any MathML markup.
Comment 5 Regina Henschel 2016-08-21 22:37:39 UTC
The feature "Import MathML from Clipboard" is made to import single formulas, not complete texts. Mark a formula from an output line in wxMaxima, then use the item "Copy as MathML" from the menu Edit in wxMaxima. This clipboard content you can use in a Math formula in LibreOffice.

Some features of MathML are not yet implemented in MathML import - not only from clipboard but generally. The import filter can only handle single character operators, for example. Therefor the := from wxMaxima will be imported as single : . You need to enter the missing = manually.

For further discussion, what is possible or not, you should use the support ways listed on http://www.libreoffice.org/get-help/community-support/
Comment 6 Gunter Königsmann 2016-08-22 04:33:18 UTC
The rtf file I attached doesn't contain MathML, but rtf-encoded OMML (see: https://blogs.msdn.microsoft.com/murrays/2006/10/25/mathematical-rtf/): One of the release notes for libreOffice tells that equations that are specified in this way will get automatically imported (http://vmiklos.hu/blog/lo-rtf-math-native.html). Hope I did get everything right: Neither the big spec describing OMML nor the smaller RTF spec look like they had been written in a way that allows someone without deep knowledge about these two languages to understand them. For example the RTF spec describes how to specify the associated font of a style and how to specify a font for a style. But fails to tell what an assocated font is.

---

Knowing about the ":=" limitation being a known error is important: I *will* get user feedback about that.
Comment 7 Gunter Königsmann 2016-08-24 05:11:24 UTC
OK: Found the real-problem - and this one is at maximum low prio:

My application offers the MathML code that renders maths on the clipboard as "text/html" which is technically correct, but not this common.
Libreoffice doesn't automatically create an equation if it encounters MathML on the clipboard (and so does MS Word) => It does do the best it can.
Comment 8 Jean-Baptiste Faure 2017-09-09 15:10:40 UTC
(In reply to Gunter Königsmann from comment #7)
> OK: Found the real-problem - and this one is at maximum low prio:
> 
> My application offers the MathML code that renders maths on the clipboard as
> "text/html" which is technically correct, but not this common.
> Libreoffice doesn't automatically create an equation if it encounters MathML
> on the clipboard (and so does MS Word) => It does do the best it can.

Ok, so closing as NotOurBug. Feel free to reopen if you disagree.

Best regards. JBF