Open alexfargus opened 3 years ago
When the image is scaled to 80% of the width, it's height is too large to fit on the page, and rinohtype moves it to the next page where the same thing happens. We need to check whether the image is the first flowable on the page. If it is, we should always place it, even if it exceeds the available height. You can use container.page._empty
for this, which is set to False as soon as a flowable has been placed on the page.
Something similar happens with inline images if they don't fit in the available width (or height, probably).
@brechtm We had the same issue already several times.
I had another look at this. This is already handled for images, but not for figures. That possibly requires some redesign, so it might take a while...
Trying to render the following .rst with the attached image triggers an infinite loop. I have verified that this issue exists on master.
I believe that the issue is caused by some combination of the
width
attribute and the dimensions of the image file. Removing the attribute or changing the image dimensions will work around the issue.I have tried to find the root cause, but I am having trouble following the rendering logic.
@brechtm can you suggest any tips for figuring out what is going wrong?