brechtm/rinohtype

item too long to fit on line is stuck without any progress

sachin-suresh-rapyuta opened this issue · 3 comments

Is there an existing issue for this?

  • I have searched the existing issues

Sphinx or rinoh output

rinohtype 0.5.4 (2022-06-17)  Copyright (c) Brecht Machiels and contributors
This program comes with ABSOLUTELY NO WARRANTY. Its use is subject
to the terms of the GNU Affero General Public License version 3.
rendering... 
TeX Gyre Pagella does not include a normal medium upright font. Falling back to normal regular upright
item too long to fit on line (page 4)         ] ETA 00:26 (00:00) page 4
item too long to fit on line (page 12)        ] ETA 00:35 (00:01) page 11
item too long to fit on line (page 13)
item too long to fit on line (page 15)        ] ETA 00:35 (00:02) page 15
item too long to fit on line (page 20)        ] ETA 00:38 (00:02) page 20
item too long to fit on line (page 21)
item too long to fit on line (page 23)
item too long to fit on line (page 24)
item too long to fit on line (page 25)
item too long to fit on line (page 31)        ] ETA 00:30 (00:04) page 31
item too long to fit on line (page 32)
 14% [=====                                   ] ETA 00:28 (00:04) page 36



$ 

Source files

In conf.py file, on using the below config, and when I run the command: sphinx-build -b rinoh source build/rinoh, the message - "item too long to fit on line" hangs indefinitely and doesn't progress.

rinoh_documents = [dict(doc='index',        
                       target='pa-amr-specification-doc',
                        template='rinohtype.rtt',
                        logo='_static/rr-logo-vertical2022-1100px-transp.png')]

Versions

$ sphinx-build --version
sphinx-build 4.5.0

$ python --version
Python 3.8.10

Do you mean that the rendering ends up in an endless loop?

Note that, as the new issue form mentions, I cannot debug this without having access to your Sphinx project or a minimal example reproducing the issue.

Yes, as you can see from the output screenshot, the pdf generation is stuck at 14% and I don't know where or which .rst file it is pointing to to correct the "item too long" message.
Here is the link of the project: project link docs folder

There are several things in your document that cause the rendering loop to get stuck:

  1. You are running into bug #283, triggered by fuzzy_pattern_without_border.png and other tall images. Scaling these down works around this problem:

    .. figure:: ./images/getting_started/map_creation_checklist/fuzzy_pattern_without_border.png
       :scale: 50%
       ...

    This is a high-priority bug, but I'm not sure when I'll be able to fix it.

  2. rinohtype is not yet able to split table cells across two pages. This also leads to an infinite rendering loop when the contents of a cell do not fit on a page. For example, the Comparison between Full-fledged WCS vs Minimalistic WCS table triggers this issue. Removing the :widths: option happens to make the contents fit. There are however other tables (often containing images) in the document that trigger this bug.

    This is also an important bug, but you should ask yourself whether tables are the best choice for that kind of content. Do you really want table cells that span multiple pages?

Some general remarks about your document that occurred to me when trying to debug this:

  • URL links are created using raw-html substitutions which only work with HTML builders. I suppose you do this to make them open in another window/tab (target="_blank")?
  • The A5 paper size allows for very little room, causing many "item too long" warnings. As I already mentioned in #337 (reply in thread), you should consider decreasing the page margins.
  • You are using inline images in tables. Note that it is possible to use the image directive inside tables as well.