I think I agree with Julius. While it may be a legitimate use case, the risk that it will break other use cases seems a bit high (I've never run into this issue in many years of org use).
Perhaps add another document 'type' into 'org-latex-classes which adds the xpatch and associated change to the default. I have a number of such 'templates' (e.g. to generate work documents with the 'approved' colours and logo etc). It works quite well. Tim Julius Dittmar <julius.ditt...@gmx.de> writes: > Hi folks, > > Am 27.08.19 um 08:57 schrieb Vladimir Nikishkin: >> I have indeed investigated the issue, and this is the link: >> https://latex.org/forum/viewtopic.php?f=47&t=32788 >> >> To make the long story short, the folowing trick is needed to allow >> page breaks after headings (which is a completely standard case in >> -org). >> >> #+begin_src latex >> \usepackage{xpatch} >> \makeatletter >> % This is not recommended, because it can break several things >> \xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{% >> \typeout{WARNING: \string\@afterheading\space broken}% >> }{% >> \@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd% >> } >> \makeatother >> #+end_src >> >> Shall this trick be considered for inclusion in 'org' officially? >> I mean, having lists of empty headings is a perfectly standard use case for >> org. > > I would not want that as the default. Yes, it is one standard use case. > It would break other standard use cases, like creating ordinary > documents, though. > > Perhaps variant adding such a patch could be added to org-latex-classes, > or at least mentioned in the docs to org-latex-classes? That way you can > use this "class" version for such cases without adding unnecessary > uglyness to other org-created documents. > > Another possible approach would be a change in the export functions. > What really is needed here, from my point of view, is that the export > adds a superficial paragraph to a heading in the case that there's no > content at all. Nothing should be added if the heading has sub-headings, > I count that as content. In case there is no content at all, then some > form of breakable vertical space should be added. I don't know enough > LaTeX to find the least intrusive way, though I'd try \vspace{0pt}. > > I did never dig into the export functions, so I don't know how difficult > that would be. > > Just my thoughts, > Julius Dittmar -- Tim Cross