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 08-17-2012, 01:47 PM   #1
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Long words running off page

I just noticed that on the Sony Reader and ADE, words that are longer than the line just run off the page. I'm accustomed to the Kindle where long words are broken and run on to the next line.

Is there something I could be putting in the CSS to tell the reading device to go ahead and break a word if it is too long for the line?

I'm not interested in inserting special characters in these long words.

I realize that the Kindle's method of just chopping at the end of the line is a little crude, but not displaying the text at all as ADE does seems unacceptable.
BKh is offline   Reply With Quote
Old 08-17-2012, 03:24 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,866
Karma: 2714881
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
There is something wrong in your stylesheet. I suspect there is a 'pre' value there. There was an mention about that about a week ago.
Toxaris is offline   Reply With Quote
Old 08-17-2012, 03:48 PM   #3
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Oh, I should have included my stylesheet. Sorry. But I don't use any pre tags.

Here is the css specificially for the text in question.

Code:
.bodytext {
    border-bottom: 0;
    border-top: 0;
    font-size: 1em;
    margin-bottom: 0em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: 1em
    }
Here is the whole style sheet.

Code:
@namespace h "http://www.w3.org/1999/xhtml";

@font-face {
font-family : Verajja;
font-weight : normal;
font-style: normal;
src : url('../Fonts/Verajjan.ttf');
}
@font-face {
font-family : Verajja;
font-weight : normal;
font-style: italic;
src : url('../Fonts/Verajjai.ttf');
}

@font-face {
font-family : Verajja;
font-weight : bold;
font-style: normal;
src : url('../Fonts/Verajjab.ttf');
}

@font-face {
font-family : Verajja;
font-weight : bold;
font-style: italic;
src : url('../Fonts/Verajjat.ttf');
}

body {
	font-family: Verajja; 
}


p.sgc-1 {text-align: center; font-size:small}

.bodytext {
    border-bottom: 0;
    border-top: 0;
    font-size: 1em;
    margin-bottom: 0em;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: 1em
    }

.book {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1.83333em;
    font-weight: bold;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }
.break {
    page-break-after: always
    }
.calibre {
    
    
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 5pt;
    margin-right: 5pt;
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
    page-break-before: always
    }
.calibre1 {
    display: block
    }
.calibre2 {
    color: inherit;
    cursor: inherit;
    text-decoration: inherit
    }
.calibre3 {
    display: block;
    page-break-after: always
    }
/*
.center {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }
*/
.centered {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    margin-bottom: 1em;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center;
	font-style:italic;
    }
/*
.centered1 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }
*/
.chapter {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 2em;
    font-weight: normal;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 3em;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }

.title {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 2em;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }

 /* Gatha line 1 */
  .gatha1 { font-size: 1em; margin-bottom: 0em; margin-left: 0em;margin-top:.5em; margin-bottom:0em; font-style:italic}

  /* Gatha line 2 */
  .gatha2 { font-size: 1em; margin-bottom: 0em; margin-left: 0em;margin-top:0em; margin-bottom:0em; font-style:italic;}

  /* Gatha line 3 */
  .gatha3 { font-size: 1em; margin-bottom: 0em; margin-left: 0em;margin-top:0em; margin-bottom:0em; font-style:italic;}

  /* Gatha last line */
  .gathalast { font-size: 1em; margin-bottom: .5em; margin-left: 0em;margin-top:0em; font-style:italic;}


/*
.gatha {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 1em;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0
    }
.gathalast {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    margin-bottom: 0.5cm;
    margin-left: 1em;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0
    }
*/

.hangnum {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    margin-bottom: -14.4pt;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: 2em
    }
.logo {
    height: 112px;
    margin-bottom: -0.1em;
    margin-left: 0.25em;
    margin-right: 0.5em;
    margin-top: 0;
    width: 270px
    }
.nikaya {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }
.note {
    color: gray;
	font-size:small;
    }
