1

I have a lengthy document containing lots of itemized lists, in two levels. It is like this, but often much longer:

\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

After compiling, I found that it often places page breaks at the beginning of the sub-list, so that it looks like this:

 _________________ _________________
|                 |                 |
| 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   |
|_________________|_________________|

In some cases, this confused readers, who do not know that the examples belong to the statement. The preferred behavior would make sure that the statements never appear without at least one of the examples below it, even if the page break must force this whole statement to the next page, e.g.:

 _________________ _________________
|                 |                 |
| 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   |
|_________________|_________________|

How can I fix the breaking to prevent these itemized items from appearing along without at least one of their sub-itemized items?

  • 2
    Try adding \startitemize[n,intro]. – Aditya Sep 2 '13 at 19:48
  • I would love to reproduce the problem, but everything seems fine. – doed Dec 9 '13 at 12:26
  • @Aditya that should be an answer. – Andrew Swann May 6 '17 at 17:02
2

You can add the intro keyword, which prevents a page break before the start of 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.