Quote:
Originally Posted by isaacbh
Hi willus..
Figures and diagrams are often accompanied by a caption. However, k2pdfopt will not treat the caption text as part of the figure and so the caption might end up on the next page if a break occurs. (This is understandable, since the caption is just text.) To circumvent this, I put colored marks before and after the figure + caption and use -bpm2 to keep them together. This works, however now there is no vertical space between the caption and the next paragraph, as seen in the image. Is there some magic that k2pdfopt can do to restore that space? ...
|
I'll have to see why the white space captured between marks for -bpm2 gets eliminated. My opinion is that it should be maintained, so I'd say that's a bug. But you can kludge it with the existing version by putting a small black mark just above the second colored mark that keeps the caption with the figure. See that attached example. BTW, k2pdfopt does try to anticipate captions after figures and keep them with the figures, but it has some internal rules for how close it expects the captions to be to the figures, and if those internal rules are violated, then the caption can get separated from the figure.