0
232 次瀏覽

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 (934 點) 提出
已重新顯示 | 232 次瀏覽

1 個回答

+1
最佳回答

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.

舊文章 - 以原文顯示
(571 點) 提出
已重新顯示

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!!

舊文章 - 以原文顯示

相關問題

0
1 個回答 365 次瀏覽
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 提出
已提問 4月 27, 2015
0
4 個回答 841 次瀏覽
In Print Draft (PT 9), if I select Page Size A5 and also select two columns, the format of the first page is all ... we can do booklet printing and get two A5 pages on one A4.
viverechristus 296 提出 已提問 3月 2, 2020
0
1 個回答 264 次瀏覽
Print Draft is mostly working fine. We have people with special needs, so managed to boost font size to 16. And got the ... grasp of the print draft will help a lot. Thank you.
Tim 934 提出 已提問 7月 11, 2018
0
3 個回答 527 次瀏覽
I filed a problem report a while ago but I also wanted to ask whether anyone has seen this sort of problem or has ... might be possible and what dependencies I could look out for.
rowbory 510 提出 已提問 8月 9, 2017
+1
1 個回答 232 次瀏覽
在搜尋時,搜尋清單中顯示的節文脈偶爾會顯示舊的 先前修改過的文字 當我點擊該節時,專案中的文字是正確的 我已經發現過幾次這種情況 我相信這些編輯通常是在幾天前或幾週前進行的 這令人不安,因為這暗示系統中的某些地方可能沒有記錄這些編輯 ... 題 其中一節經文已被編輯,但在某個術語下方的聖經術語清單中仍顯示原始文字 當我點擊該節時,我們專案中的內容是正確的
Clear7419 251 提出 已提問 9月 12, 2022
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
3,048 個問題
6,007 個回答
5,672 則評論
2,028 位使用者