Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2013, 03:24 AM   #1
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
Lightbulb [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">
A correct code is:

Code:
<link rel="stylesheet" type="text/css" href="../Styles/styles.css">
So it would be very useful if Sigil validator would check also missing type="text/css".

Is it possible to implement?
quiris is offline   Reply With Quote
Old 12-17-2013, 04:17 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Advert
Old 12-17-2013, 03:56 PM   #3
radius
Lector minore
radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.radius ought to be getting tired of karma fortunes by now.
 
radius's Avatar
 
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?
radius is offline   Reply With Quote
Old 12-17-2013, 04:34 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by radius View Post
What issue is actually fixed by ignoring the stylesheet in such a case?
According to the OP, KindleGen ignores the stylesheet altogether.

@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.
eschwartz is offline   Reply With Quote
Old 12-17-2013, 04:36 PM   #5
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
Quote:
Originally Posted by Toxaris View Post
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.
The attribute is not required in HTML5 but it's required for HTML 4.01 and I think it would be nice to keep as far as possible similarity in client experience between ePub files produced by Sigil and Mobi files generated by kindlegen from that ePub.
quiris is offline   Reply With Quote
Advert
Old 12-17-2013, 04:41 PM   #6
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
Quote:
Originally Posted by eschwartz View Post
@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.
I don't use Calibre at all since it drastically modifies original source HTML code inside ebooks. So it's evil app for me.

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.
quiris is offline   Reply With Quote
Old 12-17-2013, 04:48 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by quiris View Post
I don't use Calibre at all since it drastically modifies original source HTML code inside ebooks. So it's evil app for me.

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.
If you were using ebook-convert.exe which is meant to do automated conversion, then yes.

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.
eschwartz is offline   Reply With Quote
Old 12-17-2013, 04:49 PM   #8
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
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.
Doitsu is offline   Reply With Quote
Old 12-17-2013, 04:53 PM   #9
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
Quote:
Originally Posted by eschwartz View Post
ebook-edit.exe is a replacement for the old Tweak Book
Hm… Interesting… I'll dig into it in a spare time. Thank you for the tip
quiris is offline   Reply With Quote
Old 12-17-2013, 04:56 PM   #10
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
Quote:
Originally Posted by Doitsu View Post
@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.
I found that Pretty Print Tidy can introduce really bad code modifications especially into not valid html code, so I have turned it off.
quiris is offline   Reply With Quote
Old 12-17-2013, 05:03 PM   #11
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by quiris View Post
I found that Pretty Print Tidy can introduce really bad code modifications especially into not valid html code, so I have turned it off.
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.
Doitsu is offline   Reply With Quote
Old 12-24-2013, 02:49 AM   #12
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
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.
odedta is offline   Reply With Quote
Old 01-21-2018, 12:55 PM   #13
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 687
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
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?
BeckyEbook is online now   Reply With Quote
Old 01-21-2018, 02:00 PM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,629
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.
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:00 AM.


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