View Full Version : HTML formatting


MarcusStringer
03-10-2010, 06:32 PM
Hi people.
Just ran a test job for a client who want to branch into the eBook world.

I'm not that familiar (enough to get me in trouble) with HTML and the .epub was created from InDesign. I've anchored all the images so they appear where they are supposed to... but the formatting is atrocious... see here:
For example the prelims (dedication, imprint, title page etc) needs to really be on their own page. Can this be done???

http://i41.photobucket.com/albums/e276/marcusstringer/Picture1-18.png

And the start of chapters have an image here that I would indicate a new chapter and which I would like starting on a new page...

http://i41.photobucket.com/albums/e276/marcusstringer/Picture2-5.png

Is there a list of commands for things like this and where to place them, for beginners?

Like:
Making paragraphs centered then insert this code here.
or this is how to make all the fonts the same size
or to adjust font size insert this code here

That would be helpful

Thanks
Marcus

charleski
03-10-2010, 08:24 PM
Adobe Digital Editions respects the css 'page-break-before: always' style, though some other epub readers don't. The sure-fire way of forcing a pagebreak is to break the text into separate flows, which for InDesign means creating the epub from a Book that contains separate documents (each document will be a new flow).

As for the rest, try reading up on CSS2.

Creating epubs requires mix of typographic and technical skills equivalent to those needed to design a physical book.

Valloric
03-11-2010, 10:24 AM
Creating epubs requires mix of typographic and technical skills equivalent to those needed to design a physical book.

I'd say that having skills typically associated with web design is 90% of knowing how to create a good epub. The skills used in making a physical book are IMO not that much related. What are the chances that someone creating physical books knows XHTML and CSS? And where do classic typography skills come into play for epub where the layout is left entirely to the Reading Systems? Sure, they matter, but not as much as we'd like.

I'm not saying there is no overlap between skills used in making physical books and epubs, I'm just saying it's small.

charleski
03-11-2010, 11:46 AM
I'd say that having skills typically associated with web design is 90% of knowing how to create a good epub.A web page is a very different thing to an ebook. It serves a different purpose and is used in a different manner. While web design has inherited many elements from large-format book design, it has (quite rightly) branched out in entirely different directions. While they both use similar languages (html/xhtml and css), those are merely tools that can be put to very different purposes.

I've seen several books which have been laid-out as if they were just one long web-page, no doubt the result of some numpty thinking, 'This ebook thing is just html, that's easy!' They look hideous and are hard to read.

where the layout is left entirely to the Reading SystemsAny epub that didn't use any styling code to override the default rules would be a joke.

Valloric
03-11-2010, 12:51 PM
A web page is a very different thing to an ebook. It serves a different purpose and is used in a different manner.

No argument here.


While web design has inherited many elements from large-format book design, it has (quite rightly) branched out in entirely different directions. While they both use similar languages (html/xhtml and css), those are merely tools that can be put to very different purposes.

Still no argument.

Any epub that didn't use any styling code to override the default rules would be a joke.

And I agree with this too. I've never said epub books should be laid out as web pages, I'm just saying that skills and knowledge used in web development (XHTML and CSS) are more pertinent to epub creation than those from traditional typesetting.

You just confirmed this: any epub book not using specific CSS code looks amateurish. How many traditional typesetters/typographers/etc know CSS? I'd bet the number is very low.

And by "layout" being up to the Reading Systems, I meant the actual text layout. As in the way paragraphs and lines flow and break, tracking, kerning etc. You can't control that when creating an epub book, and it's very important for physical books. Those would be the skills from traditional typography that are sadly left wasted for ebooks.

MarcusStringer
03-11-2010, 05:42 PM
How many traditional typesetters/typographers/etc know CSS? I'd bet the number is very low.

Agreed, and the problem is Publishers are heading to traditional typesetters like myself for solutions to producing ebooks (which is a natural progression IMO). Problem is they don't understand what's involved in such a venture.

And by "layout" being up to the Reading Systems, I meant the actual text layout. As in the way paragraphs and lines flow and break, tracking, kerning etc. You can't control that when creating an epub book, and it's very important for physical books. Those would be the skills from traditional typography that are sadly left wasted for ebooks.

Is is my biggest problem...Crash course in XHTML + CSS to say "yes" we can do it... so we don't lose out on the potential massive market in this type of work... If we can offer a service of traditional typesetting as well as ebook production bundled together... It has to be the way of the future...

