Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Today has come an idea which I think that it is supported yet by Asciidoctor, and moreover it is not in AsciiDoc standard, but I think can be useful in some circumstances. I am thinking in next scenario:
Let's suppose we are writing SRS of a product, and probably I want to give them a number, for example SRS-1, SRS-2, .... how about creating an auto increment label so for example we can create an attribute which must ends with counter: :srs-identification-counter: 1 and then each time this attribute is used, value is incremented by one, so for example: == Fluidic System [cols="1,2" options="header"] .Fluidic SRS |=== |SRS |Description |SRS-{srs-identification-counter} |bla bla bla |SRS-{srs-identification-counter} |bla bla bla |=== which will be equivalent to: [cols="1,2" options="header"] .Fluidic SRS |=== |SRS |Description |SRS-1 |bla bla bla |SRS-2 |bla bla bla |=== Of course there are some problems to resolve, for example what's happen when you include another AsciiDoc file that are already using the same counter, but I think can simplify of having to maintain manually incremental values, or for example defining twice. WDYT? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
That sounds very interesting, but I'm not sure I'd want it in Asciidoctor, or actually have it be something that comes out of the box. I'd much rather see this as something you could do with a macro. I can certainly see the need in macros containing some sort of state.
On Thu, Jul 25, 2013 at 9:48 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote: Today has come an idea which I think that it is supported yet by Asciidoctor, and moreover it is not in AsciiDoc standard, but I think can be useful in some circumstances. I am thinking in next scenario: ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Yes macros could be another way but I don t know if it would be possible with current implementation. For now I am waiting for having extensions support on asciidoctor master branch to implement it on asciidoctor java integration project. And then we can decide what to do
El dijous 25 de juliol de 2013, LightGuardjp [via Asciidoctor :: Discussion] ha escrit:
... [show rest of quote] -- Enviat amb Gmail Mobile |
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
|
In reply to this post by LightGuardjp
It's already available today as I describe in this issue: I'm glad you brought the idea forward because it's a nice feature and needed to be documented. -Dan
On Thu, Jul 25, 2013 at 10:45 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen
|
Free forum by Nabble | Edit this page |