Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-06-2015, 09:43 AM   #1
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
Unhappy Errors Galore! Validator

I have searched through the site in hopes of finding something similar to my problem and I have but just not my exact type of error, and what I did read I did not know how to apply it so here is my first of many errors.

attribute 'align' is not declared for element 'p'

Code:
 <p align="center"><b>INTRODUCTION</b></p>
It seems like its not understanding the <p> tag, isn't that basic code? Alos there is not just one of these errors but hundreds like....

attribute 'align' is not declared for element 'img'
attribute 'border' is not declared for element 'img'
attribute 'border' is not declared for element 'img'

Code:
<p align="center"><img align="bottom" alt="" border="1%" height="0" id="image003" src="../Images/line.jpg" width="80%" /></p>


no declaration found for element 'u'

Code:
 <h2 id="chapter01" style="text-align: center;"><u>PART ONE</u></h2>

Under each error is the corresponding code. The second code has three
oiver55 is offline   Reply With Quote
Old 04-06-2015, 10:22 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's not the p tag it's barking about, it's the 'align' attribute. In all the examples you listed (with exception of the last one), it's those attributes that are invalid for the xhtml requirements of the epub.

The align="xxxx" either needs to be moved to CSS (either inline or external) using the text-align property. Or if you insist on styling within the tag itself, you'll have to use something like:
Code:
<p style="text-align:center;">Text to be centered</p>
The u tag is not valid in xhtml. Though I know of no reading system that won't render the u tag, the "proper" way to underline text in xhtml is to apply the text-decoration style attribute to an element--commonly the span tag. As above, you can do so through CSS or inline styling.
In the css file:
Code:
span.underlined { text-decoration: underline; }
And in the xhtml:
Code:
<p>Some text needs to be <span class="underlined">underlined</span>.</p>
or

Code:
<p>Some text needs to be <span style="text-decoration:underline;">underlined</span>.</p>

Last edited by DiapDealer; 04-06-2015 at 10:24 AM.
DiapDealer is online now   Reply With Quote
Advert
Old 04-06-2015, 10:24 AM   #3
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: 79,174
Karma: 144286760
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
When validating your ePub, don't use FlightCrew (if that's what you've used). Use epubcheck as FlightCrew misses too many errors that epubcheck gets.
JSWolf is offline   Reply With Quote
Old 04-06-2015, 10:29 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
When validating your ePub, don't use FlightCrew (if that's what you've used). Use epubcheck as FlightCrew misses too many errors that epubcheck gets.
Which answers actually zero of the questions that the poster actually asked. The validator used has absolutely no bearing whatsoever in this particular instance. Bringing it up only adds to the OP's confusion.
DiapDealer is online now   Reply With Quote
Old 04-06-2015, 10:36 AM   #5
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
Thanks.
Lol and I used FlightCrew and I have enough errors already as it is.

When you say the align="xxxx" needs be moved inline or externally to the CSS, what does that mean exactly?


You also mention "styling within the tag itself" doesn't the CSS take care of all the styling? Like the way I understood it to be was that the CSS is where you set all the styles for the way the text should appear.

Here is my CSS just to give you more insight

Code:
p {
margin-top:0.0em;
margin-bottom:0.0em;
text-indent:1.5em;
text-align:justify;
}

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

p.left {
margin-top:0.5em;
margin-bottom: 0.0em;
text-indent:0.0em;
text-align:left;
}

p.center {
margin-top:0.0em;
margin-bottom:0.25em;
text-indent:0.0em;
text-align:center;
}

h2 {
margin-top:1em;
font-size: 150%;
text-indent: 0em;
font-style: italic;
text-align:center;
}

h3 {
margin-top:1em;
font-size: 125%;
text-indent: 0em;
text-align:center;
}

h4 {
margin-top:1em;
font-size: 125%;
text-indent: 0em;
text-align:left;
}

p.large {
font-weight: bold;
margin-top:1em;
margin-bottom:1em;
font-size: 200%;
font-style: italic;
text-indent: 0em;
text-align:center;
}

p.medium {
font-weight: bold;
font-size: 150%;
font-style: italic;
margin-top:1.0em;
margin-bottom:1.0em;
text-indent: 0em;
text-align:center;
}

p.small {
font-weight: bold;
margin-bottom:1em;
font-size: 125%;
text-indent: 0em;
text-align:center;
}

p.block {
font-family: courier, monospace;
text-indent: 1em;
text-align:left;
margin:0em 0em 0em 1em;
}

p.blockfirst {
font-family: courier, monospace;
text-indent: 1em;
text-align:left;
margin:0.5em 0em 0em 1em;
}

p.blockcenter {
font-family: courier, monospace;
text-align:center;
margin:0.5em 0em 0em 1em;
}

span.smallcap {
font-size: 90%;
font-weight: bold;
}

div.image {
text-align:center;
margin-bottom: 0.25em;
}

div.icon {
text-align:center;
margin-bottom: 1em;
}

div.caption {
margin-bottom: 1em;
text-align:center;
font-style:italic;
}
oiver55 is offline   Reply With Quote
Advert
Old 04-06-2015, 10:42 AM   #6
theducks
Well trained by Cats
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: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You have already have a class: p.centered . Why did you not use it?
<p class="centered"> instead of what you did
theducks is offline   Reply With Quote
Old 04-06-2015, 10:43 AM   #7
readx
Connoisseur
readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.readx 's ceiling is 100% spider-free.
 
