0 votes
202 views

I found several threads here about Print Draft Changes. I have used them for a few years now.

For one project I would love to try the option of “applying changes in limited contexts” as hinted in the help subject “How do I apply consistent changes to the text when creating output with Print Draft?”.

I would also like to learn more on what Regex tools I can use there.

This is about project-custom admin-numbers.

This example is working for the project:

"(7\d\d\d)" > "BLO \1"

But I would like to apply this change only in the context of the marker \zblo because I fear that it will apply this change whereever a large number might show up in the scripture text or somewhere in the glossary.

I tried to guess the syntax but did not succeed with any of these:

in "\zblo": "(7\d\d\d)" > "BLO \1"

in "\\zblo": "(7\d\d\d)" > "BLO \1"

in "zblo": "(7\d\d\d)" > "BLO \1"

in zblo: "(7\d\d\d)" > "BLO \1"

The first three guesses above did not provide the expected output but triggered no error message. The fourth one above did trigger an error message about missing quotes, so somehow the first three guesses are “somewhat correct” and maybe I do not know enough what the PT8-team means by “context”.

Also I had no joy with “more regex” like adding a start-of-line-anchor ^ :

"^(7\d\d\d)" > "BLO \1"

If you have more detailed documentation or maybe one or two working examples, that would help a lot. Thank you.

Paratext by (934 points)
reshown | 202 views

1 Answer

+1 vote
Best answer

You need to first match on the
content of the in “\zblo” marker.:

in “\zblo [^\]*”:

      This will select the text

starting with the \zblo marker until the next marker.

by (571 points)
reshown

Thank you @anon467281. So you are saying what the help means by context can be any regex that contains my “target-for-change”, not a PT-level-marker.

I tried your syntax right away and got it going. If other users are searching for “context” and “print draft changes”, here are a few hints:

This line finally works after several different error messages and some testing:

in “\zblo [^\]*”: “(7\d\d\d)” > “BLO \1”

So:

  • you need to replace the pretty quotes from @anon467281 (probably changed by this web-forum-tool) to normal quotes
  • you need to escape the backslash inside the character class
  • and you might need to escape the line-initial backslash if you are using a SFM for defining your own context.

This is nice, I feel I can now write more changes to make the output more user-friendly or more admin-friendly without the risk of changing actual scripture text. Thank you!!

Related questions

0 votes
4 answers 546 views
We have a user who is experiencing a problem where a certain character combination does not present correctly using the Print ... when the user should get Any ideas? Thank you.
MSEAIT_LT 478 asked Mar 21, 2018
0 votes
1 answer 322 views
I am producing a Bible with added commentary \add \add* that I want printed in color. By default \add is Bold and Italic ... this in PT8.0 but the issue also applies to PT7.6.
Kent Spielmann 1.8k asked Aug 8, 2017
0 votes
1 answer 335 views
A user is using the Khmer script for their project. They are using the Khmer Mondulkiri font. In the project text ... of how it looks in PrintDraft, U+17C9 incorrectly above letter
[Expert]
sewhite
3.3k
asked Apr 27, 2015
+1 vote
1 answer 210 views
When searching, occasionally the verse context shown in the search list shows old, previously modified text. When I click ... clicked on the verse, it was correct in our project.
Clear7419 251 asked Sep 12, 2022
+1 vote
1 answer 247 views
I want to export a Japanese project that has ruby text to RTF (Print Draft will be okay if necessary). So far, I have ... the project is set to USFM 3. Thank you for your help.
anon180868 195 asked Dec 28, 2020
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
If anyone destroys God’s temple, God will destroy that person; for God’s temple is sacred, and you together are that temple.
1 Corinthians 3:17
3,037 questions
5,995 answers
5,661 comments
2,022 users