Nick Dokos <nicholas.do...@hp.com> writes:

> \def\mykeepwithnextpar{\par\nobreak\@afterheading}

> However, I find it exceedingly difficult to manufacture an example
> that will produce the bad break that the OP reports: LaTeX seems
> very reluctant to break after the headline.

Yes. That's because the above snippet is already part of the
definition of a section (from chapter down to paragraph). IIRC it's
defined in the latex kernel. Therefore it should not make any
difference if the command is only used directly after a sectioning
command.

One way to ensure that some part of the document is always seen as a
single entity by latex is to put it in a minipage (maybe there are
better options, but that's my fallback if I need to ensure that
something is always kept together).

-- 
Until the next mail...,
Stefan.

Reply via email to