16

I understand that to be able to type en and em dashes I have to configure the COMPOSE key, or something like that, but I am not sure about that nor on how I get from there to be able to type en and em dashes in addition to the minus sign.

How do I type en and em dashes on Ubuntu GNOME 15.10 with GNOME 3.18?

I have now looked at this answer, so I would now also like to know the code for the en dash and how to assign other keyboard shortcuts to these Unicode characters, as I don't want to have to type something too long in order to get these.

apaderno
  • 289
  • 3
  • 14
  • 2
    Possible duplicate of [How can I type a unicode character (for example, em-dash —?)](http://askubuntu.com/questions/31258/how-can-i-type-a-unicode-character-for-example-em-dash) – muru May 27 '16 at 13:12
  • Gosh, I just wrote the same thing in an answer. :D – Andrea Lazzarotto May 27 '16 at 13:17
  • Eh, search the character map? – muru May 27 '16 at 13:19
  • Also, did you see http://askubuntu.com/a/585133/158442? – muru May 27 '16 at 13:25
  • The em-dash `—`... [has its own, direct shortcut. `alt`-`-`, at least under Ubuntu-MATE](https://askubuntu.com/questions/31258/how-can-i-type-a-unicode-character-for-example-em-dash/585133#comment2001135_31258) – Frank N Dec 09 '19 at 14:55

3 Answers3

21

You need to learn the Unicode numbers of these two characters. They are not actually hard to remember, because they look like years. ;)

  • En dash: U+2013
  • Em dash: U+2014

To write a Unicode symbol, perform the following actions:

  • Press Ctrl+Shift+U (the display will show something like )
  • Type the code (e.g. 2014)
  • Press Enter

There you go: – —

For a complete reference to Unicode characters, run gucharmap.

Andrea Lazzarotto
  • 7,823
  • 3
  • 38
  • 56
  • I prefer @cipricus's answer below, using the 'compose' key, because those mnemonically chosen 2 or 3 character sequences are easier to remember than arbitrary four digit hex numbers, especially if one uses the same mechanism for other unicode characters as well. – Jonathan Hartley Sep 01 '23 at 19:54
3

When I look up "em dash" on the gnome 3 overview a result comes up that puts it on the clipboard. I think you need to have gnome-characters installed for it to work.

3

Compose key can be used like this: ­

  • Compose and then --. gives (en-dash).

  • Compose and then --- gives (em-dash).

The compose key can be set in the advanced keyboard settings

In LibreOffice Writer one can use :--: and :---:. And in the LO auto-corrector we can set -- to for example.

Jonathan Hartley
  • 1,051
  • 13
  • 16
cipricus
  • 3,102
  • 1
  • 25
  • 70