05-16-2012, 10:52 AM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: None
|
Space before paragraph not coming through in epub
I'm using InDesign CS6 (just upgraded from CS3) to create epubs.
I'm using the paragraph style to define space before and space after a paragraph (which many people explain is the better way of getting spacing rather than using carriage returns). However, for headings, the space before is not translating through into the epub document - but the space after is (i.e. if I change the spacing after the paragraph, I can see the difference as soon as I create the epub, but the spacing before is zero, no matter what value I have in InDesign) Any help appreciated. Thanks |
05-22-2012, 02:03 PM | #2 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2012
Location: Oxford, United Kingdom
Device: none
|
I have been tearing my hair out all day with the same problem.
steve2112 - you can try "style mapping" and map styles to tags. It's under the fly-out menu in Paragraph Styles. Useful video here: http://tv.adobe.com/watch/learn-inde...d-epub-export/ This has helped me a bit, in that it has standardised the spaces. But for some reasons I can only apply spacing to paragraphs (p tags in xhtml) and not to headings (h1, h2 etc in xhtml) used in epubs. I've even tried editing the .css in the unzipped epub files but that doesn't work either. Stopping while I still have some hair. |
Advert | |
|
05-22-2012, 02:47 PM | #3 | |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
In other words if you want spacing above the first item following a page break.. you need to physically start a new html file at that point. Otherwise, you won't be able to assign any spacing before that element. I'm attaching a sample epub that demonstrates the issue. Last edited by DiapDealer; 05-22-2012 at 03:08 PM. |
|
05-23-2012, 06:04 AM | #4 | ||
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
Code:
<div class="pagebreak"/> <h2>Chapter 5</h2> Whether this is possible to generate directly from ID, that's a different matter. |
||
05-23-2012, 06:11 AM | #5 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I didn't know that about the padding attribute. Thanks!
|
Advert | |
|
05-24-2012, 04:13 AM | #6 | |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2012
Location: Oxford, United Kingdom
Device: none
|
Quote:
The problem I am seeing is not related to elements which have been assigned the "page-break-before" directive, at least not intentionally. With CS6 epub exports is that any heading, no matter what paragraph style is associated with it, no matter how it is mapped, no matter what, always has any 'space before' removed rather than converted into css padding or margin. Am I missing something else? |
|
05-24-2012, 10:46 AM | #7 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't know enough about how InDesign (or its ePub plugin) works to be very helpful, I'm afraid. I can tell you what might be wrong (or missing) with the final ePub output, but not what you'd have to do in ID (if indeed you can do anything) to produce the proper result in the ePub. I do know I hear a lot of people talking about having to manually tweak the ePub after exporting from ID.
|
05-24-2012, 03:00 PM | #8 | |
Sigil developer
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
Using separate files works ok. |
|
05-25-2012, 02:18 AM | #9 |
Member
Posts: 11
Karma: 10
Join Date: Mar 2012
Device: None
|
Thanks everyone for all this info - there's more info than I was expecting as I was looking at headings through the text, not necessarily just after a page break - but this info helps even more.
I focused on the exploded epub files and found that there was no top margin info being passed from ID when creating the ePub. So I manually went in and added "margin-top:20px;" (for example) into the relevant paragraph styles in the CSS file. This worked, though it's obviously fixing a problem after the event rather than sorting it out at the source. Steve |
06-01-2012, 05:20 AM | #10 |
Junior Member
Posts: 8
Karma: 10
Join Date: May 2012
Location: Oxford, United Kingdom
Device: none
|
InDesign produces tags with complete reliability. I think it is best to use those and create a new stylesheet (or stylesheets) for ebooks. Certainly for e-ink Kindle books this is the least painful way to go, seeing as Kindle decides which fonts are used anyway!
Since my earlier post I've decided to use Indesign's export tagging to assign h1, h2, h3, etc and p tags to every paragraph used. I also assign a class e.g. myh1, myh2, plus various different paragraph styles based around what sort of spacing and other styling each paragraph style requires. I have also created several stylesheets, and used CS6's Additional Stylesheet feature to include these. This enables me to keep several sets of styles, and decide whether or not to override what InDesign exports (if it isn't working - as seems to usually be the case). You can even have different stylesheets for different e-readers, all contained in the same epub. It isn't quite the nice tidy solution I expect from InDesign but it does work if you know what you are doing with css, and also means you can keep editing in Indesign and re-exporting epubs without having to then re-edit the Indesign-produced stylesheet to put the margins back in every time you do a new export. |
06-02-2012, 10:56 AM | #11 |
Junior Member
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: none
|
|
06-03-2012, 08:47 AM | #12 | |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's hilarious to me that the CS6 epub plugin developers seem to be at odds over whether the exclusion of the "margin-top" property was an intentional feature or a bug. Last edited by DiapDealer; 06-03-2012 at 09:21 AM. |
|
06-03-2012, 03:46 PM | #13 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
@steve2112
I use an empty paragraph (or two) before the headline to adjust the text, like <p> </p> </h3>Headline</h3> This can be done in the source. The heigth of the empty paragraph depends on the font-size in paragraph with text, normally 1em. You can modify it by creating a new <p class>. But that's after conversion. George |
06-05-2012, 12:43 PM | #14 | |
Resident Curmudgeon
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
h3 { margin-top: 1em; margin- bottom: 1em } |
|
06-06-2012, 03:57 AM | #15 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
Yes, it is poor, but I understood that css didn't give the result the OP wanted.
He said: "... for headings, the space before is not translating through into the epub document." And wahahey says: "With CS6 epub exports is that any heading, no matter what paragraph style is associated with it, no matter how it is mapped, no matter what, always has any 'space before' removed rather than converted into css padding or margin." George |
Tags |
cs6, epub, indesign, spacing |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
EPUB to RTF w/out paragraph breaks | arslonga | Conversion | 2 | 02-06-2012 04:40 AM |
PRS-T1 Sony T1 EPUB paragraph problem | Cptow | Sony Reader | 13 | 01-20-2012 10:01 PM |
Paragraph/line space - "n" added | NormalJoe | Conversion | 6 | 01-25-2011 11:28 AM |
Paragraph Style Not Exporting / ePub | soulartist | Workshop | 5 | 12-11-2010 12:02 AM |
Paragraph breaks in ePub? | rocalisa | Calibre | 3 | 10-29-2010 03:53 PM |