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 04-25-2011, 09:55 AM   #1
christinerose
Junior Member
christinerose began at the beginning.
 
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:&nbsp;</span><span class="sgc-5">Don't sign with any publisher unless they are&nbsp;</span><span class="sgc-5">giving you some kind of advance.&nbsp;</span>Don't sign away your rights for nothing.</span></p>
From CSS:
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);
}
christinerose is offline   Reply With Quote
Old 04-25-2011, 12:07 PM   #2
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
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.
st_albert is offline   Reply With Quote
 
Enthusiast
Old 04-25-2011, 12:27 PM   #3
christinerose
Junior Member
christinerose began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Apr 2011
Device: Kindle
Thank you! I'll try that!
christinerose is offline   Reply With Quote
Old 04-26-2011, 03:11 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,905
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 04-26-2011, 11:28 AM   #5
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Toxaris View Post
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.
Sometimes Sigil (or tidy?) will try to clean up the code. For example suppose I have

Code:
<h2 class="center"><b>Chapter 1</b></h2>
Sigil might change that to:

Code:
<h2 class="center sgc-1">Chapter 1</h2>
with a style element .sgc-1 { font-weight: bold}

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.
st_albert is offline   Reply With Quote
Old 04-27-2011, 08:57 AM   #6
christinerose
Junior Member
christinerose began at the beginning.
 
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?
christinerose is offline   Reply With Quote
Old 04-28-2011, 03:26 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,905
Karma: 2909045
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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....
Toxaris is offline   Reply With Quote
Old 04-28-2011, 11:07 AM   #8
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: 14,479
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
4, Do not press any Sigil GUI styling buttons (Bold, Italic, Center, Justify... )

5. Live with it
theducks 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
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


All times are GMT -4. The time now is 05:40 AM.


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