在剪贴板mathpix文本处理工具中增加删除连续$符号功能, 增加替换ldots为cdots功能

This commit is contained in:
WangWeiye 2023-06-07 08:35:13 +08:00
parent d09368bc07
commit eb1018407f
1 changed files with 5 additions and 0 deletions

View File

@ -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: