Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-14-2017, 03:03 PM   #1
oenopion
Member
oenopion began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2015
Device: Kindle, Nook, Android
FlightCrew Error in Sigil

Okay, two things.

First, I was trying to add a second paragraph style to an ebook that would allow the bulk (a novel) to run under "p style" with an indented paragraph, except for a "p.first" to start every chapter. I've formatted multiple books this way, without issue.

But, I wanted to add an interview in the back matter and format it typical to interviews, all with no indent, and a space between paragraphs. I created a p1 style for this, which worked fine, except for the &nbsp between paragraphs. For whatever reason, the p1 when applied, messed with the space between paragraphs and created one long paragraph out of everything.

As a work around, the &nbsp would work if I wrapped it in a regular p style, and with find/replace it seemed an easy fix. Until FlightCrew, which turned up the "Error schema not satisfied: no declaration found for element 'p1' near column 5' which corresponds to the start of every p1 paragraph.

Is there something I need to add to the style? And would that fix the &nbsp issue? I did try to increase the bottom margin in the p1 style but it didn't seem to register and do anything.

Also, the ebooks (both epub and mobi) are displaying fine, but I'd like to wipe the error code off the board, and fix the &nbsp as well.
oenopion is offline   Reply With Quote
Old 07-14-2017, 03:40 PM   #2
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Definitely the spacing should be handled by margin-top and margin-bottom. For example:

p.interview {
margin-top:0.5em;
margin-bottom:0.5em;
text-indent:0em;
text-align:justify;
}

In the text, <p class="interview">

If half a line isn't enough at beginning and end of the interview, you could create a interviewfirst class for the first para, with a 1 em top and bottom margin. Subsequent paragraphs would be 0 top and 1 em bottom.
Notjohn is offline   Reply With Quote
Old 07-14-2017, 03:50 PM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by oenopion View Post
[...] Until FlightCrew, which turned up the "Error schema not satisfied: no declaration found for element 'p1' near column 5' which corresponds to the start of every p1 paragraph.
That message is usually displayed for non-standard HTML tags. You most likely used something like:

Code:
<p1>Lorem ipsum</p1>
BTW, FlightCrew is outdated. You might want to check your book with the IDPF Validator.

Quote:
Originally Posted by oenopion View Post
And would that fix the &nbsp issue? I did try to increase the bottom margin in the p1 style but it didn't seem to register and do anything.
Your problem description is too vague. Please post the relevant HTML/CSS sections and screenshots that illustrate your problem.
Doitsu is offline   Reply With Quote
Old 07-14-2017, 04:23 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,948
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You'd be best off to install the epubcheck plugin for Sigil sand use epubcheck 4.0.2.

https://www.mobileread.com/forums/sh...d.php?t=248186
JSWolf is online now   Reply With Quote
Old 07-14-2017, 04:40 PM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,165
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Why not use a different style sheet for the interview in the back matter?
PeterT is offline   Reply With Quote
Old 07-14-2017, 07:31 PM   #6
oenopion
Member
oenopion began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2015
Device: Kindle, Nook, Android
Awesome! Thanks Notjohn for the code, worked like a charm. As Doitsu pointed out I did use the p1 like in his example. I was told it could work, but by someone who doesn't do ebooks. Now I know what to do.

Ran the book through IDPF Validator with no errors. And with FlightCrew being outdated, should I use the EpubCheck plugin instead? Or is the browser version enough?
oenopion is offline   Reply With Quote
Old 07-14-2017, 07:36 PM   #7
oenopion
Member
oenopion began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2015
Device: Kindle, Nook, Android
JSWolf, I was typing while you commented, so you read my mind. Thanks for the link, will check out the plugin.
PeterT, good idea. I'm new to anything beyond the stuff I have figured out, and hadn't thought of that. But it would probably be good practice to just link a new style sheet to any new formats like that.

Thanks again, everyone!
oenopion is offline   Reply With Quote
Old 07-24-2017, 09:03 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by oenopion View Post
Awesome! Thanks Notjohn for the code, worked like a charm. As Doitsu pointed out I did use the p1 like in his example. I was told it could work, but by someone who doesn't do ebooks. Now I know what to do.
No, you can't invent your own tags; all you can do is specify a style for the existing ones.
HarryT is offline   Reply With Quote
Old 07-24-2017, 02:31 PM   #9
Turtle91
A Hairy Wizard
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: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by PeterT View Post
Why not use a different style sheet for the interview in the back matter?
I find adding additional sheets can get confusing...especially if they are all named style1, style2, style3, etc. Which style sheet goes with which html file???

I prefer to keep everything on a single sheet. That makes sure there is consistency in the style naming conventions. It is very frustrating when I see <p class="somestyle4"> used on one html file, then the same style name is used on another html file to do something completely different.

BUT, I agree with the idea that you can simply create a new "section" of defined styles on the same style sheet. I use the <div> tag to define when there is a large number of lines affected. It keeps the code very clean and easily readable. Plus, the nature of CSS hierarchies ensures that the more specifically defined div elements will have the correct styling.

For example:

Code:
Instead of:
p.interview {margin:0.5em 0; text-indent:0; text-align:left}

<p class="interview">Some question</p>
<p class="interview">Some answer</p>
<p class="interview">Some question</p>
<p class="interview">Some answer</p>
<p class="interview">Some question</p>
<p class="interview">Some answer</p>
<p class="interview">Some question</p>
<p class="interview">Some answer</p>
...

I would use:
div.interview p {margin:0.5em 0; text-indent:0; text-align:left}

<div class="interview">
     <p>Some question</p>
     <p>Some answer</p>
     <p>Some question</p>
     <p>Some answer</p>
     <p>Some question</p>
     <p>Some answer</p>
     ...
</div>
In Sigil I set a "clip" that will automatically surround any text I have highlighted with the <div class="">...</div> tags at the click of a button. It is then very simple to add the class name for the particular style I want on those highlighted lines.

FWIW,

Last edited by Turtle91; 07-24-2017 at 02:44 PM.
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FlightCrew validation error stephenTOS Sigil 2 06-01-2017 01:20 AM
Sigil Error Message: Book File Would Not Open in Sigil fkustaa Sigil 5 03-18-2017 12:54 AM
Flightcrew error or bad coding? Turtle91 Sigil 23 01-30-2013 12:58 PM
Flightcrew validation error Jellby Sigil 6 09-01-2011 08:20 AM
Sigil 0.4.0 and FlightCrew 0.7.2 Released user_none Sigil 13 08-23-2011 02:18 PM


All times are GMT -4. The time now is 02:21 PM.


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