Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-03-2024, 02:39 AM   #31
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,260
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by DNSB View Post
Tried that once & it took me hours to get down from the ceiling. Never again!


Quote:
Originally Posted by foosion View Post
A nice way to see the list is to execute in Python

Code:
import this
Of course, the best import to execute in Python is

Code:
import antigravity
Both imports are entertaining although I despise myself for taking too much time trying to find out the truth about who's the dutch in 'Although that way may not be obvious at first unless you're Dutch.'

https://softwareengineering.stackexc...ce-to-dijkstra
Comfy.n is offline   Reply With Quote
Old 10-03-2024, 08:59 AM   #32
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 449
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by DNSB View Post
Tried that once & it took me hours to get down from the ceiling. Never again!
Compare Mary Poppins' Uncle Albert.

Quote:
Originally Posted by Comfy.n View Post
Both imports are entertaining although I despise myself for taking too much time trying to find out the truth about who's the dutch in 'Although that way may not be obvious at first unless you're Dutch.'

https://softwareengineering.stackexc...ce-to-dijkstra
Interesting. I always assumed it was Guido, since he created Python, although I never checked.
foosion is offline   Reply With Quote
Old 10-03-2024, 09:12 AM   #33
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,260
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
Actually there's a confirmation by Tim Peters himself (author of the Zen statements) in that same answer. It was about Guido, but I had to confirm, grr.
Comfy.n is offline   Reply With Quote
Old 10-03-2024, 12:45 PM   #34
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,410
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by foosion View Post
For today's crappy code, a book with style="whatever" littered throughout the text. If every h2 is <h2 style="text-align: center";>, which not just put that in the CSS?? Similarly for many other tags.

Probably a rhetorical question.
I've seen code such as <p class="para" style="text-align: 0%;">. And there is a CSS file.
JSWolf is offline   Reply With Quote
Old 10-03-2024, 12:47 PM   #35
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,410
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by foosion View Post
One issue with <p> is distinguishing paragraphs with a text-indent and those without. Some CSS defines <p> with a text-indent and then has a class="noindent", typically for the first paragraph of a section, while others define <p> without an indent, then add a class="indent" for every paragraph other than the first.

Is one of these more canonical?
I prefer <p> for the majority of paragraphs and <p class="someclass"> when I want to deviate from the majority of paragraph styles. And I do prefer to have the indent in p in the CSS.

One thing that means doing is putting a text-indent: 0; in most/all classes that have a text-align: center; because most eBooks do not put an indent with p.
JSWolf is offline   Reply With Quote
Old 10-03-2024, 02:17 PM   #36
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Depending on how complex the book is, you may get away using only <p> and styling p and h1+p (or whatever h level you use for chapter headings).

I'd use some class name other than "noindent", something like "first" and/or "continued". Just to maintain the distinction between semantics and styling. Those paragraphs are unindented because they have some feature, not because I randomly decided to disable indent for them. If some day I want to also indent the first paragraph in a chapter (as is done in other language traditions, by the way), I won't feel embarrassed by adding some indent to the "noindent" class.
Jellby is online now   Reply With Quote
Old 10-03-2024, 02:29 PM   #37
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,410
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jellby View Post
Depending on how complex the book is, you may get away using only <p> and styling p and h1+p (or whatever h level you use for chapter headings).

I'd use some class name other than "noindent", something like "first" and/or "continued". Just to maintain the distinction between semantics and styling. Those paragraphs are unindented because they have some feature, not because I randomly decided to disable indent for them. If some day I want to also indent the first paragraph in a chapter (as is done in other language traditions, by the way), I won't feel embarrassed by adding some indent to the "noindent" class.
I do use an <hr/> for the section breaks. So the next <p> is styled for no indent with hr + p.

I probably should also do an h2 + p for no indent as I mostly use <h2> for the chapter header.
JSWolf is offline   Reply With Quote
Old 10-03-2024, 03:37 PM   #38
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,223
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
I do use an <hr/> for the section breaks. So the next <p> is styled for no indent with hr + p.


Quote:
Originally Posted by JSWolf View Post
I probably should also do an h2 + p for no indent as I mostly use <h2> for the chapter header.
I agree with your first example because there's really no definition of the-first-paragraph-that-follows-a-section-break... but I would actually define the first paragraph in the chapter as <p class="first"> or <p class="CO"> (chapter opener) instead.

Code:
<h2>Chapter Title</h2>
<p class="first">Yadda yadda yadda.</p>
Then you can apply whatever styles you want to that particular class, not just no-indent. You can even easily set the css to do any number of things depending on your creativity and the capabilities of your device.

Code:
p.first {}
p.first::first-letter {}
p.first::first-line {}
...
...
...
You can even set that css to be responsive and compatible with all kinds of different devices/apps based on screen size, @media, @supports, backwards compatibility for ePub2, as well as all the fun/creative things that are possible JUST because you semantically defined the first paragraph.

And here is the part that you like best, Jon. You can leave it a plane, vanilla no-indent while still having it set semantically. It's a win-win!!
Turtle91 is offline   Reply With Quote
Old 10-04-2024, 10:24 AM   #39
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,410
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post




I agree with your first example because there's really no definition of the-first-paragraph-that-follows-a-section-break... but I would actually define the first paragraph in the chapter as <p class="first"> or <p class="CO"> (chapter opener) instead.

Code:
<h2>Chapter Title</h2>
<p class="first">Yadda yadda yadda.</p>
Then you can apply whatever styles you want to that particular class, not just no-indent. You can even easily set the css to do any number of things depending on your creativity and the capabilities of your device.

