asciidoctor-web-pdf
asciidoctor-web-pdf copied to clipboard
List markers are (sometimes) missing from items when the list is spread over multiple pages
It looks like this:
• foo
• bar
• baz
--- page break ---
qux
• quux
• corge
Sometimes the bullet is on the previous page:
• foo
• bar
• baz
•
--- page break ---
qux
• quux
• corge
Using break-inside: avoid;
on <li>
items might fix this issue.
(moved the below from #473)
buggy_list.pdf ok_list_with_asciidoc_pdf.pdf bugreport.zip The list marker of the first item that appear on a new page does not seem to be treated correctly when the list is included via a master document. This seem to affect both ordered and unordered lists.
In some scenarios, it disappears completely and in other the marker is shown last on the previous page but the list item text is shown on the new page. The effect seems to be connected to when the vertical alignment happens to introduce a page brake. In some cases it works as expected.
I'm attaching a zip with adoc sources that replicate this bug when using the default stylesheets.
I'm also attaching the pdf's separately, one that expose the bug (generated by asciidoctor-web-pdf) and one showing the expected behaviour (generated with 'standard' asciidoctor-pdf)
I was able to reproduce this bug and apparently it's a Paged.js bug: https://gitlab.pagedmedia.org/tools/pagedjs/issues/296
I'm glad you could reproduce it. I appreciate all the work you and others are putting into this tool and I'm looking at replacing asciidoctor-pdf with asciidoctor-web-pdf for some quite complex technical documents and this is (obviously) a blocker for that transition.
Hi, I have the same issue... is there a fix to this to avoid bullet on previous page ?
Thanks
Just hardcode the offending list item as a generic <p>
. You may need to use spacers to horizontally align the <p>
element with the <li>
elements.
. Item 1
. Item 2
[.list-spacer]## ##3++.++ Item 3
[start=4]
. Item 4
.list-spacer {
padding-right: 0.35rem;
}
the empty variable seems to be the best solution for now. this case works for me to display the bullet point on the next page:
. Item 1
. Item 2
. Item 3 +
{empty} +
. Item 4