[Tex/LaTex] Sample files of LTR text on left and RTL text on right

right-to-leftxetex

I am looking for sample files with mix LTR and RTL texts where each occupy their respective side of the page on each line.

In addition I want the ability to indent odd/even lines by different lengths.

Examples of RTL languages are Arabic, Hebrew, and Persian. Sample files of each is likely to be useful for others with minor change. Output is to be something like:

English line 1 aaaaaaaaa                                                RTL line 1
   English line 2 bbbbbbbbbb                                         RTL line 2
English line 3 cccccccccc                                               RTL line 3

Best Answer

Use xelatex and the polyglossia package along with the multicols package. Here's an example. Since I don't know Persian, I've just used Google translate to translate something. I'm sure the translation isn't very good.

% !TEX TS-program = XeLaTeX

\documentclass[12pt]{article}
\usepackage{multicol}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainlanguage{english}
\setotherlanguage{farsi}
\newfontfamily\farsifont[Script=Arabic]{Scheherazade}

\begin{document}
\begin{multicols}{2}
This is some text that is in English and since I know English I didn't have to use Google Translate to translate it.
\columnbreak

\begin{farsi}
برخی از متن که به زبان فارسی است، اما من فارسی صحبت نمی کنم، بنابراین من برخی از انگلیسی به فارسی با استفاده از گوگل ترجمه، ترجمه شده است. من کاملا مطمئنم که ترجمه واقعا افتضاح است.
\end{farsi}
\end{multicols}
\end{document}

output of code

Related Question