Expex 和 RL 语言(阿拉伯语)以及 LR 自由文本(英语)

Expex 和 RL 语言(阿拉伯语)以及 LR 自由文本(英语)

我正在尝试使用 expex 对正文进行行间注释,其中正文采用 RL 语言(阿拉伯语),而自由文本采用 LR 语言(英语)。从输出中可以看出,RL 语言格式正在接管自由文本的格式。如何让 expex 仅对自由文本使用 LR?

\documentclass[12pt]{article}

% extra packages
\usepackage[margin=0.5in]{geometry}
\usepackage{expex}
\usepackage{polyglossia}

% dimensions
\newlength{\defparindent}
\setlength{\defparindent}{\parindent}
\setlength{\parindent}{0pt}

% custom ling styles
\definelingstyle{Text}{aboveexskip=0pt,belowexskip=0pt,
  belowglpreambleskip=0pt,aboveglftskip=0pt,glwordalign=left,
  glftpos=right,glhangstyle=none,ssratio=.60,
  everygla=\arabicfont}

% font
\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}

\pagestyle{empty}

\setmainlanguage{english}
\setotherlanguage{arabic}

\begin{document}

\exdisplay[lingstyle=Text]
\begin{Arabic}
\begingl
\gla
اِسْمي هَيْشم نَجّار. طالِنٌ في كُلًِيَّةِ العُلومِ في جامِعَةِ دِمَشْق. في
//
\glb
Name Haisham Najjar Student in college science at University Damascus In
//
\glft
My name is Haisham Najjar. I am a student in the college of science
at Damascus University.
//
\endgl
\end{Arabic}

\end{document}

输出: 在此处输入图片描述

答案1

添加\textenglish{...}将解决 RL 问题。

\glft \textenglish{My name is Haisham Najjar. I am a student in the college of science at Damascus University.}

编辑:也添加到everyglft=\raggedleftlingstyle

\documentclass[12pt]{article}

% extra packages
\usepackage[margin=0.5in]{geometry}
\usepackage{expex}
\usepackage{polyglossia}

% dimensions
\newlength{\defparindent}
\setlength{\defparindent}{\parindent}
\setlength{\parindent}{0pt}

% custom ling styles
\definelingstyle{Text}{
    aboveexskip=0pt,
    belowexskip=0pt,
    belowglpreambleskip=0pt,
    aboveglftskip=0pt,
    glwordalign=left,
    glftpos=right,
    glhangstyle=none,
    ssratio=.60,
    everygla=\arabicfont,
    everyglft=\raggedleft
}

\pagestyle{empty}

\setmainlanguage{english}
\setotherlanguage{arabic}
% font
\newfontfamily\arabicfont[Script=Arabic]{Andalus}

\begin{document}

\exdisplay[lingstyle=Text]
\begin{Arabic}
\begingl
\gla
اِسْمي هَيْشم نَجّار. طالِنٌ في كُلًِيَّةِ العُلومِ في جامِعَةِ دِمَشْق. في //

\glb
Name Haisham Najjar Student in college science at University Damascus In //

\glft
\textenglish{My name is Haisham Najjar. I am a student in the college of science at Damascus University.} //
\endgl
\end{Arabic}

\end{document}

相关内容