Saya baru saja melacak penyebab crash pada proyek seseorang ke satu baris. Sayangnya, ada kesalahan saat seseorang menulis template untuk buku FRT, dan baris ini disertakan:
\rem sorta will sort by \toc1, sortb by \toc2, sortc by \toc3
Ini hampir pasti akan menyebabkan crash / perilaku tidak terdefinisi.
Jika Anda memiliki Front matter yang menyertakan baris tersebut, ubahlah agar menjadi:
\rem sorta will sort by toc1 , sortb by toc2 , sortc by toc3
Yaitu, hapus garis miringnya. Jika tidak, Anda akan mengalami crash.
Versi sebelumnya dari standar USFM agak ambigu, tetapi Paratext dan standar USFM-3 TIDAK menggambarkan \rem sebagai 'abaikan sisa baris ini', melainkan sebagai gaya paragraf yang tidak menghasilkan output.
Ini berarti:
\rem berlanjut hingga penanda paragraf berikutnya
\rem masih harus memproses penanda apa pun yang dikandungnya. (bagaimana cara lain untuk menemukan penanda paragraf berikutnya?).
Karena \toc1 dan sejenisnya juga digambarkan sebagai penanda paragraf (meskipun tidak digunakan sebagai penanda paragraf), mereka seharusnya membatalkan \rem
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:
\rem continues until the next paragraph marker
\rem still has to process any markers it contains. (how else will it spot the next paragraph-marker?).
Since \toc1 and friends are also described as paragraph markers (although not used as such) they should cancel \rem
Diterjemahkan secara otomatis dari English Tampilkan asli