HighDots Forums  

HTML for Ebooks - TOC

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss HTML for Ebooks - TOC in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alex Bell
 
Posts: n/a

Default HTML for Ebooks - TOC - 07-06-2009 , 07:30 AM






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.

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.

--
Regards, Alex

Reply With Quote
  #2  
Old   
C A Upsdell
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 09:15 AM






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

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.
It is possible -- and common -- to suppress the bullets, using CSS: but
whether MobiPocket would support this CSS I don't know.

Reply With Quote
  #3  
Old   
John Hosking
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 03:03 PM



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

Quote:
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
<mbpagebreak/> 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.

Quote:
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.

Reply With Quote
  #4  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 06:31 PM



John Hosking wrote:
Quote:
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.)

Much very useful information snipped - I've printed the original page.

Very many thanks, John, and apologies for your suffering. The situation
is actually worse than we've discussed, but I won't make it worse for
you by going into the gory details.

You didn't comment on my latest idea for a shrink to fit centred TOC;
I'd still like to know whether this is acceptable markup in case it will
work in ePub when I get an ePub reader.

And yes, a couple of minutes after I sent off my last post I remembered
list-style-type: none;

--
Regards, Alex

Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 07:18 PM



In article <Ifl4m.2973$ze1.1508 (AT) news-server (DOT) bigpond.net.au>,
Alex Bell <afjbell (AT) bigpond (DOT) net.au> wrote:

....

Quote:
Also, if my memory serves me rightly orayme 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.
Bullets are not a glued on feature of HTML lists. They just happen to be
an optional thing that is set to *on* by default in most browsers. You
simply set them to be off.

list-style-type: none;

--
dorayme

Reply With Quote
  #6  
Old   
dorayme
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 07:22 PM



In article <7bf0boF237n4nU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

Quote:
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.)
I file your post in case someone who has been threatening to give me big
project to do with making available 17th and 18th texts on a website
ever actually gets ready to launch, he will doubtless want something
eBook friendly.

--
dorayme

Reply With Quote
  #7  
Old   
Adrienne Boswell
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 09:29 PM



Gazing into my crystal ball I observed John Hosking
<john-nin2 (AT) bluemail (DOT) ch> writing in
news:7bf0boF237n4nU1 (AT) mid (DOT) individual.net:

Quote:
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.)


Thank you, John. I may be having to do this very soon. I have saved this
in my "help me" folder.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Reply With Quote
  #8  
Old   
John Hosking
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-06-2009 , 10:00 PM



On Mon, 06 Jul 2009 22:31:20 GMT, Alex Bell wrote:

Quote:
John Hosking wrote:
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.

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 didn't comment on my latest idea for a shrink to fit centred TOC;
I'd still like to know whether this is acceptable markup in case it will
work in ePub when I get an ePub reader.
You probably won't like this, Alex, but I don't feel I can comment much on
your idea. It'd be like me telling a mountain climber what to take on an
expedition to Mt. Everest. I know what to take on a hike into the hills (a
water bottle, some sunblock, a sweater, etc.) because I've done that a few
times. The mountain climber's better off without my uneducated kibbitzing.

Having said that, I can say some things about your code's usefulness as a
Web page. The eBook compatibility you'll have to check. In IE6, the TOC is
left-aligned, not centered. The markup has a validation error, since the
expected namespace is missing. It does seem semantically acceptable to me,
although I'd probably use <li> instead of <p> for the links. If it worked
in all the (relevant) browsers, though, that'd be good enough for me, esp.
if it were 100% valid. (You said earlier that it validated, but there is
that xmlns error, and there's a link to a text.css file which doesn't
resolve.)

But all that's moot, IMHO. I think it'll be all you can do to make your
stuff do what you want in the eBook environment, so any way you can get
there is good.

And yes, I'm painfully aware that what I'm saying sounds like advice on how
to code HTML so it works in both the latest browsers, Netscape *and* IE4.

I can't tell you how sorry I am about that.

--
John
You said you were going to add padding. No, I'm not disappointed.

Reply With Quote
  #9  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-08-2009 , 07:37 AM



John Hosking wrote:
Quote:
On Mon, 06 Jul 2009 22:31:20 GMT, Alex Bell wrote:

John Hosking wrote:
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.
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 didn't comment on my latest idea for a shrink to fit centred TOC;
I'd still like to know whether this is acceptable markup in case it will
work in ePub when I get an ePub reader.

You probably won't like this, Alex, but I don't feel I can comment much on
your idea. It'd be like me telling a mountain climber what to take on an
expedition to Mt. Everest. I know what to take on a hike into the hills (a
water bottle, some sunblock, a sweater, etc.) because I've done that a few
times. The mountain climber's better off without my uneducated kibbitzing.

Having said that, I can say some things about your code's usefulness as a
Web page. The eBook compatibility you'll have to check. In IE6, the TOC is
left-aligned, not centered. The markup has a validation error, since the
expected namespace is missing. It does seem semantically acceptable to me,
although I'd probably use <li> instead of <p> for the links. If it worked
in all the (relevant) browsers, though, that'd be good enough for me, esp.
if it were 100% valid. (You said earlier that it validated, but there is
that xmlns error, and there's a link to a text.css file which doesn't
resolve.)

But all that's moot, IMHO. I think it'll be all you can do to make your
stuff do what you want in the eBook environment, so any way you can get
there is good.

And yes, I'm painfully aware that what I'm saying sounds like advice on how
to code HTML so it works in both the latest browsers, Netscape *and* IE4.

I can't tell you how sorry I am about that.

One of the few advantages in working on ebook HTML is that I don't have
to fuss about IE.

I have been using Liam Quinn's off line validator 'A Real Validator' for
years, but it seems that it is not enough. It did validate the file, but
I'll check into your comments.

I'm still obsessed with making the markup valid, even for ebooks, in the
hope that Mobipocket will die it's well deserved death in agony and
ePub, a valid open source format, will reign supreme.

--
Regards, Alex

Reply With Quote
  #10  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for Ebooks - TOC - 07-08-2009 , 07:39 AM



dorayme wrote:
Quote:
In article <Ifl4m.2973$ze1.1508 (AT) news-server (DOT) bigpond.net.au>,
Alex Bell <afjbell (AT) bigpond (DOT) net.au> wrote:

...

Also, if my memory serves me rightly orayme 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.

Bullets are not a glued on feature of HTML lists. They just happen to be
an optional thing that is set to *on* by default in most browsers. You
simply set them to be off.

list-style-type: none;

Thanks again. I remembered that two minutes after firing off the other
post, and have made the latest trial version a list without bullet points.

--
Regards, Alex

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.