Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex math? #155

Open
hdgarrood opened this issue Oct 26, 2015 · 4 comments
Open

Latex math? #155

hdgarrood opened this issue Oct 26, 2015 · 4 comments

Comments

@hdgarrood
Copy link
Collaborator

It might be nice to have the ability to put math equations into documentation, probably via latex. I don't really like the way MathJax works but AFAIK there aren't any other good options :(

One example where this might be useful: http://pursuit.purescript.org/packages/purescript-isomorphisms/0.1.0/docs/Data.Iso

@paf31
Copy link
Contributor

paf31 commented Oct 26, 2015

Sounds good. I've used MathJAX on my blog before, it's pretty simple. Another option might be to render the images on the server and cache them.

@hdgarrood
Copy link
Collaborator Author

My initial reaction is that I'd rather use MathJax than render images on the server, as more things will be able to understand text and/or the output of MathJax than will be able to understand images (ie, from an accessibility perspective). The only thing that bothers me about MathJax is that it looks over the whole page for pairs of $, which seems wasteful (why not something like document.querySelectorAll('.mathjax')) and prone to false positives (eg, "I owe $20 to somebody and $10 to somebody else"). Although I suppose it does get the job done fairly easily, so these objections are perhaps a bit academic.

@no-longer-on-githu-b
Copy link

no-longer-on-githu-b commented Aug 17, 2016

You can call MathJax yourself, and have it run on only the things you want it to run on. An example is in an old version of my computer algebra system:

First, configure MathJax:

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        skipStartupTypeset: true,
    });
</script>

Then call MathJax when you are ready to render the text:

const el = document.getElementById('dyel');
MathJax.Hub.Queue(['Typeset', MathJax.Hub, el]);

@Profpatsch
Copy link

There seems to be a new player in the game that is a lot faster than MathJax: https://khan.github.io/KaTeX/

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

No branches or pull requests

4 participants