list item numbering

251 views
Skip to first unread message

scaph0

unread,
Sep 19, 2010, 8:47:56 AM9/19/10
to asciidoc
Good afternoon,

Is it possible to start a numbered list (arabic) with an index greater
than one, in order to avoid the following message?

+asciidoc: WARNING: file.txt: line 40: list item index: expected 1 got
43+

This is especially useful in quoted text:

[quote, foo, bar]
____
blah blah.

43. first list item.
44. second list item.
____

Regards,

Stuart Rackham

unread,
Sep 19, 2010, 10:47:58 PM9/19/10
to asci...@googlegroups.com

You could use the HTML ol element start attribute to control HTML list
numbering, DocBook has no equivalent.

This in your .conf file for HTML outputs (though it generates invalid xHTML 1.1
but browsers still render it correctly):

[listtags-numbered]
list={id?<a name="{id}"></a>}{title?<p><b>{title}</b></p>}<ol
type="{style@arabic:1}{style@loweralpha:a}{style@upperalpha:A}{style@lowerroman:i}{style@upperroman:I}"{start?
start="{start}"}>|</ol>

Cheers, Stuart

> ____
>
> Regards,
>

Michael Wild

unread,
Sep 20, 2010, 2:46:38 AM9/20/10
to asci...@googlegroups.com

That's not correct:

http://www.sagehill.net/docbookxsl/Orderedlists.html#ListStartNum
http://www.docbook.org/tdg5/en/html/orderedlist.html

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

PGP.sig

Stuart Rackham

unread,
Sep 20, 2010, 3:09:39 PM9/20/10
to asci...@googlegroups.com

On 20/09/10 18:46, Michael Wild wrote:
>
> On 20. Sep, 2010, at 4:47 , Stuart Rackham wrote:
>
>>
>>
>> On 20/09/10 00:47, scaph0 wrote:
>>> Good afternoon,
>>>
>>> Is it possible to start a numbered list (arabic) with an index greater
>>> than one, in order to avoid the following message?
>>>
>>> +asciidoc: WARNING: file.txt: line 40: list item index: expected 1 got
>>> 43+
>>>
>>> This is especially useful in quoted text:
>>>
>>> [quote, foo, bar]
>>> ____
>>> blah blah.
>>>
>>> 43. first list item.
>>> 44. second list item.
>>
>> You could use the HTML ol element start attribute to control HTML list numbering, DocBook has no equivalent.
>>
>> This in your .conf file for HTML outputs (though it generates invalid xHTML 1.1 but browsers still render it correctly):
>>
>> [listtags-numbered] list={id?<a name="{id}"></a>}{title?<p><b>{title}</b></p>}<ol type="{style@arabic:1}{style@loweralpha:a}{style@upperalpha:A}{style@lowerroman:i}{style@upperroman:I}"{start? start="{start}"}>|</ol>
>>
>> Cheers, Stuart
>
> That's not correct:
>
> http://www.sagehill.net/docbookxsl/Orderedlists.html#ListStartNum

This relies on an XML processing instruction i.e. it's not part of DocBook and
it's use is dependent on the downstream DocBook processor (in this case DocBook
XSL Stylesheets).

> http://www.docbook.org/tdg5/en/html/orderedlist.html

This is new in DocBook 5, asciidoc generates DocBook 4.5.


Cheers, Stuart

Stuart Rackham

unread,
Sep 21, 2010, 3:18:46 AM9/21/10
to asci...@googlegroups.com
I've added a 'start' attribute for numbered lists to the trunk:
http://code.google.com/p/asciidoc/source/detail?r=59e53dde416688b55d18f42d56e00dce7ff76405

Cheers, Stuart


On 20/09/10 00:47, scaph0 wrote:

Reply all
Reply to author
Forward
0 new messages