# Difference between new line and new paragraph

When I use LibreOffice Writer and when I type shift-enter, I get a new line. Its internal representation is \u000A. When I type enter, I get a new paragraph. What's its internal representation?

edit retag close merge delete

Sort by » oldest newest most voted

answered 2018-09-27 22:50:22 +0100

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, for me it's a big difference. Notice that I format every paragraph accordingly in my documents (default, title, heading1...), so:

a) If I hit just "Enter", a new paragraph is created with settings that I have specified in the actual paragraph properties; i.e., the format following "heading1" is "default". I will have two paragraph of different styles. When I insert the table of contents, only the paragraph formatted as heading1 will be considered.

b) If I hit "shift + enter", the new line is part of the current paragraph; thus, all its properties remain the same and when I insert the table of contents, all the paragraph will be included because there is only one distributed in several lines.

more

Its internal representation is a new SwTextNode.

more

If you meant the UTF code for the "CARRIAGE RETURN" character, it is 0x000D (13 in decimal).

more

Remember that in document processors like LO the basic semantic unit is a paragraph on which you apply a style. Everything inside a paragraph share comme attributes like font, size, colors, ...

[Well, you can have different styles thanks to character style which can be considered as a styling layer superimposed above the paragraph layer, but this is irrelevant for the present discussion.]

The Enter key is the standard "command" to tell LO to close the current paragraph and open a new one.

However, sometimes, you want to jump to the next line without leaving your paragraph (This makes sense in outdented paragraphs where you list a term in the outdent and write an explanation in the paragraph body. You generally jump to the body with Tab key, but this does not work if the term is longer than the outdent margin.)

In this case, you type Shift+Enter meaning insert a new line, do not leave paragraph. The inserted newline is considered as a separator by LO, juste like a space or Tab, with a special semantics for starting a new line. LO semantics for the newline can be adjusted in Tools>Options..., LO Writer>Compatibility, check box Expand word space on lines with manual breaks in justified paragraphs, to be complete.

Internal representation presents no interest for user for document composition. You can however see (visual clue) the difference when you display hidden characters. Paragraph marks display as "pilcrows" (kind of mirrored P) while newlines display as an arrow "down then left" (similar to the usual symbol found on Enter key.

If this answer helped you, please accept it by clicking the check mark to the left and, karma permitting, upvote it. If this is what you expected, close the question, that will help other people with the same question.

more

## Stats

Asked: 2017-07-05 06:23:06 +0100

Seen: 1,190 times

Last updated: Sep 27 '18