-
Notifications
You must be signed in to change notification settings - Fork 11
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
$$ doesn't work #9
Comments
Hi @Jojo-lan, |
For example, when I print $$ and then print sin(x) between them, the sin(x) won't be translated into latex formula, I think that is because the inputRule can't deal with this condition. |
So you mean something like this (where -> indicates progress of the user writing the expression): If yes, that's true but intended. There is not really an easy way to tell if the formula inside is "finished". For instance, why should it not convert Thus, currently, the input rule will only trigger if you input the ending I hope this explains the issue you experienced. If not or I misunderstood anything, let me know! |
Thank you so much! Now I got that inputRule can't deal with this condition. I wonder if there is anyway that I can deal with it. I create a custom node and use a method like tiptap/mathematics-pro-extenson to convert the text between $ into that node, when I do this $$ -> |
Yeah, the pro extension (I think) uses more underlying ProseMirror API surface for this to work. If this is required for your use case, you could maybe try https://github.com/benrbray/prosemirror-math which uses a similar approach, as far as I know. It should be easy to also use this in TipTap (as it is built on top of prosemirror). However, I never tried it, as I personally prefer the approach of this package (i.e., LaTeX as full nodes and not text content). Cheers :) |
Thank you so much, I will have a try😊 |
When I print $$ and then insert the formula between them, it doesn't work because the input rule of tiptap doesn't support it. Would you please give me some ideas to fix it? Thank you.
The text was updated successfully, but these errors were encountered: