![]() |
[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? |
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. |
What issue is actually fixed by ignoring the stylesheet in such a case?
|
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. |
Quote:
|
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. |
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. |
@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. |
Quote:
|
Quote:
|
Quote:
|
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. |
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? |
This may be a good job for a validator plugin, if epubcheck does not already complain about it.
|
| All times are GMT -4. The time now is 10:13 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.