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
MathJax not working after update #12
Comments
There is issue with MathJax.
While it works in StackExchnage and MarkDown Preview Enhanced (In MathJax mode). I'm not sure why it doesn't succeed parsing this. |
OK, I narrowed it down. Any idea? |
OK, I'm not sure what, but there is something in the CSS which interfere with the What could it be? @facelessuser , Could you assist finding it? |
@facelessuser , I found the issue. Is there a way to find out what strips |
I will remove from the MathJax config detecting |
@facelessuser , The parser just removes cases like You can try:
None of them will work. Remark |
Please read my comment again and read the documentation via the provider links. Removing I have confirmed things are working, but I also explained there some considerations when using $ with Arithmatex. You must follow it's convention per its documentation. |
Let's focus for a second on the following one line:
When
The HTML
As can be seen, something removed My question is (Before solving it with On a side note, I would like to ask that Thank You. |
I will repost this here for others to see as well: Please create a new issue. But I will go ahead and comment here.
I can consider the advanced mode for inline, but it will need ArithMatex's non-generic mode. Discussed later in this comment. No Issue with
|
@facelessuser , I think I'm not explaining my self clear enough. I write the following line in the
Let's leave
Yet what I get is:
Something, not related to |
@RoyiAvital, this was explained in the last post, but I'll try to be more clear. This is how Markdown handles {. etc. I showed you a tester that tests most of available Markdown parsers: Take a look at how other Markdown parsers handle this: https://johnmacfarlane.net/babelmark2/?text=%5C%7Btest%5C%7D+%5C%5C. Notice they all strip the See the original Markdown spec: https://daringfireball.net/projects/markdown/syntax#backslash. Curly braces are handled special when |
@facelessuser , This tells me that many parsers I use are not following specification (StackExchange, Markdown Preview Exchange, No I ask you, how can I protect the code inside As what's most important to me is that the same text will work on StackExchange, LaTeX and my Markdwon Editor (Currently your solution). |
Kramdown was actually covered in this link https://johnmacfarlane.net/babelmark2/?text=%5C%7Btest%5C%7D+%5C%5C. It follows the spec. I cannot account special extensions they add to do other things, but base Kramdown follows the spec.
Arithmatex uses a smart detection of
This is least important to me. This will never be 1:1 with StackExchange. There will be corner cases etc. In previous posts I feel I've given details that explain a more ideal setup. I will most likely add a new config to the package and update the docs to suggest using a non-generic mode for the best user experience. I will consider a different mode for Arithmatex to allow |
@facelessuser , I'd be happy for any solution that will handle
Do you mean I will have to do Thank You!!! |
What I meant was it would require explicit escape of
Either way it is configurable. It's a matter of preference. |
OK! If so, this will be perfect. |
Yes, basically |
Please create a new issue over at pymdown-extensions so I don't forget. |
I created an issue for that - facelessuser/pymdown-extensions#297. |
Thanks! |
FYI, investigation as turned up some changes that will be coming up in the default MathJax config. It should work better with generic mode as is. For those who don't like the "smart" dollar behavior of MathJax, that functionality will have an off switch coming in the next Arithmatex version. Documentation will be updated accordingly. |
A better default MathJax config is provided that targets just Requested changes to disable "smart" dollar via an Arithmatex config option are still in the pipe. |
Something is wrong with the latest version ( Here is my MarkdownPreview Settings:
I also tried But I just can render the Math in this file:
What happened? |
@RoyiAvital, Nothing changed. Your settings are just bad.
In your settings, the only extension you are enabling is |
I just copied it from Markdown Preview Documentation - Extra. I think that page should show the whole user settings file in a way which is a proper configuration. Should the User Settings file be like that:
|
It comes from a general approach that the user is familiar with how Sublime settings work. I understand that some people are new though. I doubt I'm going to show the whole config as most of that information is irrelevant. |
As far as your settings, I think it is good. Some of the alignment is wonky, but I think it is good. |
I just did a Copy & Paste from the default. Waiting on the @facelessuser , Amazing Work! |
Stuff like this 🙂 : "pymdownx.arithmatex":
{
"generic": true
}
Hopefully it will be soon. I'm waiting for the requester to make progress on the tabbed code feature in pymdown-extensions, but if that takes too long, I may just ship it. |
On 49fedf9?diff=split#diff-ce3720e959d991a5ce99fb6f121ac498 You changed:
I would suggest the following MathJax Configuration:
|
Please do create new issues instead commented in closed issues. While this is related to MathJax, this is a new introduced issue that should get a new issue tracker. And then I don't have to dig through the old closed issues to find it.
This was not intended to get merged, so I will revert. I was testing environments and such. As for other changes, you are free to override the default provided. Everyone is going to have a difference of opinion on alignment and such. Since all you have to do is reference your personal config instead of the default, it is pretty easy to customize to your liking, but I will revert the |
Okay, looking at the history, I introduced the left alignment in recent versions. To keep parity with what the default used to be, I'll set it back to the default, which I think was centered. |
I think it makes sense to have defaults as close as possible to what would one have in LaTeX as I believe most of the users who will use it have some experience with LaTeX. Regarding the issue, It is convenient to have all information in one place. Really appreciate your work quality. By the way, an idea to extension: Enable presentation mode. |
I've enabled the Wiki. I haven't in the past used the wiki much on my repos, but if you feel there is some useful information that would benefit people, feel free to post it.
I appreciate it.
It's an interesting idea. In my work environment it doesn't make since for me to use such a presentation framework as my employment expects powerpoint. Unfortunately I support too many repositories as is, so it is unlikely that I would have the time to do such project. But maybe someone one day will put together something like that. It wouldn't surprise me if someone else has played with such an idea. |
OK, Regarding the Presentation Mode. I might be missing the point here, but it could be a nice starting point. |
FYI: smart_dollar support has been released, but I still need to merge the latest pymdown-extensions over to Sublime dependencies. Maybe later today, but definitely this week.
Remark looks like it has its own Markdown parser and such. I feel in general, something like this should be pushed to a different plugin. Mabye even something simple as a plugin that opens a new file with slideshow template, and you just fill in the Markdown content. Markdown Preview is meant just to preview Markdown. It is kind of out of scope to provide slideshows etc. And if I add Remark, then I have to deal with other requests for X slideshow lib, or Y slideshow lib. For the most part, Markdown Preview is pretty much feature complete FWIW. I basically took over maintenance to keep the project alive as I was pretty much the only active contributor, but I was not the original author. So basically I look at this project as fixing bugs, maintaining compatibility with the latest Sublime Text, and maybe reworking problematic things (like maybe one day having better live reload capability). As far as new features our concerned, I'd have to have a pretty compelling feature to convince me to add new stuff. The idea with the 2.0 release was to simplify the guts of the code for easier maintenance. And to rely more on dependencies instead of us having to maintain our own vendored versions internally. I'm much more active on repos that this relies on, such as: Python Markdown (as a contributor), Pymdown-Extensions (author), etc. Pymdown-Extensions is where most of the custom Markdown features are actually developed, such as |
@facelessuser , I thought that the presentation thing is just wrapping the MarkDown code with different template than Markdown Preview does (As it seems that I wish I knew Python / JavaScript better to write such plug into your great Plug In project. P. S. |
Yes, that is what it seems, except I believe remark does the parsing, so you don't need MarkdownPreview to call any parsers on the source, meaning it doesn't really make sense to put it into MarkdownPreview. Just copy a template, put in your Markdown, and load it in your browser.
Not entirely sure what you are referring to here. I'm assuming it is related to the slideshows? If so, I don't think Arithmatex would work for this. As previously stated, remark seems to parse the Markdown itself; therefore, running your markdown through Python Markdown (with Arithmatex), doesn't make sense.
Just to clarify, as I want to make sure I understand, and am not giving off the wrong impression, I have no current plans to offer a slide show plugin. I honestly think what you need is just a template. I mentioned you could have a plugin simply create a new file with the template to make starting a slide show easy, but I wasn't planning on implementing one. If I am mistaken, and this statement referred to the new release of the dependencies with your Arithmatex changes, then yes, that will be released soon. |
@facelessuser , Regarding the presentation, well Markdown Preview know how to send HTML code to the OS default HTML. Maybe, as you wrote, it could be a different project. |
Yeah, Sublime knows how to do this too. Just have an HTML open, right click the view, select "Open in Browser". There really isn't need to specifically have Markdown Preview do it. I know technically, the content is Markdown, but it is only loosely associated with Markdow Preview only because the content is Markdown, but Markdown Preview shouldn't actually send the content through any parser. Essentially, what is actually required is to just be wrap the arbitrary content in HTML and send it to the browser. It would basically need it's own path because it doesn't fit into what Markdown Preview actually does. That is why I don't think it really belongs in Markdown Preview. It is Markdown related, but it is actually moving into supporting markdown related libraries opposed to just parsing and previewing.
As for Arithmatex support, the dependency as been updated, you'll have to run |
Man, this is perfect!!! Works like charm. |
Thanks! Glad it's working for you. |
Adding the following to your MarkdownPreview User Settings will fix MathJax after the recent update:
The text was updated successfully, but these errors were encountered: