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

How to use MathJax or other rendering engine? #15

Open
oplatek opened this issue Jul 16, 2015 · 7 comments
Open

How to use MathJax or other rendering engine? #15

oplatek opened this issue Jul 16, 2015 · 7 comments

Comments

@oplatek
Copy link

oplatek commented Jul 16, 2015

When using MathJax via
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script> the equations are not rerendered.

Do you have any recommendation for that?

The problem can be seen in this example:
https://raw.githubusercontent.com/oplatek/lxmls-toolkit/lecture_notes/lecture_notes/7-16-01morning-session.md

@xanderdunn
Copy link

I would also really love to be able to integrate MathJax.

@shime
Copy link
Owner

shime commented Oct 10, 2015

What's the problem here? Would you like livedown to support an option for rendering math expressions out of the box?

Something like

livedown start --math example.md

@xanderdunn
Copy link

@shime Sure, something like that would be great. It seems MathJax rendering doesn't work at all right now. Adding the usual MathJax JavaScript boilerplate like @oplatek mentioned doesn't do the trick in live down. Thanks!

@shime
Copy link
Owner

shime commented Oct 11, 2015

For me it does™.

What browser are you using? Could you inspect the output in the console, maybe there's some errors being reported there...

Any additional info would help. Thanks!

@oplatek
Copy link
Author

oplatek commented Oct 11, 2015

@shime I created minimal "broken" example where MathJax is not rerendered.

The source code is here:
https://gist.github.com/oplatek/94c87c24e039686bf2af

The only time when it is rendered correctly is when you open the webpage with e.g. when you type :LivedownPreview in Vim.

After that the image is correctly rendered only:
https://www.dropbox.com/s/21smieh0dcxoxwh/Screenshot%202015-10-11%2007.50.26.png?dl=0
However if I type anything else in the document, the equation is not rerendered.
https://www.dropbox.com/s/5as794nmiwtsx9q/Screenshot%202015-10-11%2007.51.43.png?dl=0

@paynito
Copy link

paynito commented Sep 29, 2016

Similar question, does this work with mermaid flowchart diagrams?

@hcgatewood
Copy link
Contributor

hcgatewood commented Mar 5, 2019

Until this gets resolved/pulled, feel free to check out my fork which includes automatic handling of KaTeX equations @hcgatewood/livedown. Installation via npm install -g git+https://github.com/hcgatewood/livedown.

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

5 participants