Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add embedded MathJax #20

Closed
karan opened this issue Feb 27, 2014 · 11 comments
Closed

Add embedded MathJax #20

karan opened this issue Feb 27, 2014 · 11 comments

Comments

@karan
Copy link

karan commented Feb 27, 2014

It should be able to embed MathJax within markdown. Adding this snippet on top of the document works but native support would be awesome.

<style TYPE="text/css">
    code.has-jax {font: inherit; font-size: 100%; background: inherit; border: inherit;}
</style>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [['$','$'], ['\\(','\\)']],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'] // removed 'code' entry
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i = 0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
@kevinsawicki
Copy link
Contributor

Currently we use marked to render the markdown to HTML.

Looks like MathJax support has already been PRed there: markedjs/marked#180

@kevinsawicki kevinsawicki self-assigned this Feb 28, 2014
@AsgerSommer
Copy link

How precisely do you make the snippet above work?

@kevinsawicki kevinsawicki removed their assignment Apr 16, 2014
@aybabtme
Copy link

aybabtme commented May 7, 2014

This would be very nice.

@emfuller
Copy link

Agreed, +1 for this!

@joyrexus
Copy link

See also KaTeX, Khan Academy's synchronous latex renderer and the recently active discussion on github/markup#274. If Github enables support for rendering embedded latex in markdown (which at least now sounds probable), it would be nice if atom supported the same conventions.

Gosh, if atom and github had good/consistent latex support ... it would be hard to overstate what a boon this could be for scientific publishing and reproducible research.

@joyrexus
Copy link

Referencing recent discussion of this in #116

@fikovnik
Copy link

+1

@hyiltiz
Copy link

hyiltiz commented Jun 23, 2015

Looking forward to Github and Atom to to add MathJax into standard markdown.

@leipert
Copy link

leipert commented Sep 2, 2015

Have a look into markdown preview plus, which supports mathjax.

Disclaimer: I am a maintainer of markdown-preview-plus.

@ayberkt
Copy link

ayberkt commented Nov 23, 2015

+1 here

@lee-dohm
Copy link
Contributor

This is (now) a duplicate of #116. I'm closing this one in favor of the newer one because there has been significantly more discussion there. Please subscribe to #116 for updates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests