在剪贴板mathpix文本处理工具中增加删除连续$符号功能, 增加替换ldots为cdots功能
This commit is contained in:
parent
d09368bc07
commit
eb1018407f
|
|
@ -292,6 +292,8 @@ for equation in raw_equations:
|
|||
#改单位
|
||||
equation1 = re.sub(r"mathrm\{cm\}","text{cm}",equation1)
|
||||
equation1 = re.sub(r"mathrm\{km\}","text{km}",equation1)
|
||||
#改cdots
|
||||
equation1 = re.sub(r"ldots","cdots",equation1)
|
||||
modified_equations.append(equation1)
|
||||
|
||||
|
||||
|
|
@ -362,6 +364,9 @@ modified_data = re.sub(r"([\u4e00-\u9fa5\$])[\s]*\n\\fourch",lambda x: x.group(1
|
|||
#改圆弧
|
||||
modified_data = re.sub(r"overparen",r"overset\\frown",modified_data)
|
||||
|
||||
#改连续的两个$$
|
||||
modified_data = re.sub(r"([\S])(\$\$)([\S])",lambda x: x.group(1)+x.group(3),modified_data)
|
||||
|
||||
setCopy(modified_data)
|
||||
|
||||
with open("临时文件/outputfile.txt","w",encoding = "utf8") as f:
|
||||
|
|
|
|||
Reference in New Issue