Change -- to em dash does not work

In Libre office 6.4.7.2 I cannot get two hyphens and a space to make an em dash. It worked well in version 5. I go to Tools/Auto Correct/Auto Correct Options, and then enter the desired change and press OK, but nothing changes. It does not work. I still get --.

Richard

Which language did you set the replacement code for, and which language are you using when the funcion not work?

English US for both

Likely related: tdf#142938 (but the change in it is in 7.3)

  • In a test or blank document, insert the em-dash by going to menu Insert >> Special Character… (Subset: General Punctuation)
  • Select this character in the document and copy to clipboard (ctrl+c)
  • Open AutoCorrect dialog (menu Tools>>AutoCorrect>>AutoCorrect Options…)
  • Under the Replace tab, type two dashes in the Replace text box and paste from clipboard into the With text box.
  • Press the New button. Your entry will now be moved into the text area below the Replace and With text boxes.
  • Now click OK
    Hope this should work.
1 Like

That worked. Also :three hyphens: works.

Thank you all of you for your answers.

Richard

1 Like

Works in v 24.8.3.2. Thanks!

Confirmed in version 7.2.5.2. Fixed that by adding the rule to replace two hyphens by an em dash.

I upgraded to 7.3.0.3 and it still does not work. Should I go back to version 4 or 5? I don’t need a lot of fancy stuff. I am a writer. I just need a simple word processor that works.

Richard

Help for 7.3 AutoCorrect Options and I think Help for 6.4, says:

Text that you type: Result that you get:
A -- B (A, space, minus, minus, space, B) A – B (A, space, en-dash, space, B)
A--B (A, minus, minus, B) A—B (A, em-dash, B)

Probably best for consistency to use 3 dashes to make em dash in AutoCorrect (3 dashes works on this site). Open AutoCorrect Options in Replace field enter ---, in With field enter — then click New, then click OK

In Writer 7.2.5.2 by default there are settings in AutoCorrect that do the following:

:–: (in words, ColonHyphenHyphenColon produces an en-dash.)
:—: (in words, ColonHyphenHyphenHyphenColon produces an em-dash.)

For the em-dash this is pretty good as you can have the em-dash with no space before and after the em-dash. Or you can easily place the em-dash with a space before and after the em-dash. (Different publishers seem to have different conventions on how they like placement of em-dashes.)

In any case, I found this way of doing it so useful that I wrote an AutoHotkey script that gives me the same functionality in any word-processor that I use on my system. In this way I only have to remember one way of doing things for all word-processors on my system.

2 Likes