Bug 66086 - Commands wideslash, widebslash and overstrike are not correctly exported to MathML
Summary: Commands wideslash, widebslash and overstrike are not correctly exported to M...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Frédéric Wang
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-23 15:18 UTC by Frédéric Wang
Modified: 2013-06-28 09:59 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
testcase (926 bytes, text/html)
2013-06-23 19:37 UTC, Frédéric Wang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang 2013-06-23 15:18:08 UTC
Test case:

{x wideslash y} newline
{x widebslash y} newline
overstrike {sometext}

The result is

  <mtable>
   <mtr>
    <mtd>
     <mrow>
      <mrow/>
     </mrow>
    </mtd>
   </mtr>
   <mtr>
    <mtd>
     <mrow>
      <mrow/>
     </mrow>
    </mtd>
   </mtr>
   <mtr>
    <mtd>
     <mrow>
      <mrow>
       <mi mathvariant="italic">sometext</mi>
      </mrow>
     </mrow>
    </mtd>
   </mtr>
  </mtable>

Proposal:

- wideslash can be exported as <mfrac bevelled="true">
- There is not any <mfrac> equivalent for widebslash, so perhaps just use an <mo>\</mo>.
- overstrike {sometext} can be exported as <menclose notation="horizontalstrike">.
Comment 1 Frédéric Wang 2013-06-23 19:37:20 UTC
Created attachment 81282 [details]
testcase

I've submitted a patch for review, which implements the proposal:

https://gerrit.libreoffice.org/4465

I attach an HTML page with the new generated MathML code for the test case (as usual, you can open it in Firefox). Note that I've merged my fix for bug 66024 before working on this new bug because there could have been code overlap between the widehat/widevec/widetilde and the overstrike commands in SmXMLExport::ExportAttributes. However, I now think the two patches can apply independently. I've also prepared some changes to import menclose/mfrac@bevelled in the future. I don't plan to do that in that bug as I'm more concerned about the MathML export at the moment.
Comment 2 Jorendc 2013-06-24 13:23:17 UTC
Due the fact you already submitted a patch and are an expert on this domain, I mark this bug as NEW right away.

Kind regards,
Joren
Comment 3 Frédéric Wang 2013-06-27 21:57:05 UTC
Marking these bugs assigned since I've already taken them.
Comment 4 Commit Notification 2013-06-28 09:57:31 UTC
Frederic Wang committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3b3ec32358aebd81ef5385f48dbf3ee4c93649e8

fdo#66086 - MathML export: wideslash, widebslash and overstrike



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.