-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Feature/svelte latex regex (#16136) #16508
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
base: master
Are you sure you want to change the base?
Conversation
Hey @srogmann! Thank you for this contribution :) Yeah, we will definitely work sth out from these PRs :) |
7eb8914
to
9b31191
Compare
@ggerganov could u also please take a look at this and test your edge cases? @watamario15 @squik67 also some feedback & testing from you would be really useful :) |
Okay, thanks for reporting @ggerganov. I'd like to wait just a bit longer for @watamario15 and @squik67 to add their feedback and verify if there are more edge cases to be addressed before we introduce any further improvements to this. |
Thanks for the tests! I can reproduce the non-rendered formulas. The Example: working and non-working.
I'll have a look at it. |
From my quick check, this doesn't get rendered:
|
Close #16136
This PR handles LaTeX blocks in (...) and [...], as well as dollar amounts like $100 that should not be interpreted as inline LaTeX.
Examples (e.g. prompt "Think of a grade 4 math question regarding amounts."):
[
\left{ \begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix}, \begin{pmatrix} -1 & 0 \ 0 & -1 \end{pmatrix} \right} = {\pm I}
]
@allozaur : I wrote most of this PR a week ago, only just now noticed issue #16136 and your PR #16496. In math-formulas.ts, I've added examples for Storybook, along with tests for Vitest. Feel free to take a look and let me know your thoughts. Detecting inline LaTeX is inherently tricky, so my approach likely won't cover every edge case, but I hope it's a step in the right direction.