Ask Your Question
1

how to shortcut to em dash

asked 2018-10-26 04:11:13 +0200

laurencio gravatar image

updated 2018-10-26 04:23:18 +0200

would anyone be so kind to teach me haw to set a shortcut to type em dashes like e.g. [CTRL]+[-] OR [CTRL]+[SHIFT]+[-] I mean, something that does not break the workflow and let me feel comfortable when writing some short stories. I know :---: does the thing, but oh! five shots for just one character... Or [compose key] + ---. The same four shots for a single character. Or -- [space] + [backspace] (auto correct way) Again: four keys to one character (I don't want a space between the dash and the word). Those options are not comfortable.

I just would like to use writer to write.

I tried to set up a macro but i couldn't. I am not smart enough. But shure there is a better and easier way. I use Libreoffice 6.0 and I find it great.

I use MX Linux 17 (Debian 9 base)

edit retag flag offensive close merge delete

Comments

In Linux, you can (relatively) easily modify your keyboard layouts to your needs and to hook em-dash to, say, AltGr + -. Read this topic (in Russian).

gabix gravatar imagegabix ( 2018-10-26 09:33:18 +0200 )edit

One more comment:

I know :---: does the thing

You can create an autocorrect entry with, say, :--: in Replace and in With. Well, just two strokes.

gabix gravatar imagegabix ( 2018-10-26 10:37:21 +0200 )edit

Thank you gabix, I think I will need to learn to modifiy the keyboard through the os. And I did not understand your second suggestion.

laurencio gravatar imagelaurencio ( 2018-10-27 18:48:04 +0200 )edit

See RGB-es’s more detailed answer, I meant the same thing. If you follow it, you’ll be able to get A—B simply typing A--B.

gabix gravatar imagegabix ( 2018-10-27 18:54:41 +0200 )edit

4 Answers

Sort by » oldest newest most voted
2

answered 2018-10-26 18:48:19 +0200

KH gravatar image

If you're just using em-dashes for stylistic breaks---like this---the built-in dash conversion should do what you need.

Make sure it's enabled: Tools > AutoCorrect> AutoCorrect Options > Options and select "Replace Dashes".

Then, when you type a word, two hyphens, another word, and finally a space, the two hypens will be replaced with an em-dash.

This might not work perfectly in all circumstances, but for the usual case, it's as easy as can be.

Otherwise, I might be inclined to use the AutoCorrect replacement table to replace a triple hypen with an em-dash, without the usual surrounding colons, as suggested elsewhere.

edit flag offensive delete link more

Comments

Not only for sylistic breaks. In spanish, dashes (em-dashes, also called as Dialog bar (raya de diálogo)) are used also to indicate that someone is speaking (with his own voice), at the begining of the sentece. As quotes ( ' ), are used in english instead for the same purpose. So, it is a very, very used typo if you write literature.

laurencio gravatar imagelaurencio ( 2018-10-27 18:26:25 +0200 )edit

But then a space is expected between the dash and the first word, isn't it? (at least in Russian, it is) - it's better to consult language-specific normative guides...

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-27 22:32:39 +0200 )edit
2

answered 2018-10-26 12:34:05 +0200

RGB-es gravatar image

updated 2018-10-26 12:41:35 +0200

There is an autocorrect that do not need spaces: :--: As soon as you insert the second colon, an en-dash will be inserted. To insert an em-dash: :---:

EDIT: That means that you can define your own autocorrects, for example changin :n: by an en-dash.

image description

just pick the right language ;)

edit flag offensive delete link more

Comments

:-) well - OP has mentioned that (in the section "too many keystrokes")

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-26 12:35:27 +0200 )edit

@Mike Kaganski ups! I edited the answer: I hope that three keys are OK ;)

RGB-es gravatar imageRGB-es ( 2018-10-26 12:42:57 +0200 )edit

@RGB-es: let's wait what OP thinks ;-)

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-26 12:43:45 +0200 )edit

Thank you. To create autocorrect replacement like :n: is not that bad. I'll see if i get used to it.

laurencio gravatar imagelaurencio ( 2018-10-27 19:01:12 +0200 )edit
1

answered 2018-10-27 20:48:00 +0200

laurencio gravatar image

updated 2018-10-27 21:49:59 +0200

Well, I think i found a solution at the Operating System level. Modifying the keyboard map with the command xmodmap. I realized that on my keyboard layout (Spanish - Latin American) [AltGr] + [1] did the same as [AltGr] + [<], they both typed the vertical bar "|". And also the key at the left of [1] typed the same symbol. To much redundancy for a symbol that I barely use. So, I decided to modify the [<] key, so [AltGr] + [<] result in the em-dash.

With this command:

xmodmap -e "keycode 94 = less greater less greater emdash brokenbar bar"

I read this: https://blog.desdelinux.net/modifica-... and this: https://slimbook.es/tutoriales/linux/...

Although, I think LO should give an option for writers to do this kind of things.

I have just found a little app called Focus writer that types the emdash with the [ctrl]+[-] combo. Which is very good.

edit flag offensive delete link more
-1

answered 2018-10-26 09:58:23 +0200

Grantler gravatar image

updated 2018-10-26 10:08:02 +0200

You can use the -- for this: – (dash)

Why not create a new one?

--- for — (em dash)

Just edit in AutoCorrection. It's really easy.

More information: https://help.libreoffice.org/6.1/en-U...

See also https://wiki.documentfoundation.org/i... (Using AutoCorrect; page 62ff)

edit flag offensive delete link more

Comments

the user's point is "I don't want a space between the dash and the word" - so the entry needs to take that into account (using .* syntax)

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-26 10:16:05 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-26 04:11:13 +0200

Seen: 658 times

Last updated: Oct 27 '18