Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Is it possible to number the example blocks relative to the section numbers as well?
For example, when the third section starts, all the examples should be numbered as 3.1, 3.2, 3.3. I am generating a single html document from a bunch of asciidoctor files and the examples start from 1 and go to 50, by the end of the html document. Thanks, Vlad |
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
|
Not currently. There is an open issue that covers this requirement. Of course, it is possible to renumber blocks using a Treeprocessor extension. You walk the AST and change all the captions. In the process, we may discover other caveats, though. Cheers, -Dan On Fri, Dec 4, 2015 at 9:09 AM, vlad_mihalcea [via Asciidoctor :: Discussion] <[hidden email]> wrote: Is it possible to number the example blocks relative to the section numbers as well. Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thanks for the heads up. We'll stick to the current numbering scheme for the moment and watch the progress of this issue.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I’m new to this, so I may be way off.
Why not set up a counter for your sections and example? The following appears to work: [counter:section] :!part: {counter:part} Section {counter:section} Part {section}.{counter:part} Part {section}.{counter:part} Part {section}.{counter:part} Section {counter:section} :!part: [counter:part] Part {section}.{counter:part} Part {section}.{counter:part} Part {section}.{counter:part} |
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
|
Mark, That's certainly possible. However, the aim of AsciiDoc is to keep the content free of any non-essential information and rely on the computer to handle tasks such as numbering. It's very reasonable to expect that the processor to number using different strategies, either as a built-in feature or through an extension. In general, whenever we see markup being repeated a lot in a document, we always want to try to find a way to factor it out. The goal is to encode the information as efficiently as possible. -Dan On Thu, Jul 7, 2016 at 2:21 AM, [hidden email] [via Asciidoctor :: Discussion] <[hidden email]> wrote: I’m new to this, so I may be way off. ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |