From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thibault Marin Subject: Re: ox-md: Export links to equations for use with MathJax Date: Mon, 12 Feb 2018 20:49:19 -0600 Message-ID: <87tvul61u8.fsf@dell-desktop.WORKGROUP> References: <87d11cdrta.fsf@dell-desktop.WORKGROUP> <87o9kuuwd0.fsf@nicolasgoaziou.fr> Reply-To: thibault.marin@gmx.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elQex-0007wW-Cb for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 21:49:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elQes-0004ty-AB for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 21:49:31 -0500 Received: from mout.gmx.net ([212.227.15.19]:57141) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elQer-0004sa-Vv for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 21:49:26 -0500 In-reply-to: <87o9kuuwd0.fsf@nicolasgoaziou.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: Nicolas Goaziou Cc: emacs-org list > Markdown has no direct business with Mathjax, so introducing Mathjax > components in "ox-md.el" sounds wrong to me. "ox-md.el" doesn't even > have any math-related function (it lets "ox-html.el" take care of LaTeX > fragments and environments). OK. > Since it is a specific requirement, you may want to define your own > Markdown back-end in this case (e.g., replacing `org-md-link' with > `org-html-link' in some cases). Thanks. The following seems to work for my need: ,---- | (defun org-ipynb-link (link desc info) | (let* ((type (org-element-property :type link)) | (destination (if (string= type "fuzzy") | (org-export-resolve-fuzzy-link link info)))) | (if (and destination | (eq 'latex-environment (org-element-type destination)) | (eq 'math (org-latex--environment-type destination))) | (org-html-link link desc info) | (org-md-link link desc info)))) `---- Thanks for the help. thibault