From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: [bug] Export to latex truncates long subsections (WE attached) Date: Tue, 27 Aug 2019 18:10:07 +1000 Message-ID: <87blwbm3kw.fsf@gmail.com> References: <87sgpow94z.fsf@nicolasgoaziou.fr> <17ebee89-8f57-0a92-b708-532340aa0903@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34643) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2WYU-0007e6-14 for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 04:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2WYS-0002E1-CI for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 04:10:17 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:45216) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2WYS-0002Df-36 for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 04:10:16 -0400 Received: by mail-pf1-x443.google.com with SMTP id w26so13590990pfq.12 for ; Tue, 27 Aug 2019 01:10:15 -0700 (PDT) Received: from tim-desktop (2001-44b8-31f2-bb00-7285-c2ff-fe35-d2c4.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:7285:c2ff:fe35:d2c4]) by smtp.gmail.com with ESMTPSA id h195sm21529694pfe.20.2019.08.27.01.10.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2019 01:10:13 -0700 (PDT) In-reply-to: <17ebee89-8f57-0a92-b708-532340aa0903@gmx.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 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 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