View Single Post
Old 05-07-2016, 10:33 PM   #1258
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,303
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by isaacbh View Post
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.
Attached Thumbnails
Click image for larger version

Name:	example.png
Views:	251
Size:	11.9 KB
ID:	148532  
willus is offline   Reply With Quote