.paranum {
    font-weight: normal;
	font-size:small;
    }
.subhead {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    font-weight: bold;
font-style: italic;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1em;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }
.sutta {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1.2em;
    font-weight: normal;
    margin-bottom: 0.5cm;
    margin-left: 0;
    margin-right: 0;
    margin-top: 2em;
    padding-bottom: 0;
    padding-top: 0;
    text-align: center
    }

span.sutnum {
font-size:.75em;
}
span.chaptnum {
font-size:.75em;
}
span.pn {
	font-size:small;
	color:gray;
}
BKh is offline   Reply With Quote
Old 08-17-2012, 04:15 PM   #4
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,866
Karma: 4630359
Join Date: Dec 2010
Device: Kindle PW2
Does your ebook contain non-Latin text or transliterated text? If so, did you make sure that:
  • your xhtml source files are encoded in Unicode
  • the embedded font is also Unicode-compatible
  • the language code of the epub is correct
Can you post a screen capture and the corresponding html source code section?
Doitsu is offline   Reply With Quote
Old 08-17-2012, 04:30 PM   #5
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Thanks for the ideas.

It does contain non-standard Latin characters. But the source files are encoded as utf-8, the font is absolutely unicode compatible and contains the correct characters, and the language is set correctly. It's Pali.

But ADE doesn't have any capacity to split words based on the language, does it? I'm not even hoping for that, just to have all the characters displayed.

I will work on a screen shot.
BKh is offline   Reply With Quote
Old 08-17-2012, 04:44 PM   #6
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
OK, here's the code for an example:
Code:
<p class="bodytext"><a id="para813"></a><a id="para813_sn5"></a><span class="paranum">813</span>. “Cattārome <a id="T5.0326"></a><a id="V3.0328"></a><a id="M3.0222"></a><a id="P5.0254"></a><span class="pn">[254]</span> bhikkhave, iddhipādā bhāvitā bahulīkatā apārā pāraṃ gamanāya saṃvattanti. Katame cattāro? Idha, bhikkhave, bhikkhu chandasamādhippadhānasaṅkhārasamannāgataṃ iddhipādaṃ bhāveti, vīriyasamādhippadhānasaṅkhārasamannāgataṃ iddhipādaṃ bhāveti, cittasamādhippadhānasaṅkhārasamannāgataṃ iddhipādaṃ bhāveti, vīmaṃsāsamādhippadhānasaṅkhārasamannāgataṃ iddhipādaṃ bhāveti. Ime kho, bhikkhave, cattāro iddhipādā bhāvitā bahulīkatā apārā pāraṃ gamanāya saṃvattantī”ti. Paṭhamaṃ.</p>
Here is a screen shot in ADE with the page stretched wide enough so all the long words fit...


