-
Notifications
You must be signed in to change notification settings - Fork 30
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
Thanks #41
Comments
@william, thanks a lot for your kind words. I continue maintaining I consider integrating MathJax worth an attempt in the near future. I will try out your interesting script then also, which - I must confess - I do not understand completely (perhaps I need to learn a little more about MathJax first). Your solution for Thanks for your support. |
Your regular expression (slightly modified by me)
won't work with nested
Using Regex backreference here helps ...
thanks |
Your workaround above can now be replaced by using:
with Version 1.0 |
Thanks. I ended up getting a lot of feedback from my users about exactly what regexps, and in what order, etc., I was using. They are a little different than when I wrote the comments above. I also added support for using It does differ in some other ways from what you do, e.g., here's one: {
// We modify this from what's included in markdown-it-texmath to allow for
// multiple line inline formulas, e.g., "$2+\n3$" should work, but doesn't in upstream.
name: "math_inline",
rex: /\$((?:[^\$\s\\])|(?:[\S\s]*?[^\\]))\$/gmy,
tag: "$",
outerSpace: false,
pre,
post,
}, That said, of course they way you did it by adding beg_end is nice since you can preserve backward compatibility for users of your plugin. If nothing else, the point of this comment here is just that it could be useful for other users wanting more options... |
@williamstein @goessner Hi! You are very cool and your dev! Thanks. Could you advise me how can i use markdown-it-texmath with type script? where i can find types for it? |
I'm not aware of a discussion board, but just wanted to say thanks for this plugin. I just integrated it extensively into https://cocalc.com in this commit.
Regarding "Why doesn't markdown-it-texmath work with other engines ?" from the README, I needed to make this also work with mathjax (though we mainly use katex), and found it very easy to do so by using this option when creating the plugin:
I also needed to parse math environments that is determined by \begin/\end environments, but no dollar signs at all, e.g.,
None of the delimiters you have support that, so I just extended the built in dollars one via a new delimiter called "cocalc" that does right after loading as follows. This didn't require changing the code of this extension at all. The regular expression below took me a while to come up with:
In any case, many thanks for writing (and maintaining!) this plugin.
The text was updated successfully, but these errors were encountered: