"keep with next word"

I appreciate the “keep with next paragraph” option and wonder if there is an equivalent “keep with next word”. This would be very useful to prevent single letter starts to a sentence being stranded at the end of a line. I get around it by putting a shift+enter before the A or I but this doesn’t work well when the page width is adjusted.

I think the option you are looking for is a no-break space.
This creates a space that prevents words from separating.

You can create it through the menu Insert > Formating Marks > No Break Space
or with Ctrl+Shift+Space

2 Likes

A single short word on the last line of a paragraph is called a “runt”, see Widows and orphans - Wikipedia . Some DTP programs, e.g. inDesign, automatically reflow the text to avoid these.

There is a bug report, tdf#100418 from question Adjusting the length of the last line in justified paragraph (runt) . You can add yourself to the CC list, add a comment with more information, or use the workaround suggested with Hyphenation options.

Not specifically what you ask for, but see also: LibreOffice/Collabora Online Typography

imagen
But this is direct formatting, not an automatic style.

Are you sure it is a direct format?

The no break space is not deleted/changed from menu > Format > Clean Direct formating (Ctrl+M) or cleaning the direct format in the listbox of paragraph styles.

@bantoniof Direct format must not be understood only as what can be removed with Format>Clear direct formatting. There are many “operations” left untouched by the menu command. The menu command roughly clears paragraph and character properties. Some operations controlled by paragraph style live in another realm, such as outline level, bullet/numbered list, … When you consider frames, nothing is cleared.

In the present case, the “natural” word separator is a U+0020 SPACE. Replacing it explicitly with another Unicode codepoint is a manual operation, aka. direct format (because you expect the codepoint to interfere with word detection and line wrapping algorithm).

1 Like

I thought the manual format was when the text format was changed manually, not when text was written

If we consider that the no-break space is a unicode character, as is the letter A (U+0041). For me it is not a direct format.
A paragraph break also interfere with lines wrapping.

…is not direct formatting?

There is no clear definition for direct format. I tend to name direct formatting (DF) everything which impacts (overrides) styling. There is then “obvious” DF which can be fixed with Ctl+M and DF which can’t be easily cancelled (the pernicious one). “Keep with next word” is a corner case: it is not DF in the usual sense, but it can be considered so because you try to outsmart a generic process (word delimitation, hyphenation and line wrap).

hyphenation break the words, it could also be considered as direct format?

If you do it manually with a hyphen and line break. But, this is quite a common error: I see it in many magazines when there is a discrepancy between the author’s device and the publisher’s final output. Line wrap positions are moved, the hyphen is no longer at end of line and the hyphen shows up at the wrong location.

that is exactly what you get with an no-break space: a sort of authomatic hypenation.