Code:
p.first {}
p.first::first-letter {}
p.first::first-line {}
...
...
...
You can even set that css to be responsive and compatible with all kinds of different devices/apps based on screen size, @media, @supports, backwards compatibility for ePub2, as well as all the fun/creative things that are possible JUST because you semantically defined the first paragraph.

And here is the part that you like best, Jon. You can leave it a plane, vanilla no-indent while still having it set semantically. It's a win-win!!
I don't need a class as I can style h2 + p as needed.

Personally, I prefer not to use first. I don't like dropcaps or large first letter or smallcaps, etc. I just like normal text unless there's a reason for a style.
JSWolf is offline   Reply With Quote
Old 10-04-2024, 11:35 AM   #40
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,223
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
Personally, I prefer not to use first. I don't like dropcaps or large first letter or smallcaps, etc. I just like normal text unless there's a reason for a style.
You certainly can do it that way, and that is what I was referring to when I mentioned you can be as creative or plain/vanilla as you want.


Quote:
Originally Posted by JSWolf View Post
I don't need a class as I can style h2 + p as needed.
Yes, you can do it this way as well, but it makes the css a bit more unruly. Which do you think is cleaner?

Code:
h2 + p  {}
h2 + p::first-letter {}
h2 + p::first-line {}

-OR-

p.first  {}
p.first::first-letter {}
p.first::first-line {}
Also, you need to consider that there are a lot of books out there that have something inserted between the chapter head and the first paragraph, so a simple h2 + p doesn't work. Whereas, if you get in the habit of semantically labeling the first paragraph, your styling of choice will be appropriately rendered regardless of any intervening elements. Here are a couple of examples:

Click image for larger version

Name:	Screenshot 2024-10-04 101603.png
Views:	46
Size:	172.7 KB
ID:	211193

Click image for larger version

Name:	Screenshot 2024-10-04 101239.png
Views:	47
Size:	456.3 KB
ID:	211194

Click image for larger version

Name:	Screenshot 2024-10-04 101102.png
Views:	44
Size:	457.8 KB
ID:	211195

Quiz Time!
Can you name the Book/Author from the images above? (no cheating)
Spoiler:

image 1: The Long Earth by Terry Pratchett and Stephen Baxter

image 2: The Dragon Reborn by Robert Jordan

image 3: Dune by Frank Herbert
Turtle91 is offline   Reply With Quote
Old 10-04-2024, 11:58 AM   #41
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 449
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Turtle91 View Post
Quiz Time!
Can you name the Book/Author from the images above? (no cheating)
Spoiler:

image 1: The Long Earth by Terry Pratchett and Stephen Baxter

image 2: The Dragon Reborn by Robert Jordan

image 3: Dune by Frank Herbert
I don't remember ever seeing 1 & 2, let alone reading them, so no. I have heard of two of the three authors.

3: I've read that enough times to identify immediately.
foosion is offline   Reply With Quote
Old 10-04-2024, 03:47 PM   #42
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: 40,536
Karma: 156983616
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I've spoilered my reply since I included book titles.

Spoiler:
I recognize 1 from The Long Earth by Terry Pratchett and Stephen Baxter
3 from Dune by Frank Herbert
but other than saying 2 is by Robert Jordan's Wheel of Time series, no idea as to book title.

Last edited by DNSB; 10-04-2024 at 03:50 PM.
DNSB is offline   Reply With Quote
Old 10-04-2024, 08:36 PM   #43
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,444
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by foosion View Post
For today's crappy code, a book with style="whatever" littered throughout the text. If every h2 is <h2 style="text-align: center";>, which not just put that in the CSS?? Similarly for many other tags.

Probably a rhetorical question.
Old Mobi had no CSS. Center was done by multiple Blockquotes

A centered H2 is likely done because of bad devices (IIRC H# were centered by default, but not all got the memo)

I believe using H# is just a convention, not a rule for automated TOC generation.
theducks is offline   Reply With Quote
Old 10-06-2024, 07:52 PM   #44
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
I don't need a class as I can style h2 + p as needed.

Personally, I prefer not to use first. I don't like dropcaps or large first letter or smallcaps, etc. I just like normal text unless there's a reason for a style.
Lol

Then it must give you a stomach ache every time you see layouts like the following:

Click image for larger version

Name:	1001(1).jpg
Views:	42
Size:	151.8 KB
ID:	211250Click image for larger version

Name:	1001(2).jpg
Views:	45
Size:	143.7 KB
ID:	211251Click image for larger version

Name:	1001(3).jpg
Views:	45
Size:	121.0 KB
ID:	211252Click image for larger version

Name:	1001(4).jpg
Views:	43
Size:	150.0 KB
ID:	211253Click image for larger version

Name:	1001(5).jpg
Views:	43
Size:	158.9 KB
ID:	211254Click image for larger version

Name:	1001(6).jpg
Views:	37
Size:	134.9 KB
ID:	211255

The screenshots are from my epub2 version of "The Thousand Night and a Night" (in spanish) under KOReader. Under epub3 looks practically the same, but the footnotes are showed in a popup window (on an epub3 ereaders devices/apps).

Rejecting decorations in an e-book "a priori" and without further reason is prejudice on your part.
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line height issue Mercador Kobo Reader 19 07-21-2020 03:32 PM
CSS line height vs Kobo line spacing slider? bongoman Kobo Reader 2 07-12-2020 02:25 PM
line height Rellwood Conversion 3 04-07-2018 05:34 AM
Aura H2O Line height setting is ignored kAlvaro Kobo Reader 6 08-09-2016 08:59 AM
Line spacing confusion Wrongway Kobo Reader 3 04-05-2014 08:23 AM


All times are GMT -4. The time now is 04:57 PM.


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