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 03-24-2013, 02:27 PM   #1
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Circumvent code death spiral

Ok..

Here is the situation in noobese:

Have complete document. Everything in place.

Needed to paste edited section. Pasted. In code view every line of pasted section reads:
<p><span class="sgc-7"> content </span></p>

SO-- i tried to correct this - bad idea. the automatic document repair has now migrated this to ALL of the document!!!

<p> content <p> is what it was-

and there are other irregularities now on the title page:

even the blank lines show:

<p class="sgc-2 sgc-4 sgc-4"><span class="sgc-7"><br /></span></p>

<p class="sgc-2 sgc-4 sgc-4"><span class="sgc-7"><br /></span></p>

<p class="sgc-2 sgc-4 sgc-4"><span class="sgc-7"><br /></span></p>

<p class="sgc-2 sgc-4 sgc-4"><span class="sgc-7"><br /></span></p>

<p class="sgc-2 sgc-4 sgc-4"><span class="sgc-7"><br /></span></p>

<h1 class="sgc-2 sgc-5 sgc-5 sgc-5" id="sigil_toc_id_1"><span class="sgc-7">


can anyone help me get this back to a nice clean minimal code document.

every time i manual fix i do something wrong- then auto fix and the repetitive, unwanted come multiplies..

its killing me with TIME and now is in a downward spiral where ANY fix just doubles the problems.

heeyalp!?

any advice appreciated : )
ib1 is offline   Reply With Quote
Old 03-24-2013, 03:01 PM   #2
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
aslo-

what is this: � doing in there and how can i make it go?

and some :nbs&b thing?

find and replace only seems to continue the spiral with all of the above issues.
ib1 is offline   Reply With Quote
Old 03-24-2013, 03:52 PM   #3
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,200
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by ib1 View Post
aslo-

what is this: � doing in there and how can i make it go?

and some :nbs&b thing?

find and replace only seems to continue the spiral with all of the above issues.
The first is the fact that YOU used some character that is not supported by the codepage declared in your document.

&nbsp; is a valid, but not always wanted in the current context, type of space that does not allow the words to break or be padded (justify ON). Non-breaking space.


Seeing your other post, it appears you are mal-forming the code (rules as declared in the header), that tidy, then it attempts to fix.
theducks is offline   Reply With Quote
Old 03-24-2013, 04:11 PM   #4
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Can you post the epub here for us to look at? It would be a lot easier to help if we actually see the doc.
Turtle91 is offline   Reply With Quote
Old 03-24-2013, 04:17 PM   #5
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Quote:
Originally Posted by theducks View Post
The first is the fact that YOU used some character that is not supported by the codepage declared in your document.

&nbsp; is a valid, but not always wanted in the current context, type of space that does not allow the words to break or be padded (justify ON). Non-breaking space.


Seeing your other post, it appears you are mal-forming the code (rules as declared in the header), that tidy, then it attempts to fix.
sure. i understand whats happening- the question is how to repair it as find and replace is exacerbating the issues.

as i mentioned- i started with a clean document (the forum mebers here explained how to do this)

after pasting a section that had to be added.. from word, then notepad then to the sigil page.. this smal section had these extra command/comments preceeding each line of text.

in an attempt to correct i used find/replace to take these new elements back out..

this cleaned the small section back to totally clean HOWEVER when saving i was prompted with the autofix/ manual fix prompt.. failing to manual fix - i accepted the autofix which resulted in the duplication of the crapy code reappearing and being duplicated at every line of the entire document .

further inspection found &nbsp and other irregularities now spread through the document.. that was clean just a few clicks previous..

SO--- there is code- somewhere that can be corrected.

so the question is: can someone direct me to that repair answer?
ib1 is offline   Reply With Quote
Old 03-24-2013, 04:21 PM   #6
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Quote:
Originally Posted by ib1 View Post
so the question is: can someone direct me to that repair answer?
Not without being able to look at the document...

