1

I have a paragraph style called "Source". It has no spacing above and below, and it uses a mono-space font and gray background. I want to paste text with some longer lines into my document and it would be important to see in print where the "enters" (paragraph endings, option A) or the automatic line wrappings (option B) are, so the reader won't get confused on it.

Is there any setting for A or B? Workarounds?

I don't want to format anything by hand because it would be fragile and hard to maintain. Tried numbering and got a problematic use case: When reading the document on computer it makes hard to copy sources from the document, because the numbering gets copied too.

EDIT: Increasing the spacing between paragraphs is not good enough. Not obvious enough. Looks weird and consumes lot of space in the general case when there are no long lines.

(LibreOffice Writer 4.2.1.1 English; Windows 7 64bit English; Hungarian and English texts)

1
  • Used solution is with the answer with the bounty prize.
    – Notinlist
    Mar 31, 2014 at 21:58

4 Answers 4

2

You could try this: in the "Indents & Spacing" tab

  • set "Before text" to x cm
  • set "First line" to -x cm

This way you get an indentation of the wrapped parts of long lines of x cm, and short lines are not affected at all.

2
  • That cannot go as I sometimes have to insert indented text (HTML code or program), so it would raise ambiguity / ugliness in those cases.
    – Notinlist
    Mar 31, 2014 at 21:46
  • Still a nice idea... :-)
    – Notinlist
    Mar 31, 2014 at 21:49
1

If you set the Before and/or After spacing to something greater than zero (and the inter-line spacing is “Single”), then you will get separation between the “paragraphs” (which are lines of code).

1
  • Earlier I did that, which I failed to meintion in the question. Two problems arese: #1 Was not obvious enough #2 Looked weird and consumed lot of space in the general case when there were no long lines.
    – Notinlist
    Mar 31, 2014 at 13:36
1

Assuming that LibreOffice Writer has scripting support, I believe a macro could do that. A macro that looks for a line longer than a certain number of lines, sticks a carriage return at column 80, and puts ⤶ on that line.

3
  • Fixed amount of characters is not good. If I change font size or put a text file into a table cell then it goes wrong. All in all the maintenance of this solution is expensive.
    – Notinlist
    Mar 31, 2014 at 21:45
  • How would that interact with clipboard copy?
    – Notinlist
    Mar 31, 2014 at 21:48
  • Clipboard copy wouldn't probably work, but it is perfectly possible to rejustify lines with this method. Find a line that ends with a ⤶ dingbat, delete it plus the trailing carriage return, and rejustify the line.
    – RAKK
    Mar 31, 2014 at 22:10
0
+100

Set horizontal borders on the paragraphs.  This will result in horizontal lines between the paragraphs.

1
  • That is very ugly. So no +1 here. :-) But this lead to the idea to turn on the left vertical border and set "Merge with next paragraph" to false at "Borders" tab, so bounty goes here.
    – Notinlist
    Mar 31, 2014 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.