From 9e43fda52d648d26e0e1dc646850ffe5ae0a0330 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Sun, 4 Feb 2024 16:22:48 +0800 Subject: [PATCH] =?UTF-8?q?refinemathpix=E4=B8=AD=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9langle=E5=92=8Crangle=E5=89=8D\left=E4=B8=8E\right?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 47d8795a..2f29aa8d 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1223,6 +1223,7 @@ def RefineMathpix(raw_string): # 进一步修改mathpix得到的字符串 string = re.sub(r"\\right([\.\)\]|])",lambda matchobj: "" if matchobj.group(1) == "." else matchobj.group(1),string) #删去括号前的\right标记\ string = re.sub(r"\\left\\\{","\\{",string) #删去大括号前的\left标记 string = re.sub(r"\\right\\\}","\\}",string) #删去大括号前的\right标记 + string = string.replace("\\left\\langle","\\langle").replace("\\right\\rangle","\\rangle") for s in puctuationsfulltosemi: string = re.sub(s,puctuationsfulltosemi[s],string) #将部分全角标记替换为半角 for s in replacestrings: