From d883c7f34bcbb60b45767fd7eedeba2a703b7f13 Mon Sep 17 00:00:00 2001 From: fzcqc <140309989+fzcqc@users.noreply.github.com> Date: Wed, 3 Jan 2024 19:57:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20expected=5Fwords=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=8D=E6=96=9C=E6=9D=86=20(#1442)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/latex_fns/latex_toolbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crazy_functions/latex_fns/latex_toolbox.py b/crazy_functions/latex_fns/latex_toolbox.py index 0a6a873..964507c 100644 --- a/crazy_functions/latex_fns/latex_toolbox.py +++ b/crazy_functions/latex_fns/latex_toolbox.py @@ -250,8 +250,8 @@ def find_main_tex_file(file_manifest, mode): else: # if len(canidates) >= 2 通过一些Latex模板中常见(但通常不会出现在正文)的单词,对不同latex源文件扣分,取评分最高者返回 canidates_score = [] # 给出一些判定模板文档的词作为扣分项 - unexpected_words = ['\LaTeX', 'manuscript', 'Guidelines', 'font', 'citations', 'rejected', 'blind review', 'reviewers'] - expected_words = ['\input', '\ref', '\cite'] + unexpected_words = ['\\LaTeX', 'manuscript', 'Guidelines', 'font', 'citations', 'rejected', 'blind review', 'reviewers'] + expected_words = ['\\input', '\\ref', '\\cite'] for texf in canidates: canidates_score.append(0) with open(texf, 'r', encoding='utf8', errors='ignore') as f: