04-25-2011, 09:55 AM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Apr 2011
Device: Kindle
|
Sigil Automatically Adding Code
I originally exported the ePub from InDesign CS3, then started tweaking it from there.
I found that the Sigil CSS converted different paragraph styles into different font sizes, so I went in and made them all the same font size (1.00em). I also changed all the font families to "Times New Roman" instead of the ones made by InDesign (Adobe Garamond, etc.). However, now I find that Sigil is automatically changing some of those fonts back with sgc-## in-line. It's driving me crazy. Each time I fix it, it regenerates on its own again. Ex. from xhtml: Code:
p.sgc-8 {text-align: left;font-family: 'Adobe Garamond Pro'; line-height: 1.23em; font-size: 1.08em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: bold; font-style: normal; color: rgb(0, 0, 0);} Code:
<p class="boxes sgc-8"><span class="generated-style"><span class="generated-style">ADVICE: </span><span class="sgc-5">Don't sign with any publisher unless they are </span><span class="sgc-5">giving you some kind of advance. </span>Don't sign away your rights for nothing.</span></p> Code:
p.boxes { font-family: "Times New Roman"; line-height: 1.33em; font-size: 1.00em; margin-bottom: 0.00em; margin-top: 0.00em; text-indent: 0.00em; margin-right: 0.00em; margin-left: 0.00em; text-align: center; font-weight: bold; font-style: normal; color: rgb(0,0,0); } |
04-25-2011, 12:07 PM | #2 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Just guessing here, but:
1) make the changes to fonts and styles in the original CS3 epub, before opening it in Sigil (if you haven't already). 2) turn off tidy in Sigil, to minimize the amount of changes Sigil will make behind the scenes. |
Advert | |
|
04-25-2011, 12:27 PM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: Apr 2011
Device: Kindle
|
Thank you! I'll try that!
|
04-26-2011, 03:11 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Still, I think that there goes something wrong during the export from CS3. Sigil will note 'invent' code. There must be something to work with.
|
04-26-2011, 11:28 AM | #5 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Code:
<h2 class="center"><b>Chapter 1</b></h2> Code:
<h2 class="center sgc-1">Chapter 1</h2> added to the <head> of that file. Which is fine for epub, but if I use kindlegen to convert to mobi, it will not recognize the multiple css selectors (i.e. class="center sgc-1") ... but I don't think that explains why the font family declarations are getting replaced. |
|
Advert | |
|
04-27-2011, 08:57 AM | #6 |
Junior Member
Posts: 9
Karma: 10
Join Date: Apr 2011
Device: Kindle
|
That's exactly what it's doing! It's adding the sgc things all over. Like 50 different ones!! I changed the fonts in the CSS, but Sigil is adding the sgc style elements automatically and changing it all back. GRRR!
I just discovered Kindlegen, but can't get it to work on my Mac as of yet. :/ My mistake, btw. It was exported into ePub from InDesign CS4, not CS3. I converted the ePub to mobi using Calibre. The .mobi isn't awful, but it could use some work. I thought I'd be able to download the html from the KDP preview, but it seems that option is no longer available. I think they'd be easy fixes if I could just get into the html! Suggestions? |
04-28-2011, 03:26 AM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You have three options.
1. Switch Tidy off. This will prevent Sigil to 'extract' styles to make things more generic. 2. Make your stylesheet a better reflection of the used styles. 3. Live with it.... |
04-28-2011, 11:07 AM | #8 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
4, Do not press any Sigil GUI styling buttons (Bold, Italic, Center, Justify... )
5. Live with it |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil 0.2.0 Embedding Fonts - Adding all the bits | ghostyjack | Sigil | 30 | 05-14-2011 03:30 AM |
Sigil-created code not honored by Sony PRS-350 :( | PatNY | Sigil | 4 | 01-01-2011 09:46 AM |
Untitled.ePub-Sigil and Code question | soulartist | Sigil | 3 | 12-09-2010 05:06 PM |
Are the SGC_# a sigil code? | JaneFancher | Sigil | 14 | 09-06-2010 04:08 AM |
Automatically adding additional formats for a book? | HarryT | Calibre | 4 | 08-26-2009 11:57 AM |