bidi 包中的 extrafootnotefeatures 选项破坏了 KOMAScript \deffootnote

bidi 包中的 extrafootnotefeatures 选项破坏了 KOMAScript \deffootnote

我正在使用 KOMAScript 类scrartcl来排版包含英语和阿拉伯语的学术文章。对于脚注格式,我使用\deffootnote

对于包含阿拉伯语文本的脚注,页边距很奇怪。此问题已通过软件包选项修复extrafootnotefeaturesbidi请参阅这个问题)。但是,这会破坏使用 所做的更改\deffootnote

无 extrafootnotefeatures(左),有 extrafootnotefeatures(右)

不带extrafootnotefeatures(左),带extrafootnotefeatures(右)

有没有办法获得正确的双向脚注,同时保留更改脚注格式的可能性?

下面是一个最小的工作示例。

\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}
\PassOptionsToPackage{extrafootnotefeatures}{bidi}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}

%% Footnotes (load after polyglossia!)
\deffootnote{\leftmargin}{1em}{%
\makebox[\leftmargin][l]{\thefootnotemark}%
}

% Restore original footnote rule
\makeatletter
\def\footnoterule{\left@footnoterule}
\makeatother

\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.

  \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

我想我误导了你最后一个问题

糟糕的渲染是由阿拉伯语文本周围的空行造成的。如果删除它,那么即使没有 选项,它也可以正常工作bidiextrafootnotefeatures然后您可以使用\deffootnote而不会产生副作用,以及删除 hack 以保持正常的脚注规则:

\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}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\deffootnote{\leftmargin}{1em}{\makebox[\leftmargin][l]{\thefootnotemark}}
\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.

  \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}

输出

相关内容