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 08-08-2010, 11:43 AM   #1
deckoff
Member
deckoff began at the beginning.
 
Posts: 22
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
deckoff is offline   Reply With Quote
Old 08-09-2010, 07:03 AM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,975
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Not currently, but you'll be able to turn it off in a forthcoming version.
Valloric is offline   Reply With Quote
Old 08-09-2010, 06:31 PM   #3
Lexicon
Enthusiast
Lexicon will become famous soon enoughLexicon will become famous soon enoughLexicon will become famous soon enoughLexicon will become famous soon enoughLexicon will become famous soon enoughLexicon will become famous soon enough
 
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.
Lexicon is offline   Reply With Quote
Old 08-13-2010, 05:11 AM   #4
deckoff
Member
deckoff began at the beginning.
 
Posts: 22
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.
deckoff is offline   Reply With Quote
Old 08-13-2010, 08:51 PM   #5
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
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.
charleski is offline   Reply With Quote
Old 08-19-2010, 06:36 AM   #6
JayCeeEll
Connoisseur
JayCeeEll doesn't litterJayCeeEll doesn't litterJayCeeEll doesn't litter
 
JayCeeEll's Avatar
 
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?
JayCeeEll is offline   Reply With Quote
Old 08-19-2010, 08:07 AM   #7
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,975
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by JayCeeEll View Post
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?
I agree, these tags shouldn't be changed. It's Tidy acting like an idiot. It does that often.

Make an issue on the tracker about it and I'll see what I can do about teaching Tidy some manners.
Valloric is offline   Reply With Quote
Old 08-19-2010, 08:12 AM   #8
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,975
Karma: 350515
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.
Valloric is offline   Reply With Quote
Old 08-19-2010, 12:45 PM   #9
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 13,589
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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" />
instead of
Code:
  <link rel="stylesheet" href="../Styles/stylesheet.css" type="text/css" />
did Sigil do this?
theducks is online now   Reply With Quote
Old 08-19-2010, 03:24 PM   #10
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,975
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by theducks View Post
did Sigil do this?
Sigil wouldn't do that. It knows exactly where the styles folder is.
Valloric is offline   Reply With Quote
Old 08-19-2010, 03:46 PM   #11
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 13,589
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Valloric View Post
Sigil wouldn't do that. It knows exactly where the styles folder is.

I thought so, just thought it was a weird, because of the no existing CSS file ,or call-out, exception.
theducks is online now   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 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


All times are GMT -4. The time now is 09:14 PM.


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