|
|
#1 |
|
Member
![]() Posts: 15
Karma: 10
Join Date: Jun 2010
Location: Sofia, Bulgaria
Device: Kindle 3
|
Sigl auto-generated CSS
<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 |
|
|
|
|
|
#2 |
|
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,975
Karma: 348069
Join Date: Feb 2008
Device: Sony Reader PRS 505
|
Not currently, but you'll be able to turn it off in a forthcoming version.
|
|
|
|
|
Enthusiast
|
|
|
|
#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. |
|
|
|
|
|
#4 |
|
Member
![]() Posts: 15
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. |
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,181
Karma: 539735
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.
|
|
|
|
|
|
#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? |
|
|
|
|
|
#7 | |
|
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,975
Karma: 348069
Join Date: Feb 2008
Device: Sony Reader PRS 505
|
Quote:
Make an issue on the tracker about it and I'll see what I can do about teaching Tidy some manners. |
|
|
|
|
|
|
#8 |
|
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,975
Karma: 348069
Join Date: Feb 2008
Device: Sony Reader PRS 505
|
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. |
|
|
|
|
|
#9 |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,690
Karma: 2485828
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
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" />
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
#10 |
|
Created Sigil, FlightCrew
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,975
Karma: 348069
Join Date: Feb 2008
Device: Sony Reader PRS 505
|
Sigil wouldn't do that. It knows exactly where the styles folder is.
|
|
|
|
|
|
#11 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,690
Karma: 2485828
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
![]() I thought so, just thought it was a weird, because of the no existing CSS file ,or call-out, exception.
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS for auto Table of Contents | MaryBon | Calibre | 1 | 09-21-2010 06:17 AM |
| Generated covers | melz | Calibre | 5 | 07-21-2010 05:23 PM |
| Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 09:59 AM |
| PDF Generated with LaTeX for the iLiad | Hadrien | iRex | 17 | 07-25-2008 09:59 AM |
| self-generated document froze my Reader | MacBeezle | Sony Reader | 6 | 08-31-2007 03:46 AM |