TeX - LaTeX Asked by Frederik on April 10, 2021
In an English text, I have some Arabic passages. Now I have the special case that there is an Arabic paragraph in a (English) footnote. I have tried two variants, but neither produce satisfying results:
When marking the text using textarabic{}
, the second line of the paragraph is left aligned, which is unnatural for Arabic text.
When using begin{Arabic}end{Arabic}
, the text direction is changed to RTL, which makes the text flow correctly, but the margins are now odd: The text reaches into the left margin which is reserved to the footnote, while there is an additional margin on the right.
A minimal example is below.
Is there a variant that sets the Arabic paragraph correctly as RTL (i.e., starting the second line on the right), while respecting the overall margins of the footnote?
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
newfontfamilyarabicfont[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}
You could use the extrafootnotefeatures
option of the bidi
package. One possibly undesirable side effect is that this makes the footnote rule full width. Presumably this could be redefined.
documentclass[a4paper]{scrartcl}
usepackage{fontspec}
defaultfontfeatures{Scale=MatchLowercase}
defaultfontfeatures[rmfamily]{Ligatures=TeX,Scale=1}
setmainfont{Noto Serif}
setsansfont{Noto Sans}
newfontfamilyarabicfont[Script=Arabic]{Amiri}
PassOptionsToPackage{extrafootnotefeatures}{bidi}
usepackage{polyglossia}
setmainlanguage{english}
setotherlanguage{arabic}
begin{document}
nullvfill
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}
Correct answer by David Purton on April 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP