Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : Exporting epub with InDesign: I lose blank lines!


tibiafry
03-31-2009, 08:14 AM
When I export an epub from InDesign, all blank lines get lost in the procces.

For instance there is this line

then a blank line between this one on the indesign document

But on the epub (and xhtml source) It's seen like this:

For instance there is this line
then a blank line between this one on the indesign document

How can I force it to detect how many blank lines i left?

Thanks

Jellby
03-31-2009, 08:25 AM
Don't leave blank lines, use vertical spacing instead. I have never used InDesign, but I guess you can assing some vertical space above the "then a blank line between..." paragraph or below the previous one.

tibiafry
03-31-2009, 08:33 AM
Don't leave blank lines, use vertical spacing instead. I have never used InDesign, but I guess you can assing some vertical space above the "then a blank line between..." paragraph or below the previous one.

That is not an option since our books are already made. We must convert them now into ebooks. And doing so in all of the books will drive the guys at the design department even more crazy. And I don't want them to eat me :rofl:.

Any other way?

JSWolf
03-31-2009, 08:40 AM
That is not an option since our books are already made. We must convert them now into ebooks. And doing so in all of the books will drive the guys at the design department even more crazy. And I don't want them to eat me :rofl:.

Any other way?
Yes there is a way. Create a CSS entry for the paragraphs where you want the space to come before. Then use that for all those section in the XML files.

It's not as hard as it sounds. Could maybe be easier if you have all the paragraphs without an indent like in some books.

if you want to send me one of your eBooks in ePub, I cna have a go at it if you also point out where you want the spaces.

Jellby
03-31-2009, 08:41 AM
Open the XHTML generated in the ePUB file by InDesign. Are the "empty lines" there in any way (maybe an empty <P> or <DIV> tag)? If they are, you could post-process the ePUB to add something (&nbsp;) there.

If they aren't, there might be a way to run a macro/script that finds empty lines and adds a space or non-breaking space there. Then maybe when creating the ePUB these empty lines will not be lost.

tibiafry
03-31-2009, 08:43 AM
Yes there is a way. Create a CSS entry for the paragraphs where you want the space to come before. Then use that for all those section in the XML files.

It's not as hard as it sounds. Could maybe be easier if you have all the paragraphs without an indent like in some books.

if you want to send me one of your eBooks in ePub, I cna have a go at it if you also point out where you want the spaces.

I've already tried this. Editing the css, and I have that no-indent paragraph and it's just what I want to get, but It also messes up other places where it shouldn't be. Wouldn't it be easier if the export function did what it should (export everything, and not just waht it wants to). hehe.

No it's not there at all. I've searched it. I was writting a post winning to mobipocket cause it eated the lines and realized that it isn't there even on epub. Maybe post processing the xhtml is an option. But it will suck lol.

PS: can I force a page jump in epub? like <hr> or something lol

Jellby
03-31-2009, 12:12 PM
PS: can I force a page jump in epub? like <hr> or something lol

You can use the CSS properties "pagebreak-before: always" or "pagebreak-after: always".

tibiafry
04-01-2009, 04:08 AM
You can use the CSS properties "pagebreak-before: always" or "pagebreak-after: always".

That's very interesting. Any other special CSS properties I could learn?

A link or something?
Thanks.

Jellby
04-01-2009, 06:58 AM
Hmm... I don't know what's "special", but I got most of my information from http://www.w3schools.com/Css/default.asp (or rather, google searching for different things often directed me there).

tibiafry
04-01-2009, 11:52 AM
Hmm... I don't know what's "special", but I got most of my information from http://www.w3schools.com/Css/default.asp (or rather, google searching for different things often directed me there).

Ok, thanks, but now:

I really need to know how to get at least this output

<p>&nbsp;</p>

for each blank line I have in my InDesign document. It's getting a pain in the *** having to do a special style editing every time i need 1, 2, 3 or 4 blank lines before/after a paragraph.

Thanks.

P.s.: I was searching the problem on google and this thread is the first result :S

cerement
04-02-2009, 03:38 AM
I really need to know how to get at least this output
<p>&nbsp;</p>
for each blank line I have in my InDesign document. It's getting a pain in the *** having to do a special style editing every time i need 1, 2, 3 or 4 blank lines before/after a paragraph.
Ideally, you want to separate the display aspects into CSS and leave just the content in the XHTML file. Handcoding things is relatively straightforward, but I don't know enough about InDesign to go about telling you how to handle the automatic conversions.

If all of the <p> tags are getting the same space before, then in the external stylesheet, you would add something along the lines of:
p {padding-top: 1em}
If the amount of spacing was variable, then simplest (though not "best practice"), is something like:
<p style="padding-top: 2em">This is paragraph 1</p>
<p style="padding-top: 1em">This is paragraph 2</p>