In a report I have an image (a chart) with a caption line underneath. Near the bottom of a page the engine sometimes leaves the chart on page one and pushes the caption to page two, which looks broken. I don't want to force a page break before it every time because then I get a big empty gap above it. Is there a way to just say keep these two together?
Stop a chart and its caption from splitting across pages
3 replies · 606 views
3 Answers
Group the chart and caption in one block, then on that block turn on avoid break inside in its properties panel. That tells the paginator to treat the pair as a single unit, if it won't fit in the space left on the page it moves the whole group to the next page instead of splitting it, and you avoid the forced gap that 'break before: always' leaves behind.
Make sure the image and the caption are actually children of the same wrapper, otherwise avoid-break only protects whichever one you set it on.
perfect, that sorted it. appreciate the help
This helped me too with a figure and its note. Quick question for anyone, does avoid-break-inside still do something if the group itself ends up taller than a full page? Wondering what happens then.