![]() |
#16 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
William says, "Don't unnecessarily multiply entities"
Maybe in a reference work or textbook you need more complex css & html. But Fiction has headings that appear in TOC. Every other text even if it looks like a heading or is a character quoting a poem or singing or the narrator quoting (very victorian) is automatically suitable classes of <p> and is created automatically from the docx automatic conversion to epub. I never format tables, so there are really classes only for Headings All headings automatically are in the TOC. I've never seen <blockquote class="something"> created ever.unbulleted, unnumbered, unlettered lists. The i, ii or 1, 2 or a, b, or bullet are explictly typed in the source. images (usually they need height & width edited because I can't figure how to tell LO Writer image settings that translate to the css desired. Headings & body text level & lists all work. The text that's not a heading or a list. I've tried tables and the HTML & CSS is as expected. Not very useful in ebooks. Putting numbering, Roman numbering, lettering or a bullet in the "style" in the Wordprocessor may not work as expected on Kindle or all epubs. Explicitly typing the list prefix always works, automatic doesn't. Indenting (first and wrap) all works as expected with expected HTML & CSS. Simple is best. I'll let the purists designing specs worry about the semantics. We test any new WP style in kf7 on DX & KK3, kf8 on KK3 & PW3, epub on Kobo, Mars and Sony PRS-350 (5"), KoReader, Aldiko Basic and Lithium. Android from 4.3" v6 to 10" v10. eInk from 5" to 10". Probably for completeness we should check Apple's Books on iPhone and iPad, but we distribute to Apple with epub2 via Smashwords. Amazon KDP and Google play books get the same epub2. If it looks roughly the same as WP screen on 4K monitor (we set page to about 148mm x 197.5mm to edit master for ebook) allowing for KF7 fonts, then we are happy. We check epub and KF8 both in default setting a naive user would have and "publisher" mode. Then when 100% proofed (a gazzillion cycles and all proofing & annotation on a Kobo) a copy is made with formatting & styles changed for paper. It's styled & formatted in 2 page up 100% actual paper size on the 28" 4K screen. We'd change space between digits and units to smaller space. Obviously headings, footers, page numbers and Contents page with numbers. Might fix any unsuitable page breaks, pointless for ebook. Then electronic "proof" on Elipsa as PDF (the file to be uploaded) as well as PDF viewer on monitor, because sometimes you might miss a style. PDF export from LO Writer. We aren't doing anything fancy enough to need laTex or InDesign or whatever. No dropcaps, no small caps, no text flowing round images on ebook or paper. |
![]() |
![]() |
![]() |
#17 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Oh, and short "footnotes" go at end of the paragraph, smaller and right justified.
Bigger footnotes get a paragraph each and link both ways. If two places need the same footnote it's repeated so that tapping "back" works. On paper version the bigger ones go at the bottom of the page. Only a textbook or academic work wants end notes. |
![]() |
![]() |
![]() |
#18 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
|
Based on the discussion in:
https://www.mobileread.com/forums/sh...d.php?t=347606 I've decided to move all footnotes/endnotes in the books I reformat to be just after their referencing paragraphs instead of where I usually find them as endnotes. Since I'm only reading fiction, this works well. Also, I'm converting everything over to epub3 and I can use <aside> instead of the more common <p><a> stuff (though, really, it's six of one, half a dozen of the other). And, again, because it's fiction, <aside> seems more semantically correct. For instance, Pratchett's bajillions of footnotes/endnotes are actually side comments and not really footnotes. So, having them right in the text works well. Now, if the various readers would hide <aside> stuff as the reference material I find on it says they should, I'd be really happy. But, again, for fiction, that's a pretty minor complaint. |
![]() |
![]() |
![]() |
#19 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,221
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Oddly, I've been adding header, section, role, type, etc. into epub3 ebooks I edit simply to get ebooks that are close to meeting the DAISY accessibility standards. While I don't miss acessibility features at this time, there are people out there using non-visual devices to consume ebooks and for them, they are rather important.
|
![]() |
![]() |
![]() |
#20 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 | |||||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() Agreed. I wouldn't use that complex stuff. Overly convoluted CSS—like "Blitz" or "CSS Resets"—should also be avoided. (In ebooks, those cause WAY more harm than "good".) Side Note: I took a look at the linked ebook, and don't see anything SUPER egregious though. These things are squeaky clean compared to the horrors I've seen. ![]() Quote:
There's no working around it: If you're doing an HTML->HTML conversion, you're going to have to:
You can throw away most stuff ("Remove Unused CSS"), but beyond that point, you'll have to:
Why Can't I Just Push a Button And "Fix" All Books? Like JSWolf said, who knows what the heck publishers might do inside THIS book or how they might handle THIS specific case. Like a book might have any/all of the following:
or who knows what else! ![]() - - - - - Side Note: For example, in this 2021 post, I described how I've seen InDesign books with: Code:
<span class="CharOverride-4">italic</span> Code:
span.CharOverride-4 { font-family:"Minion Pro Italic"; font-style:normal; <----- See here. Should say italic. font-weight:normal; } (Hitch explained that it's some InDesign cloud font nonsense.) If you randomly stripped all fonts + did a conversion, all italics in that book would disappear. Because, according to the computer, all that text is NORMAL. - - - - - Basic Cleanup Method That I Do 1. Toss away most of the junk. (Using "Remove Unused CSS" + the other detailed tricks described in that thread.) 2. Judiciously use:
I scroll through the book, tackling each one, mapping it to:
Another trick I like to do is: Search: <section> Replace: <--- [COMPLETELY BLANK] Yes, it "breaks the HTML", but then I "Mend & Prettify" and let Sigil/Calibre do the cleanup for me. :P They'll disappear the closing </section> + reindent everything for you. ![]() Quote:
If you are dealing with heavily nested <span>s, definitely use Diap's Editing Toolbag. - - - - - You can also do many rounds of: Search: <span class="useless"> Replace: <span> and then use Diap's Toolbag to wipe away all empty <span>s in one shot. - - - - - Quote:
Search: <section [^>]+> Replace: <--- [COMPLETELY BLANK] That will wipe away all <section>s (with extra stuff in them). What does that regex say, in plain English?
Quote:
![]() And I've done over 650+ ebooks, mostly Non-Fiction, and I have everything boiled down to:
I've yet to see a book that completely breaks the mold. Maybe it exists out there, but I'm having a tough time imagining it. Quote:
Quote:
But reality, almost all don't hide it. That's why you shift+insert the footnotes at the end-of-file or end-of-book, so they're out of the way. (Shoving them in the middle of the book is very similar to people shoving page numbers smack dab in the middle of their text! ![]() Quote:
![]() ![]() If you use the ARIA markup properly, there is no harm in the extra stuff. The problem is, most people don't apply it properly. :P See the fantastic article at: and their warning: Quote:
Last edited by Tex2002ans; 07-24-2022 at 06:12 PM. |
|||||||||
![]() |
![]() |
![]() |
#22 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Yes, + vote on Diap's Editing Toolbag.
Also regex search & replace, but I test just with searches first! I'd only put very short footnotes after paragraphs inline. Regular footnotes would go at the end of a chapter or book (depending) and linked to and back. [A short in-line note] Another paragraph |
![]() |
![]() |
![]() |
#23 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,353
Karma: 20171571
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:
|
|
![]() |
![]() |
![]() |
#24 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I do use Diap's Editing Toolbag to blow away a lot of the junk I don't need or want such as <section> with or without stuff in them. Change span italics/bold to <i>/<b>, but the <a> page numbers and a number of other things.
Once you know you don't need any IDs, blow them away too. One thing I find really interesting is how much smaller the ePub becomes once you've blown away all the junk the put it like all those <p class="uselessclass"> when you convert to just <p>. |
![]() |
![]() |
![]() |
#25 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
|
Regarding Diap's <p class="heading1"> -> <h1>, that's a good suggestion. I hadn't thought of using that the change headings. I just went through another book that used standard <p class=...> stuff for all it's headings. Usually, I use regexes to replace them. But, I'll take a look at how Diaps does it.
|
![]() |
![]() |
![]() |
#26 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customize viewer css. pygments.css not found | drglenn | Viewer | 2 | 12-18-2020 04:52 PM |
ebook-convert problem with page_styles.css | gogu1904 | Conversion | 4 | 08-30-2020 03:34 AM |
pagestyle.css extra / integrated in stylesheet.css / or not at all? | chaot | Workshop | 14 | 02-24-2017 11:10 PM |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |