View Full Version : ordered list numbering problem


iain robinson
06-28-2012, 03:44 PM
Hi all

I have an ePUB file in which are several ordered lists and in the printed publication the list is interrupted several times and the numbering continues where it left off after the interruption (ie, not back at 1 again). I didn't expect that to be output correctly as ePUB but I thought I could use start="5" in the <ol> tag to fix that but it seems that is not valid xhtml (and it doesn't work in ADE). Having a look around it seems like there is no way round this with CSS!

Is that right - are there really no workarounds? What are other people doing to get round this glaring omission in ePUB?

thanks

DiapDealer
06-28-2012, 04:10 PM
I get around it by basically not using <ol> <ul> at all. I hard-code my lists (numbered or bulleted). I've just never found html list elements to be very handy/useful/effective in ebook xhtml. If it were something that had to be constantly updated with new/changing info from a database, I could maybe find them useful. Otherwise they're a pain in the butt, hard to style with any consistency across a range of devices (as you're finding out), and don't really save me any time/effort when used in lieu of styled html paragraphs and manually typing the numbers (once).

iain robinson
06-28-2012, 05:21 PM
Oh god - I knew someone was going to say that! I'm sure we can do that but what a nuisance!

Anyone else have a cunning plan?

mmat1
06-28-2012, 05:29 PM
Is that right - are there really no workarounds? What are other people doing to get round this glaring omission in ePUB?
thanks

Yes, it's true, the start - attribute doesn't work on most E-Readers as well as the value attribute (for <li>-tags). Plus, there are readers out in the world, which can't handle simple lists properly.

I make hard-coded list as follows:
--------------------------------------------------------------
html:
<p class="fn"><span class="no">1.</span>some text</p>

css:
p.fn { margin-left: 2em; text-indent: 0; }
span.no { float: left; margin-left: -1.9em; }
---------------------------------------------------------------

@DiapDealer: How do you code your lists ?

DiapDealer
06-28-2012, 05:50 PM
Oh god - I knew someone was going to say that! I'm sure we can do that but what a nuisance!
Ask yourself honestly how much time you've already spent trying to figure out how to basically get a list of items automatically numbered the way you want them. Numbers that are probably never going to change. ;)

@DiapDealer: How do you code your lists ?
I wing it to tell the truth... but I never get very fancy. Paragraphs with varying levels of margin-left and -top mainly.

iain robinson
06-29-2012, 03:47 AM
Thanks both. The more time I spend looking at ePUBs (ours are exported from Adobe Indesign) the more I realise we should just code them by hand! By the time we're finished there won't be much Indesign code left!:)

Jellby
06-29-2012, 05:29 AM
The "start" attribute does not work on most readers because it's not part of the ePub standard (neither of XHTML, I believe). As far as I know, there's no way to make a list start in anything but the first element in ePub. Follow DiapDealer's advice and forget about lists.

Skeezix
09-09-2012, 01:18 PM
"ol start" is valid HTML5. Maybe try that?

graycyn
09-09-2012, 02:47 PM
Just curious, which epub readers don't support lists?

I've been making some epubs for myself, using both ordered and unordered lists, they have worked fine on all my Sony readers, on my old Nook before I gave it away, fine in Aldiko, Mantano and several other reading apps I tried, they even converted to .mobi, albeit with ugly bullets, but they worked.

Admittedly, I did NOT find a way to make interrupted lists work. And I guess for books that have those, I'll do lists as suggested above. I also have had issues with the old style Roman numbers in lists, when you enlarge the fonts, they tend to get cut off on the left side of the page. So I can see where a standard HTML list doesn't *always* work, but there do seem to be places where I've had no trouble at all.

But maybe I should stop using them. I am new to book scanning and trying to learn.

mmat1
09-09-2012, 04:14 PM
Admittedly, I did NOT find a way to make interrupted lists work ...
... But maybe I should stop using them.


It will not work AND it make no sense since the numbers probably never change. So, maybe you should stop using them :D

Toxaris
09-09-2012, 04:20 PM
"ol start" is valid HTML5. Maybe try that?

That might work in ePUB3, but definitely not in ePUB2. Since there are hardly any readers that support ePUB3, it is not really useful.

As long as they are simple, I use lists. If the layout is more demanding, I avoid lists.

DiapDealer
09-09-2012, 04:47 PM
As long as they are simple, I use lists. If the layout is more demanding, I avoid lists.
Exactly. A simple bulleted list (or simple numbered list that starts with "1") isn't usually a problem. It's when people think they can churn out a fancy "outline" mixing letters and numbers (or starting from anything other than 1), that the problems arise.

I don't use them (lists) at all, myself, but that's just a personal decision. Mainly because I don't see the benefit (from a hand-coding standpoint) of using list elements for presenting static data.

graycyn
09-10-2012, 04:08 PM
Exactly. A simple bulleted list (or simple numbered list that starts with "1") isn't usually a problem. It's when people think they can churn out a fancy "outline" mixing letters and numbers (or starting from anything other than 1), that the problems arise.

I don't use them (lists) at all, myself, but that's just a personal decision. Mainly because I don't see any benefit (from a hand-coding standpoint) of using list elements for presenting static data.

Thanks for clarifying. As mentioned, I've had no issues with simple lists. They work fine in ADE, fine on all the ADE readers I've tested. But for fancy stuff, no.

I think I'll continue using them where they are simple and useful. Where they aren't workable, I'll code differently.

mzmm
09-18-2012, 10:57 AM
Ask yourself honestly how much time you've already spent trying to figure out how to basically get a list of items automatically numbered the way you want them. Numbers that are probably never going to change.

also number lists by hand now for this reason. trying to figure out some elaborate yet cross-platform hack is just not worth the time it takes to enter a number.

"ol start" is valid HTML5. Maybe try that?

good to hear! despite almost never using it i think it's a cool feature - glad to be able to make use of it in the feature when epub3 becomes standard.