From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julius Dittmar Subject: Re: [bug] Export to latex truncates long subsections (WE attached) Date: Tue, 27 Aug 2019 09:42:25 +0200 Message-ID: <17ebee89-8f57-0a92-b708-532340aa0903@gmx.de> References: <87sgpow94z.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58690) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2W7e-0007U3-CD for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 03:42:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2W7d-0006Fm-4p for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 03:42:34 -0400 Received: from mout.gmx.net ([212.227.15.15]:36045) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2W7c-0006FF-OS for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 03:42:33 -0400 Received: from [192.168.175.209] ([87.139.53.30]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MhhwJ-1hq3Vv1GCp-00MrvW for ; Tue, 27 Aug 2019 09:42:28 +0200 In-Reply-To: Content-Language: de-DE List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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=3D47&t=3D32788 > > 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