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

Feature Request: MathJax integration #7

Closed
arhag opened this issue May 19, 2016 · 7 comments
Closed

Feature Request: MathJax integration #7

arhag opened this issue May 19, 2016 · 7 comments

Comments

@arhag
Copy link

arhag commented May 19, 2016

Check it out: https://www.mathjax.org/

I should be able to write math in my post inline like so $a x^2 + b x + c = 0$.

Or I can do it as a display block like this:
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2 a}
$$

@arhag
Copy link
Author

arhag commented Jul 2, 2016

Here is another option: https://github.com/Khan/KaTeX

@jcalfee
Copy link
Contributor

jcalfee commented Jul 2, 2016

And another per @theoreticalbts suggestion: https://www.mathjax.org/

@arhag
Copy link
Author

arhag commented Jul 2, 2016

@jcalfee: 😄 I already suggested mathjax in the OP.

MathJax is the better option currently in terms of completeness of math rendering. Also it supports MathML (which is good for accessibility) and allows one to get the source of the render.

There are two downsides however:

  • Apparently it is much slower than KaTeX to render.
  • Out-of-the-box it only works client-side, whereas KaTeX can easily be used both client-side and server-side, which is nice for pre-rendering pages for search engines or for clients that want to view only without Javascript enabled (or even just as a further speed optimization for regular clients). However, there is a workaround to this, so that MathJax could be used server-side as well: http://pomax.github.io/1451617530567/react-with-latex-without-needing-client-side-mathjax

So there are trade-offs to consider.

@roadscape
Copy link
Contributor

Unfortunately it doesn't sound like a simple drop-in:

This sentiment appears to be all too common:

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.

and

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


This could be implemented purely server-side, though it does raise another host of issues. If we render to images, or as "intricate" HTML, each present their own challenges while we are trying to keep our beta paradigms as simple as possible for security and maintenance.

Unless there is a math rendering package that is simple and secure, I think it's too early to invest too deeply into a solution like MathJax. An ideal future solution would be browser-based.

Closing this issue. Feel free to continue using it to track relevant developments, packages, and findings.

NateBrune pushed a commit that referenced this issue Jan 15, 2017
Move undo_state out of class
@fizyk20
Copy link

fizyk20 commented Nov 21, 2017

Is this still such a problem? The referenced issues seem to be closed and resolved for years (they have been even at the time of creation of this issue).

I must admit I don't know what the situation with MathJax is security-wise, but I can't really see how it can be a risk, and it would be a really valuable addition to the platform.

gl2748 added a commit that referenced this issue Jan 8, 2018
# This is the 1st commit message:
init FeatureFlag HOC

# The commit message #2 will be skipped:

#	add feature flag reducer
#
#	refs #2179

# The commit message #3 will be skipped:

#	init FlagContainer

# The commit message #4 will be skipped:

#	Feature Flag Container Component

# The commit message #5 will be skipped:

#	uncertain about data type

# The commit message #6 will be skipped:

#	missed export of MapStateToProps for test

# The commit message #7 will be skipped:

#	tidy up

# The commit message #8 will be skipped:

#	use immutable to access FeatureFlags map
@RoyiAvital
Copy link

This is really needed for modern writing.
Usually including MathJax is pretty easy.

@ejgallego
Copy link

My humble vote to reopen this feature request; indeed I don't understand what the problem with Mathjax is, it is a purely client-side rendering suite and KaTeX is even lighter.

Without Mathjax many styles of writing are just impossible in steemit.

MathML servers a different purpose [and indeed Mathjax can output to it], in a sense it is comparable to markdown vs html [guess why nobody writes in raw HTML].

eonwarped added a commit to eonwarped/condenser that referenced this issue Jun 7, 2019
…andlebars-4.1.2

Bump handlebars from 4.0.11 to 4.1.2
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

6 participants