新课备课稿生成中加入了作业是否设置空间的选项
This commit is contained in:
parent
0c25cf1ee7
commit
ace470661a
|
|
@ -892,7 +892,7 @@ def GenerateLessonPreparationDraft(notetitle, outputdir, adict, prodict, objdict
|
||||||
print("编译失败")
|
print("编译失败")
|
||||||
return latex_data # 返回有错误的latex源代码
|
return latex_data # 返回有错误的latex源代码
|
||||||
|
|
||||||
def GenerateLessonPreparation(notetitle, outputdir, adict, prodict, objdict, basicknowledgedict): #根据adict生成每一课时的教案
|
def GenerateLessonPreparation(notetitle, outputdir, adict, prodict, objdict, basicknowledgedict, homeworkspaces = False): #根据adict生成每一课时的教案
|
||||||
output = "\\tableofcontents\n\\newpage\n\n"
|
output = "\\tableofcontents\n\\newpage\n\n"
|
||||||
|
|
||||||
outputfilepath = os.path.join(outputdir,notetitle+".tex")
|
outputfilepath = os.path.join(outputdir,notetitle+".tex")
|
||||||
|
|
@ -933,13 +933,15 @@ def GenerateLessonPreparation(notetitle, outputdir, adict, prodict, objdict, bas
|
||||||
if not remarks == "":
|
if not remarks == "":
|
||||||
output += "\\subsection{备注}\n\n"
|
output += "\\subsection{备注}\n\n"
|
||||||
output += remarks + "\n\n"
|
output += remarks + "\n\n"
|
||||||
output += "\\newpage\n\n\\subsection{课后作业}\n\n"
|
if homeworkspaces:
|
||||||
output += GenerateStudentBodyString(homeworklist,[],prodict,consecutivenumbering=False,answered=False)
|
output += "\\newpage\n\n"
|
||||||
|
output += "\\subsection{课后作业}\n\n"
|
||||||
|
output += GenerateStudentBodyString(homeworklist,[],prodict,consecutivenumbering=False,answered=False,spaceflag=homeworkspaces)
|
||||||
output += "\\newpage\n\n"
|
output += "\\newpage\n\n"
|
||||||
else:
|
else:
|
||||||
output += "\\section{%s \ %s}\n\n"%(lessonid,lessonname)
|
output += "\\section{%s \ %s}\n\n"%(lessonid,lessonname)
|
||||||
output += "\\subsection{复习题}\n\n"
|
output += "\\subsection{复习题}\n\n"
|
||||||
output += GenerateStudentBodyString(homeworklist,[],prodict,consecutivenumbering=False,answered = False)
|
output += GenerateStudentBodyString(homeworklist,[],prodict,consecutivenumbering=False,answered = False,spaceflag=homeworkspaces)
|
||||||
output += "\\newpage\n\n"
|
output += "\\newpage\n\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
notetitle = "高一上学期教案截至20230728" # 文件名, 也是文件标题
|
notetitle = "高一上学期教案截至20230828" # 文件名, 也是文件标题
|
||||||
outputdir = "临时文件" # 输出文件夹, 不建议修改
|
outputdir = "临时文件" # 输出文件夹, 不建议修改
|
||||||
|
|
||||||
from database_tools import *
|
from database_tools import *
|
||||||
|
|
@ -9,4 +9,4 @@ obj_dict = load_dict("../题库0.3/LessonObj.json")
|
||||||
lessons_dict = load_dict("../题库0.3/LessonsCut.json")
|
lessons_dict = load_dict("../题库0.3/LessonsCut.json")
|
||||||
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")
|
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")
|
||||||
|
|
||||||
GenerateLessonPreparation(notetitle, outputdir, preparationdict, pro_dict, obj_dict, basicknowledge_dict)
|
GenerateLessonPreparation(notetitle, outputdir, preparationdict, pro_dict, obj_dict, basicknowledge_dict, homeworkspaces= False)
|
||||||
Reference in New Issue