3 ms·
Ask HN: Best way to render latex equations in GitHub readme?
I want to render math equations in a github readme. Github flavored markdown does not support mathjax. My current solution is to write each equation individually, render it to a .png file, and include the .png file as an image in the repository.
This is cumbersome and inconvenient, so I'm wondering if any tools exist to streamline this process. I don't mind including the .png files in the readme, but it would be nice if I could write the latex equations in some kind of intermediate document, then run a script to build it into a readme file and rendered images.
Anyone know of something?
- detaro 11y agoIt's possible pandoc can do that? (It can take markdwon with embedded LaTeX as input, I don't know if can export markdown + images from that) If you find something, please report back, it seems like something that would be useful to have documented somewhere
- brianjking 11y agoWhat if made the readme a restructuredtext file instead of Markdown?
- brianjking 11y agoActually, nope that doesn't work apparently. I did find two solutions: * http://www.r-bloggers.com/rendering-latex-math-equations-in-github-markdown/ http://www.r-bloggers.com/rendering-latex-math-equations-in-... * http://www.sciweavers.org/free-online-latex-equation-editor http://www.sciweavers.org/free-online-latex-equation-editor (as per: https://github.com/github/markup/issues/274 https://github.com/github/markup/issues/274)
- brianjking 11y agoAlso, you may want to check out https://github.com/cben/mathdown/wiki/math-in-markdown https://github.com/cben/mathdown/wiki/math-in-markdown
- zippy786 11y agoYou can easily convert a dvi to png. https://www.ctan.org/pkg/dvipng https://www.ctan.org/pkg/dvipng