嗯,為了讓目標更清晰,這裡有一張已出版的波斯語(Farsi)翻譯截圖,其中包含平行經文指示符。第一個是馬太福音 6:25-33 的引用,視覺順序為:33-25:6 馬太福音
你說得完全正確,數字確實是從左到右(LTR)書寫的,但當有分隔符等元素時,一串數字就像一個單詞。然後所有單詞都會按照從右到左(RTL)的順序排列。
Microsoft Word 讓人困惑。如果我輸入經文引用,它會正確顯示(事實上,無論我將段落設定為 RTL 還是 LTR 都是如此)。但如果我從這個瀏覽器視窗複製並貼上,它就會顯示錯誤(同樣,無論段落是 RTL 還是 LTR)。真是「所見即所得」(WYSIAYG),我想。
以下是我可以在 Word 或其他圖形介面中重現錯誤結果的一些方法:
在引用的開頭放置一個從左到右標記(U+200E)。
如果我移除書名,章/節部分就會錯誤排列。
這讓我覺得章/節部分是以 LTR 模式排列的。
這裡有一些進一步的測試。當我把經文引用放在經文文本中時,它們會顯示錯誤。我無法完全解釋這一點,除非 XeLaTeX 根本沒有被告知這是一個 RTL 環境。
\id PHM
\h سسسس
\c 1
\cl
\s1 سسسس
\p \v 1 پیدایش ۱:۱-۲۸
\s1 سسسس
\p \v 2 ۱:۱-۲۸
接下來是 XeLaTeX……
如果我使用 fontspec 和 bidi,無論環境是 LTR 還是 RTL,輸出都是錯誤的:
\documentclass{book}
\usepackage{fontspec,bidi}
\setmainfont[Script=Arabic]{Times New Roman}
\begin{document}
\setRTL
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\setLTR
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\end{document}
相反地,如果我使用 xepersian,我無法讓它顯示錯誤。在以下四種情況中,章/節部分都能正確排列:
\documentclass{book}
\usepackage{xepersian}
\usepackage[fontsize=16pt]{fontsize}
\settextfont{Times New Roman}
\begin{document}
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\beginL
۱:۱-۲۷
\endL
\beginL
پیدایش ۱:۱-۲۷
\endL
\end{document}
我就說到這裡。看起來 xepersian 修復了 fontspec 和 bidi 的一個缺陷,但我不知道那是什麼。
Well, just so the goal is clear, here’s a picture of a published Farsi translation with a parallel passage indicator. The first one is a reference to Matthew 6:25-33, and the visual order is: 33-25:6 Matthew
You’re absolutely right that the digits are written LTR, but when you have delimiters and such, it’s like a sequence of digits is a single word. Then all the words get laid out in RTL order.
Microsoft Word is puzzling. If I type in the verse reference, it comes out correctly (in fact, whether I’ve set the paragraph to RTL or LTR). If I copy and paste from this browser window, it comes out incorrectly (again, whether the paragraph is RTL and LTR). WYSIAYG, I guess.
Here are some things that I can do to replicate the wrong result (in Word or other GUIs):
Place a LEFT-TO-RIGHT marker (U+200E) at the beginning of the reference.
If I remove the book name, the chapter/verse part gets laid out wrongly.
These suggest to me that the chapter/verse part is being laid out in LTR mode.
Here are some further tests. Verse references come out wrong when I put them in verse text. I can’t quite explain that, unless XeLaTeX isn’t being told at all that it’s an RTL context.
\id PHM
\h سسسس
\c 1
\cl
\s1 سسسس
\p \v 1 پیدایش ۱:۱-۲۸
\s1 سسسس
\p \v 2 ۱:۱-۲۸
Over to XeLaTeX…
If I use fontspec and bidi it comes out wrong whether the context is LTR or RTL:
\documentclass{book}
\usepackage{fontspec,bidi}
\setmainfont[Script=Arabic]{Times New Roman}
\begin{document}
\setRTL
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\setLTR
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\end{document}
Conversely, if I use xepersian, I can’t make it come out wrong. The chapter/verse portion gets laid out correctly in all four of these:
\documentclass{book}
\usepackage{xepersian}
\usepackage[fontsize=16pt]{fontsize}
\settextfont{Times New Roman}
\begin{document}
۱:۱-۲۷
پیدایش ۱:۱-۲۷
\beginL
۱:۱-۲۷
\endL
\beginL
پیدایش ۱:۱-۲۷
\endL
\end{document}
I’ll stop here. It looks to me as if xepersian has fixed a shortcoming in fontspec and bidi, but I don’t know what that is.
機器翻譯自 English 顯示原文