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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2009, 05:16 AM   #1
Justice Strike
Enthusiast
Justice Strike began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
line breakup possible?

I am curious. Is it possible to give some sense of line break up in the epub format. For example, words knows how words end (with space) and even how words need to be broken up. I'm curious if it is possible to somehow to specify where words are broken up.

While this seems trivial... it's essential in asian languages. For example, the space in thai is used to signify the end of a sentence. For the reader however a sentence looks like a long word and if it's nearing the end of the page it needs some guidelines to know where it could be broken up correctly. BTW. The Sony ereader formats such books very weird. It just goes off page and you cannot see the words at all... anyone have a solution for this problem?
Justice Strike is offline   Reply With Quote
Old 09-17-2009, 06:30 AM   #2
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: 5,789
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
The best way would be using: space (& #32;), no-break space (& #160;), zero-width space (& #8203;), and zero-width no-break space (& #65279;) where needed, and hope the reading software supports them.

(no space between & and # above, by the way.)
Jellby is offline   Reply With Quote
Old 09-17-2009, 09:32 AM   #3
Justice Strike
Enthusiast
Justice Strike began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
thank you i've found some other tags besides the one you gave me. I did a little test.

<wbr> ==> does not work

& #8203; ==> does work but shows a ? on the place where this is inserted

& shy; ==> does not work, and ends the document.


i tried some other things... mainly using <wbr> now my prs600 has crashed
Justice Strike is offline   Reply With Quote
Old 09-17-2009, 11:08 AM   #4
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: 5,789
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
I don't think <wbr> is supported by the ePUB spec at all.

& shy; could work, but it gives (if implemented correctly) a hyphen at the end of broken lines, which you probably don't want in Asian scripts.

& #8203; giving a ? is probably a problem of the default font, try one of these fonts.

Last edited by Jellby; 09-17-2009 at 12:27 PM.
Jellby is offline   Reply With Quote
Old 09-17-2009, 11:12 AM   #5
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: 29,256
Karma: 83706578
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
I don't know if this would work (I haven't tried it), but perhaps just enclosing parts of the sentence in <span>...</span> would be enough to allow/encourage line breaks between the spans rather than within spans?

Quote:
Originally Posted by Justice Strike View Post
For the reader however a sentence looks like a long word and if it's nearing the end of the page it needs some guidelines to know where it could be broken up correctly.
pdurrant is offline   Reply With Quote
Old 09-17-2009, 11:17 AM   #6
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Does the CSS style

white-space: nowrap

works in ePubs? I just don't know how far thought would go towards solving your problems, though...

Last edited by frabjous; 09-17-2009 at 11:22 AM.
frabjous is offline   Reply With Quote
Old 09-17-2009, 12:19 PM   #7
Justice Strike
Enthusiast
Justice Strike began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
Quote:
Originally Posted by Jellby View Post
I don't think <wbr> is supported by the ePUB spec at all.

* could work, but it gives (if implemented correctly) a hyphen at the end of broken lines, which you probably don't want in Asian scripts.

& #8203; giving a ? is probably a problem of the default font, try one of these fonts.
if implemented correctly <wbr> should not show a hyphen. & shy; should however show a hyphen... but the implementation is flawed, and it is adviced not to use it.

As for not able to support the & #8203... the font being used is an asian font... perhaps i should define multiple fonts and only use a different font when i want to use the zero width character.... however it's a problem which is also seen in some webbrowsers so i'm not totally convinced it's just the font.

Last edited by Justice Strike; 09-17-2009 at 12:24 PM.
Justice Strike is offline   Reply With Quote
Old 09-17-2009, 12:32 PM   #8
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: 5,789
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Quote:
Originally Posted by Justice Strike View Post
if implemented correctly <wbr> should not show a hyphen. & shy; should however show a hyphen... but the implementation is flawed, and it is adviced not to use it.
Sorry, I meant that & shy; could work but would show a hyphen (I've corrected the message now). As I said, <wbr> does not seem to be supported in ePUB, so don't use it, it's not a problem of implementation, but of the format specification.
Jellby is offline   Reply With Quote
Old 09-17-2009, 05:59 PM   #9
Justice Strike
Enthusiast
Justice Strike began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
the & #8203; seems to work... in latin text... haven't tried it with thai though, i wouldn't know why it shouldn't work so i have good hopes

Now a automatic way of reformating thai text is needed but i think that's manageable.
Justice Strike is offline   Reply With Quote
Old 09-18-2009, 07:15 AM   #10
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: 5,789
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
In Thai, would you need to insert & #8203; between every two characters (is a line break permitted everywhere)? If that's the case, I believe that's only a workaround, and ePUB renderers should at some point suport proper linebreaking algorithms for different languages (especially if the rules are as simple as "break anywhere").
Jellby is offline   Reply With Quote
Old 09-18-2009, 08:17 AM   #11
Justice Strike
Enthusiast
Justice Strike began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Sep 2009
Device: psr600
Quote:
Originally Posted by Jellby View Post
In Thai, would you need to insert & #8203; between every two characters (is a line break permitted everywhere)? If that's the case, I believe that's only a workaround, and ePUB renderers should at some point suport proper linebreaking algorithms for different languages (especially if the rules are as simple as "break anywhere").
i think you are correct. I was going to implement a line breaking algorithm though... to line break correctly for that language...
Justice Strike 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
Get in line for Kindle 3 Bander Amazon Kindle 105 08-07-2010 09:30 PM
Line spacing Ivo Kobo Reader 3 06-30-2010 12:54 PM
I'm in line Tangabird Introduce Yourself 4 11-12-2009 08:13 AM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM
Line on the screen jpchan Sony Reader 13 09-12-2007 02:39 PM


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


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