10-01-2010, 03:18 PM | #1 |
eBook FANatic
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Sigil Style Sheets
This may have been covered before but I haven't found it. The following is an excerpt from a sigil header.
Code:
<head> <meta content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" name="generator" /> ... ... <link rel="stylesheet" type="text/css" href="../Styles/main.css" /> <meta content="MSHTML 8.00.7600.16625" name="GENERATOR" /> <style type="text/css"> i.sgc-2 {font-weight: bold} p.sgc-1 {text-align: center} </style> </head> |
10-01-2010, 04:27 PM | #2 | |
Well trained by Cats
Posts: 29,877
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Sigil will construct (could be a compound of styles) a style. Not that the same style may not be present in another page (which is why a simple copY of a working, styled block may not work as expected... The stylesheet was not there. Moral: If you use Sigil to create a Style, copy the code part and add it to your Stylesheet with your naming (not sure what Sigil would do if SGC# appeared in the CSS), then replace the SGC# usage with you name in the document (I believe Sigil will tidy up unused selectors). |
|
Advert | |
|
10-04-2010, 07:57 PM | #3 |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
I've seen Sigil add those .sgc-# styles when I open e.g. an HTML file. I think Sigil (via libtidy?) examines the file and adds those css classes to the relevant paragraphs and at the top of the html file (like the ones you posted).
Usually Sigil gets it right with those styles, i.e. i.sgc-2 from your example is actually bold in the original file. And sometimes it adds a .sgc-# for just one line in the whole file.. So it looks like this falls under the uncontrollable-things-tidy-does-to-an-epub-sometimes, (IIRC Valloric said he'll offer an option to turn that behaviour off). |
10-06-2010, 08:48 AM | #4 | |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
Quote:
<p><i>Lorem ipsum, blah, blah</i></p> Switched to book view and back to code, and it had eliminated the <i></i> tags, created a new style at the top for an italic normal paragraph, and applied it there. I agree with theducks; when you see this, create a new style in your CSS, apply that and get rid of the one Sigil/Tidy created. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobi TOC style vs ePub style? | phearlez | Kindle Formats | 3 | 04-11-2010 06:35 AM |
Sigil et la feuille de style | roger64 | Software | 3 | 03-30-2010 09:23 PM |
music sheets on cybook? | triwy | Bookeen | 4 | 04-24-2009 09:55 AM |
Reference Lie, Hakon & Bos, Bert: Cascading Style Sheets, level 1. IMP. v1.0 4 Sept 2007 | DaleDe | IMP Books (offline) | 0 | 09-04-2007 02:12 PM |