Skip to main content
Inspiring
January 30, 2019
Question

Pictures and captions problems in Epub export

  • January 30, 2019
  • 3 replies
  • 3112 views

I'm using InDesign CC 2018 (MacOS 10.11.6). I have a multichapter book with about 50 graphics that I'm trying to export to Epub.

The pics have captions, and no matter what, it seems, InDesign can't write an Epub that keeps captions and pics together properly.

What I've done: Grouped each pic and its caption, then anchored in text using Above line/align left.

What happens: instead of being properly tucked in under its picture, the caption straggles about a pica below it. And instead of being aligned left (which the caption is), the pic is indented about 6 points (I can find no reason why this should happen; even when anchored to a flush left-styled placement paragraph).

So, apparently, InDesign doesn't treat the pic and caption as a single object, even though I have grouped them together. I've tried different Object Export Control variations on different pics/captions, but nothing seems to change this behavior. Moreover, if the caption has more than two lines, I need to add space below to keep the final line of the caption from being swallowed by the following text--it's as though the space below is measured from the picture, ignoring the caption frame.

Does fixing it involve CSS editing? If so, what should I look for and change?

This topic has been closed for replies.

3 replies

michaelf63177508
Participant
February 8, 2020

Been struggling with this also, and what seems to work for me is to create a text frame that has the caption in it, then anchor the image as an inline image (not custom) above the caption text (adding some space after to the image). From there you can add text wrap to the caption text frame with image and then anchor that text frame where you want it with the rest of the text. I've applied some keep options to the caption text frame to keep the entire caption together and it seems to be working.  

Participant
March 21, 2019

You may have to edit the CSS manually after export. But first try this: before you group the text and image, select the text element, go to Type>Create Outlines. Then, with the text still selected go to Object>Content and select Graphic. Then, group the two objects. Essentially this rasterizes the text in the program natively instead of doing it on export.

BobLevine
Community Expert
Community Expert
January 30, 2019

You haven't given us anywhere enough to go on. Is the pic/caption group anchored? Have you used styles for all text? What are your epub export settings? How are you viewing the epub?

Inspiring
January 30, 2019

I did note that the pic/caption was anchored, and I've used styles for all text.

Reflowable epub 3.0

Content: Based on page layout

Object:

Preserve appearance from layout

CSS Size: Relative to text flow

Layout: Align left

Space before: 7 pixels

Space after: [I've tried various options, from 0 to 30, the larger to accommodate longer captions without fouling text beneath]

Ignore Object Export settings: unchecked

[I've tried, on a case by case basis, various object export settings for individual pics/captions, but they don't seem to affect the behavior]

Viewer: The problem is mostly in Apple iBooks. Is it particularly unreliable?

BobLevine
Community Expert
Community Expert
January 30, 2019

It’s actually the best one there is.

Have you avoided overrides? Do you have an object style for the anchored objects? Can you post a few screenshots?

You should be aware that while EPUB has come a long way, there’s no way you’re going to duplicate a layout in InDesign with the EPUB.