Skip to main content
Participant
May 6, 2020
Answered

I cannot for the life of me get linebreaks in an epub

  • May 6, 2020
  • 9 replies
  • 10483 views

HELP! (sorry for bad english)
So i have been trying to export my indesign file to an epub reflowable, and it removes all blank spaces, line breaks and blank lines. I have looked up how to fix it and found a place that told me to use a paragraph style that had "space after" the places where i needed it.. so i did that... and it didnt work.. any other helpful tips? Im not good with indesign, i do not know ANYTHING about HTML or CSS so i feel very very lost. 

 

 

Correct answer KathrineFrich

I made it work. 😄 

But im setting up a book for an author and he finds it very important that there is a line break between the chapter titles and the text. The other authors i have worked with didnt think it was important so i have never had to deal with it before. But now i found a solution that works thanks to people in here and other forums. 🙂 

9 replies

Participant
February 4, 2025

The only solution I figured out is:

1. You create two paragraph styles. Say one is your basic one that runs through the entire manuscript. 

2. The other style should have an indent (before and after). That depends on how much spacing you want. The text and font size and everything else will be same. Make sure to duplicate your first basic text layer. 

Hope that helps 🙂 

James Gifford—NitroPress
Legend
February 4, 2025

This is a fairly old thread, but you do have the gist of the solution: use one or more additional styles any time you need to break text. A paragraph exported to EPUB should never have any kind of break in it to simulate more than one paragraph.

Participating Frequently
July 24, 2023

Where are you uploading the epub? If you are uploading to Amazon, you need to convert the file in kindle create then upload it. But if you already uploaded to Amazon in another format, then you need to create a new ebook and start over since Amazon does not allow you to upload more than one format after already uploading one. If you can't get the epub to work there are paragraph settings in Indesign to adjust it. However, to solve the problem completely with kindle you need to separately format the file in Kindle Create (which is free by the way). I had this problem after calling Amazon 7 times. So your better off just using Amazon's program, especially since they updated their software and the regular Indesign epub files are not converting well. Hope this helps! 

James Gifford—NitroPress
Legend
July 24, 2023

Almost none of this is correct. You can upload EPUB directly for Kindle, and have been able to for quite some time. And you can upload updated EPUBs for the same book as many times as you like.

 

I suggest you are informed by some of the many, many, many greatly outdated pages and blogs out there on the topic.

 

Kindle Create is... an amateur's tool. Anyone who can use InDesign has no need of it.

James Gifford—NitroPress
Legend
July 7, 2022

EPUB, like its HTML roots, inherently removes all duplicate white space, including multiple paragraph returns, tabs (converted to a space) and multiple spaces. You can't do spacing with multiple returns, tabs, spaces or anything of the like.

 

It usually removes soft returns (line breaks), and it's good practice to avoid them in layout, but there is an export option to allow or remove them. The spacing above and below, and left and right margins are the way to control text and paragraph spacing. (There are some gotchas with that as well.)

 

Spacing pretty much passes through from ID to EPUB, but it's tricky, and the ratio of one point to one display pixel (usually 144ppi) is not always clear.

 

Spacing above elements cannot be directly controlled. If you have spacing above a secondary heading and that heading falls at the top of a virtual page, it will be spaced down from the top. There is no automatic space-collapse as ID, Word and other layout programs manage it.

 

But ask away if you have any further problems. Most have solutions.

 

ETA: Didn't see this was an old thread. And while we can give answers to specific problems, some topics (such as EPUB creation) are broad and complex and it can be difficult to give a simple answer when a user doesn't have the full context of the process. I try to give answers on EPUB/Kindle creation that will help a newbie over a hump, but those answers may not be enough if a user doesn't have a full grasp of how the answer applies to their problem.

 

Training, of one form or another, is the complete answer. 🙂

 

 

ben-erwin
Known Participant
June 23, 2021

I have returned to this page several times. I would like to report both Bob Levine and Derek Cross for being very unhelpful to put it politely. Their community professional credentials should be revoked. Either answer the questions or dont say anything at all. Saying "go get training" or "you're in over your head" is just obnoxious and these guys have no business being in help forums. 

