Skip to content
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

\times not displayed between numbers with exponents #37

Closed
turner-eng opened this issue Jun 23, 2021 · 2 comments
Closed

\times not displayed between numbers with exponents #37

turner-eng opened this issue Jun 23, 2021 · 2 comments

Comments

@turner-eng
Copy link
Contributor

turner-eng commented Jun 23, 2021

using py2tex():

5*25**2 becomes 5{25}^2} instead of 5 \times {25}^2

5*25**2/4 becomes \frac{5{25}^2}{4} instead of \frac{5 \times {25}^2}{4}

@erwanp
Copy link
Owner

erwanp commented Jun 23, 2021

Hi, thanks for reporting !

\times is only added if the right component "looks like a float", which is evaluated here.
In the present case, 25**2 is evaluated as {25}**2 , which fails to be evaluated as a float because of the brackets.

Suggestion :

  • force the multiplier to always be a \cdot, or \times (done here)
  • only remove it if (something that looks like) a number precedes (something that looks like) a letter

Rather than removing the multiply symbol by default ; and adding it only in exceptions. This would be more robust and accurate.

emetor added a commit that referenced this issue Sep 2, 2021
Solving issue #37: \times not displayed between numbers with exponents
@emetor
Copy link
Collaborator

emetor commented Sep 2, 2021

Solved with pull request #45

@emetor emetor closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants