Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2011, 12: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 12:48 PM.
Christopher Wood is offline   Reply With Quote
Old 06-17-2011, 12: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
Old 06-17-2011, 01: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, 04: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, 09: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
Old 06-17-2011, 09: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, 09: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, 12: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, 12: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, 01: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, 01: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, 196 views)
Christopher Wood is offline   Reply With Quote
Old 06-18-2011, 06: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,447
Karma: 157030631
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, 11:13 AM   #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, 11:21 AM   #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, 11:25 AM   #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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 06:19 AM.


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