|
|
Thread Tools | Search this Thread |
12-17-2013, 03:24 AM | #1 |
Groupie
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
[Suggestion] Sigil validator should check missing type="text/css" attribute
I have noticed that kindlegen 2.9 tool ignores stylesheets that are improperly linked to html files inside ePub files.
For example this case is incorrect and will be ignored by kindlegen during conversion: Code:
<link rel="stylesheet" href="../Styles/styles.css"> Code:
<link rel="stylesheet" type="text/css" href="../Styles/styles.css"> Is it possible to implement? |
12-17-2013, 04:17 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It is possible, but it will probably not happen for three reasons.
1. Maintenance on Sigil and also FlightCrew is very, very limited at the moment due to lack of developers 2. The usage of type is not required, but recommended. The type only specifies the language the stylesheet is in to prevent the reader from reading unsupported stylesheets. The 'rel="stylesheet"' is more important in this case, since that identifies the file as a stylesheet. 3. It is not required and the main goal of Sigil is ePUB2 and thus not mobi or any other e-reader format. |
12-17-2013, 03:56 PM | #3 |
Lector minore
Posts: 649
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Samsung Galaxy Tab S5e, Google Pixel Slate
|
What issue is actually fixed by ignoring the stylesheet in such a case?
|
12-17-2013, 04:34 PM | #4 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
@quiris, you can try editing with calibre. If the book is in calibre, the Tweak Book setting has been replaced with the all-new Edit Book, or you can run it as the standalone program ebook-edit.exe. The editor has all the basic functionality down, although it is not yet as smooth as Sigil Kovid is working on it and has basically duplicated the basics of Sigil in only 1 & 1/2 months; given just a little time it will be far better I am thinking. calibre is actively supported, unlike Sigil, and is meant to edit azw3 as well as ePub so fixing for KindleGen fits within the design parameters. If you can't do this yet, add a request for it and it will most likely be implemented. |
|
12-17-2013, 04:36 PM | #5 | |
Groupie
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
Quote:
|
|
12-17-2013, 04:41 PM | #6 | |
Groupie
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
Quote:
I like to have almost entire control of source code in my own hands Sigil isn't perfect but I don't found better similar program. |
|
12-17-2013, 04:48 PM | #7 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
ebook-edit.exe is a replacement for the old Tweak Book, which was just a GUI for unpacking the .epub and editing the source code. It still uses the same code as that, but adds a Sigil-like GUI editor designed to give you the same control over every last byte of your book. I am not suggesting give it a run through the calibre converter. But I understand your confusion -- this editor is brand-new and was only introduced in the most recent release. |
|
12-17-2013, 04:49 PM | #8 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@quiris:
BTW, if you enable Edit > Preferences > Clean Source > Open/Save, Sigil will automatically add the missing type="text/css" attribute if you open/save your file, even if only Pretty Print Tidy is enabled. |
12-17-2013, 04:53 PM | #9 |
Groupie
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
|
12-17-2013, 04:56 PM | #10 |
Groupie
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
I found that Pretty Print Tidy can introduce really bad code modifications especially into not valid html code, so I have turned it off.
|
12-17-2013, 05:03 PM | #11 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Are you sure that don't mix up Pretty Print Tidy with HTML Tidy? HTML Tidy can mess up HTML code and adds those annoying sgc classes, but Pretty Print Tidy only adds white-space to make HTML code more readable.
|
12-24-2013, 02:49 AM | #12 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
quiris, Calibre doesn't drastically modifies original source HTML, look in options.
Anyway, like Doitsu said, just disable code modifications... HTML tidy worked fine for me. |
01-21-2018, 12:55 PM | #13 |
Guru
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
I know, that this is old thread, but...
If the type="text/css" is missing, the "Go To Link or Style" function does not work. Maybe Sigil could check it during opening the file? |
01-21-2018, 02:00 PM | #14 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
This may be a good job for a validator plugin, if epubcheck does not already complain about it.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS to "wrap" text between two .xhtml files? | december | Sigil | 28 | 12-06-2013 03:29 PM |
Proposal: CSS "normalisation" functionality in Sigil | Man Eating Duck | Sigil | 17 | 08-20-2013 12:25 PM |
How to type "square brackets" [] in German(ized) Sigil? | Mark Nord | Sigil | 7 | 12-09-2012 05:53 AM |
ePub to Mobi: can't get the reference type="text" to work | LaoTseu | Conversion | 7 | 09-14-2011 12:06 AM |
Suggestion: Don't set "color" tag in .epub css | McAlsop | Calibre | 16 | 06-17-2010 09:13 AM |