I typeset Arabic text with LuaLaTeX
. I am using the following definitions and it works nicely:
\newcommand{\arabtext}[1] % Arabic inside LTR
{\bgroup\luatextextdir TRT\arabicfont #1\egroup}
(More expanded version here.)
A while ago, though, I've been told through a comment that "[my] definition ... is wrong" and that I might have a look at the bidi
-package. Indeed I looked at it several times but never got it to work on my system. In fact, I can not even compile an example taken from the bidi
-documentation itself:
% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\Parsifont[Script=Arabic]{Arabic Typesetting}
\usepackage{bidi}
\begin{document}
\begin{RTL}
Anyone who reads Old and Middle English \LRE{Short LTR text} literary texts will be familiar with the mid-brown volumes of the EETS, with the symbol of Alfred's jewel embossed on the front cover.
\begin{LTR}
Anyone who reads Old and Middle English \RLE{Short RTL text} literary texts will be familiar with the mid-brown volumes of the EETS, with the symbol of Alfred's jewel embossed on the front cover.
\end{LTR}
\end{RTL}
\end{document}
The only result is LaTeX Error: Environment RTL undefined
.
Why is that so? is bidi
incompatible with LuaLaTeX?
I am asking, because I do believe that bidi could be a better solution than mine offered above (because, e.g., bidi
has many other feature such as RTL footnotes etc.) and would like to try and to use it.
bidi
can be used with LuaLaTeX.bidi
-author himself?) IMHO seemed to justify the believe that it could be used with LuaLaTex.documentations
of packages not by default declare on the first page by which engines and processing methods (TeX, LaTeX2e, LuaLaTeX, XeTeX, etc.) they can be used??\RTL
and\endRTL
are inxetex-bidi.def
. There is aluatex-bidi.def
file that simply enables some LuaTeX primitives, but doesn't define anything else.