From 4d4f1acf308a625476c3ce9ad02d0350740fc199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Wed, 5 Feb 2020 09:51:54 +0100 Subject: [PATCH] Support $\sim$ --- tools/lib/utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/lib/utils.py b/tools/lib/utils.py index 724a738a..7b9bdcc5 100644 --- a/tools/lib/utils.py +++ b/tools/lib/utils.py @@ -23,8 +23,13 @@ def desarg(tex): return nodify(lst,tex.name,tex.parent) def getValFromCell(cell): unsafe=False - val= list(cell.contents)[0] - if type(val) is TexNode and val.name=='emph': + lst= list(cell.contents) + val= lst[0] + if type(val) is TexNode and str(val.expr)=='$\sim$' : + unsafe=True + val = lst[1] + val=checkFloat(str(val)) + elif type(val) is TexNode and val.name=='emph': unsafe=True val=val.string val=checkFloat(str(val))