Hyphenated words recognized as whole words

Writing a book, Automating Document Production - Discuss your special needs here

Hyphenated words recognized as whole words

Postby Mahava » Sun Sep 20, 2015 12:00 am

I am putting together a document that has foreign words in it so the pronunciation of those words are spelled out. Is there a way to format the doc so the hyphenated words won't be divided onto two lines?

Example of what is happening:

And the King of Mitz-ra-yim said to the Ha-
iv-rit...

What I would prefer to happen:

And the King of Mitz-ra-yim said to the Ha-iv-rit
...

Or:
And the King of Mitz-ra-yim said to the
Ha-iv-rit...

I have the auto hyphenation turned off - these are hyphens that I am putting in the writing.

Thanks!
Open Office 4.1.1
Windows 8
Mahava
 
Posts: 2
Joined: Sat Sep 19, 2015 11:50 pm

Re: Hyphenated words recognized as whole words

Postby acknak » Sun Sep 20, 2015 12:45 am

Greetings and welcome to the community forum!

Sorry, no. There's no simple way of preventing Writer from breaking words at hyphens.

The only way to prevent a word from being broken is to insert a zero width "word joiner" character at any position where Writer would otherwise break the word. In this case, each hyphen needs a WJ character before and after.

You can insert the WJ characters with Insert > Formatting mark > no width, no break. You can then copy/paste to other places.

You can use Edit > Find & Replace to replace hyphens in one operation.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Hyphenated words recognized as whole words

Postby MrProgrammer » Sun Sep 20, 2015 8:13 am

Hi, and welcome to the forum.

Insert → Formatting Mark → Non-breaking hyphen. The menu item may show you a keyboard shortcut. For mass changes, insert one in the document, then copy/paste it into the Edit → Find & Replace dialog thereby changing hyphens to non-breaking hyphens.

If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.5 Build 9789 on MacOS 10.11.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Volunteer
 
Posts: 3610
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Hyphenated words recognized as whole words

Postby acknak » Sun Sep 20, 2015 1:26 pm

MrProgrammer wrote:... Insert → Formatting Mark → Non-breaking hyphen. ...

Ha! Sitting right there but I never even noticed it. Good catch!

The steps I gave are a general solution: it works to prevent a word break at any position. Mr Programmer's is simpler when you need a hyphen.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Hyphenated words recognized as whole words

Postby Mahava » Mon Sep 21, 2015 7:41 am

Thank you - I will give this a try!
Open Office 4.1.1
Windows 8
Mahava
 
Posts: 2
Joined: Sat Sep 19, 2015 11:50 pm


Return to Advanced Uses

Who is online

Users browsing this forum: No registered users and 3 guests