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 11-05-2014, 02:43 PM   #1
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 427
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Beautify and broken-up lines

In Sigil, if text is broken up over multiple lines in the html file but isn't actually a separate tag, the editor will condense it for you, so that

Code:
<p>I wrote
my text
like this</p>
becomes

Code:
<p>I wrote my text like this</p>.
It would be nice if Calibre's beautify feature could do this as well, so that I'd have one less thing I need to open Sigil to do.
Rand Brittain is offline   Reply With Quote
Old 11-05-2014, 09:54 PM   #2
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,337
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'd call that an anti-feature. What if you like your source code to have short lines? Or if your <p> tag has white-spacere set in the CSS. That would change the appearance of the rendered text. Beautify, unlike Sigil tries hard to ensure that changes it makes do not change too much, in particular the chance of changin the rendered appearance of text is very low.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-08-2014, 11:54 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)
I assume anyone using automated beautify features is not one of the people who prefers short lines. I do accept the reason that white-space:pre might be in play.

Could there be a setting or tweak to assume that white-space:pre is not used?
Or, this might be a bit of work to implement, and I am not sure of the performance impact, but you could also check the rendered CSS for its presence. (Live CSS already shows this?)
eschwartz is offline   Reply With Quote
Old 11-08-2014, 11:57 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,337
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It can go either way, there are people that prefer short lines and people that prefer long lines, leaving it upto the editor to wrap them.

Personally, I have no interest in joining/splitting text lines, patches are welcome.
kovidgoyal is offline   Reply With Quote
Old 11-20-2014, 02:38 AM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

Searching for and suppressing \n transforms the text in a huge bag of words, and then, using "Beautify" puts everything back magically in -good- order.

I did it sometimes, when the text in the code was too ragged for my taste. Use with care.

Last edited by roger64; 11-20-2014 at 02:44 AM.
roger64 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beautify feature BobC Editor 1 03-15-2014 09:24 AM
Dealing with bad formatting: "broken" lines inside paragraphs? MelBr Calibre 5 08-26-2013 12:10 AM
Screen showing lines and broken text riverdale iRiver Story 13 11-09-2010 08:54 AM
Collating broken lines alexxxm Sony Reader 11 01-06-2008 11:04 AM


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


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