It's kind of hard to tell you where the error is when you are only telling us what you want the result to be.
Turtle91 is offline   Reply With Quote
Old 03-24-2013, 04:22 PM   #7
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
If you don't want to post it to a public forum, I understand. You can PM me if you wish and I will take a look at it.
Turtle91 is offline   Reply With Quote
Old 03-24-2013, 04:23 PM   #8
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Quote:
Originally Posted by Turtle91 View Post
Can you post the epub here for us to look at? It would be a lot easier to help if we actually see the doc.
absolutely-

thanks for helping : )

should i just post the:

<style type="text/css">
h2.sgc-7 {text-align: center; text-decoration: underline}
h4.sgc-6 {text-align: center;}
h1.sgc-5 {text-align: center;}
p.sgc-4 {text-align: center;}
div.sgc-3 {text-align: center;}
h5.sgc-2 {text-align: center;}
h2.sgc-1 {text-align: center;}
p {text-indent:1.1em;}
div {text-indent:1.1em;}

span.sgc-8 {text-indent: 1.1em;}

span.sgc-12 {text-decoration: underline; text-indent: 1.1em}

i.sgc-10 {text-indent: 1.1em;}

span.sgc-20 {text-decoration: underline}
h2.sgc-19 {font-style: italic; text-align: center; text-decoration: underline}
span.sgc-18 {text-align: center;}

h2.sgc-22 {font-style: italic; text-align: center}

h2.sgc-23 {font-style: normal; text-decoration: underline}

h3.sgc-27 {text-align: center;}
h3.sgc-26 {font-weight: bold; text-align: center}
</style>
</head>

and an example of every paragraph:

<p><span class="sgc-7">'I pee just like a woman.. Jesus.'</span></p>

or do we need more?
ib1 is offline   Reply With Quote
Old 03-24-2013, 04:27 PM   #9
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
previously the was no <span>
only <p> bookends.. now a <span> appears at the end of each line

??????????

does any of this give a clue to the issue? o wizards of the code?
ib1 is offline   Reply With Quote
Old 03-24-2013, 04:50 PM   #10
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,200
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
All this says is:
1) There is no CSS, you are using inline styles.

2) All those are Sigil styles, probably from the use of the styling buttons in BV.
2a) the Div and P styles are the ones inherited from the source. A bare minimal source.

3) there is nothing wrong, just the way you chose to create the styling.
theducks is offline   Reply With Quote
Old 03-24-2013, 05:05 PM   #11
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Quote:
Originally Posted by theducks View Post
All this says is:
1) There is no CSS, you are using inline styles.

2) All those are Sigil styles, probably from the use of the styling buttons in BV.
2a) the Div and P styles are the ones inherited from the source. A bare minimal source.

3) there is nothing wrong, just the way you chose to create the styling.

hmmm i loaded a basic style sheet. <style type="mainstyle">

but anyway- let me ask this then;

my perception of something wrong comes from the idea that clean means minimal code in the content. is this true?

further- if the document had only

<p>'I pee just like a woman.. Jesus.'</p>

but the same entry now shows

<p><span class="sgc-7">'I pee just like a woman.. Jesus.'</span></p>

isnt that wrong if the intent is to keep it clean?

i could have this all confused so- please feel free to explain the reality : )
ib1 is offline   Reply With Quote
Old 03-24-2013, 07:31 PM   #12
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Well...first off. <span class="sgc-7"> won't do anything because sgc-7 is only defined for h2 according to your css.

When I find useless spans surrounding every paragraph - and it happens more often than you would think - I just use a search and replace to delete them. in this case I would use:

search: <p><span class="sgc-7">(.*?)</span></p>
replace: <p>\1</p>

use regex and apply it to all html files

That will get rid of the span issue, but it doesn't address the error you said you were having about it automatically adding all that stuff in there in the first place.

As ducks mentioned, you are using inline styles. Personally I would prefer putting all the stuff you have between <style> </style> into a css file and then linking your document to that css file.