Posts: 86
Karma: 118402
Join Date: Jul 2009
Device: Cybook Gen3
Quote:
Originally Posted by DiapDealer View Post
The u tag is not valid in xhtml.
Why do I get the u tag, if I use the underline function within sigil?
If the u tag ist not valid, shouldn't there be a "spec conform" implementation avaliable, like you described it
readx is offline   Reply With Quote
Old 04-06-2015, 10:49 AM   #8
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
Okay I know what happened, the inevitable, I ran my doc through a code cleaner and have just been copying and pasting all the way through to the end disregarding my css.
oiver55 is offline   Reply With Quote
Old 04-06-2015, 11:54 AM   #9
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: 79,174
Karma: 144286760
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DiapDealer View Post
Which answers actually zero of the questions that the poster actually asked. The validator used has absolutely no bearing whatsoever in this particular instance. Bringing it up only adds to the OP's confusion.
I know it doesn't help with the existing errors, but it might find more errors that will need to be fixed.
JSWolf is offline   Reply With Quote
Old 04-06-2015, 01:24 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by readx View Post
Why do I get the u tag, if I use the underline function within sigil?
If the u tag ist not valid, shouldn't there be a "spec conform" implementation avaliable, like you described it
I don't know, and care very little. Concessions for providing wysiwys editing, maybe? Chasing specs and validator approval isn't really my cup of tea. Ask how to make the error go away, and I'll answer. That's why I mentioned that I know of no reading system that doesn't honor the u tag. You could always just live with the error; safe in the knowledge that its going to work regardless

@O.P.
As theducks said: if you already had css for centered text, then you should use that class where you want your text centered, and remove the align="center" attributes to make the "align not declared for element p" errors go away.

Quote:
Originally Posted by oiver55 View Post
Like the way I understood it to be was that the CSS is where you set all the styles for the way the text should appear.
It CAN be. And it's often the most efficient and quickly modifiable way to do it. But if you have your css already set up to format your text the way you want it, then why do you also have align="center" in your (x)html?

Last edited by DiapDealer; 04-06-2015 at 01:50 PM.
DiapDealer is online now   Reply With Quote
Old 04-07-2015, 05:53 AM   #11
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,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Oliver, your basic problem is piling in-line styles on top of the style sheet. See Diap's first reply for the way out of the wilderness. Instead of

<p align="center"><b>INTRODUCTION</b></p>

You can use

<p class="center"><b>INTRODUCTION</b></p>

and get the exact result you are seeking. p class calls upon the appropriate paragraph style in the style sheet.

However, I probably would have used:

<h2>Introduction</h2>

instead. If you refer to the style sheet, you'll see that that would yield a centered and italicized (and effectively boldfaced) heading half again as large as the body text, which IMHO is more desirable than all caps. Or if you want a smaller heading, you could substitute h3.

Last edited by Notjohn; 04-07-2015 at 05:56 AM.
Notjohn is offline   Reply With Quote
Old 04-07-2015, 06:56 AM   #12
theducks
Well trained by Cats
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: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
There is a second advantage to using: <h2 class="optional">Introduction</h2>

Sigils TOC generator uses H# (the # is the relative nesting level)

The class is optional. It can be used to set spacing, colors or font size & face

Unlearn using H#'s just for size, re-style as needed
theducks is offline   Reply With Quote
Old 04-07-2015, 10:04 AM   #13
oiver55
Enthusiast
oiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windowsoiver55 format shifts faster than booting Windows
 
Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
I have done as thou has commanded.

I put this code in
Code:
  <p class="center"><b>INTRODUCTION</b></p>
And when I switch to book View mode the text is aligned to the left but when I now select the text and click on the center button, its centered and the code looks like this

Code:
 <p class="center" style="text-align: center;"><b>INTRODUCTION</b></p>
Before, that style tag wasn't there. I had the expectation that p class="center" would actually center the text but it seems like the style tag is whats actually doing it

To give more insight:
http://postimg.org/image/bkyw7tm7t/
http://postimg.org/image/f5urr1qrd/



http://postimg.org/image/l48l1a9q1/
http://postimg.org/image/nkaef4rsp/
oiver55 is offline   Reply With Quote
Old 04-07-2015, 10:45 AM   #14
theducks
Well trained by Cats
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: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You can call a class anything (there are some allowed character rules)
class="fred"

.fred {text-align: right; } /* fred is a right winger */

some publishers use short names
.CN chapter Number
.CT chapter Title
.CO or .FP first paragraph
theducks is offline   Reply With Quote
Old 04-07-2015, 10:47 AM   #15
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.
 
Posts: 13,309
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I think you need to get a basic understanding of HTML and CSS.

Take a read through Pablo's My Quick and Dirty ePub Tutorial. (While it covers an older version of Sigil, the basics are still applicable).
PeterT is offline   Reply With Quote
Reply

Tags
proofread, validator error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clean conversion BUT many errors in Epub Validator Peerie Conversion 3 12-29-2014 08:28 PM
Epub Validator Errors for iBooks Producer tcorsonk ePub 0 06-11-2014 05:10 PM
Problems galore inkedchick Kobo Tablets 5 09-14-2012 02:32 AM
Nexus galore afv011 Android Devices 2 05-15-2012 10:51 PM
Unutterably Silly Time of the Season (Rabbits Galore) RWood Lounge 125 04-02-2010 04:13 PM


All times are GMT -4. The time now is 08:48 PM.


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