We will be migrating from Ask to Discourse on the first week of August, read the details here

# Formatting text consisting with lots of dashes [closed]

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)

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2021-06-14 21:05:04.317675

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.

( 2020-10-22 04:53:15 +0200 )edit

Sort by » oldest newest most voted

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.

• 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,

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.

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

More LibreOffice Help on Tabs.

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

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

more

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?

( 2020-10-21 21:53:45 +0200 )edit

( 2020-10-21 23:44:05 +0200 )edit

@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.

( 2020-10-22 08:27:31 +0200 )edit

Thank you, it works like a charm.

( 2020-10-22 09:50:35 +0200 )edit