Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2011, 06:59 PM   #1
Giselleco
Junior Member
Giselleco began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2011
Device: Sony
HTML code in epub book

Hello,
I just got a new Kobo Touch and I've got a few ePub books that show up with the HTML code every few pages. An example of the code: "@namespace h "http://www.w3.org/1999/xhtml"; .bold { font-weight: bold } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { display: block } .calibre10 { text-decoration: underline } .calibre11 "

Which goes on for about 4-5 pages on the Kobo. I use calibre. Any idea how to remove that?

Thanks.
Giselleco is offline   Reply With Quote
Old 07-25-2011, 08:55 PM   #2
jackastor
Wizard
jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.jackastor ought to be getting tired of karma fortunes by now.
 
jackastor's Avatar
 
Posts: 1,847
Karma: 3212428
Join Date: Jun 2011
Device: iphone stanza, kobo touch,ASUS TF300,KOBO GLO, Kobo Aura HD, Kobo Mini
Quote:
Originally Posted by Giselleco View Post
Hello,
I just got a new Kobo Touch and I've got a few ePub books that show up with the HTML code every few pages. An example of the code: "@namespace h "http://www.w3.org/1999/xhtml"; .bold { font-weight: bold } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { display: block } .calibre10 { text-decoration: underline } .calibre11 "

Which goes on for about 4-5 pages on the Kobo. I use calibre. Any idea how to remove that?

Thanks.
No but if you post it in the calibre forum you may get a faster response.

But then thats your call.. Sooner or later someone will have an answer for you !
jackastor is offline   Reply With Quote
Advert
Old 07-26-2011, 12:16 PM   #3
jswinden
Nameless Being
 
Quote:
Originally Posted by Giselleco View Post
Hello,
I just got a new Kobo Touch and I've got a few ePub books that show up with the HTML code every few pages. An example of the code: "@namespace h "http://www.w3.org/1999/xhtml"; .bold { font-weight: bold } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { display: block } .calibre10 { text-decoration: underline } .calibre11 "

Which goes on for about 4-5 pages on the Kobo. I use calibre. Any idea how to remove that?

Thanks.
That appears to be sloppy HTML coding. HTML is a markup language that requires uses tags around text to define that text. Many tags have a begiining tag and an ending tag. My guess is that a begiining tag was used without an ending tag, or vice versa, which confused the conversion program and thus it interpreted the HTML code as though it was part of the readable text. In your case it looks like the <HEAD> </HEAD> and/or <STYLE> </STYLE> tags near the top of the HTML files got messed up.

It is quite possible that a typo was introduced in one file then managed to get copy and pasted into other files by the creator of the files. Probably an easy fix.

Last edited by jswinden; 07-26-2011 at 12:18 PM.
  Reply With Quote
Old 07-26-2011, 12:47 PM   #4
Feisty
Book Nerd Extraordinaire
Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.Feisty knows the square root of minus one.
 
Feisty's Avatar
 
Posts: 21
Karma: 7940
Join Date: Jun 2010
Location: Canada
Device: Kobo Original and Kobo Touch
Quote:
Originally Posted by jswinden View Post
That appears to be sloppy HTML coding. HTML is a markup language that requires uses tags around text to define that text. Many tags have a begiining tag and an ending tag. My guess is that a begiining tag was used without an ending tag, or vice versa, which confused the conversion program and thus it interpreted the HTML code as though it was part of the readable text. In your case it looks like the <HEAD> </HEAD> and/or <STYLE> </STYLE> tags near the top of the HTML files got messed up.

It is quite possible that a typo was introduced in one file then managed to get copy and pasted into other files by the creator of the files. Probably an easy fix.
I've had this exact same problem. A few times I've successfully used the "Find/Replace" function in Calibre to identify the offending sections and remove them, but this has only been successful in cases where each HTML section is exactly the same.

You suggest there is an easy fix, could you elaborate? I'm non-code fluent I'm afraid but I'd love to get rid of those huge annoying bits of gobbly-gook!

Thanks!
Feisty is offline   Reply With Quote
Old 07-26-2011, 01:33 PM   #5
jswinden
Nameless Being
 
If, as I suspect, it is a simple typo then there is probably a tag that was entered incorrectly or left out. That would be a simple fix. If you can look at the HTML, then search for the part that is being incorrectly displayed and verify the opening and closing tags match. If you cannot figure it out, then post the file with instructions about which part is displaying incorrectly and I will see if I can find the problem.
  Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub code snippets (html / css) zelda_pinwheel ePub 196 10-09-2016 04:21 AM
direkter Umlaut oder lieber HTML Code in Epub ? NASCARaddicted Erste Hilfe 14 06-16-2011 05:54 AM
HTML to epub displays munged source code haven Conversion 4 03-10-2011 10:08 PM
ebook-convert HTML to EPUB and problem with <pre><code> mikegr Calibre 2 03-09-2010 02:27 PM
HTML Book + non HTML TOC to epub aarcane Calibre 4 03-02-2010 02:58 AM


All times are GMT -4. The time now is 12:14 AM.


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