【发布时间】:2020-09-26 22:53:07
【问题描述】:
我目前正在使用 R/exams 软件包,特别是使用 exams2nops 函数创建考试,并且问题的顺序是随机的。除了一个细节外,一切都很好:samepage = TRUE 选项只能防止段落中的分页符。但是,出于我的目的,有必要不要拆分任何练习。在一个文本中仍然可以只写一个段落(尽管这对清晰没有帮助)。不幸的是,每当我需要包含一个表格时,我都不得不开始一个新段落,该段落不受分页“保护”。由于随机化,总会有一些副本,其中文本和表格被拆分为多个页面。我尝试了 .Rmd 和 .Rnw 文件,还尝试集成一些 LaTeX 函数,例如 \nopagebreak 和 \needspace,但均未成功。到目前为止,我对 LaTeX 并没有太多经验,而且在 Google 的帮助下我也没有找到解决方案。
这是我所说的练习类型的一个最小示例:
.Rmd
Question
========
Some kind of question:
| A | B | C |
|:-:|:-:|:-:|
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
Answerlist
----------
* First option
* Second option
* Third option
Some further informational text.
.Rnw
\begin{question}
Some kind of question:
\begin{center}
\begin{tabular}{ccccccr}
$\text{A}$ & $\text{B}$ & $\text{C}$ \\
$\text{1}$ & $\text{2}$ & $\text{3}$ \\
$\text{1}$ & $\text{2}$ & $\text{3}$ \\
$\text{1}$ & $\text{2}$ & $\text{3}$ \\
$\text{1}$ & $\text{2}$ & $\text{3}$ \\
$\text{1}$ & $\text{2}$ & $\text{3}$ \\
\end{tabular}
\end{center}
Some further informational text.
\begin{answerlist}
\item First option
\item Second option
\item Third option
\end{answerlist}
\end{question}
我不确定要尝试什么。
【问题讨论】: