Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2023, 08:11 AM   #16
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,364
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by DiapDealer View Post
Yep. The workarounds are more work than just styling your hard-coded numbers in p tags. And are likely to break under different conditions.

Not to mention that I've never understood how ol elements are all that useful in ebooks to begin with. Unless you're coding a website that generates lists from dynamic database data, your numbered lists are unlikely to ever change. So code them (lists) up once, style them, and be done with them.
Exactly. The only use is a database feeding either Document Mailmerge or Website.
Quoth is offline   Reply With Quote
Old 01-26-2023, 12:15 PM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,069
Karma: 145735366
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Sarmat89 View Post
Lists are getting a nice hanging indent which is very hard to reproduce without it.
Something like the below CSS works quite well:

Code:
.fakelist {
  display: block;
  margin-bottom: 0.5em;
  margin-left: 2.5em;
  margin-right: 1.25em;
  margin-top: 0.5em;
  text-align: left;
  text-indent: -1.25em;
}
DNSB is offline   Reply With Quote
Advert
Old 01-26-2023, 01:03 PM   #18
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,364
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
And you can create that as a paragraph style in Word or LO Writer, then what DNSB has is automatically the CSS.

(12pt = 1em) If you want entire list indented to a 1.5 em regular paragraph first line indent.

Before Text: 36 pt /* wrap is 1.5 em in from first line. CSS margin-left */
After Text: 18pt /* CSS margin-right */
First Line : 18 pt /* i.e. negative compared to rest of paragraph. CSS text-indent */

Add a suitable amount for a nested list style.
Probably left justify. Adjust numbers to taste.

You can use different styles for first list item and last so that item spacing in the list is different from space at top of list and bottom of list.

Last edited by Quoth; 01-26-2023 at 01:06 PM.
Quoth is offline   Reply With Quote
Old 01-26-2023, 03:33 PM   #19
Simons Mith
Member
Simons Mith began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Oct 2020
Device: none
Quote:
Originally Posted by Karellen View Post
Maybe try display:none; speak:none;

display :
Element is removed from the normal flow and hidden; the space it occupied is collapsed

visibility:
Element is hidden from view, but is not removed from the normal flow

No, display: none doesn't work, because if it's not displayed at all, it doesn't increment the list counter. You have to display the list elements, but make them zero size. One of the reasons I think this is such a hideous hack.

I do prefer not to use fake paragraphs as <li>s though; I prefer to use a <ul> with a custom bulletless style and manually put numbers in that. At least it's a list then.
Simons Mith is offline   Reply With Quote
Old 01-26-2023, 04:03 PM   #20
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,364
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by Simons Mith View Post
I do prefer not to use fake paragraphs as <li>s though; I prefer to use a <ul> with a custom bulletless style and manually put numbers in that. At least it's a list then.
That should be OK. It only makes much difference if a list or not to badly written apps that are ignoring CSS.
That also will work in the word processor.
Quoth is offline   Reply With Quote
Advert
Reply

Tags
<ol start="">, attribute, epub 2.0.1, tag


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bogus "Not a Valid Picture" Errors johnelle Library Management 9 09-18-2021 11:03 PM
How to define the "Start" or "Beginning" page in Calibre paul_01 Conversion 5 08-12-2016 06:58 AM
epub to mobi problems "No valid entries in the spine of this EPUB" TheFatMan Conversion 1 09-10-2013 10:59 PM
Is "dc:rights" a valid entry in an OPF file for Kindlegen? Stodder Kindle Formats 5 06-06-2011 06:52 PM
"invalid PID checksum" when using mobidedrm, even though it IS valid. Haidon Kindle Formats 141 11-05-2010 12:02 PM


All times are GMT -4. The time now is 02:10 PM.


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