emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to auto-renumber chapters


From: Ihor Radchenko
Subject: Re: How to auto-renumber chapters
Date: Sat, 31 Aug 2024 18:41:27 +0000

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>



reply via email to

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