![]() |
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. |
Quote:
|
Quote:
|
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:
|
Quote:
|
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.
|
Quote:
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* |
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 |
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.
|
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.
|
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. |
Quote:
|
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. |
| All times are GMT -4. The time now is 10:57 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.