View Single Post
Old 11-13-2019, 11:35 AM   #21
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,852
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by jhowell View Post
That matches the behavior I have observed. It is a change in the rendering of heading elements, rather than actual support for page-break-after:avoid. Publishers have no control over this and it cannot be used to avoid page breaks in general.

Added: Actually, there does appear to be a way that publishers can have a little control over this. In my testing setting widows/orphans on a heading disables the behavior of preventing a page break between it and the following text. I don't know if Amazon intended for this to happen, since none of this is documented.
You can control it and you can use it. Now you know that all <h*> tags have the properties page-break-after: avoid and page-break-inside: avoid. Then in theory you could, for example, use:

Code:
<h6><img class="whatever" alt="" src=".../Images/YourImage.jpg" /><br/><span class="caption">This is a caption</span></h6>
to have the caption stuck with the image.

I'm doing further test to know the scope of what can be done. So far, even in epub3, the property "page-break-inside: avoid" is unsupported, but with the new KP, <h*> tags with multiple lines are showed together. So maybe we can use something like:

Code:
<h6 class="poetry">Blah, blah, blah,<br/>
blah, blah, blah,<br/>
Blah, blah, blah,<br/>
Blah, blah, blah.</h6>
for paragraphs that we want to have together.

And indeed, nothing of that is documented and I think Amazon will polish all this stuff in next versions of KP.
RbnJrg is offline   Reply With Quote