Rendering math equations? #274

Closed
lancejpollard opened this Issue Mar 30, 2014 · 18 comments

Comments

Projects
None yet
@lancejpollard

Does markup currently support rendering math equations (for github-flavored-markdown)?

This SO question suggests the only way to currently do this is to use an external service like iTex2Img to render latex to equations:

http://stackoverflow.com/questions/11256433/how-to-show-math-equations-in-general-githubs-markdownnot-githubs-blog

Do you guys support rendering math in the markdown, similar to how math.stackexchange.com does it? If not, would you be willing to support this and/or accept a pull request implementing this? It would be awesome to use equations in the READMEs and such for things like algorithms and natural language processing / machine learning code.

http://math.stackexchange.com/questions/82876/given-a-prime-p-in-mathbbn-is-a-fracxp2-1xp-1-irreducible-i?rq=1

screen shot 2014-03-30 at 10 30 05 am

@gjtorikian

This comment has been minimized.

Show comment
Hide comment
@gjtorikian

gjtorikian Mar 30, 2014

Member

GFM doesn't support this at the moment.

/cc @arfon

Member

gjtorikian commented Mar 30, 2014

GFM doesn't support this at the moment.

/cc @arfon

@bkeepers

This comment has been minimized.

Show comment
Hide comment
@bkeepers

bkeepers Apr 2, 2014

Member

I know we've supported latex and MathJax in the past, and both caused a lot of headaches. We would be interesting in adding support for something as long as it is not a maintenance burden and doesn't open us up to security vulnerabilities.

Member

bkeepers commented Apr 2, 2014

I know we've supported latex and MathJax in the past, and both caused a lot of headaches. We would be interesting in adding support for something as long as it is not a maintenance burden and doesn't open us up to security vulnerabilities.

@lancejpollard

This comment has been minimized.

Show comment
Hide comment
@lancejpollard

lancejpollard Apr 2, 2014

Ok cool, good to know. Sucks that they caused headaches. Yeah not a fan of MathJax at all, mainly because it has noticeable delays in rendering if done purely on the client.

What were the problems you faced with latex in the past (security vulnerabilities and such)? Would be interesting to understand that, thinking about building a math parser.

I think this one is the best, mainly because it's fast:

http://mathscribe.com/author/jqmath.html

But it only works on the client, unless you guys could use some server-side DOM to render. But that's probably too much to ask :)

Any thoughts on what the ideal would look like? Is it an image generator like iTex2Img or more like jqmath (or markdown), where it generates HTML?

Ok cool, good to know. Sucks that they caused headaches. Yeah not a fan of MathJax at all, mainly because it has noticeable delays in rendering if done purely on the client.

What were the problems you faced with latex in the past (security vulnerabilities and such)? Would be interesting to understand that, thinking about building a math parser.

I think this one is the best, mainly because it's fast:

http://mathscribe.com/author/jqmath.html

But it only works on the client, unless you guys could use some server-side DOM to render. But that's probably too much to ask :)

Any thoughts on what the ideal would look like? Is it an image generator like iTex2Img or more like jqmath (or markdown), where it generates HTML?

@bkeepers

This comment has been minimized.

Show comment
Hide comment
@bkeepers

bkeepers Apr 2, 2014

Member

What were the problems you faced with latex in the past (security vulnerabilities and such)?

Yep. latex just has so many feature that it's impossible for us to deploy it securely right now.

Any thoughts on what the ideal would look like?

I haven't thought about it a lot, but we're not picky as long as it provides a good user experience and is easy to maintain.

Member

bkeepers commented Apr 2, 2014

What were the problems you faced with latex in the past (security vulnerabilities and such)?

Yep. latex just has so many feature that it's impossible for us to deploy it securely right now.

Any thoughts on what the ideal would look like?

I haven't thought about it a lot, but we're not picky as long as it provides a good user experience and is easy to maintain.

@lancejpollard

This comment has been minimized.

Show comment
Hide comment
@lancejpollard

lancejpollard Sep 17, 2014

@bkeepers would you guys be down to integrate KaTeX from the Khan Academy? Looks pretty solid, and it has server-side rendering.

https://github.com/Khan/KaTeX

It could be just:

```tex
\sum_{x=0}^n f(x)
```

Or depending on how performant it was, you could add support for the StackOverflow-like $ for inline TeX, and $$ for block TeX if you wanted.

Thoughts?

@bkeepers would you guys be down to integrate KaTeX from the Khan Academy? Looks pretty solid, and it has server-side rendering.

https://github.com/Khan/KaTeX

It could be just:

```tex
\sum_{x=0}^n f(x)
```

Or depending on how performant it was, you could add support for the StackOverflow-like $ for inline TeX, and $$ for block TeX if you wanted.

Thoughts?

@macalinao

This comment has been minimized.

Show comment
Hide comment
@macalinao

macalinao Sep 17, 2014

Can you add this in like StackOverflow has it?

Can you add this in like StackOverflow has it?

@bkeepers

This comment has been minimized.

Show comment
Hide comment
@bkeepers

bkeepers Sep 18, 2014

Member

KaTeX looks pretty cool, but it's very young and incomplete. We're definitely exploring ways for rendering math in a performant and maintainable way. We have a few promising options. Sit tight.

Member

bkeepers commented Sep 18, 2014

KaTeX looks pretty cool, but it's very young and incomplete. We're definitely exploring ways for rendering math in a performant and maintainable way. We have a few promising options. Sit tight.

@lancejpollard

This comment has been minimized.

Show comment
Hide comment
@lancejpollard

lancejpollard Sep 18, 2014

Awesome, can't wait :D

Awesome, can't wait :D

@MatthewRalston

This comment has been minimized.

Show comment
Hide comment
@MatthewRalston

MatthewRalston Sep 23, 2014

Please and thank you

Please and thank you

@gnustudent

This comment has been minimized.

Show comment
Hide comment
@gnustudent

gnustudent Oct 3, 2014

By which date do github plan to deploy (at least) beta support for math equations?

By which date do github plan to deploy (at least) beta support for math equations?

@hilaryparker

This comment has been minimized.

Show comment
Hide comment
@hilaryparker

hilaryparker Oct 7, 2014

+1, would love to see this!!

+1, would love to see this!!

@bodokaiser

This comment has been minimized.

Show comment
Hide comment

+1 too

@jaak-s

This comment has been minimized.

Show comment
Hide comment

jaak-s commented Oct 15, 2014

+1

@espinielli

This comment has been minimized.

Show comment
Hide comment

+1

@ajunior

This comment has been minimized.

Show comment
Hide comment

ajunior commented Oct 18, 2014

+1

@syzer

This comment has been minimized.

Show comment
Hide comment

syzer commented Oct 21, 2014

+1

@bkeepers

This comment has been minimized.

Show comment
Hide comment
@bkeepers

bkeepers Oct 21, 2014

Member

Thanks everyone for letting us know you care about this. We hear you. We're exploring options and will post updates here.

Member

bkeepers commented Oct 21, 2014

Thanks everyone for letting us know you care about this. We hear you. We're exploring options and will post updates here.

@github github locked and limited conversation to collaborators Oct 21, 2014

@bkeepers

This comment has been minimized.

Show comment
Hide comment
@bkeepers

bkeepers Mar 4, 2015

Member

This issue can't be resolved by a change to the code in this project, so I'm going to close this issue.

Member

bkeepers commented Mar 4, 2015

This issue can't be resolved by a change to the code in this project, so I'm going to close this issue.

@bkeepers bkeepers closed this Mar 4, 2015

yungyuc referenced this issue in solvcon/cesenote Dec 11, 2015

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