# Writer: how to prevent line wrapping inside symbol?

Using LO 6.0.x under Linux Fedora 29

I'm working on a technical document explaining the use of some reserved symbols in a programming language, like ?[.

The sentence in which this 2-character symbol appears is justified such that the symbol is split as ?-Newline-[. I could of course change slightly the wording of the sentence to modify justification, but at next editing I could be caught by this spurious line wrapping again.

I tried to insert various "space" characters in range U+2000 to U+200F, in particular ZERO WIDTH SPACE, between the characters, even irrelevant (in this case) ZERO WIDTH JOINER, but I always get some visible gap in the pair.

Is there a way to inform Writer that a sequence of characters should never be split?

What I'm looking for is the exact opposite of soft hyphen. Note matter is made difficult by the fact my symbol is not composed of letters and it starts by a character usually taken as a punctuation.

edit retag close merge delete

Thank you all for this super fast answer!

( 2018-11-25 18:40:26 +0200 )edit

Sort by » oldest newest most voted

You need WORD JOINER, which is accessible as InsertFormatting MarkNo-width no break. There's no way to tell Writer to disallow wrap between the two characters, because their Unicode properties (what Writer consults when deciding if wrapping allowed) don't disallow that.

You could create an autocorrect entry with the symbol, like .*?[.*?⁠[ (with the proper symbol in the middle of the replacement sequence).

more

You need to use U+FEFF ZERO WIDTH NO-BREAK SPACE.

more

This is tested with ?﻿[ and it works also in this askbot editor for me with Firefox. The insertion in Writer is easy with the new feature: Type FEFF and with the insertion cursor at the end of the 4 Hex digit press Alt+x. The word joinner U+2060 should also do. I preferred the other solution based on the naming. The OP doesn't want to join words (in the common sense).

( 2018-11-25 18:35:29 +0200 )edit

Danke schön, I knew the Alt+X trick and its good for other users to remind it.

( 2018-11-25 18:41:23 +0200 )edit

U+FEFF is deprecated in uses other than BOM, in favor of WORD JOINER (see this and this Wikipedia articles).

( 2018-11-25 22:17:30 +0200 )edit

Thanks. I didn't know that, and the references I recently used made no mention of it.
(Strange metamorphosis, however.)

( 2018-11-25 22:29:16 +0200 )edit

Have you already tried? Menu Insert>Formatting Mark>Protected Space.

more