Captions for pictures not getting centered after compilation to Kindle

I actually have two problems with captions for pictures.

  1. Captions look fine in Scrivener but when I compile it for Kindle (mobi) and look at it in Kindle Previewer, some of the captions are not centered even though they are centered in Scrivener.
  2. I have also had a comment become orphaned, meaning it goes to the next page even though it looks fine in Scrivener.

Has anyone had this type of problem before? Any suggestions on fixing it?

  1. You mention some working and some not, I’d guess some of them aren’t actually styled properly. For a caption to be correctly attached with a figure, it must have the caption style applied to it, and be correctly placed on a line above or below the image’s line in the editor.
  2. I’d need clarity on this one. I’m not sure what you mean by a “comment” in this case. Normally comments and inline annotations would be stripped out of the ebook, but if you choose to leave them in, then they will appear as normal paragraph text, with nothing but square brackets to denote that they are a comment. So it would paginate as all normal text would.

I’m sorry, when I said "comment’ I meant “caption”. Thanks.

Amber,
You said “For a caption to be correctly attached with a figure, it must have the caption style applied to it, and be correctly placed on a line above or below the image’s line in the editor.” Can this be done in Scrivener 2? I’m using Scrivener 2.

Oh, sorry, no in that case there is nothing that generates proper ebook figure captions in version 2, other than using Markdown, and then Pandoc to create the final ePub.

So in version 2 there are no styles, and all cases where you need text formatting to be preserved through the compile must be marked as such in the editor, with the Format ▸ Formatting ▸ Preserve Formatting menu command. That marking is considered formatting in and of itself, so consider creating a formatting preset with it applied, so you can apply both the caption formatting and the code to protect it, together.

Now that’s not going to solve orphaned caption lines, the only way around that (in version 2 anyway) is to hand code your eBook with HTML and CSS after compiling, using a tool like Sigil or Calibre.

How much easier is this going to be if I upgrade to Version 3? The problem I’ve had is that it seems every time I solve one problem, I create another one. Very frustrating.

Well, there will always be another problem to solve, I don’t know if any software is going to be solving that any time soon. :slight_smile:

I can say that the ebook output in version 3 is without doubt far more sophisticated and capable than version 2. A lot of work was put into that area, and it allows a level of control that few writing tools afford you. I don’t know about easier, considering that at a base level it means learning a major overhaul, in the middle of the final phases of your project. But speaking more objectively, and outside of your context, I do believe it makes getting things done easier, because it has more power and flexibility, which means if you want to do something, there is a greater chance you can do it without additional post-compile workflow.

Specifically will it solve these two problems you’ve raised? Yes. It is a style based program instead of raw formatting, like v2. You would apply a proper “Caption” style to the line of text beneath the graphic, and when doing so, it will create a semantic figure element in the HTML, with a figcaption sub-element, and apply CSS that binds the two together so that they don’t get separated between screen draws.

You see what I mean though—it makes proper captions easier than v2 because in v2 that would require manual labour after each compile—but for you it means going through your entire work and applying styles by hand to every bit of text you’ve given the appearance of a caption, in v2. So in the here and now, I’m not sure which is easier.

But that is a question you can answer for yourself. Download the demo and give it a 30-day spin. You don’t have to commit, you can open your project and it will create a v2 backup alongside when updating the format. If for whatever reason you find it isn’t for you, there is a command to export back to v2 format, so you can pick up where you left off in the old version.

As I say, compile has been overhauled, so in addition to going through the “what’s new” appendix in the user manual and tutorial, we also have a migration guide, specifically written for experienced users of v2, which maps the old concepts to the new ones in an interactive demo project.