20230123 evening

This commit is contained in:
weiye.wang 2023-01-23 20:19:07 +08:00
parent a6bd53459d
commit a735be19e2
1 changed files with 6 additions and 2 deletions

View File

@ -286,6 +286,10 @@
"\n", "\n",
"for equation in raw_equations:\n", "for equation in raw_equations:\n",
" equation1 = equation\n", " equation1 = equation\n",
" #删除一些无效大括号\n",
" for i in range(3):\n",
" equation1 = re.sub(r\"_\\{([0-9a-zA-Z])\\}\",lambda x:\"_\"+x.group(1),equation1)\n",
" equation1 = re.sub(r\"\\^\\{([0-9a-zA-Z])\\}\",lambda x:\"^\"+x.group(1),equation1)\n",
" #合并一些公式中的无效空格\n", " #合并一些公式中的无效空格\n",
" for i in range(2):\n", " for i in range(2):\n",
" equation1 = re.sub(r\"([0-9A-Z])\\s+([0-9A-Z])\",lambda x:x.group(1)+x.group(2),equation1)\n", " equation1 = re.sub(r\"([0-9A-Z])\\s+([0-9A-Z])\",lambda x:x.group(1)+x.group(2),equation1)\n",
@ -392,12 +396,12 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.8.15" "version": "3.9.15 (main, Nov 24 2022, 14:39:17) [MSC v.1916 64 bit (AMD64)]"
}, },
"orig_nbformat": 4, "orig_nbformat": 4,
"vscode": { "vscode": {
"interpreter": { "interpreter": {
"hash": "42dd566da87765ddbe9b5c5b483063747fec4aacc5469ad554706e4b742e67b2" "hash": "ff3c292c316ba85de6f1ad75f19c731e79d694e741b6f515ec18f14996fe48dc"
} }
} }
}, },