riscv-admin / docs-sig

The repository of the RISC-V Docs Team
https://jira.riscv.org/browse/RVG-36
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

Look at ASCIIDoc extension to list tables and figures #25

Open kersten1 opened 2 months ago

kbroch-rivosinc commented 2 months ago

I tested it out manually and it WAI.

PR to add it to the docker image: https://github.com/riscv/riscv-docs-base-container-image/pull/6

wmat commented 2 months ago

Is that extension good enough?

I had intended on implementing this one: https://gitlab.com/baiyibai/asciidoctor-pdf-lofte which adheres the asciidoctor-pdf's TOC formatting and is also style-able.

kbroch-rivosinc commented 2 months ago

I wasn't aware of this other plugin. My hope was we'd find something that worked with both pdf and html output.

This one does: https://github.com/Alwinator/asciidoctor-lists but I do see that it has some features missing that we might care about (pg number on list?) and the pdf styling may not be honored.

I'll take a look at both and let you know.

kbroch-rivosinc commented 2 months ago

asciidoctor-lists

using latest release: https://github.com/Alwinator/asciidoctor-lists/releases/tag/v1.0.9 I used this spec to test.

HTML output : image

PDF output: image

Findings:

asciidoctor-pdf-lofte

using the latest release: asciidoctor-pdf-lofte

Here's branch of changes to example spec: https://github.com/kbroch-rivosinc/riscv-cfi/tree/dev/kbroch/try-asciidoctor-pdf-lofte

image

Findings:

My recommendation

Given asciidoctor-lists supports styling of themes, both pdf/html outputs, and is packaged as a gem for easy installation and maintenance, I would recommend using that. I'll file an issue on the back-tick code block not getting rendered in the title.

kbroch-rivosinc commented 2 months ago

Filed issue on backtick literal not rendered: https://github.com/Alwinator/asciidoctor-lists/issues/23

wmat commented 2 months ago

Thanks @kbroch-rivosinc I agree, we should move forward with asciidoctor-lists for now.

kbroch-rivosinc commented 2 months ago

Filed issue on backtick literal not rendered: Alwinator/asciidoctor-lists#23

This works fine if list-of::image[enhanced_rendering=true] is used: Screenshot 2024-04-23 6 22 58 AM

I can imagine wanting to use both of these parameters: list-of::image[hide_empty_section=true, enhanced_rendering=true]

kbroch-rivosinc commented 2 months ago

The only other feature I can see wanting currently is page numbers: https://github.com/Alwinator/asciidoctor-lists/issues/14. The maintainer of asciidoctor-pdf-lofte was also in this issue discussion (and zulipchat) but it doesn't look like it has progressed past that in over a year.