# What happened to \luatextextdir?

As of today, the command \luatextextdir does no longer seem to work. I employ the command in order to be able to typeset Arabic. To that end I created the following commands:

\newcommand{\arabtext}[1]       % Arabic inside LTR
{\bgroup\luatextextdir TRT\arabicfont #1\egroup}
\newcommand{\arabnr}[1]         % for numbers inside Arabic text
{\bgroup\luatextextdir TLT #1\egroup}
\newenvironment{arabpar}            % Arabic paragraph
{\luatextextdir TRT\luatexpardir TRT\arabicfont}{}


As of today, however, I get the otherwise well-known "Undefined control sequence" - error.

I just updated all the packages to the newest version using the TeX Live Utility.

• luatex prefix was removed in recent LaTeX release, try just \textdir – michal.h21 Oct 16 '15 at 7:45

The 'proper' (internal) name of the primitive has always been \textdir, but for various reasons it used to be 'activated' as \luatextextdir in LuaLaTeX. The LaTeX team have recently revised this approach and all primitives now have their 'natural' names in LuaLaTeX. Thus you should either update your code or add

\directlua{
tex.enableprimitives("luatex",tex.extraprimitives("luatex"))
}


(\textdir comes from Omega so is currently in a list called omega. At some stage in the near future it will be moved to a list called luatex, so tex.extraprimitives("omega", "luatex") is slightly more future-proof. However, I'd strongly advise revising your code to drop the prefix entirely.)