[Solved] Prevent line breaks before prime symbol

Discuss the word processor
Post Reply
Rayosu
Posts: 5
Joined: Sun Feb 16, 2020 2:40 am

[Solved] Prevent line breaks before prime symbol

Post by Rayosu »

For some incomprehensible reason, Writer inserts a line break before a prime symbol (used in formulas in mathematical notation) if it appears close to the end of a line. So, for example, if I have A′→B, there might be a line break after the A, starting the next line with ′→B. This, obviously, should not happen. Instead, if the formula doesn't fit on the line, a line break should be added before the formula (and not inside it, and most certainly not before a prime symbol). Is there a way to fix this (rather absurd) line breaking behavior?
Last edited by robleyd on Wed Jan 17, 2024 2:03 pm, edited 2 times in total.
OpenOffice 4.1
Windows 11
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: prevent line breaks before prime symbol

Post by JeJe »

If you use Insert menu/object/formula then it won't break.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Rayosu
Posts: 5
Joined: Sun Feb 16, 2020 2:40 am

Re: prevent line breaks before prime symbol

Post by Rayosu »

Yes, but that creates other problems. I want/need to insert formulas as text. (And when doing so, I think I have only encountered this problem with the prime symbol.)
OpenOffice 4.1
Windows 11
JeJe
Volunteer
Posts: 2785
Joined: Wed Mar 09, 2016 2:40 pm

Re: prevent line breaks before prime symbol

Post by JeJe »

You could instead use a drawing textbox or a text frame. A form controls label as well - though they sometimes don't redraw properly. Or even that text turned into a picture.

The other option would be substituting an apostrophe for it.

It breaks in LibreOffice too. There is no non-breaking feature for Character formatting unfortunately.

There are non-breaking unicode spaces and hyphens but there doesn't seem to be a non-breaking unicode equivalent for the prime. There's a word joiner but entering that as a character using a macro doesn't seem to affect the breaking for me. Nor does using a zero with space.

https://en.wikipedia.org/wiki/Word_joiner

You can use the non-breaking hyphen "‑" make the text color white and reduce the character width as in the attached document

Edit: You could perhaps create an autotext. View field shadings will need to be off for a grey field shading not to be seen.
Attachments
white non breaking hyphen width reduced.odt
(9.58 KiB) Downloaded 204 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Rayosu
Posts: 5
Joined: Sun Feb 16, 2020 2:40 am

Re: prevent line breaks before prime symbol

Post by Rayosu »

Thanks for looking into this, and for your suggestions. Unfortunately, none of your suggestions would be acceptable in my case. (I need to exchange the file with others who use different text editing software, so extra symbols is not an option and I need to take conversion problems into account.) Apparently, some foolish person decided that the prime symbol should have a line breaking feature. I suppose this is a unicode problem. I was just wondering whether Open Office has some trick or feature to suppress this behavior, but that appears not to be the case unfortunately.
OpenOffice 4.1
Windows 11
Rayosu
Posts: 5
Joined: Sun Feb 16, 2020 2:40 am

Re: [SOLVED] prevent line breaks before prime symbol

Post by Rayosu »

JeJe, your solution DOES work!

I made a hotkey (using autohotkey) for the word-joiner and that does the trick.

Thanks again!
OpenOffice 4.1
Windows 11
Post Reply