|  09-14-2017, 07:00 AM | #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 | 
				
				Preventing breaks at the end of a line.
			 
			
			I've just prepared an ebook which several times refers to a city as T--, with the -- as a long line. When this occurs at the end of a line print the T is at the end of the line, and the -- is on the next line. I've tried T— and T*&mdash, but they don't work, and my Sony chokes on T & # 2805; as does MobileRead. Is there another way of forcing the T and the — to stick together? Last edited by AlexBell; 09-14-2017 at 07:05 AM. | 
|   |   | 
|  09-14-2017, 08:29 AM | #2 | |
| Grand Sorcerer            Posts: 5,763 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | Quote: 
 Code: span.nowrap {
  white-space: nowrap;
}
<p>He lived in <span class="nowrap">M—</span> at that time.</p>Last edited by Doitsu; 09-14-2017 at 08:33 AM. | |
|   |   | 
|  09-14-2017, 10:41 AM | #3 | 
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			Should that not be a hyphen instead of an em dash? That does not seem an appropriate of an em dash.
		 | 
|   |   | 
|  09-14-2017, 05:07 PM | #6 | |
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
  that's been a mote in my eye for aeons  BR | |
|   |   | 
|  09-15-2017, 02:54 AM | #7 | 
| Obsessively Dedicated...            Posts: 3,241 Karma: 35158061 Join Date: May 2011 Location: PA {back in the usa!} Device: Sony PRS-T2, ADE on PC | 
			
			If you are using justified alignment --- when using "no-wrap" in a span that way, if the line is too long for the screen width, which result will you get: will it bleed off the edge, will the spanned word drop down to the next line, or will the kerning be tightened up on the earlier part of the sentence? | 
|   |   | 
|  09-15-2017, 03:57 AM | #8 | |
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | Quote: 
 | |
|   |   | 
|  09-15-2017, 04:17 AM | #9 | |
| Grand Sorcerer            Posts: 5,763 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | Quote: 
 Also inserting zero-width joiners or word joiners didn't help.   | |
|   |   | 
|  09-15-2017, 04:24 AM | #10 | 
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | 
			
			What happens with newer versions? The word breaks at the em-dash?
		 | 
|   |   | 
|  09-15-2017, 04:28 AM | #11 | 
| Grand Sorcerer            Posts: 5,763 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | |
|   |   | 
|  09-15-2017, 04:34 AM | #12 | 
| Resident Curmudgeon            Posts: 80,727 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			Given that this doesn't work with ADE 2 on up, then I don't think there's a way to do this. Just forget the code and you'll just have to deal with the splits.
		 | 
|   |   | 
|  09-15-2017, 01:27 PM | #14 | 
| Wizard            Posts: 3,821 Karma: 19162882 Join Date: Nov 2012 Location: Te Riu-a-Māui Device: Kobo Glo | 
			
			Use a horizontal-bar (AKA quotation-dash, U+2015) instead of an em-dash.
		 | 
|   |   | 
|  09-15-2017, 02:11 PM | #15 | 
| Grand Sorcerer            Posts: 5,763 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| italic at end of line causes next line to start with a space | ebookreadr | Sigil | 29 | 03-20-2017 11:25 AM | 
| Preventing chemical symbol from being split by page or line break | Nick Payne | ePub | 8 | 10-23-2013 03:06 AM | 
| Line breaks on Kindle, no line breaks on 4 PC | Siavahda | Kindle Formats | 0 | 10-20-2012 05:50 AM | 
| Spurious Line Breaks | Halk | Workshop | 1 | 05-15-2010 01:22 PM | 
| No line breaks | ecpepper | Amazon Kindle | 3 | 08-09-2009 06:42 PM |