emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ox-md: Export links to equations for use with MathJax


From: Thibault Marin
Subject: Re: [O] ox-md: Export links to equations for use with MathJax
Date: Mon, 12 Feb 2018 20:49:19 -0600
User-agent: mu4e 0.9.18; emacs 25.2.2

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]