emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Emmanuel Charpentier <emm.charpentier@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: Possible bug(s) in MathML handling in ODT export
Date: Mon, 24 Dec 2018 23:20:12 +0100	[thread overview]
Message-ID: <556c165ed64c0c1629041c8bb117a2596219f6e8.camel@free.fr> (raw)
In-Reply-To: <40bae66baba5fabfd928b5550f8a90b808594882.camel@free.fr>

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 
    (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 :
    =================================================================
    (unless (org-format-latex-mathml-available-p)
            (user-error "LaTeX to MathML converter not configured")))
    =================================================================

  * When evaluated from M-: (org-format-latex-mathml-available-p) 
    returns t (as it should...).

  * I have been so far unable to trace the origin of the faulty 
    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écembre 2018 à 01:24 +0100, Emmanuel Charpentier a écrit :
> Dear list,
> 
> I have a couple of gripes about LaTeX handling in ODT export when one
> needs MathML conversion, and therefore a couple of questions:
> 
> The first one is possibly a gripe with the ox-pandoc exporters. The
> doc
> (info manual) states :
> 
> "Add this line to the Org file. This option is activated on a per-
> file
> basis.
> 
> #+OPTIONS: LaTeX:t"
> 
> 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.
> 
> Hence my first question : what should be responsible  for handling
> this
> option : org mode or ox-pandoc ?
> 
> 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 :
> =====================================================================
> ==
> (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))))))
> =====================================================================
> ==
> 
> 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.
> 
> 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...).
> 
> So my second question is : what do you think ?
> 
> HTH,
> 
> --
> Emmanuel Charpentier
> 
> 

      reply	other threads:[~2018-12-24 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-24  0:24 Possible bug(s) in MathML handling in ODT export Emmanuel Charpentier
2018-12-24 22:20 ` Emmanuel Charpentier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556c165ed64c0c1629041c8bb117a2596219f6e8.camel@free.fr \
    --to=emm.charpentier@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).