So I guess sortging out the best way to layout for traditional AND digital will be the challenge. Instead of creating one document in InDesign, Breaking it down the elements (title page, dedication pagee, chapter1, chapter2, etc) into seperate files then using the book feature, creating the epup file to ensure pages breaks.

charleski
03-12-2010, 08:31 AM
And by "layout" being up to the Reading Systems, I meant the actual text layout. As in the way paragraphs and lines flow and break, tracking, kerning etc. You can't control that when creating an epub book, and it's very important for physical books.
Obviously there's a lot more to typography and book design than that, though you're right that they are a very important component. Relowability means that line- and page-breaks within a continuous block of text need to be left to the reading system, but tracking and kerning can most certainly be controlled, I've attached an example to show this (which also shows the tedious contortions needed to get around the primitive limitations of the epub spec).

Typography was one of the first industries to embrace a computersied workflow, I don't think modern typographers have any problem with that, though they might not know what to do with a composing stick. (x)Html and CSS are hardly rocket-science, anyone can pick them up very quickly. They're just a tool, like a knife - everyone knows how to use a knife to cut some bread, but very few know how to use a knife to cut out an appendix.

frabjous
03-12-2010, 04:17 PM
Relowability means that line- and page-breaks within a continuous block of text need to be left to the reading system, but tracking and kerning can most certainly be controlled, I've attached an example to show this (which also shows the tedious contortions needed to get around the primitive limitations of the epub spec).

But you're telling it to use a different character spacing than usual, as a function of its normal character spacing ("tight", "loose", etc., throughout this span)-- you're not actually doing real kerning there, where information taken from the fonts is used pairwise to correctly place each pair of characters appropriately spaced apart given their individual shapes -- that would still have to be done by the rendering system, no? (Or it would be a real pain.)

(x)Html and CSS are hardly rocket-science, anyone can pick them up very quickly. They're just a tool, like a knife - everyone knows how to use a knife to cut some bread, but very few know how to use a knife to cut out an appendix.

