透過加入 id:GLO|,你已經指定了「僅在 GLO 書卷中」,因此使用另一個標記沒有好處,除非你想以不同的方式格式化它。
即使你想在 GLO 中以不同方式格式化 \m,你仍然可以保持 USFM 不變,並格式化標記 id:GLO|m。我唯一會使用特殊標記的理由是,如果它在「本質上」不是 \m。
順帶一提,\penalty 應用於它遇到的確切位置,無論那是水平方向(將文字行斷為段落)還是垂直方向(將段落斷為頁面)。
由於在 \k 的結尾處於水平模式,在 \k 之後插入它表示「不要在此處開始新段落」 。TeX 接著遇到 \p 或 \m,其定義中包含「如果我們處於水平模式,請用指定的內容填充段落,並加上 \penalty -10000」 ,因此它會在那裡斷行(即使沒有段落結尾填充,penalty 也不會累積,所以它會服從地不在 10000 處斷行,並服從地在 -10000 處斷行)。
再順帶一提,不要 受誘惑去嘗試建立一個 hook,試圖在字元樣式之後插入段落換行。我試了好幾種方法,結論是,如果你要求它在處理字元樣式結尾時設定新段落,代碼會變得非常非常混亂。
By adding the id:GLO| you are already specifying ‘only in the GLO book’, so there’s no benefit to using another marker, unless you want to format it differently.
Even if you want to format \m differently in GLO, you can still leave the USFM unchanged, and format the marker id:GLO|m The only reason I’d use a special marker would be if it’s not a \m ‘at heart’.
FWIW, \penalty applies at exactly the place it’s met, whether that’s in horizontal (breaking a line of text into paragraphs) or vertical (breaking paragraphs into pages).
Since at the end of the \k it’s in horizontal mode, inserting it after the \k says ‘don’t start a new paragraph here’ . TeX then meets the \p or \m which includes in its definition “If we are in horizontal mode, fill the paragraph with whatever has been specified and \penalty -10000” , and so it breaks there instead (even if there were no end-of-par fill, penalties are not cumulative, so it would obediently not break at the 10000 and obediently break at the -10000).
FWIW2, Don’t get tempted to try to make a hook to try to insert a paragraph break after a character style. I tried it several ways, and concluded that it just gets the code really really confused if you ask it to set up a new paragraph while it’s processing the end of a character style.
機器翻譯自 English 顯示原文