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 01-15-2011, 01:57 AM   #1
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
External CSS file questions

Greetings:
I'm new to Sigil, so if there's additional info required/missing, please let me know. I'm trying to use external CSS file, I've created a very simple external CSS called michael.css and saved it in the same folder as HTML file, this is what I did:

1: Load the HTML file into an external editor.
2: Place the following code into the HTML file (between <head> tag):
Code:
<link rel="stylesheet" type="text/css" href="michael.css" />
3: Load the HTML file to Sigil.
4: Open the Styles Section and the michael.css has been loaded.

The problem is when I tried to save the HTML file into ePub, Sigil inserted the following code into ePub file,
Code:
<style type="text/css">
p.sgc-6 {font-style: italic; font-weight: bold}
  b.sgc-5 {font-style: italic}
  p.sgc-4 {font-style: italic}
  span.sgc-3 {font-size: 16pt;}
  p.sgc-2 {font-weight: bold}
  span.sgc-1 {font-size: 24pt;}
</style>
even though I've had an external CSS file. Is this correct? How can I tell Sigil not to insert the CSS code and use the external CSS files instead? I even inserted this code into my CSS, but still Sigil inserted the style again!!!
Code:
p.sgc-6 {font-style: italic; font-weight: bold}
  b.sgc-5 {font-style: italic}
  p.sgc-4 {font-style: italic}
  span.sgc-3 {font-size: 1.5em;}
  p.sgc-2 {font-weight: bold}
  span.sgc-1 {font-size: 2em;}
I'm using Sigil 0.3.2 for Win, and OS is Win XP

Thanks for your comment/suggestions
Michael
michaelbr is offline   Reply With Quote
Old 01-15-2011, 11:06 AM   #2
theducks
Well trained by Cats
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: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by michaelbr View Post
2: Place the following code into the HTML file (between <head> tag):
Code:
<link rel="stylesheet" type="text/css" href="michael.css" />
4: Open the Styles Section and the michael.css has been loaded.

I'm using Sigil 0.3.2 for Win, and OS is Win XP

Thanks for your comment/suggestions
Michael
Number 2 statement does not agree with number 4
Code:
<link rel="stylesheet" type="text/css" href="../Styles/michael.css" />
is the correct path for statement 4 to be valid (Case sensitive: note the S )
theducks is online now   Reply With Quote
Advert
Old 01-15-2011, 12:31 PM   #3
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
@ theducks : #2 is what is in the original HTML file, before loading it into Sigil, and is correct if the original CSS file is in the same directory as the original HTML file. I would imagine that after loading it into Sigil, Sigil will have changed the CSS path to "../Styles/michael.css", to correspond with the new directory structure set up by Sigil.

@ michaelbr : I believe Sigil is creating those styles to replace formatting that has been applied within the HTML code rather than through the use of CSS (e.g. occasional use of <i> and <b> tags). The only way to stop this happening, as far as I know, is to ensure that all formatting is already handled via the CSS styles. However the styles created by Sigil are not replacing the existing styles in your CSS file, and don't prevent those from being used - they are simply in addition to those styles.
DMSmillie is offline   Reply With Quote
Old 01-15-2011, 12:51 PM   #4
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,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by DMSmillie View Post
@ michaelbr : I believe Sigil is creating those styles to replace formatting that has been applied within the HTML code rather than through the use of CSS (e.g. occasional use of <i> and <b> tags). The only way to stop this happening, as far as I know, is to ensure that all formatting is already handled via the CSS styles.
...or just turn off Tidy in the toolbar.
Valloric is offline   Reply With Quote
Old 01-15-2011, 04:41 PM   #5
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by Valloric View Post
...or just turn off Tidy in the toolbar.
Aha! Thanks Valloric. I learn something new every day.
DMSmillie is offline   Reply With Quote
Advert
Old 01-16-2011, 11:49 PM   #6
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
Thanks for all your replies, we learn little bit everyday.
michaelbr is offline   Reply With Quote
Old 01-17-2011, 10:53 PM   #7
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by Valloric View Post
...or just turn off Tidy in the toolbar.
How do you know if its on or off? I click it, and click it and I still have the same icon.

Regards - John
Jabby is offline   Reply With Quote
Old 01-17-2011, 11:43 PM   #8
theducks
Well trained by Cats
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: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jabby View Post
How do you know if its on or off? I click it, and click it and I still have the same icon.

Regards - John
In windows, the icon edges change shading and IIRC the balloon help changes wording.
theducks is online now   Reply With Quote
Old 01-18-2011, 08:42 AM   #9
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by theducks View Post
In windows, the icon edges change shading and IIRC the balloon help changes wording.
Hi Ducks-

I guess these old eyes tend to entropy like the rest of me. I see it now. But I don't know which is which. When Sigil is opened, is it on or off? If it is on when opened, I'll have to change my ways. I navigate to the file, right click and "open with" as opposed to opening the file within Sigil. I find it much easier to navigate with windows explorer.

Regards - John
Jabby is offline   Reply With Quote
Old 01-18-2011, 10:27 AM   #10
theducks
Well trained by Cats
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: 29,777
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jabby View Post
Hi Ducks-

I guess these old eyes tend to entropy like the rest of me. I see it now. But I don't know which is which. When Sigil is opened, is it on or off? If it is on when opened, I'll have to change my ways. I navigate to the file, right click and "open with" as opposed to opening the file within Sigil. I find it much easier to navigate with windows explorer.

Regards - John
I believe it stays the way you last left it (normal exit of Sigil),
In is on (edges darker)
theducks is online now   Reply With Quote
Old 01-27-2011, 08:08 AM   #11
Ahmad Samir
Zealot
Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!
 
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
The status is preserved since the last Sigil session.

You can also look in the Tools menu, the enabled/disabled status is indicated by a tick mark next to "Cleaning with HTML Tidy".
Ahmad Samir 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
Opus Fonts directory for Calibre -> External CSS fiery Bookeen 12 02-20-2011 10:05 PM
a few extra css questions marbs Recipes 12 11-20-2010 10:15 AM
CSS Questions JTAL604622 Calibre 0 11-18-2010 06:33 PM
EPUBReader doesn't find the CSS file? paulpeer EPUBReader 8 03-23-2010 02:45 PM
Questions about external memory siulayhumga Sony Reader 4 06-17-2009 12:44 PM


All times are GMT -4. The time now is 06:17 PM.


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