Re: HTML for Ebooks - TOC



On Mon, 06 Jul 2009 11:30:48 GMT, Alex Bell wrote:

In an earlier post I asked about making a TOC which shrank to fit and
was centred, and got some helpful replies.

I've put a small test page at http://pianoboe.net/ebooks/TestTOC.html

It validates and looks good to me on a browser, but doesn't damn well
work on an ebook - at least in Mobipocket format.

Thanks to you (by which I mean to say, may a curse be upon you for all
eternity), I now know much more about eBooks than I knew before, and much
more than I ever wanted to know. Far from being an expert, I am now
nevertheless certain at least that I do not want to author for an eBook
anytime in this decade; the specs and formats are far too perverse to work
with. You were right when you said that the browser wars don't compare to
the situation here. Sheesh!

I offer here a couple items I found which may help you, or at least mildly
interest other readers here. (Otherwise apologies for the very long post
with much pasting of text.)

From <http://wiki.mobileread.com/wiki/MOBI#Guidelines>
<q>
In order to better support the features of the MobiPocket Reader there are
some guidelines that need to be followed when creating a book in this
format.

* Do not specify a default font family, font size or other font
attributes such as weight or color. This is a choice the person reading the
eBook should be able to make. Fonts Sizes and Attributes can be specified
for special headings and other specific items. Use only generic font
families.
* Do not impose justification for standard text. It may be needed for
captions and other special text.
* Do not use tables for anything except table data. Nested tables are
not supported.
* Do not use blank lines to try and force page changes. Use the
<mbp:pagebreak/> tag.
</q>

From <http://wiki.mobileread.com/wiki/MOBI#Format_limitations>
<q>
There are many limitations in the MOBI format. A few are listed here.

* Blocks of text can never have a greater than normal margin on their
right side.
* Left margins can only be specified in 1em increments. Text can only
have a hanging indent if it has no left margin.
* Text cannot flow around images taller than one line of text.
* Image sizes cannot be scaled with font size.
* In some -- but not all -- Mobipocket renderers, text with a left
margin changes that margin value per line based upon the font-size at which
point the preceding line-break occurred.
* Many measures, such as the indent of a hanging indent, cannot be
specified in ems.
* Individual items of text cannot be displayed in a monospace font.
* Tables display wildly differently on different Mobipocket renderers,
especially tables which cross more than one screen.
* Nested tables are not supported at all.
* In addition you only get the full range of Mobipocket's formatting
capabilities if you have markup written to use Mobipocket's non-standard,
extended, and under-documented implementation of HTML 3.2. See: File tag
reference on the mobipocket web site.
</q>

Note that that was "a few" of the "many limitations".

The latest test page you've put up sets left margin in fractions of em,
uses display:table, specifies font-weight, and -- who knows -- probably
does two or three other things which ought to be innocuous but won't work
on an eBook.


I also found
<http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html#Section3.0>, which
may or may not be relevant to you. It's scary that they feel it necessary
to specify which CSS properties are supported. I also note that this
standard link seems to disagree somewhat with the stuff I quoted from the
MOBI wiki.


But I'd still like people to check it out.

Also, if my memory serves me rightly Dorayme suggested that since Tables
of Content are lists I should have used an unordered list. I forgot to
respond that not many ebook Tables of Contents have bullets.

On a Web page, one can disable bullets via list-style-type:none in the CSS.

--
John
And may God have mercy on your soul.
.



Relevant Pages

  • Re: set size of body in pixels
    ... You don't specify a font. ... I have put "margin" into CSS but but ... ...
    (comp.infosystems.www.authoring.html)
  • FORMATTING NORMAL and TEMPLATES
    ... numbering every single line or bulleting every single line, changing the font ... LEFT MARGIN. ... AUTOMATICALLY TABS ALL THE NUMBERING OVER. ... If I hit Ctrl Z to undo it, ...
    (microsoft.public.word.docmanagement)
  • RE: Change Printed Font
    ... I've been working with the a2ps command and I'm having a problem setting ... the margin. ... Subject: Change Printed Font ...
    (RedHat)
  • Re: Text Box Question
    ... For sure you have choose a default setting for the margin of the text block. ... "font tab", select red color and click OK. ... To return to default black just do the same in selecting black color. ... I have not used Asian font ever...... ...
    (microsoft.public.visio)
  • Re: Access 97 vs Later Version
    ... > printers don't have the same minimum margin. ... I imagine you'll find slight width differences whatever font you use, ... I thought you wanted to use A97. ...
    (microsoft.public.access.devtoolkits)