Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-01-2011, 11:11 AM   #1
therealjoeblow
Zealot
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro Reader
Line breaks with no style

I have some html files with simple unformatted line breaks, ie

Code:
<br>
When I convert them with calibre, it puts a formatted break in front of the break, ie

Code:
<br class="calibre1"><br>
I don't want it to do that, as it effectively gives me a full line blank space in between the 2 lines where the break occurs, I just want it to retain the simple line break.

Is there a config option to disable this?

thanks
The REAL Joe
therealjoeblow is offline   Reply With Quote
Old 11-01-2011, 03:45 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: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by therealjoeblow View Post
I have some html files with simple unformatted line breaks, ie

Code:
<br>
When I convert them with calibre, it puts a formatted break in front of the break, ie

Code:
<br class="calibre1"><br>
I don't want it to do that, as it effectively gives me a full line blank space in between the 2 lines where the break occurs, I just want it to retain the simple line break.

Is there a config option to disable this?

thanks
The REAL Joe
Both breaks in your example are non conforming code wise.
<br /> is the accepted form
(NB I have never seen Calibre insert without the (space)/> )
theducks is offline   Reply With Quote
Old 11-01-2011, 04:15 PM   #3
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Using very oldschool html is never going to be without issues.

I've never seen Calibre use un-self-closing <br> tags, however it makes me think that your text is not in paragraphs/divs?

If that is the case, it may be a better idea to encapsulate them first - after all these pagebreaks sound like you are using them to create paragraphs in the first place.
Serpentine is offline   Reply With Quote
Old 11-01-2011, 10:57 PM   #4
therealjoeblow
Zealot
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro Reader
Quote:
Originally Posted by Serpentine View Post
Using very oldschool html is never going to be without issues.

I've never seen Calibre use un-self-closing <br> tags, however it makes me think that your text is not in paragraphs/divs?

If that is the case, it may be a better idea to encapsulate them first - after all these pagebreaks sound like you are using them to create paragraphs in the first place.

No, they're all in proper paragraphs with proper classes and style sheets. I just get lazy sometimes and use <br> to add an extra line or 2 here and there, or to break things like quoted passages, eg

Code:
<p class="indentedquote">This is some quoted passage,
<br>This is the next line in the quote,
<br>and yet another line,
<br>and the final line in the quote.</p>
Another example is where the dedication starts exactly at the top of the page because it was formatted with the same style class as normal text and not with it's own specific class with a large top margin; and I want it to start a few lines down. I could figure out what class it is, edit that class, or create a new one. Or I can just add <br><br><br><br> in front of it and be done with it.

It's very fast and easy to format misc things like this, although, yes, I know it's taking shortcuts from the perfect world.

Cheers
The REAL Joe
therealjoeblow is offline   Reply With Quote
Old 11-01-2011, 11:38 PM   #5
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Yeah fair enough - I'd just been converting some stuff which was using br's for paragraph ends and it came to mind!, I'd still convert them to <br /> and see if it still doubles them.
Serpentine is offline   Reply With Quote
Old 11-01-2011, 11:51 PM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
I may be far off base with my limited knowledge of HTML but I'm going to take a stab at this anyways.

Quote:
Originally Posted by therealjoeblow View Post
I don't want it to do that, as it effectively gives me a full line blank space in between the 2 lines where the break occurs, I just want it to retain the simple line break.

Is there a config option to disable this?
No, calibre is converting what you give it. There is an unseen line break after every comma that calibre properly replaces with the functional equivalent of
<br class="calibre1" /> (notice the self-closing / these aren't optional) and leaves your improper tag of <br> in place unaltered.

First, you should be using <br /> not <br>

Quote:
Originally Posted by therealjoeblow View Post
Code:
<p class="indentedquote">This is some quoted passage,
<br>This is the next line in the quote,
<br>and yet another line,
<br>and the final line in the quote.</p>
Second the above is incorrect it should be the following.

Quote:
Originally Posted by therealjoeblow View Post
Code:
<p class="indentedquote">This is some quoted passage,<br />
This is the next line in the quote, <br />
and yet another line,<br />
and the final line in the quote.</p>
What happens is you convert it this way.

I'm also curious what format are you converting from/to?

Last edited by DoctorOhh; 11-01-2011 at 11:55 PM.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird line breaks on Kindle?!? echthemoderate Kindle Formats 0 06-14-2011 10:44 PM
HTML to TXT and line breaks vbdasc Calibre 6 12-04-2010 11:40 AM
Spurious Line Breaks Halk Workshop 1 05-15-2010 01:22 PM
CSS for line breaks after dashes? JaneFancher Sigil 4 04-05-2010 12:18 PM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM


All times are GMT -4. The time now is 02:24 PM.


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