在以下示例中,当我编译时,“英文脚注。”是倒着的。它位于脚注内,脚注内的内容\textLR
如下:\textLR{\footnote{Footnote in English.}}
我是否还需要将其放在\textLR
脚注内\footnote
?如果我这样做,它就可以正常工作。我只是想知道这是预期的还是一个错误(因为我不明白为什么 outsiedtextLR
不处理这个问题)?
我不知道如何粘贴,同时保留阿拉伯语,所以我另外链接到文件这里。
%% LyX 2.3.0dev created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass{article}
\usepackage[cp1256,latin9]{inputenc}
\usepackage[arabic,english]{babel}
\begin{document}
\title{Mixed text Latin and Arabic characters}
\maketitle
\section{Main Text Latin Characters}
This is a paragraph in English.\footnote{A footnote in Latin characters.}
This is a paragraph in English. This is a paragraph in English. This
is a paragraph in English. This is a paragraph in English. \inputencoding{cp1256}\textAR{���
������� ������� �������}\inputencoding{latin9} This is a paragraph
in English. This is a paragraph in English. This is a paragraph in
English. This is a paragraph in English. This is a paragraph in English.\footnote{\textAR{\selectlanguage{arabic}%
\inputencoding{cp1256}%
����� �����.\selectlanguage{english}}%
}\inputencoding{latin9} This is a paragraph in English. This is a paragraph
in English.
\section{Main Text Arabic Characters}
\selectlanguage{arabic}%
\inputencoding{cp1256}%
��� �������\inputencoding{latin9}\textLR{\footnote{Footnote in English.}}\inputencoding{cp1256}
������� �������.\inputencoding{latin9}\textLR{\footnote{\textAR{\selectlanguage{arabic}%
\inputencoding{cp1256}%
����� �����.\selectlanguage{english}}%
}} \inputencoding{latin9}\textLR{Some text in Latin characters.}\inputencoding{cp1256}
��� ������� ��������.\selectlanguage{english}%
\end{document}
我得到的显示脚注的输出如下:
这个问题的目的是我想修复这LyX 错误。请注意,我对 Bidi 一无所知。
答案1
为什么不使用该bidi
包?使用以下代码运行xelatex
:
\documentclass{article}
\usepackage{fontspec}
\usepackage{bidi}
\newfontfamily\ARFont[Script=Arabic]{Tahoma}
\begin{document}
\title{Mixed text Latin and Arabic characters}
\maketitle
\section{Main Text Latin Characters}
This is a paragraph in English.\footnote{A footnote in Latin characters.}
This is a paragraph in English. This is a paragraph in English. This
This is a long long long long {\RLE{\ARFont یک کلمه}} long
long long long long long long long sentence in English.
\begin{RTL}
{\ARFont
این هم یک جمله بلند بلند بلند%
\LTRfootnote{A sample footnote}
بلند بلند بلند بلند بلند بلند بلند بلند به فارسی است%
\RTLfootnote{\RLE{\ARFont یک کلمه}}
این هم یک پاراگراف دیگه....
}
\end{RTL}
\end{document}
输出: