0
155 次瀏覽

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 點) 提出 | 155 次瀏覽

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 提出 已提問 8月 5, 2024
0
1 個回答 20 次瀏覽
我使用的是 PTXprint 3.0.11,但已經有一陣子沒用了,所以有一些新功能。我想使用之前的設定來列印選定的經節。 謝謝!
MnKN 134 提出 已提問 2月 21
0
1 個回答 161 次瀏覽
我是首次使用者,正在嘗試整理用於印刷新約的格式代碼。另外,\toc1、\toc2 和 \toc3 在 PTXprint 中是如何使用的?
anon762804 102 提出 已提問 5月 23, 2024
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 提出 已提問 12月 16, 2023
0
1 個回答 43 次瀏覽
我想在本地 FRT 中執行以下操作,但找不到足夠的文件說明如何做到: 如果 zvar "version-name" = "readers version",則輸出 \pb。否則,輸出 \zNeedOddPage 我在 GitHub 和 PTXprint 技術參考中找到了足夠的文件,知道這應該是可行的,但由於沒有範例,很難知道該如何做。
mvk1000 206 提出 已提問 5月 20
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
3,044 個問題
6,004 個回答
5,671 則評論
2,026 位使用者