erwanp / pytexit

Convert a Python expression to a LaTeX formula
https://pytexit.readthedocs.io/
Other
114 stars 31 forks source link

Negative Sign Before Parentheses #59

Open davemlz opened 2 years ago

davemlz commented 2 years ago

Hi!

First, this package is super great! Thank you!

I found something weird, if I do py2tex("a - (b - (c - d))"), I get '$$a-b-c-d$$'. Then both equations are not the same anymore. Maybe doing the whole distributive approach could be hard here, but maybe keeping the parantheses would be easier :)

Thank you!

Best,

Dave

abuyukyi101198 commented 1 year ago

Hey, I my pull request should fix this issue in a way. Not keeping parentheses but rather adding ones where there are subtractions.