![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
Doesn't Like Its Own Strikethroughs?
Sorry, got another one.
I have a section of text with character strikethroughs. Rather than copy it, I retyped it in the Book View mode. Then, I used the Format/Strikethrough from the menus above to strike out some words. In code view this wrapped <strike> and </strike> tags around the crossed out word, as expected. It looks like this: <strike>Ordered</strike> But when I validate, I get these errors: 1) No declaration for element 'strike' 2) element 'strike' is not allowed for content model '(a|br|span|bdo|map|object||img|svg|tt|i|b|big|sma ll|em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acr onym|sub|sup|input|select|textarea|label|button|in s|del|script)' Shouldn't Sigil be okay with editing that I did in the Book View mode? I knew this would be my biggest challenge. Basically, it's a chapter that is a document marked up to look like it was edited (with strikethroughs). |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
I should add that when I view it using Adobe Digital Editions, it looks perfect. But I doubt that Google Play will let me upload it with all those error messages.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
![]() the CSS way is Code:
text-decoration: line-through; |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
This is indeed a bug. However, you can easily fix this by adding a custom style and a custom clip:
1. Select the main stylesheet and add the following code: Code:
span.strike {
text-decoration: line-through;
}
2. Press CTRL+ALT+C (or select Clip Editor... from from the Tools menu) a) Click Add Entry and paste or enter Strike into the Name field. b) Paste <span class="strike">\1</span> into the Text field. (You might have to double-click the Text field to edit it.) c) Click Save and Close. If you've folĺowed these instructions correctly, you should be able to apply your new custom Strike style to selected text by right-clicking the selected text in Code View mode and selecting Clips > Strike from the context menu. If the span was correctly inserted in Code View mode, but you don't see strikethrough text in Book View mode, you'll need to link the stylesheet to the .html file via the Link Stylesheets context menu in the Book Browser. |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
Thanks, people. I'll try!
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
Ugh, I barely know what a style sheet is and I don't know how to create one.
Wait, I think I've created one. |
![]() |
![]() |
![]() |
#7 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
I created the style sheet, but it appears that I have to link it. I'll try to figure out how to do that myself and then carry on with your instructions. Thanks!
|
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
stylesheets can be almost brain-dead simple:
Code:
p {margin: .5em 0 0 0; text-indent: 1.2em; } span.strike {text-decoration: line-through; } ![]() Code:
.scenebreaker { border-bottom: 0; border-top: 0; display: block; font-size: 1.5em; font-weight: bold; word-spacing: 1.5em; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em; padding-bottom: 0; padding-top: 0; text-align: center; } |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If I may give you a good tip... Brush up on basic HTML and CSS skills. That will help you to a large extent... There are some good guides out there. One is on this forum by Pablo (aimed for e-books) and I believe it is also published on the mobileread wiki.
In this case <strike></strike> or <s></s> is deprecated and might not be supported on the readers. To be fair, I haven't come across a reader that did not support it though. Layout and styling should be done as much as possible via stylesheets. That will make your book smaller in size, easier to maintain and better performing. |
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 100001
Join Date: Dec 2009
Device: Kindle
|
Thanks, everybody. I learned so much from you.
After slogging through four books, with six to go, I'm intrigued by this style sheet concept and will definitely be digging into it (and will try to get better at .html in general)... |
![]() |
![]() |
![]() |
#11 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
|
Search and replace strike> with del>. Strike has been deprecated and del takes its place. Also, the meaning of "s" has been subtly redefined.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Doesn't save changes | mrmikel | Editor | 42 | 08-19-2014 01:11 AM |
Troubleshooting It doesn't look like a scratch...? | Jessica Lares | Amazon Kindle | 20 | 09-21-2012 11:17 AM |
doesn't save | alansplace | Sigil | 2 | 08-18-2011 05:52 PM |
Request Everything doesn't have to be (just) an icon. | kenjennings | enTourage Archive | 1 | 04-21-2010 03:06 PM |