Writing, publishing, geekdom, and errata.

My Updated CSS StyleSheet for eBook Creation

No comments
There's a dozen and a half different ways to create stylesheets for eBooks.  Some are better than others overall, some have strengths and weaknesses.

I'm presenting mine here (updated, and with additional comments throughout) because of three reasons:

1.  It illustrates how to embed a font.
2.  It has a minimal amount of cascading.1  While cascading is useful, it also adds a level of complexity to keeping track of which style(s) apply to which things.  KISS;  it should be obvious at a glance which style (or at most, two) apply to any character in the text.
3.  It is damn-near failsafe.  I've yet to run across an eReader that can't handle the basic elements that are covered in this stylesheet - and when it has to fall back to a simpler method, it does gracefully.

You can find the stylesheet by itself here, or at this GitHub repository if you want to look at my other "helper" script (in bash) and tools I'm using for ePub creation.

I hope it provides a useful object for you to study and learn from in your own eBook creation

1 Okay, so for example, you could define a style for the body of the text, additional modifications for paragraphs within the body of the text, and additional modifications that only come into play if it's the first paragraph within the body of the text, and additional ones if it's the first five characters in that first paragraph. And they'd all apply automatically, which is great... until something borks somewhere, and then I have a hard time tracking down where the problem is. That's me, though. YMMV.

No comments :