From d8ba8caa1a740c6f8da838a4d8531c1912277916 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Tue, 5 Mar 2024 07:43:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=9Ewin=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=9A=84=E5=AD=97=E4=BD=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 0e02cdc3..65579e62 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -929,6 +929,9 @@ def XeLaTeXCompile(filedir,filename): #在filedir目录中用XeLaTeX编译filena def XeLaTeXTest(editedid,adict,objdict,misc,templatepath,outdir,outfile): #对adict中的题号字符串editedid进行编译测试, 返回成功True或失败False latex_raw = ReadTextFile(templatepath) + if sys.platform != "win32": #非win系统用默认字体 + latex_raw = re.sub(r"fontset[\s]*=[\s]*none","fontset = fandol",latex_raw) + latex_raw = re.sub(r"\\setCJKmainfont",r"% \\setCJKmainfont",latex_raw) if misc["教师版"] == True: latex_raw = latex_raw.replace(r"学号\blank{50} \ 姓名\blank{80}","上海市控江中学") bodystring = "\\begin{enumerate}\n\n"