Bug 50451 - : Mediawiki formula export
Summary: : Mediawiki formula export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: high minor
Assignee: Julien Nabet
URL:
Whiteboard: BSA target:4.3.0 target:4.2.2
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-29 03:59 UTC by i369353
Modified: 2014-02-18 21:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description i369353 2012-05-29 03:59:13 UTC
Problem description: 
In equations it exports the vectors like "vec r" as "\stackrel{⃗}{r}" instead of the correct "\vec{r}".

Steps to reproduce:
1. type in the formula editor: vec r
2. export as mediawiki
3. try it on wikipedia

Current behavior:
"vec r" to "\stackrel{⃗}{r}"

Expected behavior:
"vec r" to  "\vec{r}".
             
Browser: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0
Comment 1 Julien Nabet 2014-02-17 22:06:56 UTC
On pc Debian x86-64 with master sources udpated some days ago, I can reproduce this.
Comment 2 Commit Notification 2014-02-17 22:21:23 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#50451 Mediawiki formula export + vec use



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.
Comment 3 Julien Nabet 2014-02-17 22:24:27 UTC
To explain the patch I pushed on master, here what I noticed.
When exporting in fodt (flat odt), here's I got (which seemed ok):
    245       <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
    246        <semantics>
    247         <mover accent="true">
    248          <mi>r</mi>
    249          <mo stretchy="false">⃗</mo>
    250         </mover>
    251         <annotation encoding="StarMath 5.0">vec r
    252 </annotation>
    253        </semantics>
    254       </math>

So the problem was the translation of this in mediawiki.
The translation uses the main xslt file swext/mediawiki/src/filter/odt2mediawiki.xsl.
This one uses "xsltml", a package of xstl files located in "external" to manage MathML part.

Running some tests, I found that scripts.xsl didn't manage COMBINING RIGHT ARROW ABOVE (see http://www.fileformat.info/info/unicode/char/20d7/index.htm).
Comment 4 Commit Notification 2014-02-18 12:58:17 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=91995b930f7d35771154a439fb77d27236115d79&h=libreoffice-4-2

Resolves: fdo#50451 Mediawiki formula export + vec use


It will be available in LibreOffice 4.2.2.

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.
Comment 5 Julien Nabet 2014-02-18 21:23:48 UTC
So fixed from future 4.2.2 (see https://wiki.documentfoundation.org/ReleasePlan#4.2_release)