https://bugs.documentfoundation.org/show_bug.cgi?id=104194

            Bug ID: 104194
           Summary: MathML <mspace width="2.0em"> not rendered by the
                    equation edito
           Product: LibreOffice
           Version: 5.1.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Formula Editor
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: denis.na...@gmail.com

Created attachment 129040
  --> https://bugs.documentfoundation.org/attachment.cgi?id=129040&action=edit
Original text document with markdown markup

This is a bug similar but I think not equal to bug 76296 titled 'FILEOPEN: Open
or import of MathML file does not write ~ or ` for the <mspace>

The case originated with a formula written with TeX sintaxis in markdown markup
converted to docx and odt with Pandoc. The discussion is accesible in this
link:
https://groups.google.com/forum/?hl=es-419#!topic/pandoc-discuss/H7lXXLR3k90

Was reported by a user with LO 5.2.3.3. and by me with LO 5.1.5.2; consists in
that MS word docx represents correctly the 2 em space between the formula and
the manual number included with the formula, but LibreOffice does not. 

After some tests I found two things:

a) LibreOffice receive from Pandoc conversion to odt the following
specification "<mspace width="2.0em">" within the formula's MathML but does not
express it as an space at all. Don't throw errors also.

b) Recreating the formula with LibreOffice, required me to use eight (8) "~" 
to get a similar space as generated by MS. 

The space used in the formula with TeX sintax is 2 em (the width of letter 'M')
using command '\qquad'.

I include four files:

a) Original markdown file (mwcado.txt).
b) MS docx file which render the space(mwcado.docx).
c) LO odt file which does not render the space (mwcado-original.odt).
d) LO odt file modified by me (mwcado-modified.odt).

Additionally, attracts my attention that the formula that I recreated includes
StarMath 5.0 markup, to recreate the space but it isn't an space specified in
terms of ems thats the space unit used.

Here I reproduce the content of my considerations that published in Pandoc's
newsgroup:

LibreOffice does not understand '<mspace width="2.0em">', comparing the 
following MathML texts (copied from the unzipped odt).

Therefore, I must accept that LibreOffice does not correctly interpret \ qquad 
or that at least, '<mspace width="2.0em">' is an unimplemented instruction 
in LibreOffice.


## Markdown source

This is the markdown I used to produce the ecuation in question:

        For example, the \qquad in the following equation is ignored:

        $$ y = mx + b \qquad (1) $$

        Y otra ecuaciĆ³n sin el espacio qquad para cotejar diferencias:

        $$ y = mx + b (1) $$


## Results

This is what Pandoc produces when the ecuation has \qquad:

<?xml version='1.0' ?>
<math display="block"
xmlns="http://www.w3.org/1998/Math/MathML";><mrow><mi>y</mi><mo>=</mo><mi>m</mi><mi>x</mi><mo>+</mo><mi>b</mi><mspace
width="2.0em"></mspace><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo
stretchy="false" form="postfix">)</mo></mrow></math>

And this is what Pandoc produces without \qquad:

<?xml version='1.0' ?>
<math display="block"
xmlns="http://www.w3.org/1998/Math/MathML";><mrow><mi>y</mi><mo>=</mo><mi>m</mi><mi>x</mi><mo>+</mo><mi>b</mi><mo
stretchy="false" form="prefix">(</mo><mn>1</mn><mo stretchy="false"
form="postfix">)</mo></mrow></math>


And this is what I got using the '~' space command with LibreOffice:

<?xml version="1.0" encoding="UTF-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML";
display="block"><semantics><mrow><mrow><mi>y</mi><mo
stretchy="false">=</mo><mi>m</mi></mrow><mrow><mi>x</mi><mo
stretchy="false">+</mo><mi>b</mi></mrow><mspace width="16em"/><mo
stretchy="false">(</mo><mn>1</mn><mo stretchy="false">)</mo></mrow><annotation
encoding="StarMath 5.0">{y = m x + b ~~~~~~~~ \( 1
\)}</annotation></semantics></math>

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to