好吧,为了明确目标,这里有一张已发布的波斯语译本图片,其中包含平行经文指示符。第一个引用是马太福音 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