Ask Your Question
1

Writer: how to prevent line wrapping inside symbol?

asked 2018-11-25 18:15:24 +0200

ajlittoz gravatar image

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 flag offensive close merge delete

Comments

Thank you all for this super fast answer!

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

3 Answers

Sort by » oldest newest most voted
2

answered 2018-11-25 18:30:14 +0200

updated 2018-11-25 22:37:12 +0200

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).

edit flag offensive delete link more
1

answered 2018-11-25 18:25:24 +0200

Lupp gravatar image

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

edit flag offensive delete link more

Comments

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).

Lupp gravatar imageLupp ( 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.

ajlittoz gravatar imageajlittoz ( 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).

Mike Kaganski gravatar imageMike Kaganski ( 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.)

Lupp gravatar imageLupp ( 2018-11-25 22:29:16 +0200 )edit
0

answered 2018-11-25 18:29:54 +0200

ebot gravatar image

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

edit flag offensive delete link more

Comments

No because I want a "no space" (zero width)

ajlittoz gravatar imageajlittoz ( 2018-11-25 18:42:30 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-25 18:15:24 +0200

Seen: 45 times

Last updated: Nov 25 '18