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 03-01-2012, 10:17 AM   #1
karyan
Member
karyan began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2011
Device: Kindle, Kobo, Android Tablet
How NOT to use a stylesheet?

My apologizes if this has already been asked and answered. (I have done some searches but...)

I really like using Sigil for cleaning up badly converted documents. Most need very minimal formatting, leaving display decisions to the reading device, so I like to clean up using the code view. One thing that urks me is how Sigil often replaces the simple html with stylesheet references or adds code where none is needed.

Is there a way to stop Sigil from doing this?

Thanks.
karyan is offline   Reply With Quote
Old 03-01-2012, 10:20 AM   #2
Rob Lister
Fanatic
Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.
 
Posts: 533
Karma: 3293888
Join Date: Oct 2011
Location: Virginia
Device: Nook Simple Touch
Quote:
Originally Posted by karyan View Post
...where none is needed.
example?
Rob Lister is offline   Reply With Quote
Old 03-01-2012, 10:26 AM   #3
karyan
Member
karyan began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2011
Device: Kindle, Kobo, Android Tablet
Quote:
Originally Posted by Rob Lister View Post
example?
Adding <span> ... </span> around text that has no formatting.
karyan is offline   Reply With Quote
Old 03-01-2012, 10:29 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,314
Karma: 42858084
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Turning off HtmlTidy will help in many instances, but you can't completely stop it from ever "helping." I know I don't like it when it sometimes consolidates/stacks/creates CSS classes.

Quote:
Originally Posted by karyan View Post
Adding <span> ... </span> around text that has no formatting.
I've never had it do that, myself. I most often see stuff like that in ePubs that were automatically converted from a different format.

Last edited by DiapDealer; 03-01-2012 at 10:32 AM.
DiapDealer is offline   Reply With Quote
Old 03-01-2012, 10:45 AM   #5
Rob Lister
Fanatic
Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.Rob Lister ought to be getting tired of karma fortunes by now.
 
Posts: 533
Karma: 3293888
Join Date: Oct 2011
Location: Virginia
Device: Nook Simple Touch
Quote:
Originally Posted by karyan View Post
Adding <span> ... </span> around text that has no formatting.
no formatting? that in itself is a problem that should be addressed somehow. can you provide a cut and paste example?
Rob Lister is offline   Reply With Quote
Old 03-01-2012, 10:49 AM   #6
Keroberos
Zealot
Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.Keroberos can program the VCR without an owner's manual.
 
Keroberos's Avatar
 
Posts: 127
Karma: 194002
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
I think a lot of these issues are dependent upon the source HTML. The cleaner the HTML being imported to Sigil is, the less problems like these you will have. Unfortunately if the HTML has had any editing done in Microsoft Word, you will have a lot of wonkiness in the resulting HTML. Saving the HTML as "Web Page, Filtered" in Word can help to alleviate some of these problems.
Keroberos is offline   Reply With Quote
Old 03-01-2012, 10:50 AM   #7
karyan
Member
karyan began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2011
Device: Kindle, Kobo, Android Tablet
Quote:
Originally Posted by DiapDealer View Post
Turning off HtmlTidy will help in many instances, but you can't completely stop it from ever "helping." I know I don't like it when it sometimes consolidates/stacks/creates CSS classes.


I've never had it do that, myself. I most often see stuff like that in ePubs that were automatically converted from a different format.
Thanks! I didn't even realise HtmlTidy was turned on. I'd be very happy if Sigil was just a little less "helpful."

Most of the <span></span> were introduced (I believe) by the original conversion process, but I also had this happening in files that I had previously "cleaned" up. Turning off HtmlTidy seems to be preventing this. *fingers crossed*
karyan is offline   Reply With Quote
Old 03-01-2012, 02:24 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,520
Karma: 13917553
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
If you exported material from Word, you'll have spans everywhere that have nothing whatsoever to do with Sigil. Word outputs--as nicely as I can say it--gobbledygook--and Sigil attempts to rectify it. If you have something--ANYTHING--in a para that is odd, Sigil will attempt to span it, for lack of any other instruction.

Just cleaning your html in a plain html editor will eliminate a lot of that.

If you exported your html from PDF, even with Acrobat, gods help you. You're better off, IME, exporting to XML and working from there.

HTH,
Hitch
Hitch is offline   Reply With Quote
Old 03-02-2012, 02:24 AM   #9
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: 3,031
Karma: 4002933
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Exactly, that is the reason why I wrote my HTML export macro in Word to get some decent, clean HTML output. It is not perfect, but good enough.
Toxaris is offline   Reply With Quote
Old 03-02-2012, 03:50 AM   #10
huebi
Zealot
huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!
 
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
Never saw an empty span created by Sigil. What i dislike is the transformation <p><i>...</i></p> into <p class="sgc-n">...</p>. Well i have to live with that.
huebi is offline   Reply With Quote
Old 03-02-2012, 08:19 AM   #11
karyan
Member
karyan began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2011
Device: Kindle, Kobo, Android Tablet
Keroberos and Hitch, I didn't do the initial conversion - have no idea how it was done - although it appears to have originated from a scanned physical document. There is not much I can do about the initial state of the documents, I just want to be able to "clean" them and have them stay clean - which seems to be happening now, with DiapDealer's suggestion.

huebi, I had the same problem, but it doesn't seem to be happening now that I've turned off HtmlTidy.

Rob Lister, I no longer have examples - and I'm not eager to reproduce by turning HtmlTidy back on - but one situation I saw was <p><span>...</span></p> where the ... represents plain text. I would delete, save and then have the <span>...</span> reappear when I reopened the file. Maybe I am overlooking some steps on my part that contributed to my problems, but I'm very satistfied with the solution.
karyan is offline   Reply With Quote
Old 03-07-2012, 11:29 AM   #12
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by Toxaris View Post
Exactly, that is the reason why I wrote my HTML export macro in Word to get some decent, clean HTML output. It is not perfect, but good enough.
You have a macro? Wow. Is it available?
Oldpilot is offline   Reply With Quote
Old 03-07-2012, 12:43 PM   #13
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: 3,031
Karma: 4002933
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
yep, an old version is up here somewhere. I'll try to find it and upload the latest version.

It can probably improved upon, but it works for me.
Toxaris 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
conversion and stylesheet question pckopp Calibre 8 12-26-2010 10:21 PM
Linking Stylesheet with Text Ephraim Sigil 2 12-07-2010 05:38 PM
Adding Namespace to Stylesheet ghostyjack ePub 0 12-07-2010 07:49 AM
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 08:24 PM
Where is the stylesheet.css? roger64 Sigil 4 03-23-2010 02:12 PM


All times are GMT -4. The time now is 12:54 AM.


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