erwanp / pytexit

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

pow(x,y) doesn't work in py2tex() #35

Closed turner-eng closed 2 years ago

turner-eng commented 3 years ago

py2tex("pow(a,b)") currently produces: $$\operatorname{pow}\left(a, b\right)$$ instead of: a^b

Do you want pow(a,b) to result completely like a**b?

If yes, we should do the following shown in the picture

  1. change the name "power" with "pow" in core.py->visit_Call() and
  2. in the same function, remove the "self.parenthesis()" around args[0] image

reference

image
erwanp commented 3 years ago

Yes let's do it ! I've never used pow before but it's standard Python syntax

emetor commented 2 years ago

pow(x,y) enabled in commit #44