mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 05:43:46 +01:00
Print error message when Latex cannot be parsed for state
This commit is contained in:
parent
96428182c3
commit
9bc755fed5
@ -44,7 +44,12 @@ class dataFileBase(object):
|
||||
math=TexState.find("$")
|
||||
lst=list(math.contents)
|
||||
mystr=str(lst[0])
|
||||
mathsoup=TexSoup(mystr)
|
||||
mathsoup=None
|
||||
try:
|
||||
mathsoup=TexSoup(mystr)
|
||||
except:
|
||||
print(f"Error when parsing latex state: {mystr}")
|
||||
exit(-1)
|
||||
newCommand.runAll(mathsoup,commands)
|
||||
st=str(mathsoup)
|
||||
m=re.match(r"^\^(?P<multiplicity>\d)(?P<symm>[^\s\[(]*)\s*(?:\[(?:\\mathrm{)?(?P<special>\w)(?:})\])?\s*(:?\((?P<type>[^\)]*)\))?",st)
|
||||
|
Loading…
Reference in New Issue
Block a user