You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用exam.tex通过exams2pdf生成PDF时,如何移除卷首答案列表?

移除exams2pdf生成PDF的卷首答案列表

问题背景

使用exams2pdf生成考试PDF时,卷首自动生成了答案列表,但已在题目选项旁添加勾选框,允许学生直接在题目旁标记答案,无需保留该卷首列表。

解决方案

在exams2pdf函数中添加answerlist = FALSE参数即可禁用卷首答案列表——该参数默认值为TRUE(会自动生成答案列表),设置为FALSE就能关闭此功能。

修改后的代码示例

exams2pdf(list(
    "boxplots.Rmd",
    c("tstat.Rmd", "ttest.Rmd", "confint.Rmd"),
    c("regression.Rmd", "anova.Rmd"),
    "scatterplot.Rmd",
    "relfreq.Rmd"
  ),
  template = c("templates/exam.tex", "templates/solution.tex"),
  answerlist = FALSE  # 禁用卷首答案列表
)

内容的提问来源于stack exchange,提问作者guyabel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 02:04:51