0
371 次浏览

The translators I work with often combine verses–sometimes two, sometimes three. We use a comma as a separator, and include the number of every verse that has been combined, e.g., Gn. 31:17,18,19 (mostly so that new readers won’t be left wondering what happened to verse 18 if it was written Gn. 31:17-19).
Anyway, when I produce a Print Draft and combined verses are at the top of a page, the header reads: 31:17,18,19-32. Is there any way to have it read: 31:17-32?

较早的帖子 - 以原始语言显示
Paratext (642 分) 发布 | 371 次浏览

1 个回答

0
最佳答案

I think this will do it, or at least get the conversation started.

Here’s what to do:
Open or create "My Paratext Projects\YOURPROJECT\custom.sty"
Add

\Marker v
\TextProperties verse nonpublishable

Open or create "My Paratext Projects\YOURPROJECT\PrintDraftChanges.txt"
Add

"\\v\ ((\d*)(.*?)(\d*)?)\ " > "\\v \2-\4 \\vp \1 \\vp* "
"-\ " > " "

Why it (hopefully) works:
As you send your text to draft, you’re changing verse numbers so that \v marks what PT expects to see, i.e. hyphens in ranges. You’re also adding \vp which says which text should actually be printed. In your PrintDraft, the header references are read from \v and hence will display correctly.

I’m not very good at using Regular Expressions, so I’m not confident mine will work perfectly but I know I have the general idea down. The second line "-\ " > " " is necessary because I couldn’t find a way to not create a hyphen when the verse only had a single reference in it, so I just created it and then deleted it when necessary.

Sidenote: In my opinion the edits to custom.sty should be unnecessary, as should my forcing every verse to have both \v and \vp markers. This is because ptx2pdf, the TeX macros behind PrintDraft, fail to follow what I think should be a simple rule: If \vp exists then print \vp and not \v. Else print \v.

[Edited to fix Regular Expression]

较早的帖子 - 以原始语言显示
(1.9k 分) 发布
已重新显示

Sorry to say, it doesn’t work… With the lines added to PrintDraftChanges.txt, I get ‘marker errors’ that prevent a Print Draft from being created. With the lines commented out (with #), Print Draft works again. So there’s something up with the regular expression.
I appreciate you taking a crack at it, but don’t waste too much time on it–it’s not a big deal!

较早的帖子 - 以原始语言显示

Strange, I found that mistake yesterday and corrected, but obviously copied and pasted the wrong regex line onto the webpage. There was simply an extra \ in my line.

"\\v\ ((\d*)(.*?)(\d*)?)\ " > "\\v \2-\4 \\vp \1 \\vp* "
较早的帖子 - 以原始语言显示

This one works. Thanks!

较早的帖子 - 以原始语言显示

相关问题

0
4 个回答 540 次浏览
Tildes (used in USFMs as non-breaking spaces) disappear when the view is changed in Preview view, as expected. ... . Am I missing some step that would make these disappear?
Alex W. 191 发布 提问于 七月 13, 2018
+1
1 个回答 261 次浏览
我想将一个包含振假名(ruby)文本的日语项目导出为 RTF(如有必要,使用打印草稿也可以)。到目前为止,我尚未成功将其导出,RTF 或 PDF 中均未显示振假名文本。 我使用的是 PTX 9.1,项目设置为 USFM 3。 感谢您的帮助。
anon180868 195 发布 提问于 十二月 28, 2020
0
2 个回答 335 次浏览
One user wants to use print draft but is encountering an error which says marker errors detected , when certain ... user be concerned about the message seen in print draft?
anon310851 135 发布 提问于 五月 8, 2018
0
0 个回答 171 次浏览
While I have submitted a problem report, it does not include one of the screen shots, so I thought someone ... Roman (but trying different fonts changed nothing.) Iver+Larsen
Iver Larsen 869 发布 提问于 四月 9, 2018
0
4 个回答 587 次浏览
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 发布 提问于 三月 21, 2018
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Every day they continued to meet together in the temple courts. They broke bread in their homes and ate together with glad and sincere hearts, praising God and enjoying the favor of all the people. And the Lord added to their number daily those who were being saved.
Acts 2:46-47
3,046 个问题
6,006 个回答
5,671 条评论
2,026 位用户