Thank you -- you need to tell that to DawnFalcon (http://www.mobileread.com/forums/showthread.php?t=74421&p=809920).

P.S. I looked at the CSS file inside the ePub. I was surprised by what I saw, which is controlling spacing using margin-left and margin-right -- surely the letter-spacing (http://www.quackit.com/css/properties/css_letter-spacing.cfm) CSS property would be more appropriate, with just one <span> tag rather than a separate one for each letter. Doesn't the ePub spec support that? Disappointing if it doesn't.

charleski
03-12-2010, 09:26 PM
But you're telling it to use a different character spacing than usual, as a function of its normal character spacing ("tight", "loose", etc., throughout this span)-- you're not actually doing real kerning there, where information taken from the fonts is used pairwise to correctly place each pair of characters appropriately spaced apart given their individual shapes -- that would still have to be done by the rendering system, no? (Or it would be a real pain.)Well, kerning, 'real' or otherwise, can be done manually or automatically. In most cases it's incorporated into the font through the kerning tables, though there are some fonts which deliberately eschew that. There are certainly times when you'd want to override automatic kerning to maintain a consistent balance in a headline, but yeah, manually kerning an entire body of text would require a degree of mania.

P.S. I looked at the CSS file inside the ePub. I was surprised by what I saw, which is controlling spacing using margin-left and margin-right -- surely the letter-spacing (http://www.quackit.com/css/properties/css_letter-spacing.cfm) CSS property would be more appropriate, with just one <span> tag rather than a separate one for each letter. Doesn't the ePub spec support that? Disappointing if it doesn't.
Pity you can't hear my bitter laugh. No, letter-spacing is not a required attribute for the CSS subset specified by the IDPF, and it's not supported by ADE.

I have no idea why it's not included (a search on the IDPF forum (http://www.openebook.org/forums/index.php) reveals nothing), and it's just another example of why the epub spec needs revision.

OTOH, letterspacing can be really irksome when overused, so maybe this is some subtle ploy to enforce a typographic standard :).

Valloric
03-13-2010, 07:22 AM
OTOH, letterspacing can be really irksome when overused, so maybe this is some subtle ploy to enforce a typographic standard :).

I think most people would be surprised at just how few subtle ploys really exist in the world.

MarcusStringer
03-29-2010, 01:05 AM
Well...umm...I guess thanks? for helping me out... Individual Documents, right? Thanks charleski.

I didn't mean for this to turn into a argument about Letter spacing... To be honest. I'm hoping with the introduction of the iPad that PDFs will take over .epub as the new standard.

Because Acrobat will actually maintain the look and feel of the Printed Book, Including bookmarks, Hyperlinks, Metadata, and can now include video etc etc... and most importantly maintains columns and table... I think given time the industry will come full circle back to PDF, instead of the jumbled continuous single column only supporting OpenType fonts mess that it is at the moment...

Valloric
03-29-2010, 09:27 AM
To be honest. I'm hoping with the introduction of the iPad that PDFs will take over .epub as the new standard.

Because Acrobat will actually maintain the look and feel of the Printed Book, Including bookmarks, Hyperlinks, Metadata, and can now include video etc etc... and most importantly maintains columns and table... I think given time the industry will come full circle back to PDF, instead of the jumbled continuous single column only supporting OpenType fonts mess that it is at the moment...

On MobileRead, that can of worms has been opened and closed repeatedly about 50 million times (on last count).

Let's not go there yet again. :)

JSWolf
04-05-2010, 05:42 PM
To be honest. I'm hoping with the introduction of the iPad that PDFs will take over .epub as the new standard.

Because Acrobat will actually maintain the look and feel of the Printed Book, Including bookmarks, Hyperlinks, Metadata, and can now include video etc etc... and most importantly maintains columns and table... I think given time the industry will come full circle back to PDF, instead of the jumbled continuous single column only supporting OpenType fonts mess that it is at the moment...

ePub can use Truetype fonts as well as Opentyle when embedding fonts.

As far as PDF goes, let's just say you are way out in left field here. Most readers won't work well with PDF and since epub should work fine on the iPad and most readers, it would be rather bad for business to do away with ePub in favor of the eBook wannabe format that is PDF.

MarcusStringer
04-05-2010, 07:06 PM
As far as PDF goes, let's just say you are way out in left field here. Most readers won't work well with PDF and since epub should work fine on the iPad and most readers, it would be rather bad for business to do away with ePub in favor of the eBook wannabe format that is PDF.

The point I was trying to make was with the introduction of iPad I can see PDF becoming more widely used, because it retains everything people want in a book...Good design and readability.

My prediction will be iPad slowly becoming the benchmark, in the same vein as iPhone became the benchmark in mobile phone tech

Let me just say. There are a lot of frustrations because of the limitations .epub have for the first timer with ebook creation.

Elfwreck
04-05-2010, 07:16 PM
I didn't mean for this to turn into a argument about Letter spacing... To be honest. I'm hoping with the introduction of the iPad that PDFs will take over .epub as the new standard.

Not a chance.

Not everyone is going to read on a screen big enough to display letter-sized pages well, and that's what gets in the way of PDFs being the industry-standard for ebooks. Pocket-sized ebook readers, between Blackberry/PDA size and 6" e-ink screens, can't handle magazine-page-sized PDFs well.

What'll take over is whoever manages to make a markup-based format (which might be ePub) that displays with elaborate layout options if you've got the screen real estate, and simple linear layout if you don't.

MarcusStringer
04-05-2010, 07:22 PM
What'll take over is whoever manages to make a markup-based format (which might be ePub) that displays with elaborate layout options if you've got the screen real estate, and simple linear layout if you don't.

Fair point...

This maybe be a viable way forward: http://www.youtube.com/watch?v=G_oBpaMuCvc&feature=player_embedded

gaphic2
04-05-2010, 08:16 PM
Indesign to Epub works. Be sure to look at http://www.adobe.com/products/creativesuite/design/crossmedia_resources/ebooks_software.html and http://www.adobe.com/devnet/digitalpublishing/. Yes, there are howto videos in the first link.

Do as much as you can from Indesign itself. Usually, if any, there's only minor tweaking left to do in the css style definitions and the epub metadata. Avoid editing the xhtml files manually. That way the epub won't cost more than the print version to typeset.

Valloric
04-06-2010, 12:23 PM
What'll take over is whoever manages to make a markup-based format (which might be ePub) that displays with elaborate layout options if you've got the screen real estate, and simple linear layout if you don't.

And that is epub.

PrinceXML as an application shows what can be done when someone wants to make an (X)HTML renderer that actually doesn't suck when it comes to typography. Sure, it could be even better, but it already has a very nice line breaking algorithm.

The fact that no one has yet made a typographically pleasent epub Reading System doesn't mean it can't be done (and PrinceXML proves it could be).