08-08-2010, 12:43 PM | #1 |
Member
Posts: 24
Karma: 10
Join Date: Jun 2010
Location: Sofia, Bulgaria
Device: Kindle 3
|
Sigl auto-generated CSS
Ok, sigil auto generates CSS. It is ok, but sometimes I want turned it off. I have some files with the following format:
<p class="italic">blah</p> I want <p><i>blah</p></i>( I want it, because Freda WM wont render properly the first format> I'll do find and replace, will do it , but after saving the epub with sigil, I'll get <p class="sgl-1"> blah</p> again... Can I tun it off |
08-09-2010, 08:03 AM | #2 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Not currently, but you'll be able to turn it off in a forthcoming version.
|
Advert | |
|
08-09-2010, 07:31 PM | #3 |
Enthusiast
Posts: 44
Karma: 542
Join Date: Dec 2007
Device: Sony PRS-505
|
There are a few things you can try.
Firstly I think you may have the tags in the wrong order, I believe your example should be: <p><i>blah</i></p> Putting them in the wrong order may be confusing Sigil/tidy, although in my experience it seems pretty good at coping with such tagging errors. Secondly you could try to tag like this: <p class="italic"><i>blah</i></p> or: <p class="italic"><em>blah</em></p> Which should result in the text displaying as italic even if the reading app doesn't support CSS classes. It's a bit of a kludge but it might work. Thirdly you could try moving the css statements out of the chapter files into an external CSS style sheet. It may be that Freda can only work with external style sheets. To test this you need to copy the code between the style tags (should be at the top in the <head></head> section): <style type="text/css"> p.sgc-1 { font-style: italic } p.sgc-2 { color: green } span.sgc-3 { font-weight: bold } etc. etc. </style> to a new file in the styles folder - just copy the sgc statements, not the enclosing tags. Rename the new file to MyStyles.css and then add the following statement to the head section of your original file(s): <link rel="stylesheet" type="text/css" href="../Styles/MyStyles.css" /> As ever make sure you have a backup of the unmodified file before making any changes. |
08-13-2010, 06:11 AM | #4 |
Member
Posts: 24
Karma: 10
Join Date: Jun 2010
Location: Sofia, Bulgaria
Device: Kindle 3
|
10x for suggestions
I meant <p><i>blah</i></p> actually Will try what you said. It appears I used an older version of Freda, too. |
08-13-2010, 09:51 PM | #5 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
I find that using <em> and <strong> instead of <i> and <b> prevents Sigil generating an automatic class.
|
Advert | |
|
08-19-2010, 07:36 AM | #6 |
Connoisseur
Posts: 87
Karma: 204
Join Date: Dec 2007
Location: Exeter, Devon, UK
Device: PRS-300
|
Why does Sigil change <i> and <b> tags to css, they are valid xhtml after all.
If I want to style them I can use i {....} in my css, or add whatever class I choose. Should Sigil really be making these types of decisions for me? |
08-19-2010, 09:07 AM | #7 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Make an issue on the tracker about it and I'll see what I can do about teaching Tidy some manners. |
|
08-19-2010, 09:12 AM | #8 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
On a related note, I'll be adding a button to the toolbar that will enable you to turn off Tidy "cleaning". Tidy will still be run to make sure your code is XHTML, but the button will disable the CSS style extraction and similar shenanigans that sometimes do things you don't want them to do.
Basically, the button will switch Tidy into a bare-bones, just-turn-this-into-XHTML-and-don't-touch-anything-else parser. |
08-19-2010, 01:45 PM | #9 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Speaking of autogenerated CSS in Sigil
I added a Bunch of HTML files that did not have a CSS. When I saved as EPUB, I could not get any font size changes to take effect , no matter what I set. Code:
<link rel="stylesheet" href="../../stylesheet.css" type="text/css" />
Code:
<link rel="stylesheet" href="../Styles/stylesheet.css" type="text/css" />
|
08-19-2010, 04:24 PM | #10 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
08-19-2010, 04:46 PM | #11 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Generated covers | melz | Calibre | 8 | 11-02-2024 05:34 AM |
CSS for auto Table of Contents | MaryBon | Calibre | 1 | 09-21-2010 07:17 AM |
Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 10:59 AM |
PDF Generated with LaTeX for the iLiad | Hadrien | iRex | 17 | 07-25-2008 10:59 AM |
self-generated document froze my Reader | MacBeezle | Sony Reader | 6 | 08-31-2007 04:46 AM |