0 votes

Hi,
Can anyone help me please with a regex that will work to put in PrintDraftChanges.txt that will remove all verse segments in a text? Some verses have e.g. up to 5 segments (v14a, v14b, v14c, v14d, v14e). I simply want the verse to be normal. I’m guessing that means changing all the a’s to just the verse number, and removing all remaining references to the segments.
Thank you,

PTXprint by (424 points)

5 Answers

0 votes

Hi,

try:

(\v \d+?)a > \1

(\v \d+?)[b-z] >

Mark Skinner

by (123 points)
reshown
0 votes

Totally untested but…

"(\\v\s+\d+)a" > "\1"
"(\\v\s+\d+)[b-z]" > ""

Ought to be pretty close…
CAPTURE{A literal back-slash, a v, one space or more, one digit or more}then an a. becomes what was captured.
The second line doesn’t actually need to capture anything, but it shouldn’t slow things down much, I hope, and it keeps the symmetry.

by (737 points)

This is great. It partially solves one question I’ve had, but we need the ability to include OR exclude the verse segment markers for specific purposes.

We added verse segments into the Gospel passages that are regularly dramatized at Christmas and Easter, to automate printing the drama scripts from a PT Module file. The segments signal change of speaker/actor in our Module spec. (when more than one speaker speaks within a verse). It would be great to strip the segments for other publication types, but if I add these lines to PrintDraftChanges.txt it will strip out the V segments for all pubs, unless someone remembers to comment out the lines when we print the drama scripts for Years A,B,C. We’ve been printing them yearly for in-progress translations, as the text isn’t finalized. I myself might be able to remember to do this but others to whom I hope to delegate this job will not necessarily handle it well.

So I would like to request, if it’s not already available:

A place to store certain PrintDraftChanges and other formatting tweaks in the Saved Layout spec, because certain publications need specific tweaks. Perhaps even a tag in PrintDraftChanges.txt to specify include/exclude a custom statement?

0 votes

HI Mark! it looks like you hit send just before I did! Bracket things in back-ticks to avoid double-slashes displaying as a single one.

by (737 points)

Good catch.

Mark Skinner

0 votes

That seems to work great, thanks. Just a note to anyone else who might use it, that you need to check any footnotes don’t reference verse segments and adjust accordingly.

by (424 points)
0 votes

Hi @Kim_Blewett ,
We have that ability already in PTXprint, where you can write configuration-specific rules in changes.txt and those only apply to the one configuration. (In addition, you can include printdraftchanges.txt) for any rules that need to apply to ALL configurations, regardless of which configuration you’re running at the time. I hope this slide helps you understand it a bit better.

by (2.6k points)

Related questions

0 votes
1 answer
PTXprint Nov 23, 2022 asked by LorenHawthorne (173 points)
0 votes
0 answers
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Very truly I tell you, whoever accepts anyone I send accepts me; and whoever accepts me accepts the one who sent me.
John 13:20
2,629 questions
5,372 answers
5,045 comments
1,420 users