[texhax] List of Examples (page break?)

David Carlisle d.p.carlisle at gmail.com
Sat Sep 26 19:42:10 CEST 2015


Barbara wrote

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

"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.

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.

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

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20150926/af9895e7/attachment.html>


More information about the texhax mailing list