From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16189 Path: news.gmane.org!.POSTED!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Math whitespace commands and docx output Date: Sat, 26 Nov 2016 18:39:58 +0100 Message-ID: <20161126173958.GA4430@Johns-MBP.home> References: <417644b0-297f-42de-9678-f622120644b4@googlegroups.com> <20161125103541.GG77617@Johns-MBP.home> <33f0e49f-edaa-435f-a98a-1dc36a68c3ce@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480182008 19305 195.159.176.226 (26 Nov 2016 17:40:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2016 17:40:08 +0000 (UTC) User-Agent: Mutt/1.6.2 (2016-07-01) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB4UR47AQKGQEWRQEGXA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Nov 26 18:40:03 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-yw0-f192.google.com ([209.85.161.192]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAgxD-0003xr-Mm for gtp-pandoc-discuss@m.gmane.org; Sat, 26 Nov 2016 18:40:00 +0100 Original-Received: by mail-yw0-f192.google.com with SMTP id s68sf14580616ywg.0 for ; Sat, 26 Nov 2016 09:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=GxJPQAWLbbUXwJvGLDvuXjUb3JnepkOUwPrnqm72agg=; b=iDxyFMhDUhnf1w78zf+tZ51vC36cectT1rKbZWtGt27ijOGjsZjD3EDLZacELbP0st B6KoNp5HKpUkbR3i7p3iu88U5PnwmWiJuH0zxkZEs+AHL1t8p6wr5JK+zJzTRS/9wZQE IZ4BjhfxL8GRx5DihYrEhASwpyZyDhHrl2G8Obn83Yt0erq5hU4pCQWTVSODS68As48X FPTJ7aD231866Q7CT6UkG/E+Kg5CLWD0EQdlQ+78lVyR98kAGnsO85qOEguUTNa9hURg edRkhM9HziciiyimUuqu5jSjl6UmczF9aPzo+20xC/t8/sCBtxu6oQV9BbtwiSg6 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=GxJPQAWLbbUXwJvGLDvuXjUb3JnepkOUwPrnqm72agg=; b=QQpsm1JsmxaDog/YgrDsAfk2/GbH7sutzy59HA7Ro7KH9JuqLm4E+CsJ6mwAmS+nfC Go7GAE1Zy7XpjeIxhWiYVl46tLDElIKw3QAfJk3olqDNE6+OsqKDwhoG+rh+PfdW1fdT TB+0bYil+yBQQL24kTEhQT3gOwwy93CfYiybXRyQZaK2DgDGVlysXHLVKdLvKE7qyCBj EMopwyw2gl4wxTp5ebh7ARoQc7HAbNHMsinEYhDqX/KfbFA7ZW9N2DIWRM60pmIItfkF SLKPySz/jPOu245HqYdTJa8bcsk2fUm7W Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AKaTC03Rx2NHEW7NFhqk7A1HoLixcIY1lZBcaiR+3xJJvrJd/AfiBZWDPXZLVgRBivAppw== X-Received: by 10.36.175.6 with SMTP id t6mr189282ite.6.1480182003329; Sat, 26 Nov 2016 09:40:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.19.153 with SMTP id 25ls2177669iot.53.gmail; Sat, 26 Nov 2016 09:40:02 -0800 (PST) X-Received: by 10.36.3.209 with SMTP id e200mr2053527ite.35.1480182002332; Sat, 26 Nov 2016 09:40:02 -0800 (PST) Original-Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com. [2607:f8b0:400e:c05::243]) by gmr-mx.google.com with ESMTPS id n18si1376348pfb.2.2016.11.26.09.40.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Nov 2016 09:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::243 as permitted sender) client-ip=2607:f8b0:400e:c05::243; Original-Received: by mail-pg0-x243.google.com with SMTP id e9so8472432pgc.1 for ; Sat, 26 Nov 2016 09:40:02 -0800 (PST) X-Received: by 10.99.48.68 with SMTP id w65mr24962929pgw.68.1480182001674; Sat, 26 Nov 2016 09:40:01 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id 129sm25846918pgj.26.2016.11.26.09.40.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Nov 2016 09:40:01 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 69F73A16A; Sat, 26 Nov 2016 12:40:00 -0500 (EST) Content-Disposition: inline In-Reply-To: <33f0e49f-edaa-435f-a98a-1dc36a68c3ce-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::243 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:16189 Archived-At: If OpenDocument (the XML format used in ODT) uses MathML, then pandoc can create that instead of "faking it with unicode" as it does now for OpenDocument. +++ Denis Jos=C3=A9 Navas Vega [Nov 25 16 20:25 ]: > I made some tests that I wish to share with the group. > This is the ecuation in docx as readed by LibreOffice: > {y =3Dm 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: > ~~~ > > > > > > y > =3D > m > > > x > + > b > > > ( > 1 > ) > > {y =3D m x + b ~~~~~~~~ \( = 1 > \)} > > > ~~~ > 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 =E2=80=9COMML 5 Equation Editor=E2=80=9D (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=C3=B3: > > You can see how pandoc handles whitespace here (using the > texmath executable from texmath): > % echo "\\qquad" | texmath -t omml > > > > > > > =E2=80=81=E2=80=81 > > > > 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 =3D 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][1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To post to this group, send email to > > [2][2]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > > [3][3]https://groups.google.com/d/msgid/pandoc-discuss/ > 417644b0-297f-42de- > > 9678-f622120644b4%[4]40googlegroups.com. > > For more options, visit [4][5]https://groups.google.com/ > d/optout. > > > >References > > > > 1. mailto:[6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 2. mailto:[7]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 3. [8]https://groups.google.com/d/msgid/pandoc-discuss/417644b0- > 297f-42de-9678-f622120644b4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=3D > email&utm_source=3Dfooter > > 4. [9]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 [10]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [11]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [12]https://groups.google.com/d/msgid/pandoc-discuss/33f0e49f-edaa-435f > -a98a-1dc36a68c3ce%40googlegroups.com. > For more options, visit [13]https://groups.google.com/d/optout. > >References > > 1. javascript:/ > 2. javascript:/ > 3. https://groups.google.com/d/msgid/pandoc-discuss/417644b0-297f-42de- > 4. http://40googlegroups.com/ > 5. https://groups.google.com/d/optout > 6. javascript:/ > 7. javascript:/ > 8. https://groups.google.com/d/msgid/pandoc-discuss/417644b0-297f-42de-= 9678-f622120644b4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=3Demail&utm_source=3Dfooter > 9. https://groups.google.com/d/optout > 10. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 11. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 12. https://groups.google.com/d/msgid/pandoc-discuss/33f0e49f-edaa-435f-= a98a-1dc36a68c3ce-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=3Demail&utm_source=3Dfooter > 13. https://groups.google.com/d/optout --=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/20161126173958.GA4430%40Johns-MBP.home. For more options, visit https://groups.google.com/d/optout.