如何防止在 ConTeXt 中子项目列表开始的地方出现分页符?

如何防止在 ConTeXt 中子项目列表开始的地方出现分页符?

我有一份很长的文档,其中包含大量分层次的条目列表。它就像这样,但通常要长得多:

\startitemize[r]
    \item This is a statement.
    \startitemize[n]
           \item This is an example.
           \item This is another example.
           \item This is another example.
    \stopitemize
    \item This is another statement.
    \startitemize[n]
           \item This is an example.
           \item This is another example.
           \item This is another example.
    \stopitemize
\stopitemize

编译后,我发现它经常将分页符放在子列表的开头,因此它看起来像这样:

 _________________ _________________
|                 |                 |
| This is some    |    1. This is   |
| text. This is   |       an examp- |
| some more text. |       le.       |
| This is some    |    2. This is   |
| more text.      |       another   |
| i. This is      |       example.  |
|    a statement. |    3. This is   |
|_________________|_________________|

在某些情况下,这会让读者感到困惑,因为他们不知道这些示例属于该语句。首选行为是确保语句永远不会在没有至少一个示例的情况下出现,即使分页符必须强制将整个语句移到下一页,例如:

 _________________ _________________
|                 |                 |
| This is some    | i. This is a s- |
| text. This is   |    tatement.    |
| some more text. |                 |
| This is some    |    1. This is   |
| more text.      |       an examp- |
|                 |       example.  |
|                 |    2. This is   |
|_________________|_________________|

我该如何修复这个缺陷,以防止这些逐项显示的项目在没有至少一个子逐项显示的项目的情况下出现?

答案1

您可以添加intro关键字,以防止在开始之前出现分页符itemize

\startitemize[r]
    \item This is a statement.
    \startitemize[n,intro]
           \item This is an example.
           \item This is another example.
           \item This is another example.
    \stopitemize
    \item This is another statement.
    \startitemize[n,intro]
           \item This is an example.
           \item This is another example.
           \item This is another example.
    \stopitemize
\stopitemize

相关内容