Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
20 posts
|
I would like to be able to begin section numbering with 12.1, 12.2, 12.3 etc, but it seems :sectnum: always starts with 1. Is there a way to set the starting number and then have automatic numbering continue from there?
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
48 posts
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
In reply to this post by Tom Swan
At the moment this can be done with a Treeprocessor. There's an open issue to add this behavior to core. See https://github.com/asciidoctor/asciidoctor/issues/1434 -Dan On Sun, Dec 18, 2016 at 5:00 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote: I would like to be able to begin section numbering with 12.1, 12.2, 12.3 etc, but it seems :sectnum: always starts with 1. Is there a way to set the starting number and then have automatic numbering continue from there? Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
In reply to this post by rockyallen
Spot on, rocky! -Dan On Sun, Dec 18, 2016 at 5:45 PM, rockyallen [via Asciidoctor :: Discussion] <[hidden email]> wrote: I don't think it is in Asciidoctor core yet, but when this came up in issue 1113 Dan pointed to this extension Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
20 posts
|
In reply to this post by rockyallen
Thank you! That's exactly what I needed. I hope this change does make it into core -- I would definitely find this feature useful. -- Tom On December 18, 2016 at 7:45 PM "rockyallen [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
20 posts
|
In reply to this post by mojavelinux
That works great. Thank you Rocky and Dan. To get chapter 12's numbers correct, it seems sectnumoffset must be 11. Is that intentional? (No biggie either way.) Following is the command I use with the extension in the current path. -- Tom
asciidoctor -r ./sectnumoffset-treeprocessor.rb -a sectnums -a sectnumoffset=11 c12.txt
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
Correct. That's because sectnumoffset is an offset (the amount added to the starting number), not a start number itself. Though, we could consider changing the attribute to sectnumstart. -Dan On Sun, Dec 18, 2016 at 6:19 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote: That works great. Thank you Rocky and Dan. To get chapter 12's numbers correct, it seems sectnumoffset must be 11. Is that intentional? (No biggie either way.) Following is the command I use with the extension in the current path. -- Tom Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
20 posts
|
Got it. sectnumstart is probably simpler. -- Tom
On December 18, 2016 at 9:50 PM "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> wrote: ... [show rest of quote]
www.tomswan.com
|
Free forum by Nabble | Edit this page |