0 votes

We have traditionally NOT allowed lines to break in-word hyphens. But for this Jonah book we want to experiment with this option. On the View/Edit > Changes.txt tab I added the code snippet from the very helpful buttons at the right--line 7 in the screenshot. This works great--thank you for these helpful snippet suggestions! However, in one paragraph I need to avoid an orphaned suffix string, so I added line 9 and then used "Expand paragraph by one line" in my PTX Print Layout window. 

image

The result of this configuration is below--same result : Line 7 overrides line 9. When I comment out line 7 the word piriʼooareha-ʼuuri is correctly moved as a unit to the next line; however... all end-of-line in-word hyphens are treated as non-breaking, which is not what I want. 

So then I noticed (duh!) that line 7 allows the line break by inserting a zero-width space after the hyphen. So I tried this for line 9:

at JON 1:8 '(piriʼooareha)-\u200B(ʼuuri?”)' > '\1\u2011\2'

But the suffix was still orphaned. This regex code is above my power-OWL paygrade.

image

So how do I override the "allow linebreaks after in-word hyphens" code for a single instance? Or could this code snippet be tweaked for a narrower scope or something?

PTXprint by (670 points)
Many thanks, Phil. I finally got it to work. I've gotta remember that rule order matters.

1 Answer

+1 vote
Try reversing lines 7 and 9. Change the word you want to protect to the non-breaking hyphen and then the rule allowing the break won't apply.
by (9.8k points)

Related questions

0 votes
3 answers
0 votes
2 answers
PTXprint Jan 20, 2022 asked by listentwice (1.2k points)
0 votes
2 answers
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
3,036 questions
5,992 answers
5,659 comments
2,020 users