From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Charpentier Subject: Re: Possible bug(s) in MathML handling in ODT export Date: Mon, 24 Dec 2018 23:20:12 +0100 Message-ID: <556c165ed64c0c1629041c8bb117a2596219f6e8.camel@free.fr> References: <40bae66baba5fabfd928b5550f8a90b808594882.camel@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbYaB-0001jY-3Q for emacs-orgmode@gnu.org; Mon, 24 Dec 2018 17:20:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbYa7-0000uX-Vk for emacs-orgmode@gnu.org; Mon, 24 Dec 2018 17:20:19 -0500 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:30545) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gbYa7-0000qf-Lb for emacs-orgmode@gnu.org; Mon, 24 Dec 2018 17:20:15 -0500 Received: from asus16-ec (unknown [82.228.67.28]) by smtp1-g21.free.fr (Postfix) with ESMTPS id 97F3EB00535 for ; Mon, 24 Dec 2018 23:20:12 +0100 (CET) In-Reply-To: <40bae66baba5fabfd928b5550f8a90b808594882.camel@free.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Sorry for the noise : the bugs do exist, but my previous analysis was false (one paren too much). More data points : * I installed also MathToWeb, and configured it in emacs=20 (via file-local-variables), with the same problematic result. * The error message "LaTeX to MathML converter not configured" appears exactly twice in org.el: + In org-format-latex + In org-create-math-formula * In both cases, the call has the form : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (unless (org-format-latex-mathml-available-p) (user-error "LaTeX to MathML converter not configured"))) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * When evaluated from M-: (org-format-latex-mathml-available-p)=20 returns t (as it should...). * I have been so far unable to trace the origin of the faulty=20 evaluations. I'll probably have to run an uncompiled org for this, and I don't (yet) know how to do that. Interim hypothesis : the relevant variables (org-latex-to-mathml-jar-file and org-latex-to-mathml-convert-command) may be inadvertently shadowed somewhere upstream in the call tree. I'm afraid to be a bit out of my depth here... Suggestions ? -- Emmanuel Charpentier Le lundi 24 d=C3=A9cembre 2018 =C3=A0 01:24 +0100, Emmanuel Charpentier a= =C3=A9crit : > Dear list, >=20 > I have a couple of gripes about LaTeX handling in ODT export when one > needs MathML conversion, and therefore a couple of questions: >=20 > The first one is possibly a gripe with the ox-pandoc exporters. The > doc > (info manual) states : >=20 > "Add this line to the Org file. This option is activated on a per- > file > basis. >=20 > #+OPTIONS: LaTeX:t" >=20 > It seems that this option is *NOT* handled by the ox-pandoc exporters > : > when using one of these, the text "LaTeX:t" appears at the top of the > output. >=20 > Hence my first question : what should be responsible for handling > this > option : org mode or ox-pandoc ? >=20 > The second one is that I can't get org to acknowledge the > configuration > of org-latex-to-mathml-convert-command. A bit of peeking int the > source > leads to this function, responsible for testing it : > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D > (defun org-format-latex-mathml-available-p () > "Return t if `org-latex-to-mathml-convert-command' is usable." > (save-match-data > (when (and (boundp 'org-latex-to-mathml-convert-command) > org-latex-to-mathml-convert-command) > (let ((executable (car (split-string > org-latex-to-mathml-convert-command)))) > (when (executable-find executable) > (if (string-match > "%j" org-latex-to-mathml-convert-command) > (file-readable-p org-latex-to-mathml-jar-file) > t)))))) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D >=20 > As written, I can't see how one can use latexmlmath WITHOUT having > ALSO > the MathToWeb jar file somewhere : the test for it is systematic ; > therefore, it fails if the jarfile isn't configured/available. >=20 > The value of executable should be tested, and the test for the > jarfile > should be done *only* if executable is "java" (or, better, belongs to > a > list of "reasonable" java executables or scripts...). >=20 > So my second question is : what do you think ? >=20 > HTH, >=20 > -- > Emmanuel Charpentier >=20 >=20