答案1
使用该程序fribidiXeTeX
。如果你使用的是 Windows,你可以使用编译版本由 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 输出。