-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed issue with E not parsing in preview, when using LaTeX #241
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great summary thanks.
For my benefit of understanding, it will be good to explain what happens to multi-character symbols containing, but not beginning with, E.
|
Thanks for that idea. I have updated the preview.
Question: |
|
On the point of parsing aliases in the preview, I don't totally understand the question, or the code (or the requirements!!). So I'll try and answer but apologies if I'm missing the point:
As a reference, the current behaviour for typed input is desirable:
The current behaviour for writing is different. We parse inputs to check that they work, but we display the MathPix latex. This is primarily because parsing and re-rendering as LaTeX may introduce errors in the LaTeX preview. Sympy-to-LaTeX is poor in complex cases (LLMs are probably quite good though!). So currently in writing/draw mode we can't make any changes to the preview LaTeX can we? I think that's the answer to your question? In terms of requirements, we could/should revisit this, as it would be good to augment the preview. Augmenting in the short term would be as the example above; but in the long term we can do a lot more e.g.:
|
|
Thanks Peter. Yes in the code aliases are the alternatives in the app. Currently, these alternatives are not being used in the LaTeX preview. I'll add them to the backlog and merge these changes. |
Problem:
When using handrawing (or LaTeX) and multi-character symbols with
Ein, would not parse.This was due to the
latex2sympyhandling for the symbols not handling theE.Fix:
The main fixes were in
preview_utilities.py.Eandereplacements, and captured which is replaceEore.Ereplacement to replace with the character that was captured during preprocessingOther changes
preview_tests.py- Added relevant testsevaluation_tests.py- Added relevant tests