From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lixin Chin Subject: [PATCH] org.el: Relax the match criteria for MathML header line Date: Tue, 29 Nov 2016 11:45:49 +0800 Message-ID: <866cd05d-676d-aa1c-3ab0-d6e7a3edbf08@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBZMl-00085k-Pa for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 22:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBZMh-0000O4-TA for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 22:45:59 -0500 Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]:34695) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cBZMh-0000Nr-HJ for emacs-orgmode@gnu.org; Mon, 28 Nov 2016 22:45:55 -0500 Received: by mail-pf0-x22c.google.com with SMTP id c4so28930808pfb.1 for ; Mon, 28 Nov 2016 19:45:55 -0800 (PST) Received: from [130.95.28.187] ([130.95.28.187]) by smtp.gmail.com with ESMTPSA id p64sm90440075pfi.88.2016.11.28.19.45.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 19:45:52 -0800 (PST) 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 Hi everyone, This fixes a minor bug in converting LaTeX equations to MathML. The default match criteria for the toplevel is unnecessarily strict, and should probably be relaxed. Thanks, Lixin Chin * lisp/org.el (org-create-math-formula): Allow the xmlns attribute to be preceded by any other mathml header attribute. The problem here was that the match criteria for MathML assumed that the xmlns attribute is the first listed in the top level MathML element. Some LaTeX -> MathML converters (e.g., pandoc) will add attributes before xmlns, which is still valid MathML. --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index e372475..93d00ac 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19387,8 +19387,9 @@ inspection." (goto-char (point-min)) (when (re-search-forward (concat + "]*?" (regexp-quote - "]*?>" "\\(.\\|\n\\)*" "") -- 2.10.2