From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniele Pizzolli Subject: Re: [PATCH] ox-koma-letter.el: Add support for section Date: Tue, 05 Jan 2016 18:12:33 +0100 Message-ID: <878u44zzzz9chq@me.localhost.invalid> References: <87lh88zzzzz01o@me.localhost.invalid> <87y4c7wwrj.fsf@gmx.us> <87y4c5zzzzbpw5@me.localhost.invalid> <874mett9o1.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGVAI-0004hw-TU for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 12:13:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGVAE-0004hu-NM for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 12:12:58 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:34038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGVAE-0004gj-Gs for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 12:12:54 -0500 Received: from mfilter21-d.gandi.net (mfilter21-d.gandi.net [217.70.178.149]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id BC9CEC5A6F for ; Tue, 5 Jan 2016 18:12:52 +0100 (CET) Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter21-d.gandi.net (mfilter21-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id TdkP9Ch8MpMN for ; Tue, 5 Jan 2016 18:12:51 +0100 (CET) Received: from localhost.invalid (host36-211-static.0-79-b.business.telecomitalia.it [79.0.211.36]) (Authenticated sender: me@toel.it) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 23115C5A5A for ; Tue, 5 Jan 2016 18:12:50 +0100 (CET) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Mon, Jan 04 2016, Rasmus wrote: > Hi Daniele, > > Daniele Pizzolli writes: > >> thanks for you comment. I try to explain my point of view better. Now >> the export to letter silently discard the headings text in the exported >> tex. This is quite bad, even if documented. As a user I want to change >> quite easily the export backend (text, latex, beamer, ...) while >> retaining most of my work. Every backend as it's own supported >> features, but discarding the input provided by the user does not provide >> the best user experience to me. > > That's a fair point. Nonetheless, Hi Rasmus, thanks for recognizing it. >> By the way this patch does not change the final output, if there is no >> section.lco available. So there should be no regression and only >> improvements. > >> I really prefer something that instead of discarding the user input >> rewrite it to fit the backend features (if there is no heading/section >> support, use something like the start of paragraph, and support section >> only if enabled by the user) but this is beyond my coding abilities in >> elisp, so I sent the minimal working patch with the minimal impact on >> existing behaviour. > > > Whether sections.lco is available is nontrivial. As I remember the patch, > it also imposed level two headings to be sections. Not really. With the current patch, all the headings inside the main content (that is the first not special tagged heading) are rendered with a section level that is one level more than expected because the first level is taken away by the main content (because the main content is not a section). So there should be some work to adjust the level by adding +1. The behaviour of one level headings is left unchanged because of the way ox-koma-letter works, but this can be changed, if there is a better approach. > If you really think this is the right approach, perhaps the "H:" option > could be used to set the special heading level... We=E2=80=99d need this= since > you can specify the opening with a heading. I am lost here. H: should work as expected. We have the inverse problem (go up to the level with sections). >>>> +Add [sections] to LATEX_CLASS_OPTIONS with: >>>> + >>>> +#+LATEX_CLASS_OPTIONS: [sections] >>>> + >>>> +If section.lco is unavaliable the section are exported in the tex >>>> +source but not rendered in the final pdf. >>> >>> Whether section.lco is available or not is a complicated question. You >>> first need to figure out what is the tex distribution (what if it=E2=80= =99s not in >>> PATH) and whether section.lco is available via something like kpsewhich. >>> Note that e.g. TL also looks in the current path. >> >> I use org to touch as less latex as possible, I just downloaded the >> section.lco and put in the same directory of my org file and everything >> was working. A little before I used apt-file search section.lco but >> since nothing was found I quickly reverted to the manual download. I >> wish that everything is packaged as distro package, but I can survive >> some manual work. > > This is because sections.lco is not part of KOMA-Script (like titlepage= =EF=BB=BF=C2=B9). > E.g. on my system with TL: > > $ kpsewhich sections.lco > /home/rasmus/.texmf/tex/latex/koma-script/sections.lco > > kpsewhich/tex also looks in the current directory, which is why you can > just place it in the same folder. Thanks for the info, I admit that LT and kpsewhich are unknown to me, as I said I try to stay away from latex and tex as much as possible. If there is some agreement on the patch I will update the doc to add those info. Best, Daniele