DarkTrick
DarkTrick

Reputation: 3499

How to prevent line breaks (general)

I'm writing a text on C++. But often the line breaks after the first "+", so I get C+

+

This is just an example. How can I prevent line breaking of arbitrary parts in my odt doc?

Upvotes: 4

Views: 1901

Answers (2)

tell
tell

Reputation: 113

For the Unicode character called the "Word Joiner", type 2060 followed by Alt+x. The x must be lower-case.

It doesn't matter whether you type the digits on the ordinary number keys or the numerical keyboard. If you want a character such as "æ", which has the Unicode value 00E6, it doesn't matter whether you type the "E" in upper or lower case either.

As @E.vanPutten rightly says, the word joiner can also be found at Insert | Formatting Mark | No-width No Break.

In Libre Office Writer version 6.3.2.2 (2019), and presumably also in later versions, the method using Ctrl+Shift+U doesn't work.

Upvotes: 0

DarkTrick
DarkTrick

Reputation: 3499

There is no formatting option at the moment

Use the Unicode Character U+2060. Insert it an every point the line breaks, but it shouldn't. It glues two parts together.

Example for "C++" ( | represents the text cursor )

  • C|++
  • Press Ctrl+Shift+U
  • u will appear on the screen
  • Type in 2060
  • Press Enter
  • Now the line won't break between C and +.
  • Move cursor: C+|+
  • repeat process

Upvotes: 4

Related Questions