LTR 脚注中的 RTL 段落导致边距奇数

LTR 脚注中的 RTL 段落导致边距奇数

在英文文本中,我有一些阿拉伯语段落。现在我遇到了一个特殊情况,即(英文)脚注中有一个阿拉伯语段落。我尝试了两种变体,但都没有产生令人满意的结果:

使用 标记文本时\textarabic{},段落的第二行左对齐,这对于阿拉伯文本来说是不自然的。

使用时\begin{Arabic}\end{Arabic},文本方向更改为 RTL,这会使文本正确流动,但边距现在很奇怪:文本延伸到为脚注保留的左边距,而右侧有一个额外的边距。

两种变体的示例

下面是一个简单的例子。

是否有一种变体可以将阿拉伯语段落正确设置为 RTL(即从右侧第二行开始),同时尊重脚注的整体边距?

\documentclass[english, a4paper]{scrartcl}
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\setmainfont[]{Charis SIL}
\setsansfont[]{Charis SIL Compact}
%% languages/scripts
\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\usepackage{polyglossia}
\setmainlanguage[]{english}
\setotherlanguage[]{arabic}
\usepackage{bidi}

\begin{document}
%% No additional space between sentences
\frenchspacing

Christians are
compared to \emph{goim} and are also accused of heresy (\emph{herejía}),
mainly because of their inability to understand revelation. They are
compared to donkeys (\emph{ḥimār}): an ``asno ke lieba libros''
(``donkey that carries books'').\footnote{Cardaillac (1972, 2:41),
  Madrid, National Library of Spain, Aljamiado 4944, f.~45f. Algiers,
  National Library of Algeria, Ar. 1557, p.~57, lines 7--8.

  \textarabic{فسجن الله ما اعمى ابصارهم بيدهم الانجيل يقرونه ولا يفهموه انما مثلهم
  كمثل الحمار يحمل اسفارا اصدق الله العظيم ورسول الكريم}

  The expression ``ka-mathal al-ḥimār yaḥmilu asfāran'' is well known by
  Muslims, as it is found in Qur. 62:5 and used by Arabic grammarians as
  an illustrative case study.} but the basic idea is the same in the Arabic
original and the Aljamiado adaptation.

Christians are
compared to \emph{goim} and are also accused of heresy (\emph{herejía}),
mainly because of their inability to understand revelation. They are
compared to donkeys (\emph{ḥimār}): an ``asno ke lieba libros''
(``donkey that carries books'').\footnote{Cardaillac (1972, 2:41),
  Madrid, National Library of Spain, Aljamiado 4944, f.~45f. Algiers,
  National Library of Algeria, Ar. 1557, p.~57, lines 7--8.

  \begin{Arabic}

  فسجن الله ما اعمى ابصارهم بيدهم الانجيل يقرونه ولا يفهموه انما مثلهم
  كمثل الحمار يحمل اسفارا اصدق الله العظيم ورسول الكريم

  \end{Arabic}

  The expression ``ka-mathal al-ḥimār yaḥmilu asfāran'' is well known by
  Muslims, as it is found in Qur. 62:5 and used by Arabic grammarians as
  an illustrative case study.} but the basic idea is the same in the Arabic
original and the Aljamiado adaptation.

\end{document}

答案1

您可以使用包extrafootnotefeatures的选项bidi。一个可能不受欢迎的副作用是,这会使脚注规则占满整个宽度。大概可以重新定义。

\documentclass[a4paper]{scrartcl}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\setmainfont{Noto Serif}
\setsansfont{Noto Sans}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\PassOptionsToPackage{extrafootnotefeatures}{bidi}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\begin{document}
\null\vfill
Christians are compared to \emph{goim} and are also accused of heresy
(\emph{herejía}), mainly because of their inability to understand revelation.
They are compared to donkeys (\emph{ḥimār}): an ``asno ke lieba libros''
(``donkey that carries books'').\footnote{Cardaillac (1972, 2:41), Madrid,
  National Library of Spain, Aljamiado 4944, f.~45f. Algiers, National Library
  of Algeria, Ar. 1557, p.~57, lines 7--8.

  \textarabic{فسجن الله ما اعمى ابصارهم بيدهم الانجيل يقرونه ولا يفهموه انما
  مثلهم كمثل الحمار يحمل اسفارا اصدق الله العظيم ورسول الكريم}

  The expression ``ka-mathal al-ḥimār yaḥmilu asfāran'' is well known by
  Muslims, as it is found in Qur. 62:5 and used by Arabic grammarians as an
illustrative case study.} but the basic idea is the same in the Arabic
original and the Aljamiado adaptation.

Christians are compared to \emph{goim} and are also accused of heresy
(\emph{herejía}), mainly because of their inability to understand revelation.
They are compared to donkeys (\emph{ḥimār}): an ``asno ke lieba libros''
(``donkey that carries books'').\footnote{Cardaillac (1972, 2:41), Madrid,
  National Library of Spain, Aljamiado 4944, f.~45f. Algiers, National Library
  of Algeria, Ar. 1557, p.~57, lines 7--8.

  \begin{Arabic}
  فسجن الله ما اعمى ابصارهم بيدهم الانجيل يقرونه ولا يفهموه انما مثلهم كمثل
  الحمار يحمل اسفارا اصدق الله العظيم ورسول الكريم
  \end{Arabic}

  The expression ``ka-mathal al-ḥimār yaḥmilu asfāran'' is well known by
  Muslims, as it is found in Qur. 62:5 and used by Arabic grammarians as an
illustrative case study.} but the basic idea is the same in the Arabic
original and the Aljamiado adaptation.
\end{document}

输出

相关内容