Mobileread
Trying to add space in EPUB document
#1  BrendaGreally 10-20-2020, 09:00 AM
Hi

I think what I'm trying to do is probably quite simple but I can't for the life of me figure it out. In InDesign CC 2020 I need to add space above the text on an ebook title page, and also I need to add some space above each of the chapter headings.

For the title page, I've tried Object Export Options > Custom Layouts > Space Before but no matter what value I input it has no effect - the text still appears at the top of the page on the exported EPUB.

For the space at the start of each chapter, I've tried adding things in the paragraph style but it seems lots of information gets discarded on export to EPUB.

Hopefully someone has a solution!
Reply 

#2  JSWolf 10-20-2020, 09:39 AM
I don't know the solution using InDesign. But there is a solution that requires editing the CSS. Find the class that defines how the chapter title is displayed and add in code like...
Code
margin-top: 1em;
. That will add 1em of space to the top of the chapter title.

You can use Sigil to do this and you'll be able to see the result before saving.
Reply 

#3  BrendaGreally 10-20-2020, 09:53 AM
Quote JSWolf
I don't know the solution using InDesign. But there is a solution that requires editing the CSS. Find the class that defines how the chapter title is displayed and add in code like...
Code
margin-top: 1em;
. That will add 1em of space to the top of the chapter title.

You can use Sigil to do this and you'll be able to see the result before saving.
Thanks for this - I'm not very confident with editing CSS so I'd prefer a solution within InDesign if such a thing is possible. If it's not, I'll give it a try!
Reply 

#4  Notjohn 10-20-2020, 02:32 PM
You may find that InDesign epubs have to be fixed in Sigil anyhow, so you might as well learn to do it in the purpose-built epub software rather in ID.
Reply 

#5  JSWolf 10-20-2020, 03:04 PM
If you learn how to do this in CSS, you can learn more and you can also learn HTML. This way, you can make any changes to the ePub you want/need that you cannot do easily with InDesign.

To be honest, I've seen the code for a lot of ePub that was made with InDesign and it's not as good as it could be. The problem with some eBooks done in InDesign is that they are laid out for print and then exported as ePub and that in;t always optimal. Fonts are one thing that is an issue with InDesign when exporting to ePub.

Learn HTML/CSS and you can do what you want/need to do. Remember, you can always ask for help on MR.
Reply 

#6  Hitch 10-20-2020, 03:33 PM
Quote BrendaGreally
Thanks for this - I'm not very confident with editing CSS so I'd prefer a solution within InDesign if such a thing is possible. If it's not, I'll give it a try!
Well, there's more to it than that. And no, you can't fix it inside of InDesign. Moreover, as Notjohn says, you really CANNOT upload a direct-from-INDD ePUB of the reflowable type, to any vendor and have it pass intake and work. It simply won't, so you're going to have to get your hands into the ebooks a bit.

The solution that Wolfie mentioned will work; but you can also use the simple expedient of ensuring that each chapter is its own HTML file and then use margin-top to ensure that you get the spacing that you want.

I hope that helps. Don't be afraid of the code. It just looks scary.

Hitch
Reply 

#7  JSWolf 10-20-2020, 03:54 PM
I think for the average novel, that HTML/CSS is easier to learn then it is to learn to use InDesign. It's been a long time since I've used InDesign. This was pre-ePub and I was doing some complex layout to be printed.
Reply 

#8  JSWolf 10-20-2020, 03:57 PM
Have a look at the following code for a chapter title.

HTML code
Code
<h2>Chapter One</h2>
CSS code
Code
h2 { font-size; large; margin-top: 1em; margin-bottom: 1em; text-align: center; text-indent: 0; font-weight: bold;
}
That defines a chapter header of Chapter One that's bold, center, font size is large, and has a 1em space between the top and bottom of the chapter title.

See how simple it is?
Reply 

#9  Quoth 10-21-2020, 02:57 PM
Indesign was meant for paper (and by implication PDFs which really are only proofs of paper). The epub support is a fudge and produces ghastly stuff.

Far better to use a Wordprocessor. Use Styles. Totally trivial to set top margin, left, right, first line and bottom.

Then Sigil or Calibre to convert a docx to epub.

Then the above example is totally automatic converting docx to epub if the margins are set in pt. The convention is 12pt = 1em. Almost all rendering engines use that if the CSS is in points.
Reply 

#10  JSWolf 10-21-2020, 04:03 PM
Quote Quoth
Indesign was meant for paper (and by implication PDFs which really are only proofs of paper). The epub support is a fudge and produces ghastly stuff.

Far better to use a Wordprocessor. Use Styles. Totally trivial to set top margin, left, right, first line and bottom.

Then Sigil or Calibre to convert a docx to epub.

Then the above example is totally automatic converting docx to epub if the margins are set in pt. The convention is 12pt = 1em. Almost all rendering engines use that if the CSS is in points.
In some cases, it's easier to output a text version of the book and edit that. If the formatting is not too complex, it will be easy enough to edit that to be well formatted ePub.

What I don't get is why publishers try to duplicate the look of the pBook but still manage to botch the eBook formatting. For example, paragraph spaces. They don't exist in the pBook and left justify does not exist in the pBook.
Reply 

  Next »  Last »  (1/4)
Today's Posts | Search this Thread | Login | Register