You can anchor your image titles to your images in your PDF exports by following the instructions below. Note that these instructions work only for PDF exports, as pagination in ebooks is automated and variable across devices and platforms.
To anchor an image title to an image, you'll need to use CSS and HTML to wrap the two objects together. First, add this piece of code to your PDF CSS (Appearance > Custom Styles > PDF):
div.image {
page-break-inside: avoid; }
This will create a class that you can use in your text editor to signal that anything within the tag should avoid a page break.
To apply this tag to your images:
1. Find the image and its title in the text editor. You can do this by searching with Ctrl+F for "img"
2. Paste in the class tag before the title in the text editor, and then paste the closing tag after the image.
3. Once you're done, click Save for the chapter.
You'll need to apply this tag in the text editor for each individual image. Do note that since the page is avoiding a break, there may be some half blank pages before or after the image. After you've applied the tag to your images, your export files for PDF shouldn't have any images split from their titles.
Comments
0 comments
Please sign in to leave a comment.