Formatting text consisting with lots of dashes

I have problem with formatting documents where user use dashes to separate different paragraphs. They make dashes manually. Expected behaviour is like on MS Word Version screenshot

. Im not able to force Libreoffice to work the same way

Any idea how can I make it work on Libreoffice?

(edited by ajlittoz to display the screenshots)

This issue isn’t tab stops or search and replace. I noted you paragraph justification is set to Right Justify text. In MS Word it is set to Full Justify.

Try selecting all the text in LO and then apply the Full Justification, see if that clears it up.

This might be a import bug in LO’s end.

EDIT 2 (2020-10-25):

  • The better way:
  • Find all \-{50,} (with Regular expressions).¹
  • Choose menu Format - Paragraph…, and add a new right tab stop at 6.67" (it is preferable to make this value bigger, and not smaller, than the width of the paragraph area), with dash fill.²
  • Choose menu Edit - Repeat: Apply attributes (the same that Ctrl+Shift+Y).³
  • Replace all with \t\t.

¹ \- stand for slash, {50,}stand for at least 50.

² This will work only for the first paragraph (maybe a bug).

³ This will apply the tab stop to all selected paragraphs.

EDIT 1 (accepted answer):

  • The elegant way:
  • Find all -.
  • Check Current selection only, find --, and replace with -​-​ (not seen but there is slash, zero width spaceslash, zero width space). Keep in mind that whatever two consecutive slashes in the document will be replaced (or find --- instead of --).

¹ To get a zero width space type U+200B and inmediatelly press Alt+X (don’t work in the Replace: field, so you will need to paste it from the document).

  • The dirty way: Add manually a space at the end of the first line. To avoid the need of guess were to add a space, you could:
  • Cut the second line of dashes,
  • Paste if after the text,
  • Add a space.

image description

And teaches writer/user to use a better option: tab stops also can be used in Word.

Original answer: Choose menu Format - Paragraph…, and add a new right tab stop at 6.67", with dash fill. Then press the tab key at the right of the text.

image description

Notice that you can use another character (only one by tab stop) as Fill Character.

More LibreOffice Help on Tabs.

Tested with LibreOffice (x86); OS: Windows 6.1.

Add Answer is reserved for solutions.

Press edit below your question if you want to add more information; also can comment an answer.

Check the mark (Correct answer mark) to the left of the answer that solves your question.

Hi, thank you for tip. The problem is that I recieve ms word documents which have manually written dashes, therefore using your trick means that I have to remove them all and format every document from scratch. Is there other solution which force libreoffice to read MS Word documens in the way I need?

@MarekSurek, Edited my answer.

@MarekSurek: try to convince the document writers that manually filling dashes to end of line is a bad idea. You become vulnerable to the slightest change in formatting (paper size, margins, … or even simply font face). I assume that this dash-stuffing comes from the requirement that nothing can be added at end of paragraph once the document is printed.

The correct way of doing this is tabbing with dash fill as given by @LeroyG at top of his answer.

Thank you, it works like a charm.