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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2015, 08:41 PM   #1
SantafA
Member
SantafA began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Mar 2015
Device: none
Ordered List Numbers being cut off

Hi everyone,

I have an ordered list I need to keep as close to the left side of the screen as possible. When I enlarge the font in a reader app the list numbers soon start to get cut off at the left edge of the page though.

This happens in Nook and Calibre. It actually doesn't happen in ADE. ADE somehow keeps everything on screen when the other apps don't.

The only way I've found to rectify it is to place a div around the list and give it a pretty large left margin. It's squishing my list though - the list item text is kind of long. Also, different readers need a differently sized margin, and I don't know what the universal minimum sized margin should be - don't know when to stop. Nook for PC only needs a .3em left margin to not cut off list numbers at its largest font size setting. Calibre requires a much larger margin.

Is there a simpler method to preserve your list numbers? A way for every reader (or at least the most popular readers) to automatically keep list numbers from being cut off?

margin-left:auto; doesn't help.

Giving the div a width and floating it right just messes everything up real bad. Making an empty div before it and making both divs display:inline-block; and giving them widths just seems to create chaos too. 2/3 of my list vanishes and I get some page-break problems. Some problem with the vertical alignment maybe, I don't know.

Making the list-style-position: inside; causes uneven alignment problems which I have to then fix with text-indent and that just leads to other alignment problems across multiple reader apps/devices.

I may very well be doing something wrong with my code. Any advice you guys have I will much appreciate. Thank you everyone.
SantafA is offline   Reply With Quote
Old 03-08-2015, 01:34 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
lists in ereaders are a big hassle, since many ereaders do not seem to support it very well. e.g. my Kindle randomly restarts from item one every once in a page turn or three.

I ended up using paragraphs with the list number inserted, and used the following CSS:
Code:
.listindent_1 {
  text-align: left;
  text-indent: -1.1em;
  margin-left: 1.8em;
}
.listindent_2 {
  text-align: left;
  text-indent: -1.6em;
  margin-left: 1.8em;
}
.listindent_3 {
  text-align: left;
  text-indent: -2.1em;
  margin-left: 1.8em;
}
Granted, that is awkward and requires manually setting each paragraph -- but calibre's new Functions Replace mode can do the work for you. Too bad it didn't exist yet when I started out instead I used bash, readline, a for loop, and echo, then pasted into the editor.

Last edited by eschwartz; 03-08-2015 at 01:37 AM.
eschwartz is offline   Reply With Quote
Advert
Old 03-08-2015, 03:36 PM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by eschwartz View Post
lists in ereaders are a big hassle, since many ereaders do not seem to support it very well. e.g. my Kindle randomly restarts from item one every once in a page turn or three.
If you're okay with attributes that were deprecated in HTML 4 and then un-deprecated again in HTML 5, you can specify the value attribute on your li tag. That has the advantage of giving you a proper list style where the number is above whitespace if it spans multiple lines (without having to trust readers to properly handle negative distances in CSS), but should guarantee that no conforming renderer can screw up the numbering even if it loses track of the preceding elements. (Then again, Kindle always finds a way, so.... )
dgatwood is offline   Reply With Quote
Old 03-12-2015, 07:59 PM   #4
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
Quote:
Originally Posted by SantafA View Post
Hi everyone,

I have an ordered list I need to keep as close to the left side of the screen as possible. When I enlarge the font in a reader app the list numbers soon start to get cut off at the left edge of the page though.

This happens in Nook and Calibre. It actually doesn't happen in ADE. ADE somehow keeps everything on screen when the other apps don't.

The only way I've found to rectify it is to place a div around the list and give it a pretty large left margin. It's squishing my list though - the list item text is kind of long. Also, different readers need a differently sized margin, and I don't know what the universal minimum sized margin should be - don't know when to stop. Nook for PC only needs a .3em left margin to not cut off list numbers at its largest font size setting. Calibre requires a much larger margin.

Is there a simpler method to preserve your list numbers? A way for every reader (or at least the most popular readers) to automatically keep list numbers from being cut off?

margin-left:auto; doesn't help.

