在TL25
中直接使用latexmk -pdfxe
编译确实会出现:
! LaTeX Error: The key 'exam-zh/solution/show-answer' is unknown and is being
(LaTeX) ignored.
For immediate help type H <return>.
...
l.241 }
向上溯源,这个问题报错显然是因为Tl25
自带的v0.2.5
的exam-zh
不认识这个key...
在USTBexam.cls
中,此处写死了solution/show-answer = true,
,是没有考虑到exam-zh
后来的可能更新的...:
% Line 211
\examsetup{
page = {
foot-content = {
\l_ustbexam_title_tl \, 第~\thepage~页 \quad 共~\lastpage@lastpage~页
},
},
sealline = {
show = true,
scope = mod-2,
circle-show = false,
line-type = dotted,
odd-info-content = {{装},{订},{线},{内},{不},{要},{答},{题}},
odd-info-xshift = 12mm,
text = {自觉遵守考试规则,诚信考试,绝不作弊},% \\装订线内不要答题},
text-direction-vertical = true,
text-width = 0.6\textheight,
text-format = \normalfont,
text-xshift = 20mm
},
scoringbox/type = onecolumn,
symbols/change-frac-style = true,
symbols/change-dfrac-style = true,
solution/blank-type = hide,
solution/show-answer = true,
solution/label-content = 解,
question/show-answer = true,
problem/show-answer = true,
paren/show-answer = true,
fillin/show-answer = true,
}
进一步回溯,我们发现OP上传的文件信息为:
\ProvidesExplClass {USTBExam} {2022-11-04} {v2.0} {An exam template for USTB}
开发者在写该.cls
此时大概率使用的是TL23
自带的v0.1.20
前后的版本,我们进一步查看其文档:
由于我没找到v0.1.20
的.pdf
下载链接,用[0.1.23] - 2022-12-20
代替: https://gitee.com/xkwxdyy/exam-zh/releases/download/v0.1.24/exam-zh-doc.pdf
在0.2.0版本之前的文档:
现在TL25
时对应0.2.5的文档:
对于solution/show-answer
这一键值对已经发生了更新...这也是为什么报错的原因。
Remarks:
USTBExam.cls
还有多少mismatch...我不知道,我也没有改的任何动机exam-zh
的v0.1.x
版本,这是USTBExam.cls
没有及时随着exam-zh
更新的问题,理论上,USTBExam-v2.0
从如今来看已经obsoleted,不应该再被使用exam-zh
发生了从v0.1
到v0.2
的破坏性更新,由此产生的版本错配问题自然由下载者负责...USTBExam.cls
已经更新到v2.3
https://github.com/htharoldht/USTBExam/releases/tag/v2.3.0 你可以自行测试关注下是否已经修复,关于模板问题,请向开发者提issues