asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.13k stars 500 forks source link

Ordered list starting from 0 #2501

Closed m-kru closed 4 months ago

m-kru commented 4 months ago

I try to type ordered list starting from index 0. As for some unknown reason [start=0] has no effect. I try to provide numbers explicitly. My list looks like this:

.Languages:

0. Lua
1. Perl
2. Python
3. Ruby
4. Tcl

When I generate pdf using asciidoctor-pdf I get following output:

asciidoctor: WARNING: file.adoc: line 34: list item index: expected 1, got 0
asciidoctor: WARNING: file.adoc: line 35: list item index: expected 2, got 1
asciidoctor: WARNING: file.adoc: line 36: list item index: expected 3, got 2
asciidoctor: WARNING: file.adoc: line 37: list item index: expected 4, got 3
asciidoctor: WARNING: file.adoc: line 38: list item index: expected 5, got 4

This is fine, I understand why asciidoctor warns me here. However, in the generated pdf file the list starts from index 1 not 0 as I wanted. Generating warnings is ok. However, why does asciidoc by default tries to outsmart the user? How is user supposed to start ordered list numbering from 0, as [start=0] has no effect.

m-kru commented 4 months ago

It turned out I had to update the version of asciidoctor-pdf.

mojavelinux commented 4 months ago

Indeed, this was resolved in the 1.5.0 release. See #498.

As the issue template suggests, please make sure you are using the latest version before reporting an issue.