修改学生和教师讲义制作后的输出呈现方式
This commit is contained in:
parent
50824ed5e8
commit
ab8cbf6ad4
|
|
@ -28,6 +28,9 @@ bodystring = GenerateStudentBodyString(problems,sectiontitles,pro_dict,consecuti
|
||||||
latex_data = StringSubstitute(r"<<[\s\S]*?待替换[\s\S]*?>>",latex_raw,(notetitle,bodystring)) #替换标题和bodystring
|
latex_data = StringSubstitute(r"<<[\s\S]*?待替换[\s\S]*?>>",latex_raw,(notetitle,bodystring)) #替换标题和bodystring
|
||||||
SaveTextFile(latex_data,outputfilepath) #保存.tex文件
|
SaveTextFile(latex_data,outputfilepath) #保存.tex文件
|
||||||
|
|
||||||
succeeded = XeLaTeXCompile(outputdir,notetitle+".tex")
|
if XeLaTeXCompile(outputdir,notetitle+".tex"):
|
||||||
|
print("编译成功")
|
||||||
|
else:
|
||||||
|
print("编译失败")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ problems = ["1:50000"] #题号列表, 每个字符串表示一个分块的题目
|
||||||
notetitle = "测试讲义教师版" #讲义标题, 也是文件标题
|
notetitle = "测试讲义教师版" #讲义标题, 也是文件标题
|
||||||
sectiontitles = ["课前","课后"] #小节标题列表, 如果与题号列表长度不符则作为不设小节处理
|
sectiontitles = ["课前","课后"] #小节标题列表, 如果与题号列表长度不符则作为不设小节处理
|
||||||
consecutivenumbering = False #不同小节是否连续编号, True表示连续编号, False表示每小节从1开始编号
|
consecutivenumbering = False #不同小节是否连续编号, True表示连续编号, False表示每小节从1开始编号
|
||||||
topandbottomusagestuple = (3,-1) #表示保留得分率最高的使用记录与最低的使用记录的个数, 有负数表示不排列
|
topandbottomusagestuple = (2,0) #表示保留得分率最高的使用记录与最低的使用记录的个数, 有负数表示不排列
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -30,7 +30,10 @@ bodystring = GenerateTeacherBodyString(problems,sectiontitles,pro_dict,obj_dict,
|
||||||
latex_data = StringSubstitute(r"<<[\s\S]*?待替换[\s\S]*?>>",latex_raw,(notetitle,bodystring)) #替换标题和bodystring
|
latex_data = StringSubstitute(r"<<[\s\S]*?待替换[\s\S]*?>>",latex_raw,(notetitle,bodystring)) #替换标题和bodystring
|
||||||
SaveTextFile(latex_data,outputfilepath) #保存.tex文件
|
SaveTextFile(latex_data,outputfilepath) #保存.tex文件
|
||||||
|
|
||||||
succeeded = XeLaTeXCompile(outputdir,notetitle+".tex")
|
if XeLaTeXCompile(outputdir,notetitle+".tex"):
|
||||||
|
print("编译成功")
|
||||||
|
else:
|
||||||
|
print("编译失败")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Reference in New Issue