Skip to content
Snippets Groups Projects
Commit cec0874b authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Add support for negative exponents

parent 82f36bf4
Branches
Tags
No related merge requests found
......@@ -49,7 +49,7 @@ def _nodeToLatex(node: list):
except KeyError:
latexString += r'{\color{red}\mathrm{'+node[1]+r'}}'
if node[2]:
latexString += r'^' + node[2]
latexString += r'^{' + node[2] + r'}'
if node[1] == "":
latexString = r'{\color{red}'+latexString+r'}'
......@@ -129,8 +129,8 @@ def _parseFractionlessDsi(dsiString:str):
item = items.pop(0)
except IndexError:
item = ''
if re.match('tothe\{[0-9]\}', item):
tuple[2] = item[-2]
if re.match('tothe\{-?[0-9]\}', item):
tuple[2] = item.split('{')[1].split('}')[0]
try:
item = items.pop(0)
except IndexError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment