# Sample files of LTR text on left and RTL text on right

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

• What would be the RTL language? Do you require page breaking possibility? – Werner Apr 15 '12 at 1:02
• @Werner RTL would be Persian. For now I am looking to produce a single page. The ability to justify the given line so that all lines appears to have a uniform length would be nice. – Maesumi Apr 15 '12 at 1:15
• Using tabularx would work in setting a \raggedright (LTR) and \raggedleft (RTL) column. But honestly, I know nothing about Persian... – Werner Apr 15 '12 at 1:21
• @Werner Thanks, that gives me the starting point. – Maesumi Apr 15 '12 at 1:24
• I do not understand your question, sorry! Can you put some image showing what you like to get? – Simurgh12 Apr 16 '12 at 6:39

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}

\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}


• @Munn Thanks. This gives an interlaced appearance. In my usage each line has both languages in their respective sides. – Maesumi Apr 16 '12 at 16:07
• @Maesumi I've modified the example to use the multicols package. For simple things, this is probably sufficient. For more complicated things like critical editions you should investigate the ledpar or parallel packages. – Alan Munn Apr 16 '12 at 17:39
• @Maesumi: Or paracol. – Speravir Apr 16 '12 at 17:58

You can do this using \parbox:

\documentclass[12pt]{article}
\newcommand\mytext[2]{\parbox[t]{\dimexpr(0.5\linewidth-0.5\columnsep)}{#1}\hskip\columnsep\parbox[t]{\dimexpr(0.5\linewidth-0.5\columnsep)}{\begin{latin}#2\end{latin}}}
\usepackage{xepersian}
\thispagestyle{empty}
\begin{document}
\mytext{%
این یک متن فارسی است که در سمت راست قرار می‌گیرد%
}{This is some English text that is on the left hand side.}\\
\mytext{%
این یک متن فارسی است که در سمت راست قرار می‌گیرد%
}{This is some English text that is on the left hand side.}
\vskip10pt
\mytext{%
این یک متن فارسی است که در سمت راست قرار می‌گیرد%
}{This is some English text that is on the left hand side.}
\vskip50pt
\mytext{%
این یک متن فارسی است که در سمت راست قرار می‌گیرد%
}{This is some English text that is on the left hand side.}
\end{document}