2

I have a problem with my university thesis template, which in in Persian language and loads xepersian package with B Nazanin Persian font, The problem is exactly with B Nazanin font. as in template preamble we have:

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

and B Nazanin does not support Latin characters. My Latin characters outside an \lr environment becomes square like below:

enter image description here

I wrote 4 chapters of thesis and it's very hard to use \lr{} for every single latin part. Is there anyway to correct this problem more easily?

1

Use the program fribidiXeTeX. If you are on windows, you can use the compiled version by Akira Kakuto. Otherwise, compile from source yourself.

If test.tex contains

\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

By running

fribidixetex -n test.tex -o test.ltx

You get the file test.ltx in which all your latin short texts are automatically placed inside \lr. You will then need to run

xelatex test.ltx

to produce the pdf output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.