Giving the div a width and floating it right just messes everything up real bad. Making an empty div before it and making both divs display:inline-block; and giving them widths just seems to create chaos too. 2/3 of my list vanishes and I get some page-break problems. Some problem with the vertical alignment maybe, I don't know.

Making the list-style-position: inside; causes uneven alignment problems which I have to then fix with text-indent and that just leads to other alignment problems across multiple reader apps/devices.

I may very well be doing something wrong with my code. Any advice you guys have I will much appreciate. Thank you everyone.
This occurs with no margin set for the book itself?

Hitch
Hitch is offline   Reply With Quote
Old 03-15-2015, 04:21 PM   #5
SantafA
Member
SantafA began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Mar 2015
Device: none
Hi Hitch,

"html" has no margins applied at all.

"body" has margin:0em 0em 0em .01em;

And I'm not sure if this matters for this problem but "@page" has margin : .8in .5in;

If you're talking about the reader's margin setting, I notice it with Nook for PC's margins at kind of a low setting (not sure how to quantify it since no numbers are displayed, just a slider) - it's what I believe is the default setting.

And it happens in Calibre with a side margin of 36px - I also believe this is Calibre's default margin setting.
SantafA is offline   Reply With Quote
Advert
Old 03-15-2015, 05:25 PM   #6
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
Quote:
Originally Posted by SantafA View Post
Hi Hitch,

"html" has no margins applied at all.

"body" has margin:0em 0em 0em .01em;

And I'm not sure if this matters for this problem but "@page" has margin : .8in .5in;

If you're talking about the reader's margin setting, I notice it with Nook for PC's margins at kind of a low setting (not sure how to quantify it since no numbers are displayed, just a slider) - it's what I believe is the default setting.

And it happens in Calibre with a side margin of 36px - I also believe this is Calibre's default margin setting.

Remove the @page margins--which are set in INCHES, which they oughtn't be--and see if that helps. Were I a betting man...

Hitch
Hitch is offline   Reply With Quote
Old 03-16-2015, 12:07 AM   #7
SantafA
Member
SantafA began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Mar 2015
Device: none
Nah, exact same thing. I don't notice any difference getting rid of it.

I put it in inches because I thought @page just had to do with printing an ebook out. Am I wrong?
SantafA is offline   Reply With Quote
Old 03-16-2015, 02:11 PM   #8
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
Quote:
Originally Posted by SantafA View Post
Nah, exact same thing. I don't notice any difference getting rid of it.

I put it in inches because I thought @page just had to do with printing an ebook out. Am I wrong?
Something very weird is going on, because I've just not seen this behavior, not in an HTML list. I've seen it when we've tried to manually create a list (a client used something that isn't part of the character set, like an arrow, or what-have-you), but I don't recall having this issue with a regular HTML list.

Question: Given that your users can change the font size, willy-nilly--which is the topic here, really, WHY does the list need to be so close to the left margin? It's not like you're preventing wrapping behavior, etc., so...??? I'm not following the reasoning?

Vis-a-vis the printing question: I wouldn't know. I haven't ever tried "printing out" an ebook, to be honest.

Hitch
Hitch is offline   Reply With Quote
Old 03-16-2015, 09:56 PM   #9
SantafA
Member
SantafA began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Mar 2015
Device: none
It's the table of contents. It's really not even that close to the left anymore.

And I can't just type numbers instead of using a real list because the chapter titles are long and they wrap, leading to alignment problems if it's not a list.

Last edited by SantafA; 03-16-2015 at 10:30 PM.
SantafA is offline   Reply With Quote
Reply

Tags
<ol>, cut off, margin, numbers, ordered list

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo Ordered List: No more than one numeral is visible ibu Kobo Reader 13 12-07-2015 11:36 AM
Why are my page numbers cut off? Books987 Conversion 10 01-25-2015 01:48 AM
ordered list numbering problem iain robinson ePub 13 09-18-2012 09:57 AM
ordered list cut of after epub->mobi conversion lela1031 Conversion 5 03-02-2012 12:29 PM
Podcast numbers cut through hype Laurens Lounge 1 04-11-2006 09:40 PM


All times are GMT -4. The time now is 10:24 AM.


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