SmXMLExport::ExportTable contains some code to remove the last line: //If the list ends in newline then the last entry has //no subnodes, the newline is superfulous so we just drop //the last node, inclusion would create a bad MathML //table if (nSize >= 1 && pNode->GetSubNode(nSize-1)->GetNumSubNodes() == 0) --nSize; This seems to be to avoid adding a row when doing e.g "a newline b newline" but that does not seem to work in 4.0 and master... Worse, it breaks things like "binom a b" In 4.0, you can do "binom {a} {b}" to avoid that, but after bug 66081 the two markup are equivalent. Similarly, MathML export of "stack{x ## y}" is now broken in master (before bug 66081, the { } added to each cell was hiding that bug).
I've submitted a patch for review: https://gerrit.libreoffice.org/#/c/4712/ > This seems to be to avoid adding a row when doing e.g > > "a newline > b newline" > > but that does not seem to work It turned out that a dummy row was added for the sake of the visual editor and so this empty row was exported in the MathML output. The patch should fix that and avoids removing the line with binom/stack. Tetscase for the visual editor (enable the "experimental features"): when doing a newline b newline you should be able to move the cursor to a third line.
(In reply to comment #1) > I've submitted a patch for review: > > https://gerrit.libreoffice.org/#/c/4712/ The patch seems to break other things with single line formulas... please do not approve. (I don't know how to comment or edit something on gerrit)
Frederic Wang committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=75032fde426c781aea0af24eb9b9f6432a6bc9bb fdo#66575 - MathML export: fix errors with newline, binom and stack. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 82031 [details] patch Correct version that should have been pushed (sorry!)
Frederic Wang committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d63514c6eddcd61a319c994202c7689f60ebf0a fdo#66575 - MathML export: fix errors with newline, binom and stack. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.