Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2010, 02:24 PM   #1
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,389
Karma: 4115574
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
Need help formatting HTML for good conversion

I had some HTML that I thought was perfect (converted from eReader, gone through and stripped of all code, saved with text editor etc) and they display fine on all my devices except a Libre I am testing. There are no line breaks in the mobipocket files on the Libre where there were on the Kindle. Someone told me I might not have used the right code. I have been finding that epub and a few other supported formats are showing up fine on the Libre using the same batch of files as my base for conversion, so short-term, the problem is solved. But I really don't want to be dealing with further issues every time I use a new device, so I am interested in getting my source files as clean as possible.

Even in the files which are now displaying better as epub, there is a problem with double line breaks not showing up. So I am wondering if the problem is mobi, or Calibre, or whomever not recognizing double line breaks. My document is plain text and what I had been doing was using Text Wrangler to replace the extraneous line breaks with double line breaks <br><br> If I do a find and replace and replace every <br><br> with </p><p> (to end the current paragraph and then start a new one) will that solve all my problems? If I have plain text with only these formatting marks, will I at last have clean HTML that will convert to anything?
ficbot is offline   Reply With Quote
Old 04-15-2010, 09:17 PM   #2
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,389
Karma: 4115574
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
Anybody?
ficbot is offline   Reply With Quote
Old 04-15-2010, 09:36 PM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
Well, the line-breaks should be terminated (<br/>) as epub files are xhtml. Maybe that's your issue - just replace them all with terminated tags, which should also be compatible with html. Also, if there's no text in a block after a <br/> then the break will be ignored, so if you want to insert an extra line after a paragraph you need to do something like
Code:
<p>text text text<br />&nbsp;</p>
In general, I prefer to mark up extra line-breaks using css instead, which also allows you to set the following paragraph flush, such as:
Code:
css - 
.normal_paragraph {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1em;
}
.space_above {
  margin-top: 1.2em;
  margin-bottom: 0;
  text-indent: 0;
}

body - 
<p class="normal_paragraph">preceding section text</p>
<p class="space_above">New paragraph with one blank line above</p>
This is generally more robust and flexible than using <br/> tags.
charleski is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML formatting MarcusStringer ePub 17 04-06-2010 11:23 AM
html2mobi - html formatting brunovg Kindle Formats 2 12-13-2009 05:56 AM
HTML formatting john folkard Calibre 1 08-18-2009 10:15 AM
html formatting question Nate the great Workshop 49 07-17-2009 10:33 AM
Formatting a pdf or html..... tmastern Sony Reader 3 12-12-2006 03:41 PM


All times are GMT -4. The time now is 03:16 PM.


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