# Non breaking en dash

I want to insert a non-breaking en-dash in a word, not a minus sign, with no spaces before or after the en-dash. I can get a non-breaking minus sign with no spaces before or after, but I can't get an en-dash to replace the minus sign.

Thank you.

edit retag close merge delete

I don't know the term "en dash, not to talk of "non breaking en dash". Of what unicode character (code point) are you talking?

( 2017-08-18 19:51:52 +0200 )edit

Sort by » oldest newest most voted

(A guess:)
The "non-breaking hyphen" U+2011 (decimal 8209) is inserted by Ctrl+Shift+Dash in 'Writer'.

Editing with respect to the below comment by the OQer:

Quoting @robtkatz: "What I want is a non-breaking U+2013."
There isn't such a thing in Unicode. However, you may use a sequence of three characters for the intended functionality, the first and the third having zero width, but the functionality to "glue the two neighbouring characters together": WORD-JOINER U+2060. The second character can be your U+2013 then.
Try this: "What word⁠–⁠join has joined together let no rendering put asunder."

Don't miss to notice that "word-join" has 9 characters while "word⁠–⁠join" has length 11.

more

Thank you. I can get the U+2011 as a non-breaking character. What I want is a non-breaking U+2013.

( 2017-08-19 23:15:44 +0200 )edit

Hello @robtkatz,

the en-dash has unicode 2013 ( UTF-16: 0x2013 ).

on Ubuntu it can be typed as follows: CTRL+SHIFT+u and then 2013+ENTER

more

I've got Libre Office on Windows 10

( 2017-08-19 23:17:07 +0200 )edit

Since several versions (5.1, maybe?) there is an autocorrect for en-dash:

:--:

As soon as you type the second colon, you'll get the substitution (Em-dash is with three dashes and the minus sign with just one).

As @Lupp pointed out, there is no such a thing as a "non breaking U+2013" character, so you need to use the n-dash combined with a zero width, non breaking word joined: U+2060.

Also since several versions (5.1, again?) there is a "switch" to change character representation between unicode codes and actual characters: Alt+x.

So you need the following sequence:

1. Type :--: to insert the en-dash
2. Without adding any space, type 2060
3. Without doing anything else, press Alt+x to convert 2060 to the non breaking word joiner
4. Start typing the word that follows the en-dash
more

@RGB-es: Thanks! I had missed to learn the new way to enter characters by unicode (used 'Compose Special Characters' extension for the purpose).
The way you describe also works in Calc, but: Other than in Writer the entered character is in selected state after the 'Alt+x' conversion. Do you know a way to change that?

( 2017-08-28 11:25:45 +0200 )edit

@Lupp, sorry, no. I know near to nothing about Calc :(

( 2017-08-28 14:36:27 +0200 )edit

Thanks anyway!

( 2017-08-28 15:09:11 +0200 )edit

@Lupp: After the value is entered, a simple way is to press an arrow key to deselect, which is perhaps the closest equivalent to LO Basic oCursor.goRight(0, False). It may also be necessary to press another arrow key to get back to the original location. It's useful that the value is selected because then it can be correctly toggled back to the code point with another Alt+x.

( 2017-12-11 23:42:50 +0200 )edit

I initially was wondering why 'Writer' and 'Calc' were behaving differently when the Alt+X was used.
The reason - if any - for the inserted character to be selected should be the same in 'Writer' as in 'Calc', shouldn't it?

( 2017-12-12 00:36:45 +0200 )edit

@Lupp: It does seem inconsistent, and after a few tests, I do not see a good reason for the difference. However, it may be wise to do more investigation before concluding that it is a bug. I do know the person who implemented it, but I'm not interested in looking into the issue further right now.

( 2017-12-12 01:35:57 +0200 )edit

I woudl drop it.

( 2017-12-12 03:05:56 +0200 )edit