And this is a shot when I make the page more narrow, simulating a smaller screen (note, I'm just changing the viewing window size). You can see that the fifth, seventh and ninth line run off the screen.

Attached Thumbnails
Click image for larger version

Name:	screenshot.1345235787.png
Views:	309
Size:	13.6 KB
ID:	90935   Click image for larger version

Name:	screenshot.1345235810.png
Views:	256
Size:	30.4 KB
ID:	90936  
BKh is offline   Reply With Quote
Old 08-17-2012, 05:40 PM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,866
Karma: 2714881
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
If the word cannot fit on one line, it will run off. It will not hyphenate. ADE will have no choice than to let the word run off.
Toxaris is offline   Reply With Quote
Old 08-17-2012, 06:05 PM   #8
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by Toxaris View Post
If the word cannot fit on one line, it will run off. It will not hyphenate. ADE will have no choice than to let the word run off.
Thank you. I'm not wanting it to hyphenate. That's asking a bit much. But of all the ways to deal with long strings of unbroken text, not displaying seems to be the worst. It may not be pretty, but at least on the Kindle (different format, I know) it wraps the text to the next line.

Thanks to all the folks who responded.
BKh is offline   Reply With Quote
Old 08-18-2012, 03:18 AM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,866
Karma: 2714881
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Wrapping is worse in my opinion. The break is guessed and is very strange. Then again, I cannot imagine too many words that would be longer than a line.

ADE does display the rest of the line, it is only not visible.
Toxaris is offline   Reply With Quote
Old 08-18-2012, 06:46 AM   #10
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 1,932
Karma: 1405001
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
You might want to make a note at the beginning of your book asking the reader to switch their book view to landscape, if that is possible on the Kindle. That is, they would hold and read their book with the longest screen dimension horizontal. That will allow longer lines. If editing for epub, also make sure you pull out all non breaking spaces to avoid compounding the problem of overlong words.

Last edited by mrmikel; 08-18-2012 at 06:51 AM.
mrmikel is offline   Reply With Quote
Old 08-18-2012, 01:05 PM   #11
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 939
Karma: 1104656
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by BKh View Post
I'm not wanting it to hyphenate.
I noticed that most readers and reading software have serious problems with long words. I'm talking about standard-ascii. Like this:
Transvaaltruppentropentransporttrampelthiertreiber trauungsthraenentragoedie!

My solution was to insert small spaces after each letter. Lucklily, with this text this strategy was possible.

Even <span>s won't help. I guess, inserting something is the only way to help certain reader software to find a spot to break the word to the next line.

I know, you told us you don't want to do so. So i'm sorry, but i don't see any other way

edit: ----------------------------------------------------
It was not in my intention to add as space into the long word shown above. The MR-editor did it.

Last edited by mmat1; 08-18-2012 at 01:10 PM.
mmat1 is offline   Reply With Quote
Old 08-19-2012, 03:16 AM   #12
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,994
Karma: 4346921
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Newer ADE versions, like the 1.8 preview (is it still a preview? is it still available?) or the embedded versions in newer readers can hyphenate. It's not a perfect feature (my reader will sometimes leave a single letter in a line, or insert a hyphen between a letter and a punctuation character), but it won't allow words to overflow a line.

Or you could use a zero-width space (& #8203;), but that's inserting special characters.
Jellby is offline   Reply With Quote
Old 08-19-2012, 09:45 AM   #13
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by Toxaris View Post
Then again, I cannot imagine too many words that would be longer than a line.
Some languages make heavy use of compound words. It's not extremely common to have words that long, but it does happen.

Quote:
You might want to make a note at the beginning of your book asking the reader to switch their book view to landscape, if that is possible on the Kindle. That is, they would hold and read their book with the longest screen dimension horizontal. That will allow longer lines. If editing for epub, also make sure you pull out all non breaking spaces to avoid compounding the problem of overlong words.
Actually, the Kindle just wraps the line if it is longer than the screen width. Since I personally use a Kindle, this is the behaviour I am accustomed to. It was when I used a Sony Reader that I saw the problem with long words not displaying.

Removing any non-breaking spaces is a great idea.

Thanks everyone.
BKh is offline   Reply With Quote
Old 08-19-2012, 04:22 PM   #14
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,697
Karma: 40387231
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
What language is this? It'll be a problem in any "agglutinative" language which forms sentences by joining words together. Turkish is perhaps the most commonly encountered (for a European, anyway) agglutinative language.
HarryT is offline   Reply With Quote
Old 08-20-2012, 08:25 AM   #15
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
The language is Pali, the scriptural and liturgical language of Theravada Buddhism.
BKh 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
Split long words using the "¬" character (small screens) DSpider Workshop 5 03-16-2012 07:09 AM
Words per page jbcohen General Discussions 6 01-26-2011 07:12 PM
ebook has words running together with no gaps between them likethis DarkRoast General Discussions 19 01-06-2011 01:05 AM
page-template -> running headline setzer ePub 14 07-27-2009 03:53 AM
How long does it take to get to your page. yvanleterrible Legacy E-Book Devices 9 09-01-2006 03:06 PM


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


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