From: Eric S Fraga <esflists@gmail.com>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Numbering only second-level headlines in export
Date: Wed, 28 Feb 2018 20:09:26 +0000 [thread overview]
Message-ID: <87efl47u6h.fsf@gmail.com> (raw)
In-Reply-To: <87inahdrt1.fsf@iki.fi> (Jarmo Hurri's message of "Wed, 28 Feb 2018 18:04:10 +0200")
[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
next prev parent reply other threads:[~2018-02-28 20:09 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 [this message]
2018-03-01 7:37 ` Jarmo Hurri
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efl47u6h.fsf@gmail.com \
--to=esflists@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jarmo.hurri@iki.fi \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).