xepersian がロードされている間、\lr なしでラテン文字を設定します

xepersian がロードされている間、\lr なしでラテン文字を設定します

大学の論文テンプレートに問題があります。このテンプレートはペルシャ語で書かれており、ペルシャ語のフォントxepersianでパッケージがロードされますB Nazanin。問題はまさにB Nazaninフォントにあります。テンプレートのプリアンブルには次のように書かれています。

\settextfont{B Nazanin}
\setlatintextfont{Times New Roman}

ラテン文字をサポートしていませんB Nazanin。環境外のラテン文字は\lr以下のように四角形になります。

ここに画像の説明を入力してください

\lr{}論文を 4 章書きましたが、ラテン語の各部分に使用するのは非常に困難です。この問題をもっと簡単に修正する方法はありますか?

答え1

プログラムを使用するfribidiXeTeXWindowsの場合は、コンパイルされたバージョン作者: Akira Kakuto。それ以外の場合は、ソースから自分でコンパイルしてください。

test.tex含まれる場合

\documentclass{article}
\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}
\let\fribidixetexLRE\lr
\let\fribidixetexRLE\rl
\let\fribidixetexlatinnumbers\lr
\let\fribidixetexnonlatinnumbers\rl
%BIDION
\begin{document}    
این یک پاراگراف «پارسی» است به نام Simple text و این یک عدد 0887 به لاتین است.
%BIDIOFF
\begin{equation}
1+2=3\label{eq:1}
\end{equation}
%BIDION
این فرمول شماره
\ref{eq:1}
است.
%BIDILTR
\begin{latin}
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\end{latin}
%BIDION
و ادامه متن که بعد از متن Lorem Imsum قرار می‌گیرد.
\end{document}
%BIDIOFF

実行することで

fribidixetex -n test.tex -o test.ltx

test.ltxラテン語の短いテキストがすべて自動的に配置されたファイルを取得します\lr。次に、

xelatex test.ltx

PDF出力を生成します。

関連情報