# Right to Left in LaTeX

Is there a way to typeset with both RTL and LTR languages in the same LaTeX document, without use XeTeX? All the solutions I have seen (bidi, polyglossia, etc) require XeTeX.

Basically, I make using \fbox to layout some text. I want the first box to be on the right, then the second box to be to the left of it, etc. I want the boxes to be right aligned (though the text inside the boxes can be left or right aligned), and for the boxes to line wrap correctly (i.e., when it gets to the left of the page, start on the right side of the next line).

• Is there some reason to avoid XeTeX? Oct 26, 2013 at 0:54
• ArabTeX (at least used to be) based on pdfTeX. But why must you avoid XeTeX (and LuaTeX?)? There's also mostly forgotten earlier attempts: NTS, exTeX, TeX-XeT, etc., but I don't think you want to go that route either.
– jon
Oct 26, 2013 at 1:04
• Just about everything except plain tex now uses e-tex or pdftex as the formatting engine. Both of these allow you to say \TeXXeTstate=1 \beginR material to be typeset R-to-L \endR. If you want a whole paragrah right justified, be sure to end the paragraph before \endR. These are primitive commands and I can't say if they will do everything you want.
– Dan
Oct 26, 2013 at 4:21
• Excellent, thanks @Dan! I have few document styles that I use that have a number of packages and settings and I have not been able to get everything to work with either Xetex or LuaLaTeX yet. I was hoping that there was a quick way to do this. I'm sure I'll eventually have to switch, however.
– Paul
Oct 26, 2013 at 4:53
• Both XeTeX and pdfTeX use TeX--XeT: LuaTeX uses a different (and superior) approach. Getting TeX--XeT to work is certainly doable for many cases: an example of what you need will help! Oct 26, 2013 at 7:20