Syntax help for ordered list

19 views
Skip to first unread message

MS

unread,
Nov 23, 2020, 8:12:16 AM11/23/20
to asciidoc
Hi,

I need some help on figuring out how to write "20b" in an ordered list, see examples below. The "[start]" values cannot be pushed as this document contains hundreds of starts. Document isn't structurally generated to perfection, but that's a fix for another time. 

Syntax as of today:
[start=20]
. Sentence 1
.. Sentence 2
[Start=21]
. Sentence 3

Output as of today:
20. Sentence 1
    b. Sentence 2
21. Sentence 3

Output i need:
20. Sentence 1
20b. Sentence 2
21. Sentence 3

Alexander Schwartz

unread,
Nov 23, 2020, 3:41:31 PM11/23/20
to asci...@googlegroups.com

Hi,

what is the output format you're aiming for: PDF, HTML or something else?

If it is HTML, some CSS might help you: https://stackoverflow.com/questions/13841771/ordered-list-css-style-includes-parent-number

Regards,
Alexander
--
You received this message because you are subscribed to the Google Groups "asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asciidoc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/asciidoc/1c9a5bc2-49ed-4fd7-8d96-2a48858bf63fn%40googlegroups.com.
--
Alexander Schwartz (alexander...@gmx.net)
https://www.ahus1.de

MS

unread,
Nov 24, 2020, 9:14:06 AM11/24/20
to asciidoc
Hi, output is PDF. Only "pure" AsciiDoc syntax is of interest, to ensure easy and hassle free updates in the future. I've tried a few different things, but without the outcome I was hoping for. 

Using "20b.::" standalone makes a line shift for the sentence, and the "20b"-text is bold. Giving me an output like this:
20. Sentence 1
20b.
     Sentence 2
21. Sentence 3

Using [horizontal] to get rid of the line shift, followed by "20b.::", gives me an indent in front of "20b", followed by a larger indent for the body of sentence 2 as well. "20b" is also still bold. 
If there is a way to get rid of that automatic indent, and make the text not bold - this would be a solution that works. 
20. Sentence 1
  20b. Sentence 2
21. Sentence 3

Compared to the outcome I wish for:
20. Sentence 1
20b. Sentence 2
21. Sentence 3

Alexander Schwartz

unread,
Nov 24, 2020, 10:57:39 AM11/24/20
to asci...@googlegroups.com

Hi MS,

sorry - I'm not aware of a solution using pure AsciiDoc syntax for PDF output of asciidoctor-pdf.

You could have a look at asciidoctor-web-pdf that uses CSS to style the PDF. It is still alpha https://github.com/Mogztter/asciidoctor-web-pdf 

Regards,
Alexander

Dan Allen

unread,
Nov 26, 2020, 2:30:25 AM11/26/20
to asci...@googlegroups.com
When using Asciidoctor PDF, you can remove the indent using the following theme key:


outline-list-indent: 0

Best Regards,

-Dan



--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply all
Reply to author
Forward
0 new messages