From: Ihor Radchenko <yantar92@posteo.net>
To: Sharon Kimble <boudiccas@skimble09.plus.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to auto-renumber chapters
Date: Sat, 31 Aug 2024 18:41:27 +0000 [thread overview]
Message-ID: <877cbwlelk.fsf@localhost> (raw)
In-Reply-To: <87mskxrqdx.fsf@skimble09.plus.com>
Sharon Kimble <boudiccas@skimble09.plus.com> writes:
> I'm writing a fiction book, and have just added several chapters from a previous draft to it.
>
> As a result I now have
>
> ** Chapter 2
> blah
>
> ** Chapter 2
> blah de blah
>
> ** Chapter 3
> more blahing
>
> How can I get these new chapters to autorenumber themselves please, so that they will show Chapter 2, Chapter 3 and Chapter 4?
Yet another solution, in addition to what was provided in other replies,
is using macros. When you have
** Chapter {{{n}}}
...
** Chapter {{{n}}}
...
{{{n}}} will be automatically replaced with a counter, but only on
export. See https://orgmode.org/manual/Macro-Replacement.html#index-n_002c-macro
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
prev parent reply other threads:[~2024-08-31 18:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 8:41 How to auto-renumber chapters Sharon Kimble
2024-08-28 16:20 ` András Simonyi
2024-08-28 17:55 ` Gregor Zattler
2024-08-31 18:41 ` Ihor Radchenko [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
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=877cbwlelk.fsf@localhost \
--to=yantar92@posteo.net \
--cc=boudiccas@skimble09.plus.com \
--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 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).