![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
How to prevent breaks within a 'word'
I'm working on an ebook in which the first part of the story takes place in --shire, and a city called X--.
I'm using —shire for the name of the county, and X— for the city. But every now and then both constructions break - with the — at the end of the line, and shire at the beginning of the next line - similarly for X— Is there anyway to stop this happening? It happens rarely, but when it does it's ugly. I've tried using —‍shire, but that doesn't work. Last edited by AlexBell; 11-06-2015 at 01:14 AM. |
![]() |
![]() |
![]() |
#2 |
Apprentices Against DRM
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 9787852
Join Date: Feb 2015
Location: UK
Device: Asus Laptop
|
If an ePub renderer ignores the zero width joiner, I don't think there's much you can do.
Hmmm.... I seem to remember that one renderer would no break a work if it started with a soft hyphen. Worth a try, but I'm not optimistic. For Apple's iBooks you could use the {-webkit-hyphens:none;} CSS attribute. But I don't know how many other renderers take notice of that non-standard CSS. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
You could use a quotation dash (U+2015) instead of an em dash (U+2014).
A quotation dash looks the same as an em dash, but doesn't break between the dash and the word. The only problem is that some fonts don't contain a quotation dash, so you would want to embed a font that has one to be sure. |
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,743
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#5 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,213
Karma: 34984928
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
If you don't mind messy markup, you might try a span with whitespace: nowrap
but then it might drop down to the next line, leaving a ragged right margin. You can experiment with other whitespace settings, and see if any give a workable result. http://www.w3schools.com/cssref/pr_text_white-space.asp I keep seeing breaks with nbsp and with trailing emdash all the time. I often even see a break between a full stop and the closing quote mark --- kerning and hyphenation algorithms leave so much to be desired! ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks to you all. I'll try quotation dash and see what happens. I presume the if the font family doesn't include quotation dash I won't see any dash at all?
|
![]() |
![]() |
![]() |
#7 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
On most devices, if a font doesn't contain a glyph, an empty square box will be displayed instead.
I'd recommend against using a glyph which is not commonly present in fonts. |
![]() |
![]() |
![]() |
#8 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Short lines are fairly common in Kindle editions, so that wouldn't bother me. Some time ago, Amazon evidently changed the software so that if the gaps got too wide between words in a justified line, then the line would fall short of the right margin. I see this often in e-books.
|
![]() |
![]() |
![]() |
#9 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Kindles have always done this, certainly as far back as my first Kindle, which was the Kindle Keyboard.
|
![]() |
![]() |
![]() |
#10 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
This is the main problem with Spanish books, where em-dashes (or quotation dashes) are used everywhere in dialogue... This "let's allow line break at either side of a dash, regardless of anything else" makes them look awful. Using quotation dashes is not a solution without embedding a font (and embedding a font is not a solution).
|
![]() |
![]() |
![]() |
#11 |
Unicycle Daredevil
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Alex, have you tried the word joiner?
It looks awful in Sigil's book view, but seems to work just fine in RMSDK. (Thanks to pynch for mentioning this in the German forum a while back!) EDIT: The html code, missing from the Wiki entry is ⁠ Last edited by doubleshuffle; 11-07-2015 at 05:07 AM. |
![]() |
![]() |
![]() |
#12 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks for your trouble, but it doesn't work - at least, not on my Sony T3. I get the dreaded little square with a question mark inside.
|
![]() |
![]() |
![]() |
#15 |
Unicycle Daredevil
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,944
Karma: 185432100
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
What a pity. I thought I had successfully tested it in ADE, Bluefire and on my Kobo, but it's been a while. I was looking forward to using it in the collection I'm working on right now - keeping it for last due to the horrible look in Sigil - well, seems I can forget about that now.
Although I think I'll do some more testing and if it really works like I remember, I might offer one version with and one without... |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word breaks | FlexUser | Calibre | 10 | 03-24-2014 02:42 AM |
How to prevent page breaks? | bgoldnyxnet | ePub | 9 | 01-28-2014 09:45 AM |
Getting word breaks to work correctly | Techno4 | ePub | 1 | 08-27-2012 01:27 PM |
Epub to Mobi conversion strange word breaks | inkwords | Conversion | 0 | 03-04-2012 05:29 PM |
Word Wrap and Creating Line breaks for paragraphs? | mjt57 | Calibre | 3 | 01-03-2011 10:14 PM |