Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2015, 09:45 PM   #1
Telyt
Member
Telyt began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2014
Location: Canada
Device: Samsung 7" Tablet SM-T210R
Element <y> not permitted anywhere...

HI. I have searched the forums, an found a few similar threads, but their solutions have not solved my problem.

I am writing a history of photograhy, and have hundreds of paragraphs much like this one...

<p><y>1614</y> An Italian chemist, Angelo Sala, notes that silver nitrate turns black when exposed to the sun, but he sees nothing significant in the change and does not ascribe it to the action of light.</p>

Which formats as:

1614 An Italian chemist, Angelo Sala, notes that silver nitrate turns black when exposed to the sun, but he sees nothing significant in the change and does not ascribe it to the action of light.

The CSS contains this code:

y {
font-style: normal;
font-weight: bold;
font-size: 1em;
font-family: Arial Black, sans-serif;
text-indent: 2em;
text-align: left;
}

The book is written with Calibre (ePub) and Caliber's "Check book" says it's fine. I can load the file into Sigil and check it with Flightcrew and it passes, without errors. I have uploaded the book to KOBO.com, and KOBO accepts it, as well. I've sold several copies and people have said they love it! So, where's the problem?

I'd like to sell through Smashwords, and so I've run it through ePubCheck, only to get hundreds of errors - one for every entry. "Element y is not allowed anywhere".

Please! What am I doing wrong?

Many thanks, for any and all help.

Telyt.

Last edited by Telyt; 02-02-2015 at 09:47 PM.
Telyt is offline   Reply With Quote
Old 02-02-2015, 09:58 PM   #2
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
<y>
Where (what standard) is this markup defined?

<span class="y">1963</span> might be a safer way
where you have a CSS .y { stuff }
theducks is offline   Reply With Quote
Advert
Old 02-02-2015, 10:00 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Because you made up
Code:
<y>
and it has absolutely no idea what one is...

This is not XML, you do not define your own elements.

The appropriate way to add styles to an arbitrary text fragment is through the use of
<span class="myclass">text goes here</span>
eschwartz is offline   Reply With Quote
Old 02-02-2015, 10:31 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Epubcheck loves to complain about hundreds of "problems" that aren't actually problems in real world usage. Unfortunately, if you want to sell through a vendor that uses epubcheck you have to jump through the epubcheck hoops, calibre will not do that automatically for you.

calibre will only produce epubcheck valid output if you give it epubcheck valid input. In this case simply replace <y> with <span class="y"> as the ducks told you. You should be able to do it fairly easily with the search and replace function in the editor.
kovidgoyal is offline   Reply With Quote
Old 02-03-2015, 07:36 PM   #5
Telyt
Member
Telyt began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2014
Location: Canada
Device: Samsung 7" Tablet SM-T210R
Thank you, all three of you!

The secret, for my simple mind, was the period, in front of the "y" in the naming of the CSS code, as provided by theducks. I tried it, and it works, perfectly.

And thank you, Kovigoyal, for a wonderful program for writing ebooks (as well as your kind advice!)

David (Telyt).
Telyt is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column Colors for "Text but with a fixed list of permitted values" Skeeve Calibre 5 04-03-2014 01:44 PM
Default Value for Custom Column (fixed set of permitted values) Andy P Calibre 1 06-21-2013 03:25 AM
Question about permitted colours in columns Victoria Library Management 3 01-21-2012 12:15 PM
Custom Column with list of permitted values Eugenie Library Management 1 01-10-2012 03:57 AM


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


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