-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support for Inline and Display Math #180
Conversation
+1 would love to see this! |
Love the idea but I dislike Personally I've gone with a syntax more like
|
👍 |
I like the syntax suggestion! Would love to see this in Atom soon. |
If you're interested I implemented this in my own fork of marked |
Actually I impl'd this as a monkey patch to support MathJax in renren-markdown. I'm enough of all this Markdown-related fragmentation and wish that someday we could really have a blessed "common markdown" or such. chjj/marked seems to be in a state of limbo -- dunno what's going on or what's the author's plans, but it seems that these will never get merged... sigh... |
there are already many other editors doing this mathjax + markdown, and they stick to latex convention : imnsho, the last thing anyone need is a new syntax for latex. you can also accept a block syntax to make it more regular if you so wish, but supporting what is now the standard seems a must for usability/interoperabiltity. |
@nrolland I know (and have used) the And, before the big players agree on a "common markdown" I don't think this chaos could really end. |
I am not sure this is wise. If people really mean dollar, they use USD. I dont even know where the euro sign is on my keyboard, or how to do Yen. As far as I can see, there is little chaos in that matter : editors have settled for latex convention. |
That's far from true for the majority of people.
That's completely irrelevant to the discussion. The equivalent argument is that I don't know latex.
Do you have any statistics to actually back that up?
I think this is a strong argument. If there are multiple implementations that already follow this convention, then deviating from this convention is harmful. Including the |
Since the statistics to back that up would be the same than those which backs your argument about "the majority of the people". I dont have them, you dont have them, we are talking opinion here. At the level of opinion, me not knowing where the euro or yen symbol is despite working for 10years in finance is relevant. The equivalent argument would be you ignoring latex despite being a mathematician typing electronic math for 10years. I guess that would say something about the relevance of such system. My guess though is folks who type € for EUR, $ for USD, ¢ for cent (just discovered that one, cute), ¥ for JPY, ?? for CNY (can't find it..) use Word or any other general editor, not a fancy new markdown format. let's see in 5 years if that guess is proved correct. In the meantime, there seems to be a standard, and it it not in favor of funny currency signs. |
The "common markdown" concept would be a very good thing though. |
I don't understand the difficulty with the $. A single $ is an inline expression, it has to be matched to a closing $ within the same block. If there are two $ currency symbols in the same block -- and mathjax is enabled -- the user is likely to recognize the problem and take appropriate action. So what is the appropriate action? How can the $ symbol be escaped, so that it's not processed as a mathjax open inline block indicator? Let's see how it works on math.stackexchange:
Why not follow suit? |
Based on how the quoted comment rendered, backslash already escapes the curly brace and the underscore -- so it's probably just a matter of adding the $ symbol to the list of 'escape-able characters' in the same block of code. |
@marfarma : Makes sense. Changed. @nrolland @scottgonzalez : My fault to bring up the "currency" issue. It's clearly off-topic and let's return to supporting mathjax correctly. |
damn, I spent the afternoon implementing this :) that's the status here? I'd love to see it merged soon! |
I'm interested in helping out to get this merged. @chjj if this was rebased would you consider merging it? |
+1 for merging! |
Quite suprised to see this attracting attention 1 year after I first wrote it. |
I was misled by use cases that made me think that this issue was not taken into account. However, curly braces introduce are another source of problem: e.g. in
I guess this should be considered as a bug. |
@julou : I failed to reproduce the bug at 2d3594f .
|
Thanks for checking! |
@julou : |
After getting in touch with summivox, it appears that his test was run using his
Such a widely used md parser deserves a better support for inline math… |
@summivox @julou I created a fork of It has your Here's Why we forked marked |
@AaronO : Sweet. Won't close this PR for the time being though. |
Why introduce a new syntax when you can just piggyback on code blocks and use a custom renderer?
https://github.com/chjj/marked#overriding-renderer-methods |
Because inline math. |
Scholdoc found a reasonable way to use backticks for inline math - require If you want to compare to syntaxes others implemented, I'm cataloguing them 2015-03-10 0:44 GMT+02:00 summivox notifications@github.com:
|
@cben : I was aware of these work. This fragmentation is unfortunate yet inevitable -- considering we actually have CommonMark now. Very ironic -- this patch was here over 2 years ago. |
Clsoing due to staleness, possibly going beyond the specifications we are focusing on, and merge conflicts. See #956 |
I'm working to support MathJax.
Output tag format:
http://docs.mathjax.org/en/latest/model.html#how-mathematics-is-stored-in-the-page
The idea for now:
$ ... $
=> inline math$$ ... $$
=> display mathThe code I wrote is mostly monkey-patching. Could anyone help get it settled?