Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using TeXstudio in order to write a report and I use XeLaTeX compiler. However the following code :

\documentclass[10pt,a4paper]{report}
\usepackage{xepersian}
\usepackage[left=1.00cm, right=1.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\title{فارسی - English }
\begin{document}
\maketitle
\end{document}

fails to print the English characters and the output only contains Farsi strings. What am I doing wrong?

share|improve this question
1  
Welcome to TeX.sx! –  hpesoj626 Mar 20 '13 at 23:31

1 Answer 1

up vote 3 down vote accepted

I think this has nothing to do with TeXstudio as your editor but a feature of xepersian package. I looked at the documentation and found out that if you want to show English text for short left-to-right text, you wrap the text in \lr{}. If it involves larger amount of text, you use the latin environment. Perhaps you meant to type something like

%\documentclass[10pt,a4paper]{report}
\documentclass[10pt,a4paper]{article}

\usepackage{kantlipsum}
\usepackage{xepersian}
\usepackage[left=1.00cm, right=1.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\title{\lr{-English}فارسی}
\begin{document}
\maketitle
\begin{latin}
\kant[1]
\end{latin}
\end{document}

which gives us the following output.

enter image description here

I changed to article class here for demonstration purposes. You can switch back to report in your actual use case. (BTW, why the very small left and right margins?)

share|improve this answer
    
I appreciate your very helpful answer. –  ye9ane Mar 21 '13 at 5:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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