asciidoctor-web-pdf icon indicating copy to clipboard operation
asciidoctor-web-pdf copied to clipboard

List markers are (sometimes) missing from items when the list is spread over multiple pages

Open ggrossetie opened this issue 4 years ago • 6 comments

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.

ggrossetie avatar Jan 08 '21 07:01 ggrossetie

(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)

rillbert avatar May 01 '21 15:05 rillbert

I was able to reproduce this bug and apparently it's a Paged.js bug: https://gitlab.pagedmedia.org/tools/pagedjs/issues/296

ggrossetie avatar May 02 '21 14:05 ggrossetie

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.

rillbert avatar May 02 '21 15:05 rillbert

Hi, I have the same issue... is there a fix to this to avoid bullet on previous page ?

Thanks

gtortone avatar Apr 11 '23 17:04 gtortone

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;
}

jhannwong avatar Nov 11 '23 02:11 jhannwong

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

Isos9 avatar Apr 30 '24 21:04 Isos9