I made some tests that I wish to share with the group.

This is the ecuation in docx as readed by LibreOffice:

    {y =m x +b  none  none  \( 1  \)}

You can observe that LibreOffice can't interprete the quad spaces and translates
it as 'none'.

The same equation generated by Pandoc from markdown to odt, lacks the space.
If made directly with the LibreOffice suite, its equation editor provides a tilde
'~' character with provides a 'large space' according to LibreOffice MathGuide.
It is necessary to use four tildes to equal the space of an quad as viewed in
MS Office. For a qquad are necesary 8 tildes ('~~~~~~~~') to represent that
space. Thats is explained in the following text:


    From Math-guide (pag 38):

    Space at the end of a formula

    The grave accent ` inserts a small additional space into the formula; the
    tilde ~ inserts a larger one. In the basic installation, these symbols are
    ignored when they occur at the end of a formula. However, when working with
    running text, it may be necessary to include spacing at the end of formulas
    as well. This customization is only available when you are working with a
    Math document, and not when you are embedding a Math object.

The next code is an export of LibreOffice Math as MathML 1.01, of the
equation written in 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>
    ~~~

I verified with
[Wolfram Research](http://www.mathmlcentral.com/Tools/ValidateMathML.jsp)
and reports that "The input is valid MathML".


Pandoc's manual states (p46, pdf):

    Docx It will be rendered using OMML math markup.

    RTF, OpenDocument, ODT It will be rendered, if possible, using unicode
    characters, and will otherwise appear verbatim.


LibreOffice MathGuide informs that are some limitations converting math objects
from docx to odt; therefore its preferable the direct route markdown --> odt.
But my test shows that what Pandoc's generate is not understood as spaces
 by LibreOffice.

Here I reproduce the manual aboout conversion by LibreOffice from docx to odt
(pag 42), that confirms the restrictions from docx to odt.

    Microsoft file formats

    The options in Tools > Options > Load/Save > Microsoft Office [in LibreOffice]
    control how the import and export of Microsoft Office file formats is
    carried out in regard to formulas.

    Loading

    If [L] is checked, LibreOffice converts Microsoft formulas into native
    format when a document is loaded. This is possible if the formulas
    were created with MathType 4 (up to version 3.1) or with the Microsoft
    Equation Editor. The latter is a reduced, older version of MathType
    licensed by Microsoft and included in the Microsoft Office package.

    Formulas created by newer versions of MathType or by the new Microsoft
    formula editor “OMML 5 Equation Editor” (Microsoft Office Suite 2010
    and to some extent 2007) cannot be converted.

    If a document created in Microsoft Office 2010 and containing an OMML
    formula is saved into a .doc file format, Microsoft Office converts
    the formula into a graphic. Only this graphic is then accessible to
    LibreOffice.

    If you load a .docx document that contains OMML formulas, these fail
    in conversion whether [L] is checked or not.

    Inside Microsoft Office, formulas created with MathType or Microsoft
    Equation Editor are treated as OLE objects. If [L] is not checked,
    LibreOffice maintains this. Double-clicking on the object launches
    MathType and new formulas can be inserted using Insert > Object > OLE
    Object. This setup is to be recommended if you have MathType installed
    and wish to use it to create and edit formulas.

Therefore, is preferable the direct route 'markdown --> odt' and look by
mechanisms to get the \qquad spaces. Its preferable to settle on math
expressed with TeX commands, because is a referent on the field.


El viernes, 25 de noviembre de 2016, 4:35:47 (UTC-6), John MacFarlane escribió:
You can see how pandoc handles whitespace here (using the
texmath executable from texmath):

% echo "\\qquad" | texmath -t omml
<m:oMathPara>
  <m:oMathParaPr>
    <m:jc m:val="center" />
  </m:oMathParaPr>
  <m:oMath>
    <m:r>
      <m:t>  </m:t>
    </m:r>
  </m:oMath>
</m:oMathPara>

It uses a "text" node with an appropriate combination of unicode
whitespaces.  I don't know if there's a better way to do this,
but I can say that the results look fine in Word, so this may be
a LibreOffice issue.


+++ Thomas J. Duck [Nov 24 16 07:52 ]:
>   Hi there,
>   Pandoc seems to ignore math whitespace commands when the output format
>   is docx (as viewed with LibreOffice 5.2.3.3).  For example, the \qquad
>   in the following equation is ignored:
>   $$ y = mx + b \qquad (1) $$
>   It works for LaTeX and html output.
>   This is a simple example: Whitespace is used for many purposes in
>   writing equations.
>   Is this a bug, or am I missing something?  Is there a workaround?
>   Thanks,
>   Tom
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discus...@googlegroups.com.
>   To post to this group, send email to
>   [2]pandoc-...@googlegroups.com.
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/417644b0-297f-42de-
>   9678-f622120644b4%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-...@googlegroups.com
>   3. https://groups.google.com/d/msgid/pandoc-discuss/417644b0-297f-42de-9678-f622120644b4@googlegroups.com?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/33f0e49f-edaa-435f-a98a-1dc36a68c3ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.