Skip to main content
Man Myth Legend
Participating Frequently
January 22, 2023
Question

"space between paragraphs using same style" disappears on reflowable epub

  • January 22, 2023
  • 4 replies
  • 4608 views

This is a bit maddening, I'm publishing a book of poetry and just need spaced between the sections. Spaces between paragraphs is not an abstract function of written text but seems to be incredibly complex to accomplish. Orignally I just hit retun to show a space, as I do in word processing doc. Those spaces disappeared when I saved to epub. After digging I found that I needed to use paragraph styles above and below, did that and those spaces also disappeared. Then I found someone suggesting I use forced line breaks and that worked! Then someone else said that's bad form, and that I should use paragrpah styles. I discovered there's paragraph style "space between paragraphs using same style"...that's what I need! Applied it...disappeared. I've spent hours trying to get spaces between my paragraphs, please can someone tell me what I'm missing? Is there some setting I need to click to preserve paragraph style spacing in epub?

4 replies

Bevi Chagnon - PubCom.com
Legend
January 31, 2023

@Man Myth Legend, you're working across several different publishing technologies and some things are the same across them, others aren't.

 

EPUB is a form of HTML and is thus required to follow some principles, two of which you're running into:

  • No double hard returns are allowed between paragraphs, and
  • "Space between paragraphs using same style is reduced to just one" is not in HTML. This feature is only available in 2 programs that I know of: Adobe InDesign and MS Word, but it's not in HTML/EPUB.

 

If you were exporting to a PDF, your spacing would be retained. But because you're exporting to EPUB, that InDesign feature is stripped out.

 

There are many features in InDesign that don't carry over into EPUB, as many of us have discovered over the years. @James Gifford—NitroPress suggestion for multiple paragraph styles is your best solution for your book.

 

And all formatting should be with done with paragraph and character styles in order to create a more compliant EPUB when exported.

 

|    Bevi Chagnon   |  Designer, Trainer, & Technologist for Accessible Documents ||    PubCom |    Classes & Books for Accessible InDesign, PDFs & MS Office |
Derek Cross
Community Expert
Community Expert
January 23, 2023

If you're using a Mac, BBEdit is an excellent application for editing ePubs.

James Gifford—NitroPress
Legend
January 23, 2023

I don't think exported EPUBs should ever be edited, any more. That's an obsolete approach if you are starting from a tool like ID.

 

The whole "build-a-bear" e-book world is stuck on these obsolete, unnecessary approaches (which, to be fair, were once the only approach) and it's time for serious book designers to move on.

 

TᴀW
Legend
January 23, 2023

To this very day, there's no way to create decent ePub from InDesign without using a custom CSS file, in my experience. That's part of the InDesign create-an-ePub workflow...

James Gifford—NitroPress
Legend
January 22, 2023

That spacing, like all automatic spacing around bullets etc., is not exported to the HTML structure of EPUB.

 

The solution is to use two or three styles for things like bullets — one for all middle elements, one for the top element, and (sometimes) one for the bottom element. Even then, spacing difference can disappear into standard <ol> and <ul> formats, and some CSS overrides are needed to get the spacing that ID (and Word) do both automatically and with features like "space between paragraphs" settings.

 

All or most layout apps have such "auto adjust" and fancy override features that exist only within the app layouts and direct exports to print or PDF. You have to learn to work around them for flexible exports.

 

Man Myth Legend
Participating Frequently
January 22, 2023

I guess I'm confused bc the consesus here is that pargraph styles is the appropriate way to create spacing, but "space between paragraphs of the same style" IS a paragraph style element...it's in the exact same tab as the "space above" and "space below" functions so it's a bit agitating when it doesn't work. Essentially if only space above and space below work then I need to apply a different style to top or bottom line of text everywhere there's a break. I'm publishing a book of poetry so it's like 2 lines and then a break, 3 lines then a break...a lot of spacing. To go through the whole book and have to apply different styles to every 2nd or 3rd line of text seems incredibly inefficient to have to do in a software that had decades of development to be flexible and efficient to the task of layout design. It really seems like I'm missing something, that Adobe would have come up with an easier way to do this than me having to comb through my whole book applying different paragraph styles every few lines just to create spacing between the text.

Is there a way I could apply the "space between paragraphs of the same style" with HTML in a way that would render on the epub? In effect, I'm much more interested in figuring out how to globally apply space between paragraphs than in having to do it manually all through the document.

James Gifford—NitroPress
Legend
January 22, 2023

"Space between styles" is a paragraph style element ONLY within InDesign. It doesn't export or translate to any other format.

 

Word and other word processors do all kinds of little things that aren't obvious, such as adjusting the space after periods, in between bullets, etc. so on yadda yadda. These tweaks will show up in print, and equivalents like PDF, but they don't represent any inherent style or setting that any downstream process like HTML or EPUB or generic word formats will preserve.

 

ID is the same. It has some internal tweaks and tricks that disappear on export. All of this paragraph auto-spacing stuff is one such.

 

ETA: Just in case that's not clear, there are different things going on here. Setting the space above and below paragraphs is a simple part of Paragraph Styles, and fairly fixed and absolute. It's that automatic "collapse space between identical styles" that is something of an app hack and not easily replicable on export.

 

As for "globally apply space" — that's a basic aspect of paragraph styles, and will (largely) be preserved on export. However, export to EPUB is subject to some magic fudge factors that aren't always evident; if you don't like how an EPUB doc looks on a vanilla EPUB reader, all you can do is adjust the setting in ID to get the desired export — even if it looks "off" in ID — or use CSS to adjust the style at export.

 

It's very possible to have an optimal ID document for print and export it to optimal EPUB (and Kindle) — but it's all in mastery of CSS.

 

Derek Cross
Community Expert
Community Expert
January 22, 2023

Don't use Returns for line spacing use Space After in your Paragraph Style.

It's helpful to know a bit of HTML and CSS if you're going to create Reflowable ePubs.