Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2022, 08:07 PM   #1
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
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:
Code:
p02c13.xhtml Line: 83 Col: 24 ERROR(RSC-005): Error while parsing file: element "strike" not allowed here; expected the element end-tag, text, element "a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "em", "embed", "epub:switch", "i", "iframe", "img", "input", "ins", "kbd", "label", "link", "map", "mark", "meta", "meter", "ns1:math", "ns2:svg", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "script", "select", "small", "span", "strong", "sub", "sup", "template", "textarea", "time", "u", "var", "video" or "wbr" (with xmlns:ns1="http://www.w3.org/1998/Math/MathML" xmlns:ns2="http://www.w3.org/2000/svg") or an element from another namespace


Apparently this is deprecated and we should use <s></s> instead
Is this an oversight?

https://developer.mozilla.org/en-US/...Element/strike

Thanks
Karellen is offline   Reply With Quote
Old 12-10-2022, 10:20 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...e3a9c8fdecff17
kovidgoyal is online now   Reply With Quote
Old 12-10-2022, 10:41 PM   #3
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,094
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
That was a simple fix

Thank you @kovidgoyal

Karellen is offline   Reply With Quote
Old 12-16-2022, 02:38 AM   #4
Capricorn
Belgian Pommes Frites
Capricorn will become famous soon enoughCapricorn will become famous soon enoughCapricorn will become famous soon enoughCapricorn will become famous soon enoughCapricorn will become famous soon enoughCapricorn will become famous soon enough
 
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,
Capricorn is offline   Reply With Quote
Old 12-16-2022, 02:56 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Old 12-17-2022, 05:40 AM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Capricorn View Post
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.
You can visit the other MDN pages for those explanations:

<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:
contents that are no longer accurate or no longer relevant.

Note: The s element is not appropriate when indicating document edits; to mark a span of text as having been removed from a document, use the del element.
- - -

Side Note: You can easily also get strikethrough by applying CSS:

Code:
.striketext {
  text-decoration: line-through;
}
- - -

Also, according to MDN, <s>:

Quote:
[...] is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate.
So, if you're actually showing DELETED or INSERTED text—like in tracked changes—then...

Use <del> + <ins> instead:

Quote:
The <del> HTML element represents a range of text that has been deleted from a document. This can be used when rendering "track changes" or source code diff information, for example. The <ins> element can be used for the opposite purpose: to indicate text that has been added to the document.
Long story short:

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>.
Tex2002ans is offline   Reply With Quote
Old 12-17-2022, 09:25 AM   #7
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,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.
Quoth is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:04 AM.


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