emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] ox-koma-letter.el: Add support for section


From: Rasmus
Subject: Re: [O] [PATCH] ox-koma-letter.el: Add support for section
Date: Tue, 05 Jan 2016 19:39:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Ciao Daniele,

Daniele Pizzolli <address@hidden> writes:

>> 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).

That’s fair.

> 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.

Some notes which are probably obvious to you, but which at least I need to
think about the problem follows.

1. From above, I guess you can take the relative level of the opening
   headline plus one.

2. As I recall, there’s no limitation on the level of the opening in
   org-koma-letter--keyword-or-headline.  It simply takes the first
   headline without a special keyword.  It need not be top level.

It seems you’d have to implement the following:

  - The opening headline is at the relative top level.  /This breaks
    backward-comparability/.  So perhaps only if sections are requested,
    although ox-koma-letter already has WAY too many options and
    configurations.
  - Sections start at (1+ (or "the opening level" "the relative top level")).
  - Bonus: How to configure the mapping of levels to section, subsection
    etc.  E.g. what if I want to use \addsect in stead of sections?  (I
    don’t remember if this is supported by sections.lco; IMO it’s very
    reasonable to just take assumptions according to what is available in
    sections.lco)
  
Some people organizes letters like this with subtree export (re previous
posts to this list).  It must work in that case.

    * letter one
    ** to one :to:
    ** opening one,
       Letter 1 
    * letter two
    ** to two :to:
    ** opening two,
       Letter 1 


>> If you really think this is the right approach, perhaps the "H:" option
>> could be used to set the special heading level...  We’d 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).

Compare

    #+options: H:2
    * section
    ** frame

and

    #+options: H:1
    * section
    ** frame

in ox-beamer.  Perhaps it’s an overkill for ox-koma-letter.

> 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.

I think it’s best to add a switch (defcustom) either per document or at
least a global variable.  It defaults to nil.  E.g. #+options: sections:t

Thanks,
Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




reply via email to

[Prev in Thread] Current Thread [Next in Thread]