Is there any reasonable, generic way (i.e. not only Arabic, or only Farsi) to write RTL LaTeX documents (or even bidi) and compile them with pdfTeX or LuaTex?
In ConTeXt, we can use \righttoleft{my inline content}, \startalignment[righttoleft] my paragraph content \stopalignment and finally \setupalign[righttoleft] for the base direction of the document.
When using the bidi package (which only works for XeLaTeX as far as I know), they are \RL, setRL and \usepackage[RTLdocument]{bidi} respectively.
So is there a way, and if so what are the three equivalent commands for pdf/LuaLaTex? The reason I'm asking is that we're debating what pandoc should generate for LaTeX output.
pandocneeds to generate code for one of the less linguistically-advanced engines? (It is true that XeTeX is not, as I understand it, being actively developed now. Maybe LuaTeX will catch up. But my understanding is that it is not there yet.) – cfr Aug 23 '15 at 20:34\luatexpardirand\luatextextdir. this is much lower level than what is provided bybidipackage. there is also luabidi, but I don't know what is it's status – michal.h21 Aug 23 '15 at 20:51pdflatexthere is arabi package with babel, which provide\textRL,\selectlanguage{arabic}, and environment to write right to left text. – Salim Bou Aug 24 '15 at 06:12luabidi, albeit very rudimentary, they hasbidi's basic commands. – Arthur Reutenauer Aug 25 '15 at 03:28\textRL; minor note though: the shortcut \textRLis deprecated because when you load both Arabic and Farsi it uses whichever language was loaded last. Instead, the documentation of [arabi](http://ctan.org/pkg/arabi) says you should use\ARfor Arabic and\FR` for Farsi (Persian). (Discovered this here.) – ShreevatsaR May 04 '17 at 22:54