[Solved] Non-Breaking Hyphens and Spaces Breaking Anyway

Discuss the word processor

[Solved] Non-Breaking Hyphens and Spaces Breaking Anyway

Postby Vyxenne » Sun Sep 16, 2018 2:03 am

Hi- I'm usiong OOW 4.3 AOO413m1(Build:9783) - Rev. 1761381 2016-09-29 02:39:19.

Please see the snippet below:
NonBreakingFaiuls.png
Image of Line Breaking despite using NB dash & space
NonBreakingFaiuls.png (9.47 KiB) Viewed 279 times

The issue is the line break on hyphen at the end of the first line. It is line-breaking on a non-breaking dash (Ctrl+Minus) followed by a non-breaking space (Ctrl+space.) I'm using a custom style for my manuscript that includes Justified Text and First-Line Indent. In the AutoCorrect options for my Style as well as under AutoCorrect Options under Tools, I have set "Convert Dashes" to NB Dashes. However, in this case, Something seems to be undoing my formatting commands. I have tried to stop the line-break by replacing dash and space with just NB dash but it still line breaks there, totally ignoring all of my formatting to stop it from doing that throughout my 500-page manuscript.

I have been struggling with this for 3 days, reading literally everything online that seems to pertain to this and I'm at my wits' end. Nothing works. I would appreciate any help getting Writer to obey its own Style and Formatting parameters.

Thanks.
Last edited by Hagar Delest on Mon Sep 17, 2018 8:01 am, edited 1 time in total.
Reason: tagged solved
Open Office 4.1.2
Windows 7 Home Premium x64
Vyxenne
 
Posts: 10
Joined: Mon Jun 27, 2016 11:22 pm

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby robleyd » Sun Sep 16, 2018 3:12 am

It is very difficult to tell from an image exactly what is in the real document. Can you upload a sample Writer file - .odt - that shows the problem?

[Forum] How to attach a document here Note maximum file size is 128K. If your file is larger, use a file sharing site such as Mediafire and post the link here. The link also contains information on how to anonymise your document if it contains confidential information.

The information in your signature may be outdated - please consider upgrading it - How to update your signature
Cheers
David
Apache OpenOffice 4.1.4 - Windows 7
Apache OpenOffice 4.1.5 - Slackware 14.2 - 64 bit
User avatar
robleyd
Moderator
 
Posts: 1970
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby Lupp » Sun Sep 16, 2018 2:48 pm

Ctrl+dash isn't a non-breaking but a conditionally-printing hyphen: It should only print if an actual hyphenation occurred due to automatic line wrapping.
The default shortcut for non-breaking (protected) dash is Ctrl+Shift+minus.

The default shortcut for the protected space is Ctrl+Shift+space. (Ctrl+space is not preset at all for my AOO 4.1.5.)
On Windows 10: LibreOffice 6.1 and older versions, PortableOpenOffice 4.1.5 and older, StarOffice 5.2
---
Let's create a powerful UFO: United Free Office!
Lupp from München
User avatar
Lupp
Volunteer
 
Posts: 1990
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby Bill » Sun Sep 16, 2018 4:40 pm

Vyxenne wrote:In the AutoCorrect options for my Style as well as under AutoCorrect Options under Tools, I have set "Convert Dashes" to NB Dashes.

The "Replace Dashes" AutoCorrect option replaces dashes with em-dashes or en-dashes. There are no AutoCorrect options to replace dashes with non-breaking dashes. The Wiki says to use Ctrl + Shift + minus sign to insert a non-breaking dash and Ctrl + Shift + space to insert a non-breaking space.

Inserting dashes and non-breaking spaces
AOO 4.1.5 and LO 6.0.3.2 on Manjaro MATE
Bill
Volunteer
 
Posts: 6815
Joined: Sat Nov 24, 2007 6:48 am

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby Vyxenne » Sun Sep 16, 2018 9:22 pm

Thanks for the responses- I'll go back and make sure that I used Ctrl+Shft+(minus or space) as directed in the Wiki, which I read beginning to end in the hyphenation section- my "Ctrl+(space or minus) above was simply a brain f@rt. Sorry.

