感謝大家提供這些想法。
是的 - 我確實嘗試了其他間隔字元,它們確實產生了不同大小的空格,但方向仍然會翻轉。我嘗試在空格的一側或兩側(以及為了嘗試一切——在任何字串之前)添加 RTL 標記。
Jeff - 我確實嘗試了零寬非連接字元,它運作正常!(但沒有留下空格)。我想我可以啟用該字元,然後將其定義為一定量的膠合(glue,即空格)?我的 TeX 知識非常生疏,我不確定該怎麼辦。我嘗試了:
\catcode`\=\active
\def{\bgroup\hskip 0.25em\egroup}
(在 \catcode `\ 和 \def 之後有一個 200c)
這可以運作 - 但它給出的結果與空格相同(這並不令人驚訝,因為它現在就是一定量的空格)。
我也嘗試了:
\catcode`\=\active
\def{\bgroup\beginR\hskip 0.25em\egroup}
這是一個不同的結果,但仍然不正確——我知道我現在是在盲目摸索。
Malachi - 我嘗試了你的建議,但結果是 TeX 錯誤,我不會貼在這裡。我想問題在於它將 USFM 標記插入到了 \rb ...|...\rb* 的屬性部分中。
既然我無法在那裡添加標記,我想嘗試將一個從右到左的字元著色來取代空格(Michael 的建議),但我真的不知道自己在做什麼。我嘗試了以下代碼,用 Paseq 取代空格:
\catcode`\׀=\active
\def׀{\bgroup\color{white}׀\egroup}
但我收到關於 ! Argument of \color has an extra } 的抱怨。
我不知道如何使用\color,或者它是否甚至可以這樣使用,或者是語法問題。我知道我現在是在黑暗中摸索。
如果不著色,Paseq 本身其實運作得很好!我希望有一個具有從右到左屬性的空格字元。
感謝回覆和想法。
Jeff
Thanks for these ideas everyone.
Yes - I did try others spacing characters, which do result in different sizes of space, but still flip direction. I tried adding the RTL mark on either side of the space or both (and for the sake of trying everything – before any string at all).
Jeff - I did try the zero width non-joiner, and that works OK! (but leaves no space). I suppose I could make that character active and then define it as some amount of glue (space)? My TeX is very very rusty and I’m not sure how to go about this. I tried:
\catcode`\=\active
\def{\bgroup\hskip 0.25em\egroup}
(there is a 200c in there after \catcode `\ and \def)
This works - but it gives the same result as a space (which is not surprising I guess, since it is now an amount of space).
I also tried:
\catcode`\=\active
\def{\bgroup\beginR\hskip 0.25em\egroup}
which is a different result, but still not correct – and I know I’m hunting around here at this point.
Malachi - I tried your suggestion, but the result is a TeX error, which I won’t paste here. I think the issue there is that it is inserting USFM markup into the attribute section of \rb ...|...\rb*
Since I can’t add markup in there, I’d like to try coloring a right-to-left character in place of the space (Michael’s suggestion), but I don’t really know what I’m doing. I tried the following with Paseq inserted in place of spaces:
\catcode`\׀=\active
\def׀{\bgroup\color{white}׀\egroup}
but I get a complaint about ! Argument of \color has an extra }
I don’t know how to use\color or whether it is even available like this, or a syntax problem. I’m aware that I’m searching in the dark at this point.
Without the color, the Paseq itself actually works fine! I wish there was an space character with Right-To-Left property set.
Thanks for the replies and ideas.
Jeff
機器翻譯自 English 顯示原文