all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thibault Marin <thibault.marin@gmx.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: ox-md: Export links to equations for use with MathJax
Date: Mon, 12 Feb 2018 20:49:19 -0600	[thread overview]
Message-ID: <87tvul61u8.fsf@dell-desktop.WORKGROUP> (raw)
In-Reply-To: <87o9kuuwd0.fsf@nicolasgoaziou.fr>


> 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	other threads:[~2018-02-13  2:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-11  5:21 ox-md: Export links to equations for use with MathJax Thibault Marin
2018-02-12 14:16 ` Nicolas Goaziou
2018-02-13  2:49   ` Thibault Marin [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

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

  git send-email \
    --in-reply-to=87tvul61u8.fsf@dell-desktop.WORKGROUP \
    --to=thibault.marin@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.