diff --git a/工具v2/Ui_单一题号转为图片.py b/工具v2/Ui_单一题号转为图片.py
index 94386064..63297f4f 100644
--- a/工具v2/Ui_单一题号转为图片.py
+++ b/工具v2/Ui_单一题号转为图片.py
@@ -22,7 +22,7 @@ class Ui_Form(object):
def setupUi(self, Form):
if not Form.objectName():
Form.setObjectName(u"Form")
- Form.resize(278, 69)
+ Form.resize(278, 97)
self.label = QLabel(Form)
self.label.setObjectName(u"label")
self.label.setGeometry(QRect(10, 10, 31, 16))
@@ -41,6 +41,12 @@ class Ui_Form(object):
self.pushButton_open = QPushButton(Form)
self.pushButton_open.setObjectName(u"pushButton_open")
self.pushButton_open.setGeometry(QRect(200, 10, 75, 51))
+ self.label_3 = QLabel(Form)
+ self.label_3.setObjectName(u"label_3")
+ self.label_3.setGeometry(QRect(10, 70, 51, 16))
+ self.lineEdit_message = QLineEdit(Form)
+ self.lineEdit_message.setObjectName(u"lineEdit_message")
+ self.lineEdit_message.setGeometry(QRect(70, 70, 201, 20))
self.retranslateUi(Form)
@@ -53,5 +59,7 @@ class Ui_Form(object):
self.label_2.setText(QCoreApplication.translate("Form", u"DPI", None))
self.pushButton_convert.setText(QCoreApplication.translate("Form", u"\u8f6c\u6362", None))
self.pushButton_open.setText(QCoreApplication.translate("Form", u"\u6253\u5f00", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"\u9644\u52a0\u6587\u5b57", None))
+ self.lineEdit_message.setPlaceholderText(QCoreApplication.translate("Form", u"\u8f93\u5165\u9644\u52a0\u6587\u5b57, \u7559\u7a7a\u8868\u793a\u65e0\u9644\u52a0\u6587\u5b57", None))
# retranslateUi
diff --git a/工具v2/单一题号转为图片.py b/工具v2/单一题号转为图片.py
index 0b213006..3462f472 100644
--- a/工具v2/单一题号转为图片.py
+++ b/工具v2/单一题号转为图片.py
@@ -21,7 +21,8 @@ class MyWindow(QWidget,Ui_Form):
self.id = self.lineEdit_ID.text()
self.dpi = self.lineEdit_dpi.text()
pro_dict = load_dict("../题库0.3/Problems.json")
- content = pro_dict[self.id.zfill(6)]["content"]
+ prefix = self.lineEdit_message.text().strip()
+ content = f"{prefix} {pro_dict[self.id.zfill(6)]['content']}"
latex_raw = ReadTextFile("模板文件/独立文件模板.txt")
latexdata = StringSubstitute(r"<<待替换\d*>>",latex_raw,[content])
makedir("临时文件/pics")
diff --git a/工具v2/单一题号转为图片.ui b/工具v2/单一题号转为图片.ui
index 789419b1..fbc411ec 100644
--- a/工具v2/单一题号转为图片.ui
+++ b/工具v2/单一题号转为图片.ui
@@ -7,7 +7,7 @@
0
0
278
- 69
+ 97
@@ -85,6 +85,32 @@
打开
+
+
+
+ 10
+ 70
+ 51
+ 16
+
+
+
+ 附加文字
+
+
+
+
+
+ 70
+ 70
+ 201
+ 20
+
+
+
+ 输入附加文字, 留空表示无附加文字
+
+