![]() |
#1 | ||
Zealot
![]() Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
|
Headings appearing huge with Indesign stylesheet
Hi,
I'm trying to tweak a book that was designed in InDesign and exported as ePub. I love the look of it when I upload to KDP, except for one problem - the headings (H1) appear HUGE. I've tried going into the Indesign-generated stylesheet to tinker with the code, but nothing happens, no matter what I do. I'm actually not sure if what the stylesheet defines as a heading is the same thing as Sigil's H1. This is the code in the stylesheet, as far as I can ascertain: Quote:
Many thanks. EDIT: on closer inspection I see this in the page html Quote:
Last edited by Alda; 06-20-2014 at 06:51 AM. |
||
![]() |
![]() |
![]() |
#2 |
Zealot
![]() Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
|
Ok, answered my own question. When I tinkered with the "override" code I managed to get it the way I wanted.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You do realise I hope that you can probably reduce your stylesheet with 75% by removing the InDesign clutter? That would also speed up the book.
|
![]() |
![]() |
![]() |
#4 |
Zealot
![]() Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
|
Nope, I had no idea. This is my first time doing this.
Can you be more specific re. InDesign clutter? Thanks. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Stylesheets inherits. So, characteristics can be set in the body/html. As long as they do not change (as most do not), you don't need them in the other definitions. So, usually you can move margin settings, font settings etc into the body/html tags. That saves a lot of entries. Also, Indesign will often use micro values (in your example a line-height of 1.083). That is unnecessary. A setting of 1.0 or 1.1 would do.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Reminds me a lot like not using Styles functionality in Microsoft Word or LibreOffice, and then exporting to HTML.
While doing things that way might LOOK fine on the surface, or be perfectly fine for a print edition, if you try to do anything besides print, your code is going to be mangled/unmaintainable. When you design a book in InDesign without thinking "ebook FIRST", you cause yourself A MASSIVE amount of headaches when trying to do anything outside of PDF/print. Let us say when designing the InDesign file, you forgo using Styles, and implement things like manual kerning tweaks, manual font-sizing, instead of specifying logical markup of "heading1" + "heading2" you decide to just resize+bold the text+change the font, etc. etc. When you export the book to EPUB, InDesign creates a massive amount of spans that are just worthless/redundant/overlapping. For example, here is a sample from one of the latest InDesign -> EPUB conversions I cleaned up. Here is the first page from the PDF from Chapter 7: As you can see, it looks perfectly fine on the surface... but, let us take a look at the EPUB code that was generated. InDesign EPUB: Quote:
Code:
p.chapter-number { font-family: "Poppl-Laudatio"; font-weight: normal; font-style: normal; font-size: 0.83em; line-height: 1.20em; text-decoration: none; font-variant: small-caps; text-indent: 0em; text-align: center; color: #000000; margin: 0.90em 0em 2.25em 0em; } p.chapter-number-override { margin: 0.64em 0em 1.61em 0em; } span.no-style-override { font-size: 1.17em; } span.no-style-override-1 { font-size: 1em; } p.chapter-heading { font-family: "Poppl-Laudatio"; font-weight: normal; font-style: normal; font-size: 1.83em; line-height: 1.27em; text-decoration: none; font-variant: normal; text-indent: 0em; text-align: center; color: #000000; margin: 0em; } span.no-style-override-2 { font-size: 1.33em; line-height: 1.88em; } After: Quote:
InDesign EPUB: Quote:
Code:
p.body-text { font-family: "Minion Pro"; font-weight: normal; font-style: normal; font-size: 0.92em; line-height: 1.20em; text-decoration: none; font-variant: normal; text-indent: 1.64em; text-align: justify; color: #000000; margin: 0.13em 0em 0em 0em; } span.no-style-override-4 { font-style: italic; } span.no-style-override-5 { } Quote:
For example, color: #000000; is telling the text to be black. While this works perfectly fine on paper (or in a physical book), in an ebook, this sort of code is only going to cause problems (let us say a user wanted to change the color of their fonts). InDesign introduces all of these overlapping font-sizes + font-heights + line-heights + other madness... who knows how certain devices would interpret that code. You would HOPE it would show up correctly, but your safest bet is to just strip that all out, and start from the basics, never even giving the chance for the code to be displayed wrong. Side Note: If you right click on a class in Sigil, and press "Go To Link or Style", it should jump you directly to the class in the CSS file: This is extremely helpful in determining what classes do what. Although again, there is most likely going to be A TON of overlapping classes. Other Side Note: If you don't think this code is that bad, there are WAY greater horrors that I have seen. ![]() Last edited by Tex2002ans; 06-20-2014 at 03:08 PM. |
||||
![]() |
![]() |
![]() |
#7 |
Zealot
![]() Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
|
Thanks for the explanation. I've been immersed in tweaking the last few hours and totally get what you mean. However, I'm too much of a novice to be able to strip it the way you describe above, so I'm doing what I can, then crossing my fingers and hoping for the best.
If all else fails, I'll go back to a very basic html and build the book from scratch. |
![]() |
![]() |
![]() |
#8 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
There is always Word and Toxaris' add in or Atlantis Word Processor. They produce much simpler and manageable code.
|
![]() |
![]() |
![]() |
#9 | |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
I'm interested in what you say about Atlantis. I've heard good things about Jutoh, but nobody to my knowledge has mentioned Atlantis before. It creates epubs or mobis or just simply clean code? It's easy to use? Thanks! |
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Atlantis is mentioned on the board for years now. It is basically a word processor than can read Word documents. It can output ePUB and now also mobi I believe. The quality of the output is acceptable the last time I checked. It has some drawbacks. It doesn't do tables IIRC.
|
![]() |
![]() |
![]() |
#11 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Very easy to use. Allows to just drag pictures into it, copy and paste, things you can't do in the calibre editor or Sigil.
For me it provides a good basis which can be tuned in either editor. Tables can be added in by hand afterwards in one of the editors, when desired. Most word processors want to make over complicated tables, as far as I am concerned. One note is that AWP publishes the mobi or epub, it can not edit them. That you have to do in one of the editors. But you can correct seen mistakes and publish once again. |
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#13 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
When the announcement about Sigil no longer being supported came out, I tried Atlantis. I have to say, trying to sort out those CSS styles would make me personally insane, but...to each their own. The fact that named styles can't be mapped from Word-->ATL-->CSS is a bit frustrating. Yes, it can be fixed with regex, but I'd feel seriously sorry for anyone who didn't regex them into some type of order, who had to go back 6 or 12 months later and try to figure out WTH was what. OTOH, it does make a perfectly nice ePUB, in terms of how it appears on the surface. I'll give it its due. But at least, in terms of WYSIWYG, Jutoh maps styles (and, yes: THAT stylesheet makes me nutty, too.) Hitch |
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
I would agree that it would be nice to map the style names directly to a traceable name which would aid fixing or modifying the epub after it is built. But this is not the idea of Atlantis. It is designed to always go back to the source file and fix things. What I do like is that if you override the styles by making a change to an individual paragraph without changing the styles the compiler will pick that up and make a CSS style for it. If you do the same kind of change to several paragraphs it will group them and make a single CSS entry thus it is cleaner for sloppy writers. I chased some of this down but currently try and avoid worrying much about the CSS and just add things if required.
Dale |
![]() |
![]() |
![]() |
#15 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I just couldn't deal with it. I stared at it once (having used a pre-cleaned Word file, that had Word-styles applied), and was appalled. If you could predict the styles that Atlantis was going to apply--I mean, the names--you could create clips for it, but as you can't...oish. And, yes, I understand it's not meant to work like Sigil, (i.e., editing in ePUB view) but surely, they have SOME idea that people might want to do that? I guess not, having said it. Too bad, because other than that, which I consider unmanageable (it's like having to map Calibre styles, really), it's not bad at ALL. Hitch |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
stylesheet help | arethusa | ePub | 6 | 07-02-2013 12:03 PM |
Link Stylesheet Does Not Appear | smallstate | Sigil | 2 | 09-20-2012 07:43 AM |
How NOT to use a stylesheet? | karyan | Sigil | 12 | 03-07-2012 12:43 PM |
Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 08:24 PM |
Where is the stylesheet.css? | roger64 | Sigil | 4 | 03-23-2010 02:12 PM |