Thread: Page breaks
View Single Post
Old 05-31-2009, 08:44 AM   #11
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by ldolse View Post
The tags appeared to be in pretty bad shape. Note that epub requires xhtml, which requires every tag opened to be neatly closed to form proper xml. Calibre will attempt to convert html to xhtml, but that process is error prone and its' effectiveness is pretty dependent on the source material.

For this file, I did the following:
Replaced '<br><br>' with '</p><p>'
Cleaned up all the remaing single <br>, <p>, and </p> tags. There were a lot of places where a paragaph began with <p> but wasn't terminated with </p>, in many other cases there were many </p> tags where the preceding beginning of the paragraph was <br> instead of <p>.

The last issue, which I didn't notice until I sent the book to my reader, is that every paragraph immediately following an <h1> tag wasn't enclosed in <p></p> tags, which apparently makes it invisible on the reader.

Basically every paragraph should start with <p> and end with </p>.
<br> is not considered a good tag to use, but I believe if you just want a line break you can make it a self closing <br/> and that is acceptable for xhtml.

Seems to work fine with these changes on my Sony, but I didn't go through every page in detail.
Thanks. Funny how the reader doesn't recognize <h1> tags outside of <p> tags.

I didn't think the HTML was that bad, but I had copied it from the source of a website, and I didn't feel like going through the whole thing.

Hey, do you think you could upload the HTML file for me?

Thanks for the help.

Last edited by enarchay; 05-31-2009 at 09:10 AM.
enarchay is offline   Reply With Quote