0 votes

I'm having pretty good success using this command to prevent breaks before a specific marker (e.g. to always keep a \q2 with the previous \q1 or \q2):

\sethook{before}{q2}{\nobreak}

But I'm having less luck with the \setbetweenhook command. The situation is that I have text like the following in a number of places:

\s Injiil Isa al-Masiih, al-katabah al-rasuul Matta (Matthieu)
\pc (Évangile : Mt 1, 18-24)
\p
\v 18 Daahu taariikh ...

I want to prevent the \s and \pc from being at the bottom of a column. I would think that the following would do it, but it doesn't seem to help:

\setbetweenhook{pc}{p}{\nobreak}

Any suggestions?

PTXprint by (1.4k points)

2 Answers

0 votes
Best answer

It turns out the adding the \b after the \pc didn't work. (It also got absorbed by the \nobreak.) So I thought I would add a new paragraph with a no-break space like this:

'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u00a0\2'

But that also seems to get absorbed. If I make the no-break space into a real character "x", then the spacing works out about right... but it also puts an "x" in the output!

'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p x\2'

Is there something I can put in the paragraph that would be invisible, but would not get absorbed by the \nobreak?
Jeff

UPDATE: Well, it turns out that a narrow no-break space is invisible and doesn't get absorbed:

'(\\pc .+)(\n\\s |\n\\s2 |\n\n)' > '\1\n\\p \u202f\2'

Jeff

by (1.4k points)
selected by
0 votes

I found somewhat of a workaround. I had more luck with the following:

\sethook{after}{pc}{\nobreak}

But there were some situations where I didn't want the \pc attached to the following element. In those cases, I needed to add a \b after the \pc with the following line in "changes.txt":

'(\\pc .+)(\n\\s |\n\n)' > '\1\n\\b\2'

I would be happy to hear of better solutions...
Jeff

by (1.4k points)

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
2 answers
0 votes
1 answer
Paratext Aug 7, 2018 asked by anon482869 (105 points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overcome it.
Matthew 16:18
3,034 questions
5,988 answers
5,659 comments
2,020 users