I also would clean all the extra sgc-# items off of the css styles...they aren't really necessary - or clean - but you would need to use F/R to clean the document before you delete them. Again, ducks mentioned that they probably come from you editing in the book view. I would recommend minimizing the amount of editing you do in book view...code view is much better and you can see exactly what is going on as you work.
Turtle91 is offline   Reply With Quote
Old 03-24-2013, 07:32 PM   #13
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,200
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
there is no span.sgc-7 declared
there is a h2.sgc7

This leads me to believe you changed a tag somehow

BTW if the above read just: .sgc-7 it would apply to all tags.

No external stylesheet has bee imported/declared

I will provide no further support as you have repeatedly refused to post a complete,validated sample.
theducks is offline   Reply With Quote
Old 03-24-2013, 08:01 PM   #14
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Quote:
Originally Posted by Turtle91 View Post
Well...first off. <span class="sgc-7"> won't do anything because sgc-7 is only defined for h2 according to your css.

When I find useless spans surrounding every paragraph - and it happens more often than you would think - I just use a search and replace to delete them. in this case I would use:

search: <p><span class="sgc-7">(.*?)</span></p>
replace: <p>\1</p>

use regex and apply it to all html files

That will get rid of the span issue, but it doesn't address the error you said you were having about it automatically adding all that stuff in there in the first place.

As ducks mentioned, you are using inline styles. Personally I would prefer putting all the stuff you have between <style> </style> into a css file and then linking your document to that css file.

I also would clean all the extra sgc-# items off of the css styles...they aren't really necessary - or clean - but you would need to use F/R to clean the document before you delete them. Again, ducks mentioned that they probably come from you editing in the book view. I would recommend minimizing the amount of editing you do in book view...code view is much better and you can see exactly what is going on as you work.
100% understood : )

many thanks for explaining- lots if good nuggets in there.

i will apply all of the above and get back
ib1 is offline   Reply With Quote
Old 03-24-2013, 08:30 PM   #15
ib1
noob
ib1 began at the beginning.
 
ib1's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2013
Device: nook. kindel
Quote:
Originally Posted by Turtle91 View Post
Well...first off. <span class="sgc-7"> won't do anything because sgc-7 is only defined for h2 according to your css.

When I find useless spans surrounding every paragraph - and it happens more often than you would think - I just use a search and replace to delete them. in this case I would use:

search: <p><span class="sgc-7">(.*?)</span></p>
replace: <p>\1</p>

use regex and apply it to all html files

That will get rid of the span issue, but it doesn't address the error you said you were having about it automatically adding all that stuff in there in the first place.

As ducks mentioned, you are using inline styles. Personally I would prefer putting all the stuff you have between <style> </style> into a css file and then linking your document to that css file.

I also would clean all the extra sgc-# items off of the css styles...they aren't really necessary - or clean - but you would need to use F/R to clean the document before you delete them. Again, ducks mentioned that they probably come from you editing in the book view. I would recommend minimizing the amount of editing you do in book view...code view is much better and you can see exactly what is going on as you work.


SOLVED! thank you.. after hours of butchering the book.. it only took your simple instructions to fix everything in minutes.

i did the F/R and that did the trick with all the extraneous code..
then the auto/manual error box led me to all the mysterious entries that appeared and i simply took them out one by one.
ALL CLEAN!

now working on your other clean up and stylesheet suggestions.. but jeeezas! thank you! death spiral averted!
ib1 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
I guess B&N is in their final death spiral taustin Barnes & Noble NOOK 30 04-19-2013 09:32 PM
B&N "death spiral"? BeccaPrice News 40 02-01-2013 03:25 PM
Spiral X - Paranormal Action for $.99 JJWestendarp Self-Promotions by Authors and Publishers 6 05-06-2011 10:02 PM
Easiest drm to circumvent echoleaf Workshop 23 02-08-2009 10:58 PM
iLiad Should we post everything we know even if iRex can circumvent us again? TadW iRex Developer's Corner 13 08-24-2006 05:31 AM


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


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