Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2011, 01:41 AM   #1
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Lettered lists

--------------

A solution is posted below.
If you have a better solution, please post it!


--------------

Is there any way to create a list with letters instead of numbers? I have a list of two levels: 1, 2, 3 ... and then under 3 there's a i, ii, iii (indented double, of course).

Code:
     1. Bleh blah.
     2. Meh yada yada.
     3. Etc.
           i. More etc.
          ii. And so on ... but note
              the outdent (hanging indent).
    10. And all the nums right-aligned
        and outdented.
Is this possible at all in Mobi?

I could just hard-code the letters, but then they would not outdent and right-align like the numbers.

I can do it with tables, but some of the list elements are long, and the Kindle won't pagebreak in table cells, so some of the text might become impossible to read.

Last edited by Christopher Wood; 06-19-2011 at 01:48 PM.
Christopher Wood is offline   Reply With Quote
Old 06-17-2011, 01:51 AM   #2
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
I should mention, I've tried hundreds of combinations, and scores of tricks that didn't work. I'm aware that Mobi ignores great swaths of CSS and HTML attributes.

I'm just hoping somebody has a work-around.
Christopher Wood is offline   Reply With Quote
Advert
Old 06-17-2011, 02:07 AM   #3
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
OMG -- I just solved it! LOL!

Days of bashing my brain, to no effect, then I post here, and lightning struck. LOFL!
Christopher Wood is offline   Reply With Quote
Old 06-17-2011, 05:30 AM   #4
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by Christopher Wood View Post
OMG -- I just solved it! LOL!

Days of bashing my brain, to no effect, then I post here, and lightning struck. LOFL!
Please tell us what you did to make it work.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 06-17-2011, 10:09 PM   #5
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
I certainly will! I'm fine-tuning the effort (it is not fully perfect), and then I will post code.

I see some guy is out there selling a book of "kindle formatting secrets" for $9.99. I wonder if he has good stuff in there. Obviously he's not the sort to share his discoveries for free.
Christopher Wood is offline   Reply With Quote
Advert
Old 06-17-2011, 10:10 PM   #6
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Just out of curiosity, has anybody else got a solution? The more the merrier, you know.
Christopher Wood is offline   Reply With Quote
Old 06-17-2011, 10:11 PM   #7
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Oh, I should mention: my solution is for the Kindle 3. I'm not trying to make it work on other Mobi readers. Maybe it will, maybe it won't, in various degrees. Why do all the Mobi readers render code so differently?
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 01:30 AM   #8
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Argh disappointment! My solution is flawed in that the size of an em-space varies from font to font, and Kindle indents by em-spaces. Therefore, the size of a 4em indent is unpredictable. If the reader changes fonts, the alignment in my solution gets zonked.

I heard someone say "The more I work with Mobi, the more I like Epub." I'm really feeling the same way. But let us (me) not turn this into a Mobi-bashing session.

Anybody got a solution that works more widely than just for the Kindle 3 default typeface?
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 01:51 AM   #9
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Wait a minute, I'm onto something else here ...

Bear with me while I post here by myself ...
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 02:21 AM   #10
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
AAAAAAAA HAHAHAHAH w00h00, I nailed it. SNOOPY DANCE! A round of drinks on me.

Code to follow.
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 02:55 AM   #11
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
Indents, Outdents, Roman Numerals, multi-level lists with right-aligned enumerators.

Teaser ... a sample document! using my solution.

No fair deconstructing the Mobi, now. I'll post code in due course.
Attached Files
File Type: prc AcidTest 213x.prc (6.5 KB, 207 views)
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 07:05 AM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,495
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Christopher:

Does this solution entail an actual LIST, or is it hardcoding? Looks good in Previewer...but size is not changeable hence not reflowable, so I suspect not an actual list (ol, ul) element?

Thx in advance for your response.
Hitch is offline   Reply With Quote
Old 06-18-2011, 12:13 PM   #13
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
It is fully reflowable. Try it! That's why I posted the .prc.

The numbering and lettering themselves are actually hard-coded, not generated at view time by an OL element. However, I am assuming that by the time a piece of text gets to the stage of formatting for the Kindle, it's pretty much finalized, and the numbers aren't going to change. So who cares if it's not an OL with on-the-fly numbering?
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 12:21 PM   #14
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
The size of the list numbering itself is not changeable, true -- which is how I managed to get the indents & outdents to line up. But the text itself, you can set to any size you like.

Remember, though: this is for the Kindle 3. I'd love to see some screenshots from other readers, and see where/how this solution fails.
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 12:25 PM   #15
Christopher Wood
Enthusiast
Christopher Wood began at the beginning.
 
Christopher Wood's Avatar
 
Posts: 28
Karma: 10
Join Date: May 2011
Device: Kindle 3
I gotta say, I don't know WHAT the Mobi developers are thinking! No support for multi-level lists? really? How is one to do an outline, or a detailed table of contents, etc.? I've scoured the interwebz and found not a single solution. Mine is the first I've seen.

If anybody has a different solution, PLEASE post it! Even if it doesn't work as well. I'd love to see it.
Christopher Wood is offline   Reply With Quote
Reply

Tags
kindle, lettered, list, mobi, ordered list


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ordered lists and ADE dynabook Sigil 3 01-27-2011 05:53 AM
Book Lists ballast Calibre 3 08-14-2010 03:46 PM
Authors' Lists? LadyLou Calibre 2 02-07-2010 04:06 PM
Save for Later replaced with Wish Lists RobbieClarken Amazon Kindle 0 12-08-2009 01:09 PM
Managing wish lists Elsi Amazon Kindle 5 02-28-2009 04:20 PM


All times are GMT -4. The time now is 11:45 AM.


MobileRead.com is a privately owned, operated and funded community.