This is not something that is supported out of the box. You can do it, but you need to manipulate the parsed document yourself. You can do so using a TreeProcessor.
What you are looking for is the `numeral` property on the section nodes. This property accepts a string, so you can set it to whatever you want.
Here's an example:
Asciidoctor::Extensions.register do
tree_processor do
process do |doc|
sections = doc.sections
sections[0].numeral = 'i'
sections[1].numeral = 'ii'
(sections.slice 2, sections.length).each do |sect|
sect.numeral = sect.numeral.to_i - 2
end
nil
end
end
end
Cheers,
-Dan
On Mon, Jun 3, 2019 at 2:57 PM be.wood [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I am trying to figure out how to number some sections with Roman Numerals (preferably lowercase, but in general). What I'm looking to do is have some early sections numbered like this:
i. Forward
ii. Glossary
and then move on to the normal section numbering
1. Introduction
2. stuff
And to have each one independently tracked (so the the Introduction wouldn't be 3 in this case, but would restart).
I can find how to add Appendices, but not how to do something like this (if it is possible).
Thank you
--