eledmac/eledpar/LuaTeX:页面环境中 RTL 文本段落右对齐

eledmac/eledpar/LuaTeX:页面环境中 RTL 文本段落右对齐

我有一个 LuaTex eledmac++eledpar设置,用于叙利亚语和英语的关键版本(在对开页上)。奇怪的是,当我进入结构时,运行 RTL 的叙利亚语文本没有在右侧对齐,而是在列的左侧\begin{pages}...\end{pages}对齐eledpar

以下 MWE 说明了我的意思。有人能帮助我使以下叙利亚语段落的叙利亚语文本\eledsection与整个页面的右侧对齐吗?

\documentclass{scrartcl}
\usepackage{fontspec}
\usepackage{eledmac,eledpar}
\setlength{\parindent}{0pt}

\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{estre.otf}

\newcommand{\textsyriac}[1] % Syriac inside LTR
           {\bgroup\luatextextdir TRT\syriacfont #1\egroup}
\newcommand{\n}         [1] % for digits inside Arabic text
           {\bgroup\luatextextdir TLT #1\egroup}
\newcommand{\syriacfootnote} [1] % Syriac Footnotes
           {\footnote{\textsyriac{#1}}}
\newenvironment{syriac}     % Syriac paragraph
           {\luatextextdir TRT\luatexpardir TRT\syriacfont}{}

\begin{document}
The following syriac paragraph appears right-aligned as a whole: 

\begin{syriac}
        1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ
\end{syriac}

\bigskip

But on the next page, neither the syriac section heading nor the syriac
paragraph are right-aligned, although they are correctly typsetted RTL: 

\begin{pages}
\begin{Leftside}
\begin{syriac}
\beginnumbering
   \pstart
%% This text is aligned on the left, but should be on the right: 
       \eledsection*{\textsyriac{ܡܿܟܪܟܝ}}
   \pend

   \pstart
       \begin{syriac}
%% This text is aligned on the left, but should be on the right: 
        1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ
       \end{syriac}
   \pend
\endnumbering
\end{syriac}
\end{Leftside}

\begin{Rightside}
\beginnumbering
   \pstart
       \eledsection{English headline} 
   \pend

   \pstart
        Some english text. 
   \pend
\endnumbering
\end{Rightside}

\Pages
\end{pages} 

\end{document}

答案1

刚刚上传到 CTAN 的 eledmac/eledpar 版本 1.18.0 / 1.12.0 应该可以解决此问题。

感谢您的报告和测试。

答案2

正如我所说,使用 XeLaTeX,我可以通过以下 MWE 获得您需要的内容

\documentclass{book}
\usepackage{fontspec,polyglossia}
\usepackage{eledmac,eledpar}
\setmainlanguage{english}
\setotherlanguage{syriac}

\usepackage{bidi}
\setlength{\parindent}{0pt}

\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{Estrangelo Edessa}


\newcommand{\n}         [1] % for digits inside Arabic text
           {\bgroup\LTR  #1\egroup}
\newcommand{\syriacfootnote} [1] % Syriac Footnotes
           {\footnote{\textsyriac{#1}}}

\let\bfseries\relax
\begin{document}
\begin{syriac}
\section*{ܘܟܕ}
\end{syriac}
The following syriac paragraph appears right-aligned as a whole: 

\begin{syriac}
        1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ
\end{syriac}

\bigskip

But on the next page, neither the syriac section heading nor the syriac
paragraph are right-aligned, although they are correctly typsetted RTL: 

%\newpage

\begin{pages}
\begin{Leftside}
\begin{RTL}
\begin{syriac}
\beginnumbering
   \pstart
%% This text is aligned on the left, but should be on the right: 
       \eledsection*{\syriacfont{ܘܟܕ}}
   \pend

   \pstart

%% This text is aligned on the left, but should be on the right: 
        1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ

   \pend
\endnumbering
\end{syriac}
\end{RTL}
\end{Leftside}

\begin{Rightside}
\beginnumbering
   \pstart
       \eledsection{English headline} 
   \pend

   \pstart
        Some english text. 
   \pend
\endnumbering
\end{Rightside}

\Pages
\end{pages} 

\end{document}

相关内容