You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using weasyprint via pandoc to generate printout files of essay collections from markdown. When generating the table of contents with the leader() attribute the pdf fails to generate and I get a traceback which ends in
File "/home/usr/.local/lib/python3.8/site-packages/weasyprint/layout/inlines.py", line 80, in handle_leaders text_box, = leader_box.children ValueError: not enough values to unpack (expected 1, got 0) Error producing PDF.
The relevant CSS I'm using is nav ul li a::after { content: leader('.') target-counter(attr(href), page); float: right; }
I am by far not the best at CSS, and the documentation for this function is patchy, So I could easily be at fault. 52 Simply skipped over leader(), and removing it allows the pdf to generate
The text was updated successfully, but these errors were encountered:
liZe
added
the
crash
Problems preventing documents from being rendered
label
Aug 1, 2021
Using float for a block containing leaders is a bit "dangerous", because floats somehow try to be as small as they can be. So, in many cases, the current implementation doesn’t display the leaders at all, because they’re not "mandatory". The specification is not really clear about this, and I think that nobody knows how it’s supposed to work exactly.
Removing "float: right" should do what you expect.
But of course, it shouldn’t crash, we need a fix for this problem.
I'm using weasyprint via pandoc to generate printout files of essay collections from markdown. When generating the table of contents with the
leader()
attribute the pdf fails to generate and I get a traceback which ends inFile "/home/usr/.local/lib/python3.8/site-packages/weasyprint/layout/inlines.py", line 80, in handle_leaders text_box, = leader_box.children ValueError: not enough values to unpack (expected 1, got 0) Error producing PDF.
The relevant CSS I'm using is
nav ul li a::after { content: leader('.') target-counter(attr(href), page); float: right; }
I am by far not the best at CSS, and the documentation for this function is patchy, So I could easily be at fault. 52 Simply skipped over leader(), and removing it allows the pdf to generate
The text was updated successfully, but these errors were encountered: