emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Numbering only second-level headlines in export


From: Eric S Fraga
Subject: Re: [O] Numbering only second-level headlines in export
Date: Wed, 28 Feb 2018 20:09:26 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Wednesday, 28 Feb 2018 at 18:04, Jarmo Hurri wrote:
> Greetings.
>
> What - if any - would be the recommended way to implement numbering only
> second-level headlines in an exported document with running numbering
> (resets with first-level headline change)?

You haven't said what export target you are using.  In any case, I would
suggest you look at using a counter.  See section 12.5 of the org manual
but specifically:

‘{{{n}}}’
‘{{{n(NAME)}}}’
‘{{{n(NAME,ACTION)}}}’
     This macro implements custom counters by returning the number of
     times the macro has been expanded so far while exporting the
     buffer.  You can create more than one counter using different NAME
     values.  If ACTION is ‘-’, previous value of the counter is held,
     i.e.  the specified counter is not incremented.  If the value is a
     number, the specified counter is set to that value.  If it is any
     other non-empty string, the specified counter is reset to 1.  You
     may leave NAME empty to reset the default counter.

I would turn off numbering of headings (num:nil option) and then have
the counter in each second level heading.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d

Attachment: signature.asc
Description: PGP signature


reply via email to

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