0
154 次浏览

I’ve just tracked down the cause of a crash on someone’s project to a line Unfortunately there was a think-o when someone was writing the template for FRT books, and this line was included:

\rem sorta will sort by \toc1, sortb by \toc2, sortc by \toc3

This is pretty much guaranteed to cause a crash / undefined behaviour.

If you have a Front matter that includes that line, change it so that it reads:
\rem sorta will sort by toc1, sortb by toc2 , sortc by toc3
I.e. remove the slashes. Otherwise you will experience crashes.

Earlier versions of the USFM standard were a bit vague, but Paratext and the USFM-3 standard do NOT describe \rem as ‘ignore the rest of this line’, but as a paragraph style that produces no output.
This means:

  1. \rem continues until the next paragraph marker
  2. \rem still has to process any markers it contains. (how else will it spot the next paragraph-marker?).
  3. Since \toc1 and friends are also described as paragraph markers (although not used as such) they should cancel \rem
PTXprint (1.1k 分) 发布 | 154 次浏览

1 个回答

0

Correction… Point 3 above is probably incorrect. The standard states that “All paragraph markers should be preceded by a single newline.” Therefore, I feel that it is legitimate for the code to entirely ignore \toc1 etc. in the above situation.
I’m just submitting a small change (which will be available in a week or so, I guess), which obeys the following logic:

  1. USFM codes occurring after \rem and on the same line will be ignored.
  2. After that 1st line, \rem will continue as it has been doing until now: ignoring text but acting on any USFM codes met.
  3. \toc1 etc. are now recognised as paragraph breaks.
(1.1k 分) 发布

相关问题

0
2 个回答 219 次浏览
我协助运营 ScriptureEarth.org 我们一直在设想一种可能性,即提供一个选项,让人们可以请求生成 PDF,并自行选择页面尺寸 字体和行距,也许还可以选择字体 双栏或单栏 我们的服务器是基于 Linux 的 看起来,如果 ... 们希望让人们能够选择他们需要的参数,而不是发布十几种不同的格式 这听起来合理吗? --Loren Hawthorne
LorenHawthorne 173 发布 提问于 八月 5, 2024
PTXprint
0
1 个回答 20 次浏览
我正在使用 PTXprint 3.0.11,但已经有一段时间没用了,所以有一些新功能。我想使用之前的配置来打印选定的经文。 谢谢!
MnKN 134 发布 提问于 二月 21
PTXprint
0
1 个回答 161 次浏览
我是新用户,正在尝试整理用于打印新约的格式代码。另外,\toc1、\toc2 和 \toc3 在 PTXprint 中是如何使用的?
anon762804 102 发布 提问于 五月 23, 2024
PTXprint
0
1 个回答 239 次浏览
I am looking for a way to add a page break so that the next section header starts on a new page. Is there a code ... a new page? Is there a list of module codes somewhere? thanks
MnKN 134 发布 提问于 十二月 16, 2023
0
1 个回答 43 次浏览
我想在本地 FRT 中实现类似以下功能,但找不到足够的文档来了解具体操作方法: 如果 zvar "version-name" = "readers version",则输出 \pb。否则,输出 \zNeedOddPage 我在 github 和 PTXprint 技术参考中找到了关于此主题的足够文档,知道这应该是可行的,但由于没有示例,很难知道该怎么做。
mvk1000 206 发布 提问于 五月 20
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Don’t you know that you yourselves are God’s temple and that God’s Spirit dwells in your midst?
1 Corinthians 3:16
3,044 个问题
6,004 个回答
5,671 条评论
2,026 位用户