BobLevine
Community Expert
Community Expert
June 23, 2021

Telling people that they require training is sometimes the best response. InDesign has a high learning curve and if you want to use it for EPUB without any knowledge of CSS and HTML you are in over your head.

 

If you don't like it, that's just too damn bad.

alexr45624708
Participant
June 24, 2021

Hey BobLevine,

 

Can I just check please if you have provided the answer. You mentioned before 'If you're trying to force things with multiple line breaks, etc, stop doing that...it's futile' how can you force it? I don't mind going through my both and insert something like <br> or something.

 

I just want any solution to make it work so I can put simple line breaks in between my paragraphs where it needs to be 🙂

 

Thank you for your help

Alex

Legend
May 6, 2020

Bear in mind that when you choose to make a reflowable publication you are giving up full control. You are letting the viewing software make its layout decisions for you, and these decisions will be very different on diffferent device and apps. Some may squash your content or spread it very much, so blank lines will be sacrificed. Don’t worry! Your job is to deliver what matters: the content. 

If you can explain why, in a particular case, you feel you must break the reflow with extra blanks, new lines, or blank lines, someone may have a solution, or can tell you you cannot control it. Screen shots may help. 

KathrineFrichAuthorCorrect answer
Participant
May 6, 2020

I made it work. 😄 

But im setting up a book for an author and he finds it very important that there is a line break between the chapter titles and the text. The other authors i have worked with didnt think it was important so i have never had to deal with it before. But now i found a solution that works thanks to people in here and other forums. 🙂 

Participant
November 25, 2020

How did you make it work? I'm having the same issue.

rob day
Community Expert
Community Expert
May 6, 2020

told me to use a paragraph style that had "space after" the places where i needed it.. so i did that... and it didnt work.. any other helpful tips?

 

Also, space after should work, but the epub’s relative space amount will be different. It will be defined as a margin-below in device pixels, while InDesign’s space below is the print output dimensions. Here I set a space below as 150 pixels which equals 2.083" when printed. You can also see the tabs and multiple returns are collapsed:

 

 

 

Participating Frequently
July 24, 2023

I'm having the same exact problem. My indesign file is set up with space after and before in paragraph styles and it is still collapsing.

 

The only thing that worked for me in kindle previewer is inserting Html, making <br> tag, and anchoring that to the begining or end of the paragraph, but it shows up as an error in my mac books app.

 

James Gifford—NitroPress
Legend
July 24, 2023

I can't see anything evidently wrong other than that locking styles to the baseline grid might be making something wonky happen. You don't really need to use the baseline grid for most projects if you set up your styles with some care. (And bear in mind it applies only to print; if this is an EPUB/Kindle title only there's absolutely no reason to use the grid.)

 

In any case, try turning off the "align to grid" setting for at least this heading, and see what happens.

 

Beyond that, we'd need to see a sample file to look for other problems.

Derek Cross
Community Expert
Community Expert
May 6, 2020

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

But you need to understand some concepts, such as no page size, no page numbers, no Master pages, all text to be styled (paragraph and character styles), all images to be anchored. You will be very lost until you get some training.

BobLevine
Community Expert
Community Expert
May 6, 2020

If you truly know nothing about HTML or CSS you're in over your head.

What version of InDesign are you using?

Participant
May 6, 2020

I have some basic knowledge of CSS and HTML. Where can I find the CSS files for the style in InDesign?

I'm using version 15.0.2 on 64x

rob day
Community Expert
Community Expert
May 6, 2020

HTML collapses white space—multiple returns and spaces get collapsed into a single space or return:

 

https://www.oreilly.com/library/view/web-programming-with/9781284091809/xhtml/11_Chapter02_08.xhtml

 

Derek Cross
Community Expert
Community Expert
May 6, 2020

Creating Reflowable ePubs is not intuative. I suggest you take a LinkedinLearning online video course on creating Reflowable ePubs. They are in English but there is transcript. You can get 30-day free access.

https://www.linkedin.com/learning/me