# [texhax] List of Examples (page break?)

bnb at ams.org bnb at ams.org
Sat Sep 26 20:06:26 CEST 2015

On Sat, 26 Sep 2015, David Carlisle wrote:

Barbara wrote

> if i were coding this in plain tex,
> i would set a switch to indicate that

"list item" rather than "heading" (since theorem uses lists) but yes that
is exactly
what latex does: it detects that one list is starting directly inside
another and
invokes a special layout.

But by adding  or \leavemode or \mbox{} etc you defeat that and hide
the outer list, which is why you can get a bad page break.

The layout latex uses for immediately nested lists is to move the item out
of the inner list and place it next to the item label of the outer list.

yes, this happens reliably, and isn't
wanted by either authors or production
editors.  (for one thing, it makes an
attempt to use \label and \ref for one
or the other ineffectual.)

It does this consistently whether it's itemize in a theorem or an itemize
as the
first thing after \item in an enumerate or outer itemize.

This is a deliberate design decision (which as far as I can tell no one
likes:-)
but the way to fix that is to change the layout used for nested lists, not
to hide
the fact that the lists are nested.

you're correct about the decision being
disliked.  an associated problem, namely
the inability of an optional argument to
a list item to break to a new line if it
exceeds the text width, has been worked
around for theorems, but it still exists
for the proof environment.  this complicates
matters.  (needless to say, i really wish
that the list mechanism had never been
used for defining the theorem and proof
environments.)

(Might post some code later, no time now:-)

would be greatly appreciated.  thanks.
-- bb