Max Nikulin <[email protected]> writes:

>> -            contents
>> +            (or contents "\\leavevmode")
>>              (let ((case-fold-search t)
>
> "\\penalty0" may be safer (perhaps with additional "\\relax " or newline 
> for a case that next portion of text will be started from a number 
> without any space). I was not aware that penalties are not combined by 
> TeX, any is considered as a break point. There are various tricks like 
> \vfil\penalty100\vfilneg to allow variation of page height.
>
> Maybe e.g. 100 should be used instead of zero to make less probable page 
> break between section and subsection titles. (Carefully prepared text 
> likely will have at least a paragraph before next level header. Anyway 
> nobody expects that early drafts are carefully formatted.)
>
> There are should be a user option to disable this workaround and 
> probably an "#+options:" keyword. It should be carefully tested with 
> inline headings (\paragraph{...} and similar).
>
> I still believe that it is a LaTeX issue. I see why it is not supported, 
> but any workaround may be fragile. I am really surprised that TeX does 
> not generate apparent warning due to a page of enormous height.

What about simply \mbox{}?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to