Skip to content

Commit

Permalink
Update calc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JWock82 authored Nov 27, 2024
1 parent 355df1a commit ae69f48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ipycalc/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ def python_to_latex(text):
for unit in unit_list:
text = text.replace('*' + unit, ' \\ ' + unit)

# Remove multiplication symbols
# Replace multiplication symbols in front of numbers with a multiplication dot
for i in range(10):
text = text.replace('*' + str(i), '\\cdot{}' + str(i))

# Remove all other multiplication symbols
text = text.replace('*', '')

# Return the Latex text
Expand Down

0 comments on commit ae69f48

Please sign in to comment.