|
|
#1 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
|
Long words running off page
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. |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,113
Karma: 958803
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
}
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;
}
|
|
|
|
|
|
#4 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,091
Karma: 2701341
Join Date: Dec 2010
Device: Kindle 3
|
Does your ebook contain non-Latin text or transliterated text? If so, did you make sure that:
|
|
|
|
|
|
#5 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#6 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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> 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. |
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,113
Karma: 958803
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
|
#8 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
|
Quote:
Thanks to all the folks who responded.
|
|
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,113
Karma: 958803
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
|
#10 |
|
Book Twiddler
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 982
Karma: 1118807
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. |
|
|
|
|
|
#11 |
|
Det
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 720
Karma: 478020
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
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. |
|
|
|
|
|
#12 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,150
Karma: 2505637
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
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. |
|
|
|
|
|
#13 | ||
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
|
Quote:
Quote:
Removing any non-breaking spaces is a great idea. Thanks everyone. |
||
|
|
|
|
|
#14 |
|
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,666
Karma: 26165759
Join Date: Nov 2006
Location: UK
Device: Kindle Touch, PW, Fire HD, iPad 3, iPhone 4, Samsung Tab 2 7 + More
|
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.
__________________
Harry Currently proofreading The Poison Belt, by Sir Arthur Conan Doyle. |
|
|
|
|
|
#15 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 1000
Join Date: Mar 2011
Device: Kindle
|
The language is Pali, the scriptural and liturgical language of Theravada Buddhism.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
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 |