16

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.

1 Answers1

15

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"))
}

to your preamble.

(\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.)

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036