Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-07-2009, 04:25 AM   #1
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Sigil Inserting hard line wraps at ~100 characters

I noticed this earlier, but hadn't really quantified it. Sigil is inserting hard line breaks into content so that no line can go beyond the 100 character mark.

Needless to say this isn't particularly desirable even if it's invisible in the final output. Worst impact I've stumbled upon is that when search and replace is added this is going to break some intended searches. I just discovered this the hard way when I copied some code from Sigil into a standard text editor to do a quick regex find/replace - the hard line wraps created a number of situations where my regex no longer matched.
ldolse is offline   Reply With Quote
Old 08-07-2009, 04:39 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Clarification - apparently the hard wraps are only inserted when opening an HTML source file. Not sure under what other situations they are inserted. Sigil seems fully capable of supporting long lines otherwise.
ldolse is offline   Reply With Quote
Old 08-07-2009, 05:02 AM   #3
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,496
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by ldolse View Post
Clarification - apparently the hard wraps are only inserted when opening an HTML source file. Not sure under what other situations they are inserted. Sigil seems fully capable of supporting long lines otherwise.
I'm sure Valloric would say, please open an issue and attatch a sample HTML source file that shows this problem.
pdurrant is offline   Reply With Quote
Old 08-07-2009, 07:51 AM   #4
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by ldolse View Post
I noticed this earlier, but hadn't really quantified it. Sigil is inserting hard line breaks into content so that no line can go beyond the 100 character mark.

Needless to say this isn't particularly desirable even if it's invisible in the final output. Worst impact I've stumbled upon is that when search and replace is added this is going to break some intended searches. I just discovered this the hard way when I copied some code from Sigil into a standard text editor to do a quick regex find/replace - the hard line wraps created a number of situations where my regex no longer matched.
During development of Sigil, I noticed that editing in Code View with a really large document loaded was somewhat painful. Performance suffered because of automatic line wrapping. Wrapping a 5000 line document live, while the user is typing, is very CPU-intensive. I planed on addressing this issue at a later time after I analysed possible solutions. But honestly I don't think there's a good way of doing this that would please everyone.

Hard line breaks were the solution. Back then at least. You could edit in large docs even on lower end computers, which is important. As I've said, I'll look into adding some sort of fast wrapping, but I doubt it will be possible.

You'll probably just get an option to switch from line wrapping to hard line breaks.

Quote:
Originally Posted by pdurrant View Post
I'm sure Valloric would say, please open an issue and attatch a sample HTML source file that shows this problem.
Thanks for this.

And pdurrant is right: create an issue for this. No need to attach a source file since this is not a bug but a design decision.
Valloric is offline   Reply With Quote
Old 08-07-2009, 09:50 AM   #5
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I had a hunch it might be a design decision. I guess that reasoning makes sense, note the option I'd prefer is just to not wrap lines at all. Disabling wrapping completely is usually the first preference I enable in my editors.

It should be possible to make wrapping less intensive, I know a lot of editors I use don't seem to have problems, even with really large documents.

I'll open a case.
ldolse is offline   Reply With Quote
Old 08-07-2009, 10:04 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
It's probably safest to add linebreaks after block elements (<p>, <hX>...), then soft-wrap the contents.
Jellby is offline   Reply With Quote
Old 08-07-2009, 11:00 AM   #7
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by Jellby View Post
It's probably safest to add linebreaks after block elements (<p>, <hX>...), then soft-wrap the contents.
This was what the first implementation looked like. As I said, it was slow on old hardware.
Valloric is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing hard line endings Mostly Math Calibre 2 06-01-2010 11:18 PM
Sigil 1.6 - deleting blank line very slow lol Sigil 2 12-24-2009 11:54 AM
Unwrapping hard line breaks across all input formats ldolse Calibre 17 05-10-2009 11:31 PM
Digitimes wraps up electronic paper TadW News 1 07-21-2007 09:35 AM
PRS-500 BD suggestion - line spacing under 100% pitolee Sony Reader Dev Corner 0 05-30-2007 04:50 AM


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


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