\hangindent と RTL テキスト

\hangindent と RTL テキスト

\hangindent は左から右へのテキストでは完璧に機能しますが、bidi の RTL テキストでは機能しません。

xelatexで実行しているこの例を参照してください

\documentclass{article}
\usepackage{polyglossia}
\usepackage{libertine}
\setmainlanguage{french}
\setotherlanguage{hebrew}
\begin{document}
\begin{hebrew}
  \parindent=0em
\hangindent=4em
\hangafter=1
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְהֹ֑ום וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃
וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י אֹ֑ור וַֽיְהִי־אֹֽור׃
יַּ֧רְא אֱלֹהִ֛ים אֶת־הָאֹ֖ור כִּי־טֹ֑וב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָאֹ֖ור וּבֵ֥ין הַחֹֽשֶׁךְ׃
\end{hebrew}

  \parindent=0em
\hangindent=4em
\hangafter=1
1Au commencement Dieu créa le ciel et la terre.
2La terre était un chaos, elle était vide ; il y avait des ténèbres au-dessus de l'abîme, et le souffle de Dieu tournoyait au-dessus des eaux.
3Dieu dit : Qu'il y ait de la lumière ! Et il y eut de la lumière.
4Dieu vit que la lumière était bonne, et Dieu sépara la lumière et les ténèbres
\end{document}

答え1

\hangindent < 0右からインデントするように設定できます。\parヘブライ語の段落の最後にも (または空行) が必要であることに気付きました。

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{hebrew}
\newfontfamily{\hebrewfont}{SBL BibLit}[Script=Hebrew,Contextuals=Alternate]
\begin{document}
\begin{hebrew}
  \parindent=0em
  \hangindent=-4em
  \hangafter=1
  בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
  וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְהֹ֑ום וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃
  וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י אֹ֑ור וַֽיְהִי־אֹֽור׃
  יַּ֧רְא אֱלֹהִ֛ים אֶת־הָאֹ֖ור כִּי־טֹ֑וב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָאֹ֖ור וּבֵ֥ין הַחֹֽשֶׁךְ׃

\end{hebrew}

\parindent=0em
\hangindent=4em
\hangafter=1
1Au commencement Dieu créa le ciel et la terre.
2La terre était un chaos, elle était vide ; il y avait des ténèbres au-dessus de l'abîme, et le souffle de Dieu tournoyait au-dessus des eaux.
3Dieu dit : Qu'il y ait de la lumière ! Et il y eut de la lumière.
4Dieu vit que la lumière était bonne, et Dieu sépara la lumière et les ténèbres
\end{document}

出力

答え2

arabluatexと を使用するとenumitem、次の MWE が得られます。

%!TEX TS-program = lualatex
%!TEX encoding = UTF-8 Unicode

\documentclass{report}
\usepackage{fontspec}
    \newfontfamily\arabicfont[Script=Arabic]{Amiri}
\usepackage{arabluatex}

\usepackage{enumitem}
    \newlist{hangar}{itemize}{1}
    \setlist[hangar]{label={},itemindent=-2em,leftmargin=2em}

\begin{document}
\Huge

\begin{arab}
\begin{hangar}
\item 
kalimAt kalimAt kalimAt kalimAt kalimAt kalimAt 
kalimAt kalimAt kalimAt kalimAt kalimAt  

\item
kalimAt kalimAt kalimAt kalimAt kalimAt kalimAt 
kalimAt kalimAt kalimAt kalimAt kalimAt  
\end{hangar}
\end{arab}

\end{document}

RTL ぶら下げインデントサンプル

関連情報