10-03-2024, 02:39 AM | #31 | ||
want to learn what I want
Posts: 1,253
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
Quote:
https://softwareengineering.stackexc...ce-to-dijkstra |
||
10-03-2024, 08:59 AM | #32 | ||
Evangelist
Posts: 441
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Quote:
Quote:
|
||
10-03-2024, 09:12 AM | #33 |
want to learn what I want
Posts: 1,253
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.
|
10-03-2024, 12:45 PM | #34 |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I've seen code such as <p class="para" style="text-align: 0%;">. And there is a CSS file.
|
10-03-2024, 12:47 PM | #35 | |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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. |
|
10-03-2024, 02:17 PM | #36 |
frumious Bandersnatch
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. |
10-03-2024, 02:29 PM | #37 | |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I probably should also do an h2 + p for no indent as I mostly use <h2> for the chapter header. |
|
10-03-2024, 03:37 PM | #38 | ||
A Hairy Wizard
Posts: 3,220
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:
Quote:
Code:
<h2>Chapter Title</h2> <p class="first">Yadda yadda yadda.</p> Code:
p.first {} p.first::first-letter {} p.first::first-line {} ... ... ... 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!! |
||
10-04-2024, 10:24 AM | #39 | |
Resident Curmudgeon
Posts: 76,370
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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. |
|
10-04-2024, 11:35 AM | #40 | |
A Hairy Wizard
Posts: 3,220
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:
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 {} Quiz Time! Can you name the Book/Author from the images above? (no cheating) Spoiler:
|
|
10-04-2024, 11:58 AM | #41 |
Evangelist
Posts: 441
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
|
10-04-2024, 03:47 PM | #42 |
Bibliophagist
Posts: 40,475
Karma: 156982136
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:
Last edited by DNSB; 10-04-2024 at 03:50 PM. |
10-04-2024, 08:36 PM | #43 | |
Well trained by Cats
Posts: 30,442
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:
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. |
|
10-06-2024, 07:52 PM | #44 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Then it must give you a stomach ache every time you see layouts like the following: 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. |
|
|
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 |