-
Notifications
You must be signed in to change notification settings - Fork 393
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
Wrong behavior around multiplication #89
Comments
Anyway, I will handle this issue today. |
Anyway some simple heuristic can be applied without waiting for #82 |
Re-open this issue since it is actually not resolved yet. |
Mind if I take a look into this? |
Maybe it's good if we get a list of possible LHS-RHS pairs with/without the multiplication symbol, e.g.,
|
I can't think of a case where we would want to remove the
|
Some complete examples:
In cases EDIT(2023-10-16)Added some consistent rules:
|
def (x, y, xy):
return xy
edit: I'm realizing that word is stylized differently than alphabet, so it should be clear that |
Yes this is intended in #139, but maybe the result is somewhat confusing for some users. |
Looking through the code this seems like we'll have to utilize information from expr codegen to figure out what nodes are wrapped in parens |
Another situation, if we have |
It looks
|
I think we eventually need more informative object than the raw string for expression codegen to implement this feature (and other stuff that rely on the LaTeX syntax rules). let me implement it later |
The current implementation converts$ab$ . This only works if the variables have only 1 character and doesn't generate a correct syntax for other cases:
a * b
intoabc * def
-->x * -y
-->These cases require explicit multiply operator ($\cdot$ or $\times$ ) between the operands.
I think the$left \cdot right$ by default, and try to avoid the operator only in the following cases:
Mult(left, right)
subtree should be converted toThis requires fine-graind name processing, and may be applied after #82.
The text was updated successfully, but these errors were encountered: