12-10-2022, 08:07 PM | #1 |
Wizard
Posts: 1,094
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
<strike></strike>
Hello @kovidgoyal,
In the Editors toolbar, one of the text formatting actions is the Strikethrough button. When using this button, it inserts <strike></strike> and causes EpubCheck to write an Error Spoiler:
Apparently this is deprecated and we should use <s></s> instead Is this an oversight? https://developer.mozilla.org/en-US/...Element/strike Thanks |
12-10-2022, 10:20 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
12-10-2022, 10:41 PM | #3 |
Wizard
Posts: 1,094
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
That was a simple fix
Thank you @kovidgoyal |
12-16-2022, 02:38 AM | #4 |
Belgian Pommes Frites
Posts: 101
Karma: 532
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
When I use <strike>, the epubcheck plugin gives an error, just like you did.
However, when I use the <s>, the epubcheck plugin gives exactly the same error. Then, when I try <del>, everything is fine for the epubcheck plugin. Reading the mozilla reference you gave, I read this under the heading "warning": If semantically appropriate, i.e., if it represents deleted content, use <del> instead. In all other cases use <s>. Huh? I am very confused about this statement. According to the epubcheck <del> is correct, not <strike>, not <s>. I would appreciate it, if someone could clarify this in some way that I can understand. Thanks, |
12-16-2022, 02:56 AM | #5 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
epubcheck is wrong, ignore it. In general my advice is to always ignore epubcheck. The errors it finds are largely useless at best and misleading at worst. The few non-useless functions it does are done better by the check book tool.
|
12-17-2022, 05:40 AM | #6 | ||||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
<strike> was deprecated in HTML4. (For a straight replacement, better to use <s>.) For <s>, it's probably not that good to use it... but, it stands for: Quote:
Side Note: You can easily also get strikethrough by applying CSS: Code:
.striketext { text-decoration: line-through; } Also, according to MDN, <s>: Quote:
Use <del> + <ins> instead: Quote:
In normal books, you'll probably only ever need to use <s> (or the simple CSS above). If you are working with some sort of coding book, editing book, or dealing with "tracked changes", then perhaps you may need <ins> + <del>. |
||||
12-17-2022, 09:25 AM | #7 |
the rook, bossing Never.
Posts: 11,158
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
In fact if you use a wordprocessor and automatic conversion you only get a style pointing to CSS, either in <p class="something"> or <span class="something">
.something { text-decoration: line-through; } You never get <s>, <strike> or <del> And I agree, that only specialist systems, not real ebooks will ever use <del> or <ins> I've never actually seen those two in over 25 years of editing HTML and nearly 10 years of making ebooks. Last edited by Quoth; 12-17-2022 at 09:31 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HarperCollins Strike | SteveEisenberg | News | 1 | 11-22-2022 04:45 PM |
use of strike-through...? | DesRez | ePub | 3 | 07-30-2011 04:27 AM |
A Wee Bit O' Fiction: A MobileRead [strike]Abomination[/strike] Collaboration | vivaldirules | Writers' Corner | 37 | 02-14-2010 05:18 PM |
text strike-out code? | europas_ice | Feedback | 4 | 02-25-2009 12:17 PM |