If Autocorrect, Styles and/or Formatting can't be used to fix this globally (mind boggling that they can't), is there a way for me to use Find and Replace to convert all instances of "- " (dash space) to NB dash NB space? I've tried it but the Replace field doesn't like it when I enter Ctrl+Shft+Space.

The issue is that I use a lot of dash-space at the end of words instead of semicolons or colons, as suggested by several author's style guides, which suggest that semicolons and colons are perceived today as "heavy" and very formal, thus deprecated for modern-era 1st-person narratives. There has got to be some way to convince OOW not to line-break when it encounters this form. Given the ubiquity of "dash space" in modern writing, I would have thought that preventing line breaks on any dash would be the OOW default- I can't think of any circumstance where an author would actually WANT a line break on any explicitly-entered "hyphen-space."
Open Office 4.1.2
Windows 7 Home Premium x64
Vyxenne
 
Posts: 10
Joined: Mon Jun 27, 2016 11:22 pm

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby MrProgrammer » Sun Sep 16, 2018 11:47 pm

Vyxenne wrote:is there a way for me to use Find and Replace to convert all instances of "- " (dash space) to NB dash NB space? I've tried it but the Replace field doesn't like it when I enter Ctrl+Shft+Space.
Put NON-BREAKING HYPHEN NO-BREAK SPACE (U+2011 U+00A0) (Insert → Formatting Mark → Non-breaking hyphen, Insert → Formatting Mark → Non-breaking space) in your document. Copy those two characters to the clipboard. Use Edit → Find&Replace → Search for → {type dash space with keyboard} → Replace with → {paste data from clipboard} → Replace all → OK.

You can also use Unicode input to enter characters not directly supported by the physical keyboard but since OpenOffice has a method to type NON-BREAKING HYPHEN NO-BREAK SPACE into your document so you can copy it, that is probably easier for you.

Going forward, use Edit → AutoText to create an entry for NON-BREAKING HYPHEN NO-BREAK SPACE. It will work better if you use a non-alphabetic shortcut like ;; for this AutoText. Read about AutoText in Help → Index or in User Guides (PDF) or searching for topics about it in the Writer Forum.

I have no difficulty with line-breaking at NON-BREAKING HYPHEN NO-BREAK SPACE when I insert them with an AutoText. If you do, attach a small document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).

If this solved your problem 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 Mac OS 10.11.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Volunteer
 
Posts: 3472
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

[Solved] Non-Breaking Hyphens and Spaces Breaking Anyway

Postby Vyxenne » Mon Sep 17, 2018 2:35 am

Thank you, MyProgrammer, I stumbled onto the copy-paste variation of your method about 2 hours ago. Although I'm still baffled as to why I can't just enter NBHyphen NBSpace directly into the "Replace with" window of the Find dialog box... logically I would expect to be able to enter anything there that I can enter directly into the document itself.

What I did was "fix" one instance by entering NB-Hyphen, NB-Space into my document to replace one instance of "- " that was line-breaking inappropriately, then copied that and pasted it into the "Replace with" section of the Find dialog. Holding my breath, I then banged "Replace all" and ... Mirabilu! Problem solved- 4k+ instances replaced! I then did the same for my frequently-used " - " (Space-hyphen-space) and fixed all 2k+ instances of that. I skimmed the first 3 chapters and didn't find the first inappropriate line break so color this camper happy and thanks for the help.

Now I'm looking for some way to mark this as "Solved" and not finding anything obvious.
Last edited by Vyxenne on Tue Sep 18, 2018 6:06 am, edited 1 time in total.
Open Office 4.1.2
Windows 7 Home Premium x64
Vyxenne
 
Posts: 10
Joined: Mon Jun 27, 2016 11:22 pm

Re: Non-Breaking Hyphens and Spaces Breaking Anyway

Postby robleyd » Mon Sep 17, 2018 3:15 am

How to tag a topic as solved.

In your first post, click the Edit button. Go to the subject line and add [Solved] at the beginning of the subject.

Then select the green tick as the Post icon (just below the subject line). Finally, hit Submit - done!
Cheers
David
Apache OpenOffice 4.1.4 - Windows 7
Apache OpenOffice 4.1.5 - Slackware 14.2 - 64 bit
User avatar
robleyd
Moderator
 
Posts: 1970
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia


Return to Writer

Who is online

Users browsing this forum: Google [Bot] and 14 guests