From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Re: Numbering only second-level headlines in export
Date: Thu, 01 Mar 2018 09:37:23 +0200 [thread overview]
Message-ID: <87muzs6ybw.fsf@iki.fi> (raw)
In-Reply-To: 87efl47u6h.fsf@gmail.com
>> 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.
Brilliant, that worked like a charm on first trial. Thanks!
(BTW, my export target is html.)
Jarmo
prev parent reply other threads:[~2018-03-01 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 16:04 Numbering only second-level headlines in export Jarmo Hurri
2018-02-28 20:09 ` Eric S Fraga
2018-03-01 7:37 ` Jarmo Hurri [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87muzs6ybw.fsf@iki.fi \
--to=jarmo.hurri@iki.fi \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.